summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.github/ISSUE_TEMPLATE/bb_crash_issues.yml2
-rw-r--r--.github/ISSUE_TEMPLATE/ee_cc.yml5
-rw-r--r--.github/README.md5
-rw-r--r--.github/actions/linux-build/action.yml60
-rw-r--r--.github/workflows/core-build-nopch.yml6
-rw-r--r--.github/workflows/core-build-pch.yml6
-rw-r--r--.github/workflows/core_modules_build.yml6
-rw-r--r--.github/workflows/dashboard-ci.yml142
-rw-r--r--.github/workflows/docker_build.yml12
-rw-r--r--.github/workflows/macos_build.yml16
-rw-r--r--.github/workflows/tools_build.yml2
-rw-r--r--.github/workflows/windows_build.yml2
-rw-r--r--.vscode/settings.json4
-rw-r--r--AUTHORS5
-rw-r--r--LICENSE912
-rw-r--r--acore.json2
-rw-r--r--apps/EnumUtils/enumutils_describe.py10
-rw-r--r--apps/bash_shared/common.sh20
-rw-r--r--apps/bash_shared/defines.sh2
-rw-r--r--apps/bash_shared/includes.sh2
-rwxr-xr-xapps/ci/ci-install-modules.sh2
-rw-r--r--apps/compiler/includes/functions.sh36
-rw-r--r--apps/installer/includes/config/config-main.sh9
-rw-r--r--apps/installer/includes/config/config.sh60
-rw-r--r--apps/installer/includes/functions.sh4
-rw-r--r--apps/installer/includes/includes.sh9
-rw-r--r--apps/installer/includes/modules-manager/README.md6
-rw-r--r--apps/installer/includes/modules-manager/modules.sh151
-rw-r--r--apps/installer/includes/os_configs/debian.sh4
-rw-r--r--apps/installer/includes/os_configs/ubuntu.sh6
-rw-r--r--apps/installer/includes/os_configs/windows.sh5
-rw-r--r--apps/installer/main.sh4
-rwxr-xr-xapps/installer/test/test_module_commands.bats2
-rw-r--r--apps/startup-scripts/README.md34
-rwxr-xr-xapps/startup-scripts/src/run-engine7
-rwxr-xr-xapps/startup-scripts/src/service-manager.sh825
-rwxr-xr-xapps/startup-scripts/src/simple-restarter2
-rwxr-xr-x[-rw-r--r--]apps/startup-scripts/test/test_startup_scripts.bats183
-rw-r--r--conf/dist/config.cmake2
-rw-r--r--conf/dist/config.sh39
-rw-r--r--data/sql/updates/db_world/2025_09_28_01.sql (renamed from data/sql/updates/pending_db_world/rev_1758965186881591714.sql)1
-rw-r--r--data/sql/updates/db_world/2025_09_29_00.sql19
-rw-r--r--data/sql/updates/db_world/2025_09_30_00.sql6
-rw-r--r--data/sql/updates/db_world/2025_09_30_01.sql4
-rw-r--r--data/sql/updates/db_world/2025_09_30_02.sql3
-rw-r--r--data/sql/updates/db_world/2025_10_01_00.sql6
-rw-r--r--data/sql/updates/db_world/2025_10_01_01.sql2
-rw-r--r--data/sql/updates/db_world/2025_10_01_02.sql3
-rw-r--r--data/sql/updates/db_world/2025_10_02_00.sql6
-rw-r--r--data/sql/updates/db_world/2025_10_02_01.sql11
-rw-r--r--data/sql/updates/db_world/2025_10_04_00.sql13
-rw-r--r--data/sql/updates/db_world/2025_10_04_01.sql6
-rw-r--r--data/sql/updates/db_world/2025_10_04_02.sql45
-rw-r--r--data/sql/updates/db_world/2025_10_04_03.sql28
-rw-r--r--data/sql/updates/db_world/2025_10_04_04.sql7
-rw-r--r--data/sql/updates/db_world/2025_10_04_05.sql12
-rw-r--r--data/sql/updates/db_world/2025_10_04_06.sql13
-rw-r--r--data/sql/updates/db_world/2025_10_06_00.sql9
-rw-r--r--data/sql/updates/db_world/2025_10_07_00.sql4
-rw-r--r--data/sql/updates/db_world/2025_10_07_01.sql17
-rw-r--r--data/sql/updates/db_world/2025_10_09_00.sql39
-rw-r--r--data/sql/updates/db_world/2025_10_09_01.sql16
-rw-r--r--data/sql/updates/db_world/2025_10_09_02.sql6
-rw-r--r--data/sql/updates/db_world/2025_10_09_03.sql34
-rw-r--r--data/sql/updates/db_world/2025_10_09_04.sql5
-rw-r--r--data/sql/updates/db_world/2025_10_10_00.sql4
-rw-r--r--data/sql/updates/db_world/2025_10_10_01.sql5
-rw-r--r--data/sql/updates/db_world/2025_10_11_00.sql3
-rw-r--r--data/sql/updates/db_world/2025_10_11_01.sql113
-rw-r--r--data/sql/updates/db_world/2025_10_11_02.sql7
-rw-r--r--data/sql/updates/db_world/2025_10_11_03.sql13
-rw-r--r--data/sql/updates/db_world/2025_10_11_04.sql27
-rw-r--r--data/sql/updates/db_world/2025_10_11_05.sql3
-rw-r--r--data/sql/updates/db_world/2025_10_11_06.sql6
-rw-r--r--data/sql/updates/db_world/2025_10_12_00.sql11
-rw-r--r--data/sql/updates/db_world/2025_10_12_01.sql10
-rw-r--r--data/sql/updates/db_world/2025_10_12_02.sql23
-rw-r--r--data/sql/updates/db_world/2025_10_12_03.sql128
-rw-r--r--data/sql/updates/db_world/2025_10_12_04.sql40
-rw-r--r--data/sql/updates/db_world/2025_10_12_05.sql23
-rw-r--r--data/sql/updates/db_world/2025_10_12_06.sql7
-rw-r--r--data/sql/updates/db_world/2025_10_14_00.sql20
-rw-r--r--data/sql/updates/db_world/2025_10_16_00.sql12
-rw-r--r--data/sql/updates/db_world/2025_10_16_01.sql6
-rw-r--r--data/sql/updates/db_world/2025_10_16_02.sql5
-rw-r--r--data/sql/updates/db_world/2025_10_16_03.sql5
-rw-r--r--data/sql/updates/db_world/2025_10_16_04.sql33
-rw-r--r--data/sql/updates/db_world/2025_10_16_05.sql7
-rw-r--r--data/sql/updates/db_world/2025_10_17_00.sql3
-rw-r--r--data/sql/updates/db_world/2025_10_18_00.sql7
-rw-r--r--data/sql/updates/db_world/2025_10_18_01.sql6
-rw-r--r--data/sql/updates/db_world/2025_10_18_02.sql94
-rw-r--r--data/sql/updates/db_world/2025_10_19_00.sql3
-rw-r--r--data/sql/updates/db_world/2025_10_21_00.sql4
-rw-r--r--data/sql/updates/db_world/2025_10_24_00.sql7
-rw-r--r--data/sql/updates/db_world/2025_10_24_01.sql3
-rw-r--r--data/sql/updates/db_world/2025_10_24_02.sql34
-rw-r--r--data/sql/updates/db_world/2025_10_24_03.sql30
-rw-r--r--data/sql/updates/db_world/2025_10_24_04.sql14
-rw-r--r--data/sql/updates/db_world/2025_10_24_05.sql3
-rw-r--r--data/sql/updates/db_world/2025_10_25_00.sql87
-rw-r--r--data/sql/updates/db_world/2025_10_25_01.sql8
-rw-r--r--data/sql/updates/db_world/2025_10_26_00.sql6
-rw-r--r--data/sql/updates/db_world/2025_10_26_01.sql16
-rw-r--r--data/sql/updates/db_world/2025_10_26_02.sql15
-rw-r--r--data/sql/updates/db_world/2025_10_26_03.sql6
-rw-r--r--data/sql/updates/db_world/2025_10_28_00.sql5
-rw-r--r--data/sql/updates/db_world/2025_10_28_01.sql9
-rw-r--r--data/sql/updates/db_world/2025_10_28_02.sql5
-rw-r--r--data/sql/updates/db_world/2025_10_28_03.sql5
-rw-r--r--data/sql/updates/db_world/2025_10_28_04.sql578
-rw-r--r--data/sql/updates/db_world/2025_10_28_05.sql13
-rw-r--r--data/sql/updates/db_world/2025_10_29_00.sql8
-rw-r--r--data/sql/updates/db_world/2025_10_29_01.sql12
-rw-r--r--data/sql/updates/db_world/2025_10_29_02.sql14
-rw-r--r--data/sql/updates/db_world/2025_10_30_00.sql4
-rw-r--r--data/sql/updates/db_world/2025_10_30_01.sql152
-rw-r--r--data/sql/updates/db_world/2025_10_31_00.sql8
-rw-r--r--data/sql/updates/db_world/2025_10_31_01.sql4
-rw-r--r--data/sql/updates/db_world/2025_10_31_02.sql208
-rw-r--r--data/sql/updates/db_world/2025_11_01_00.sql3
-rw-r--r--data/sql/updates/db_world/2025_11_01_01.sql3
-rw-r--r--data/sql/updates/db_world/2025_11_01_02.sql15
-rw-r--r--data/sql/updates/db_world/2025_11_01_03.sql7
-rw-r--r--data/sql/updates/db_world/2025_11_03_00.sql54
-rw-r--r--data/sql/updates/db_world/2025_11_03_01.sql7
-rw-r--r--data/sql/updates/db_world/2025_11_04_00.sql106
-rw-r--r--data/sql/updates/db_world/2025_11_04_01.sql3
-rw-r--r--data/sql/updates/db_world/2025_11_05_00.sql183
-rw-r--r--data/sql/updates/db_world/2025_11_06_00.sql33
-rw-r--r--data/sql/updates/db_world/2025_11_06_01.sql2
-rw-r--r--data/sql/updates/db_world/2025_11_07_00.sql3
-rw-r--r--data/sql/updates/db_world/2025_11_07_01.sql43
-rw-r--r--data/sql/updates/db_world/2025_11_07_02.sql108
-rw-r--r--data/sql/updates/db_world/2025_11_08_00.sql2481
-rw-r--r--data/sql/updates/db_world/2025_11_08_01.sql5
-rw-r--r--data/sql/updates/db_world/2025_11_08_02.sql172
-rw-r--r--data/sql/updates/db_world/2025_11_09_00.sql3
-rw-r--r--data/sql/updates/db_world/2025_11_09_01.sql3
-rw-r--r--data/sql/updates/db_world/2025_11_09_02.sql3
-rw-r--r--data/sql/updates/db_world/2025_11_09_03.sql67
-rw-r--r--data/sql/updates/db_world/2025_11_09_04.sql6
-rw-r--r--data/sql/updates/db_world/2025_11_09_05.sql79
-rw-r--r--data/sql/updates/db_world/2025_11_10_00.sql5
-rw-r--r--data/sql/updates/db_world/2025_11_10_01.sql4
-rw-r--r--data/sql/updates/db_world/2025_11_10_02.sql4
-rw-r--r--data/sql/updates/db_world/2025_11_10_03.sql15
-rw-r--r--data/sql/updates/db_world/2025_11_11_00.sql4
-rw-r--r--data/sql/updates/db_world/2025_11_11_01.sql10
-rw-r--r--data/sql/updates/db_world/2025_11_11_02.sql45
-rw-r--r--data/sql/updates/db_world/2025_11_11_03.sql21
-rw-r--r--data/sql/updates/db_world/2025_11_12_00.sql4
-rw-r--r--data/sql/updates/db_world/2025_11_12_01.sql10
-rw-r--r--data/sql/updates/db_world/2025_11_12_02.sql64
-rw-r--r--data/sql/updates/db_world/2025_11_12_03.sql3
-rw-r--r--data/sql/updates/db_world/2025_11_12_04.sql36
-rw-r--r--data/sql/updates/db_world/2025_11_12_05.sql5
-rw-r--r--data/sql/updates/db_world/2025_11_12_06.sql11
-rw-r--r--data/sql/updates/db_world/2025_11_13_00.sql8
-rw-r--r--data/sql/updates/db_world/2025_11_13_01.sql5
-rw-r--r--data/sql/updates/db_world/2025_11_13_02.sql5
-rw-r--r--data/sql/updates/db_world/2025_11_13_03.sql5
-rw-r--r--data/sql/updates/db_world/2025_11_13_04.sql53
-rw-r--r--data/sql/updates/db_world/2025_11_13_05.sql4
-rw-r--r--data/sql/updates/db_world/2025_11_14_00.sql9
-rw-r--r--data/sql/updates/db_world/2025_11_14_01.sql6
-rw-r--r--data/sql/updates/db_world/2025_11_14_02.sql5
-rw-r--r--data/sql/updates/db_world/2025_11_14_03.sql5
-rw-r--r--data/sql/updates/db_world/2025_11_15_00.sql5
-rw-r--r--data/sql/updates/db_world/2025_11_15_01.sql3
-rw-r--r--data/sql/updates/db_world/2025_11_15_02.sql6
-rw-r--r--data/sql/updates/db_world/2025_11_15_03.sql3
-rw-r--r--data/sql/updates/db_world/2025_11_15_04.sql3
-rw-r--r--data/sql/updates/db_world/2025_11_15_05.sql6
-rw-r--r--data/sql/updates/db_world/2025_11_15_06.sql9
-rw-r--r--data/sql/updates/db_world/2025_11_15_07.sql5
-rw-r--r--data/sql/updates/db_world/2025_11_15_08.sql69
-rw-r--r--data/sql/updates/db_world/2025_11_15_09.sql3
-rw-r--r--data/sql/updates/db_world/2025_11_15_10.sql9
-rw-r--r--data/sql/updates/db_world/2025_11_15_11.sql14
-rw-r--r--data/sql/updates/db_world/2025_11_15_12.sql3
-rw-r--r--data/sql/updates/db_world/2025_11_15_13.sql5
-rw-r--r--data/sql/updates/db_world/2025_11_15_14.sql3
-rw-r--r--data/sql/updates/db_world/2025_11_15_15.sql31
-rw-r--r--data/sql/updates/db_world/2025_11_16_00.sql10
-rw-r--r--data/sql/updates/db_world/2025_11_16_01.sql3
-rw-r--r--data/sql/updates/db_world/2025_11_16_02.sql3
-rw-r--r--data/sql/updates/db_world/2025_11_17_00.sql19
-rw-r--r--data/sql/updates/db_world/2025_11_17_01.sql5
-rw-r--r--data/sql/updates/db_world/2025_11_17_02.sql22
-rw-r--r--data/sql/updates/db_world/2025_11_17_03.sql8
-rw-r--r--data/sql/updates/db_world/2025_11_17_04.sql10
-rw-r--r--data/sql/updates/db_world/2025_11_18_00.sql45
-rw-r--r--data/sql/updates/db_world/2025_11_18_01.sql3
-rw-r--r--data/sql/updates/db_world/2025_11_18_02.sql5
-rw-r--r--data/sql/updates/db_world/2025_11_20_00.sql14
-rw-r--r--data/sql/updates/db_world/2025_11_20_01.sql4
-rw-r--r--data/sql/updates/db_world/2025_11_20_02.sql5
-rw-r--r--data/sql/updates/db_world/2025_11_20_03.sql10
-rw-r--r--data/sql/updates/db_world/2025_11_20_04.sql11
-rw-r--r--data/sql/updates/db_world/2025_11_21_00.sql15
-rw-r--r--data/sql/updates/db_world/2025_11_21_01.sql3
-rw-r--r--data/sql/updates/db_world/2025_11_21_02.sql10
-rw-r--r--data/sql/updates/db_world/2025_11_21_03.sql75
-rw-r--r--data/sql/updates/db_world/2025_11_21_04.sql23
-rw-r--r--data/sql/updates/db_world/2025_11_21_05.sql10
-rw-r--r--data/sql/updates/db_world/2025_11_21_06.sql11
-rw-r--r--data/sql/updates/db_world/2025_11_21_07.sql4
-rw-r--r--data/sql/updates/db_world/2025_11_23_00.sql3
-rw-r--r--data/sql/updates/db_world/2025_11_24_00.sql6
-rw-r--r--data/sql/updates/db_world/2025_11_24_01.sql3
-rw-r--r--data/sql/updates/db_world/2025_11_24_02.sql5
-rw-r--r--data/sql/updates/db_world/2025_11_24_03.sql3
-rw-r--r--data/sql/updates/db_world/2025_11_25_00.sql3
-rw-r--r--data/sql/updates/db_world/2025_11_25_01.sql3
-rw-r--r--data/sql/updates/db_world/2025_11_25_02.sql3
-rw-r--r--data/sql/updates/db_world/2025_11_26_00.sql7
-rw-r--r--data/sql/updates/db_world/2025_11_26_01.sql17
-rw-r--r--data/sql/updates/db_world/2025_11_26_02.sql9
-rw-r--r--data/sql/updates/db_world/2025_11_26_03.sql113
-rw-r--r--data/sql/updates/db_world/2025_11_26_04.sql3
-rw-r--r--data/sql/updates/db_world/2025_11_26_05.sql6
-rw-r--r--data/sql/updates/db_world/2025_11_26_06.sql12
-rw-r--r--data/sql/updates/db_world/2025_11_27_00.sql41
-rw-r--r--data/sql/updates/db_world/2025_11_27_01.sql745
-rw-r--r--data/sql/updates/db_world/2025_11_27_02.sql12
-rw-r--r--data/sql/updates/db_world/2025_11_27_03.sql3
-rw-r--r--data/sql/updates/db_world/2025_11_27_04.sql2
-rw-r--r--data/sql/updates/db_world/2025_11_27_05.sql16
-rw-r--r--data/sql/updates/db_world/2025_11_27_06.sql167
-rw-r--r--data/sql/updates/db_world/2025_11_27_07.sql3
-rw-r--r--data/sql/updates/db_world/2025_11_27_08.sql11
-rw-r--r--data/sql/updates/db_world/2025_11_27_09.sql36
-rw-r--r--data/sql/updates/db_world/2025_11_27_10.sql8
-rw-r--r--data/sql/updates/db_world/2025_11_28_00.sql3
-rw-r--r--data/sql/updates/db_world/2025_11_28_01.sql7
-rw-r--r--data/sql/updates/db_world/2025_11_28_02.sql9
-rw-r--r--data/sql/updates/db_world/2025_11_28_03.sql8
-rw-r--r--data/sql/updates/db_world/2025_11_28_04.sql15
-rw-r--r--data/sql/updates/db_world/2025_11_28_05.sql214
-rw-r--r--data/sql/updates/db_world/2025_11_28_06.sql47
-rw-r--r--data/sql/updates/db_world/2025_11_28_07.sql128
-rw-r--r--data/sql/updates/db_world/2025_11_28_08.sql25
-rw-r--r--data/sql/updates/db_world/2025_11_29_00.sql5
-rw-r--r--data/sql/updates/db_world/2025_11_29_01.sql8
-rw-r--r--data/sql/updates/db_world/2025_11_29_02.sql5
-rw-r--r--data/sql/updates/db_world/2025_11_29_03.sql3
-rw-r--r--data/sql/updates/db_world/2025_11_30_00.sql8
-rw-r--r--data/sql/updates/db_world/2025_11_30_01.sql3
-rw-r--r--data/sql/updates/db_world/2025_11_30_02.sql6
-rw-r--r--data/sql/updates/db_world/2025_11_30_03.sql8
-rw-r--r--data/sql/updates/db_world/2025_11_30_04.sql4
-rw-r--r--data/sql/updates/db_world/2025_11_30_05.sql4
-rw-r--r--data/sql/updates/db_world/2025_11_30_06.sql8
-rw-r--r--data/sql/updates/db_world/2025_11_30_07.sql90
-rw-r--r--data/sql/updates/db_world/2025_11_30_08.sql18
-rw-r--r--data/sql/updates/db_world/2025_12_01_00.sql3
-rw-r--r--data/sql/updates/db_world/2025_12_01_01.sql124
-rw-r--r--data/sql/updates/db_world/2025_12_01_02.sql4
-rw-r--r--data/sql/updates/db_world/2025_12_01_03.sql5
-rw-r--r--data/sql/updates/db_world/2025_12_01_04.sql43
-rw-r--r--data/sql/updates/db_world/2025_12_01_05.sql9
-rw-r--r--data/sql/updates/db_world/2025_12_02_00.sql4
-rw-r--r--data/sql/updates/db_world/2025_12_02_01.sql38
-rw-r--r--data/sql/updates/db_world/2025_12_02_02.sql66
-rw-r--r--data/sql/updates/db_world/2025_12_02_03.sql3
-rw-r--r--data/sql/updates/db_world/2025_12_02_04.sql23
-rw-r--r--data/sql/updates/db_world/2025_12_04_00.sql4
-rw-r--r--data/sql/updates/db_world/2025_12_05_00.sql9
-rw-r--r--data/sql/updates/db_world/2025_12_05_01.sql146
-rw-r--r--data/sql/updates/db_world/2025_12_08_00.sql3
-rw-r--r--data/sql/updates/db_world/2025_12_08_01.sql19
-rw-r--r--data/sql/updates/db_world/2025_12_09_00.sql23
-rw-r--r--data/sql/updates/db_world/2025_12_10_00.sql3
-rw-r--r--data/sql/updates/db_world/2025_12_10_01.sql3
-rw-r--r--deps/CMakeLists.txt1
-rw-r--r--deps/PackageList.txt4
-rw-r--r--deps/acore/bash-lib/src/common/boolean.sh5
-rwxr-xr-xdeps/acore/joiner/joiner.sh17
-rw-r--r--deps/fkYAML/CMakeLists.txt17
-rw-r--r--deps/fkYAML/fkYAML/node.hpp14730
-rw-r--r--deps/recastnavigation/Detour/CMakeLists.txt2
-rw-r--r--deps/recastnavigation/Recast/CMakeLists.txt2
-rw-r--r--doc/ConfigPolicy.md101
-rw-r--r--doc/changelog/master.md2
-rw-r--r--modules/CMakeLists.txt38
-rw-r--r--modules/ModulesLoader.cpp.in.cmake10
-rw-r--r--modules/ModulesPCH.h10
-rw-r--r--modules/ModulesScriptLoader.h10
-rw-r--r--modules/create_module.sh2
-rw-r--r--pull_request_template.md3
-rw-r--r--src/cmake/macros/FindMySQL.cmake3
-rw-r--r--src/common/Asio/AsioHacksFwd.h10
-rw-r--r--src/common/Asio/IoContext.h10
-rw-r--r--src/common/Asio/IpAddress.h10
-rw-r--r--src/common/Asio/IpNetwork.h10
-rw-r--r--src/common/Asio/Resolver.h10
-rw-r--r--src/common/Asio/SteadyTimer.h10
-rw-r--r--src/common/Asio/Strand.h10
-rw-r--r--src/common/Banner.cpp10
-rw-r--r--src/common/Banner.h10
-rw-r--r--src/common/Collision/BoundingIntervalHierarchy.cpp10
-rw-r--r--src/common/Collision/BoundingIntervalHierarchy.h12
-rw-r--r--src/common/Collision/BoundingIntervalHierarchyWrapper.h10
-rw-r--r--src/common/Collision/DynamicTree.cpp59
-rw-r--r--src/common/Collision/DynamicTree.h14
-rw-r--r--src/common/Collision/Management/IMMAPMgr.h10
-rw-r--r--src/common/Collision/Management/IVMapMgr.h35
-rw-r--r--src/common/Collision/Management/MMapFactory.cpp10
-rw-r--r--src/common/Collision/Management/MMapFactory.h10
-rw-r--r--src/common/Collision/Management/MMapMgr.cpp13
-rw-r--r--src/common/Collision/Management/MMapMgr.h13
-rw-r--r--src/common/Collision/Management/VMapFactory.cpp10
-rw-r--r--src/common/Collision/Management/VMapFactory.h10
-rw-r--r--src/common/Collision/Management/VMapMgr2.cpp82
-rw-r--r--src/common/Collision/Management/VMapMgr2.h14
-rw-r--r--src/common/Collision/Maps/MapDefines.h52
-rw-r--r--src/common/Collision/Maps/MapTree.cpp42
-rw-r--r--src/common/Collision/Maps/MapTree.h17
-rw-r--r--src/common/Collision/Maps/TileAssembler.cpp10
-rw-r--r--src/common/Collision/Maps/TileAssembler.h10
-rw-r--r--src/common/Collision/Models/GameObjectModel.cpp35
-rw-r--r--src/common/Collision/Models/GameObjectModel.h11
-rw-r--r--src/common/Collision/Models/ModelIgnoreFlags.h10
-rw-r--r--src/common/Collision/Models/ModelInstance.cpp54
-rw-r--r--src/common/Collision/Models/ModelInstance.h11
-rw-r--r--src/common/Collision/Models/WorldModel.cpp135
-rw-r--r--src/common/Collision/Models/WorldModel.h20
-rw-r--r--src/common/Collision/VMapDefinitions.h14
-rw-r--r--src/common/Collision/VMapTools.h10
-rw-r--r--src/common/Common.cpp10
-rw-r--r--src/common/Common.h10
-rw-r--r--src/common/CompilerDefs.h10
-rw-r--r--src/common/Configuration/BuiltInConfig.cpp10
-rw-r--r--src/common/Configuration/BuiltInConfig.h10
-rw-r--r--src/common/Configuration/Config.cpp311
-rw-r--r--src/common/Configuration/Config.h31
-rw-r--r--src/common/Configuration/ConfigValueCache.h10
-rw-r--r--src/common/Cryptography/AES.cpp10
-rw-r--r--src/common/Cryptography/AES.h10
-rw-r--r--src/common/Cryptography/ARC4.cpp10
-rw-r--r--src/common/Cryptography/ARC4.h10
-rw-r--r--src/common/Cryptography/Argon2.cpp10
-rw-r--r--src/common/Cryptography/Argon2.h10
-rw-r--r--src/common/Cryptography/Authentication/AuthCrypt.cpp10
-rw-r--r--src/common/Cryptography/Authentication/AuthCrypt.h10
-rw-r--r--src/common/Cryptography/Authentication/AuthDefines.h10
-rw-r--r--src/common/Cryptography/Authentication/SRP6.cpp10
-rw-r--r--src/common/Cryptography/Authentication/SRP6.h10
-rw-r--r--src/common/Cryptography/BigNumber.cpp10
-rw-r--r--src/common/Cryptography/BigNumber.h10
-rw-r--r--src/common/Cryptography/CryptoConstants.h10
-rw-r--r--src/common/Cryptography/CryptoGenerics.h10
-rw-r--r--src/common/Cryptography/CryptoHash.h10
-rw-r--r--src/common/Cryptography/CryptoRandom.cpp10
-rw-r--r--src/common/Cryptography/CryptoRandom.h10
-rw-r--r--src/common/Cryptography/HMAC.h10
-rw-r--r--src/common/Cryptography/OpenSSLCrypto.cpp10
-rw-r--r--src/common/Cryptography/OpenSSLCrypto.h10
-rw-r--r--src/common/Cryptography/SessionKeyGenerator.h10
-rw-r--r--src/common/Cryptography/TOTP.cpp10
-rw-r--r--src/common/Cryptography/TOTP.h10
-rw-r--r--src/common/DataStores/DBCFileLoader.cpp10
-rw-r--r--src/common/DataStores/DBCFileLoader.h10
-rw-r--r--src/common/Debugging/Errors.cpp10
-rw-r--r--src/common/Debugging/Errors.h10
-rw-r--r--src/common/Define.h10
-rw-r--r--src/common/Dynamic/FactoryHolder.h10
-rw-r--r--src/common/Dynamic/LinkedList.h10
-rw-r--r--src/common/Dynamic/LinkedReference/RefMgr.h10
-rw-r--r--src/common/Dynamic/LinkedReference/Reference.h10
-rw-r--r--src/common/Dynamic/ObjectRegistry.h10
-rw-r--r--src/common/Dynamic/TypeContainer.h10
-rw-r--r--src/common/Dynamic/TypeContainerFunctions.h10
-rw-r--r--src/common/Dynamic/TypeContainerFunctionsPtr.h10
-rw-r--r--src/common/Dynamic/TypeContainerVisitor.h10
-rw-r--r--src/common/Dynamic/TypeList.h10
-rw-r--r--src/common/Encoding/Base32.cpp10
-rw-r--r--src/common/Encoding/Base32.h10
-rw-r--r--src/common/Encoding/Base64.cpp10
-rw-r--r--src/common/Encoding/Base64.h10
-rw-r--r--src/common/Encoding/BaseEncoding.h10
-rw-r--r--src/common/GitRevision.cpp10
-rw-r--r--src/common/GitRevision.h10
-rw-r--r--src/common/IPLocation/IPLocation.cpp10
-rw-r--r--src/common/IPLocation/IPLocation.h10
-rw-r--r--src/common/Logging/Appender.cpp10
-rw-r--r--src/common/Logging/Appender.h10
-rw-r--r--src/common/Logging/AppenderConsole.cpp10
-rw-r--r--src/common/Logging/AppenderConsole.h10
-rw-r--r--src/common/Logging/AppenderFile.cpp10
-rw-r--r--src/common/Logging/AppenderFile.h10
-rw-r--r--src/common/Logging/Log.cpp15
-rw-r--r--src/common/Logging/Log.h10
-rw-r--r--src/common/Logging/LogCommon.h10
-rw-r--r--src/common/Logging/LogMessage.cpp10
-rw-r--r--src/common/Logging/LogMessage.h10
-rw-r--r--src/common/Logging/LogOperation.cpp10
-rw-r--r--src/common/Logging/LogOperation.h10
-rw-r--r--src/common/Logging/Logger.cpp10
-rw-r--r--src/common/Logging/Logger.h10
-rw-r--r--src/common/Logging/enuminfo_AppenderConsole.cpp10
-rw-r--r--src/common/Logging/enuminfo_LogCommon.cpp10
-rw-r--r--src/common/Metric/Metric.cpp10
-rw-r--r--src/common/Metric/Metric.h10
-rw-r--r--src/common/Platform/ServiceWin32.cpp10
-rw-r--r--src/common/Platform/ServiceWin32.h10
-rw-r--r--src/common/Threading/LockedQueue.h10
-rw-r--r--src/common/Threading/MPSCQueue.h10
-rw-r--r--src/common/Threading/PCQueue.h10
-rw-r--r--src/common/Threading/PolicyLock.h10
-rw-r--r--src/common/Threading/ProcessPriority.cpp10
-rw-r--r--src/common/Threading/ProcessPriority.h10
-rw-r--r--src/common/Threading/Threading.cpp10
-rw-r--r--src/common/Threading/Threading.h10
-rw-r--r--src/common/Threading/ThreadingModel.h10
-rw-r--r--src/common/Utilities/AsyncCallbackProcessor.h10
-rw-r--r--src/common/Utilities/ByteConverter.h10
-rw-r--r--src/common/Utilities/CircularBuffer.h2
-rw-r--r--src/common/Utilities/Containers.h10
-rw-r--r--src/common/Utilities/DataMap.h2
-rw-r--r--src/common/Utilities/Duration.h10
-rw-r--r--src/common/Utilities/EnumFlag.h10
-rw-r--r--src/common/Utilities/EventEmitter.h10
-rw-r--r--src/common/Utilities/EventMap.cpp187
-rw-r--r--src/common/Utilities/EventMap.h189
-rw-r--r--src/common/Utilities/EventProcessor.cpp18
-rw-r--r--src/common/Utilities/EventProcessor.h32
-rw-r--r--src/common/Utilities/Geometry.h10
-rw-r--r--src/common/Utilities/IteratorPair.h10
-rw-r--r--src/common/Utilities/MathUtil.h10
-rw-r--r--src/common/Utilities/MessageBuffer.h10
-rw-r--r--src/common/Utilities/Optional.h10
-rw-r--r--src/common/Utilities/Physics.h10
-rw-r--r--src/common/Utilities/Random.cpp10
-rw-r--r--src/common/Utilities/Random.h10
-rw-r--r--src/common/Utilities/SFMTRand.cpp10
-rw-r--r--src/common/Utilities/SFMTRand.h10
-rw-r--r--src/common/Utilities/SignalHandler.h10
-rw-r--r--src/common/Utilities/SmartEnum.h10
-rw-r--r--src/common/Utilities/StartProcess.cpp10
-rw-r--r--src/common/Utilities/StartProcess.h10
-rw-r--r--src/common/Utilities/StringConvert.h10
-rw-r--r--src/common/Utilities/StringFormat.cpp10
-rw-r--r--src/common/Utilities/StringFormat.h10
-rw-r--r--src/common/Utilities/Systemd.cpp59
-rw-r--r--src/common/Utilities/Systemd.h31
-rw-r--r--src/common/Utilities/TaskScheduler.cpp10
-rw-r--r--src/common/Utilities/TaskScheduler.h10
-rw-r--r--src/common/Utilities/Timer.cpp10
-rw-r--r--src/common/Utilities/Timer.h10
-rw-r--r--src/common/Utilities/Tokenize.cpp10
-rw-r--r--src/common/Utilities/Tokenize.h10
-rw-r--r--src/common/Utilities/Tuples.h10
-rw-r--r--src/common/Utilities/Types.h10
-rw-r--r--src/common/Utilities/Util.cpp10
-rw-r--r--src/common/Utilities/Util.h19
-rw-r--r--src/common/Utilities/advstd.h10
-rw-r--r--src/server/apps/authserver/Authentication/AuthCodes.cpp10
-rw-r--r--src/server/apps/authserver/Authentication/AuthCodes.h10
-rw-r--r--src/server/apps/authserver/Main.cpp13
-rw-r--r--src/server/apps/authserver/PrecompiledHeaders/authserverPCH.h10
-rw-r--r--src/server/apps/authserver/Server/AuthSession.cpp10
-rw-r--r--src/server/apps/authserver/Server/AuthSession.h10
-rw-r--r--src/server/apps/authserver/Server/AuthSocketMgr.h10
-rw-r--r--src/server/apps/authserver/authserver.rc10
-rw-r--r--src/server/apps/worldserver/ACSoap/ACSoap.cpp10
-rw-r--r--src/server/apps/worldserver/ACSoap/ACSoap.h10
-rw-r--r--src/server/apps/worldserver/CommandLine/CliRunnable.cpp10
-rw-r--r--src/server/apps/worldserver/CommandLine/CliRunnable.h10
-rw-r--r--src/server/apps/worldserver/Main.cpp21
-rw-r--r--src/server/apps/worldserver/PrecompiledHeaders/worldserverPCH.h10
-rw-r--r--src/server/apps/worldserver/RemoteAccess/RASession.cpp10
-rw-r--r--src/server/apps/worldserver/RemoteAccess/RASession.h10
-rw-r--r--src/server/apps/worldserver/worldserver.conf.dist43
-rw-r--r--src/server/apps/worldserver/worldserver.rc10
-rw-r--r--src/server/database/Database/AdhocStatement.cpp10
-rw-r--r--src/server/database/Database/AdhocStatement.h10
-rw-r--r--src/server/database/Database/DatabaseEnv.cpp10
-rw-r--r--src/server/database/Database/DatabaseEnv.h10
-rw-r--r--src/server/database/Database/DatabaseEnvFwd.h10
-rw-r--r--src/server/database/Database/DatabaseLoader.cpp31
-rw-r--r--src/server/database/Database/DatabaseLoader.h10
-rw-r--r--src/server/database/Database/DatabaseWorker.cpp10
-rw-r--r--src/server/database/Database/DatabaseWorker.h10
-rw-r--r--src/server/database/Database/DatabaseWorkerPool.cpp10
-rw-r--r--src/server/database/Database/DatabaseWorkerPool.h10
-rw-r--r--src/server/database/Database/Field.cpp10
-rw-r--r--src/server/database/Database/Field.h10
-rw-r--r--src/server/database/Database/Implementation/CharacterDatabase.cpp10
-rw-r--r--src/server/database/Database/Implementation/CharacterDatabase.h10
-rw-r--r--src/server/database/Database/Implementation/LoginDatabase.cpp10
-rw-r--r--src/server/database/Database/Implementation/LoginDatabase.h10
-rw-r--r--src/server/database/Database/Implementation/WorldDatabase.cpp10
-rw-r--r--src/server/database/Database/Implementation/WorldDatabase.h10
-rw-r--r--src/server/database/Database/MySQLConnection.cpp10
-rw-r--r--src/server/database/Database/MySQLConnection.h10
-rw-r--r--src/server/database/Database/MySQLHacks.h10
-rw-r--r--src/server/database/Database/MySQLPreparedStatement.cpp10
-rw-r--r--src/server/database/Database/MySQLPreparedStatement.h10
-rw-r--r--src/server/database/Database/MySQLThreading.cpp10
-rw-r--r--src/server/database/Database/MySQLThreading.h10
-rw-r--r--src/server/database/Database/MySQLWorkaround.h10
-rw-r--r--src/server/database/Database/PreparedStatement.cpp10
-rw-r--r--src/server/database/Database/PreparedStatement.h10
-rw-r--r--src/server/database/Database/QueryCallback.cpp10
-rw-r--r--src/server/database/Database/QueryCallback.h10
-rw-r--r--src/server/database/Database/QueryHolder.cpp10
-rw-r--r--src/server/database/Database/QueryHolder.h10
-rw-r--r--src/server/database/Database/QueryResult.cpp10
-rw-r--r--src/server/database/Database/QueryResult.h10
-rw-r--r--src/server/database/Database/SQLOperation.h10
-rw-r--r--src/server/database/Database/Transaction.cpp10
-rw-r--r--src/server/database/Database/Transaction.h10
-rw-r--r--src/server/database/Logging/AppenderDB.cpp10
-rw-r--r--src/server/database/Logging/AppenderDB.h10
-rw-r--r--src/server/database/PrecompiledHeaders/databasePCH.h10
-rw-r--r--src/server/database/Updater/DBUpdater.cpp21
-rw-r--r--src/server/database/Updater/DBUpdater.h10
-rw-r--r--src/server/database/Updater/UpdateFetcher.cpp10
-rw-r--r--src/server/database/Updater/UpdateFetcher.h10
-rw-r--r--src/server/game/AI/CoreAI/CombatAI.cpp18
-rw-r--r--src/server/game/AI/CoreAI/CombatAI.h10
-rw-r--r--src/server/game/AI/CoreAI/GameObjectAI.cpp10
-rw-r--r--src/server/game/AI/CoreAI/GameObjectAI.h12
-rw-r--r--src/server/game/AI/CoreAI/GuardAI.cpp10
-rw-r--r--src/server/game/AI/CoreAI/GuardAI.h10
-rw-r--r--src/server/game/AI/CoreAI/PassiveAI.cpp10
-rw-r--r--src/server/game/AI/CoreAI/PassiveAI.h10
-rw-r--r--src/server/game/AI/CoreAI/PetAI.cpp10
-rw-r--r--src/server/game/AI/CoreAI/PetAI.h10
-rw-r--r--src/server/game/AI/CoreAI/ReactorAI.cpp10
-rw-r--r--src/server/game/AI/CoreAI/ReactorAI.h10
-rw-r--r--src/server/game/AI/CoreAI/TotemAI.cpp12
-rw-r--r--src/server/game/AI/CoreAI/TotemAI.h10
-rw-r--r--src/server/game/AI/CoreAI/UnitAI.cpp10
-rw-r--r--src/server/game/AI/CoreAI/UnitAI.h12
-rw-r--r--src/server/game/AI/CreatureAI.cpp28
-rw-r--r--src/server/game/AI/CreatureAI.h12
-rw-r--r--src/server/game/AI/CreatureAIFactory.h10
-rw-r--r--src/server/game/AI/CreatureAIImpl.h10
-rw-r--r--src/server/game/AI/CreatureAIRegistry.cpp10
-rw-r--r--src/server/game/AI/CreatureAIRegistry.h10
-rw-r--r--src/server/game/AI/CreatureAISelector.cpp10
-rw-r--r--src/server/game/AI/CreatureAISelector.h10
-rw-r--r--src/server/game/AI/GameObjectAIFactory.h10
-rw-r--r--src/server/game/AI/ScriptedAI/ScriptedCreature.cpp48
-rw-r--r--src/server/game/AI/ScriptedAI/ScriptedCreature.h21
-rw-r--r--src/server/game/AI/ScriptedAI/ScriptedEscortAI.cpp52
-rw-r--r--src/server/game/AI/ScriptedAI/ScriptedEscortAI.h14
-rw-r--r--src/server/game/AI/ScriptedAI/ScriptedFollowerAI.cpp14
-rw-r--r--src/server/game/AI/ScriptedAI/ScriptedFollowerAI.h10
-rw-r--r--src/server/game/AI/ScriptedAI/ScriptedGossip.cpp12
-rw-r--r--src/server/game/AI/ScriptedAI/ScriptedGossip.h12
-rw-r--r--src/server/game/AI/SmartScripts/SmartAI.cpp179
-rw-r--r--src/server/game/AI/SmartScripts/SmartAI.h28
-rw-r--r--src/server/game/AI/SmartScripts/SmartScript.cpp105
-rw-r--r--src/server/game/AI/SmartScripts/SmartScript.h12
-rw-r--r--src/server/game/AI/SmartScripts/SmartScriptMgr.cpp109
-rw-r--r--src/server/game/AI/SmartScripts/SmartScriptMgr.h108
-rw-r--r--src/server/game/AI/enuminfo_CreatureAI.cpp10
-rw-r--r--src/server/game/Accounts/AccountMgr.cpp10
-rw-r--r--src/server/game/Accounts/AccountMgr.h10
-rw-r--r--src/server/game/Achievements/AchievementMgr.cpp23
-rw-r--r--src/server/game/Achievements/AchievementMgr.h10
-rw-r--r--src/server/game/Addons/AddonMgr.cpp10
-rw-r--r--src/server/game/Addons/AddonMgr.h10
-rw-r--r--src/server/game/ArenaSpectator/ArenaSpectator.cpp12
-rw-r--r--src/server/game/ArenaSpectator/ArenaSpectator.h10
-rw-r--r--src/server/game/AuctionHouse/AuctionHouseMgr.cpp10
-rw-r--r--src/server/game/AuctionHouse/AuctionHouseMgr.h10
-rw-r--r--src/server/game/AuctionHouse/AuctionHouseSearcher.cpp12
-rw-r--r--src/server/game/AuctionHouse/AuctionHouseSearcher.h10
-rw-r--r--src/server/game/Autobroadcast/AutobroadcastMgr.cpp12
-rw-r--r--src/server/game/Autobroadcast/AutobroadcastMgr.h10
-rw-r--r--src/server/game/Battlefield/Battlefield.cpp22
-rw-r--r--src/server/game/Battlefield/Battlefield.h15
-rw-r--r--src/server/game/Battlefield/BattlefieldHandler.cpp10
-rw-r--r--src/server/game/Battlefield/BattlefieldMgr.cpp10
-rw-r--r--src/server/game/Battlefield/BattlefieldMgr.h10
-rw-r--r--src/server/game/Battlefield/Zones/BattlefieldWG.cpp12
-rw-r--r--src/server/game/Battlefield/Zones/BattlefieldWG.h10
-rw-r--r--src/server/game/Battlegrounds/Arena.cpp10
-rw-r--r--src/server/game/Battlegrounds/Arena.h10
-rw-r--r--src/server/game/Battlegrounds/ArenaScore.h10
-rw-r--r--src/server/game/Battlegrounds/ArenaSeason/ArenaSeasonMgr.cpp10
-rw-r--r--src/server/game/Battlegrounds/ArenaSeason/ArenaSeasonMgr.h10
-rw-r--r--src/server/game/Battlegrounds/ArenaSeason/ArenaSeasonRewardsDistributor.cpp10
-rw-r--r--src/server/game/Battlegrounds/ArenaSeason/ArenaSeasonRewardsDistributor.h10
-rw-r--r--src/server/game/Battlegrounds/ArenaSeason/ArenaTeamFilter.h10
-rw-r--r--src/server/game/Battlegrounds/ArenaTeam.cpp18
-rw-r--r--src/server/game/Battlegrounds/ArenaTeam.h10
-rw-r--r--src/server/game/Battlegrounds/ArenaTeamMgr.cpp10
-rw-r--r--src/server/game/Battlegrounds/ArenaTeamMgr.h10
-rw-r--r--src/server/game/Battlegrounds/Battleground.cpp39
-rw-r--r--src/server/game/Battlegrounds/Battleground.h10
-rw-r--r--src/server/game/Battlegrounds/BattlegroundMgr.cpp12
-rw-r--r--src/server/game/Battlegrounds/BattlegroundMgr.h10
-rw-r--r--src/server/game/Battlegrounds/BattlegroundQueue.cpp16
-rw-r--r--src/server/game/Battlegrounds/BattlegroundQueue.h10
-rw-r--r--src/server/game/Battlegrounds/BattlegroundScore.h10
-rw-r--r--src/server/game/Battlegrounds/BattlegroundSpamProtect.cpp10
-rw-r--r--src/server/game/Battlegrounds/BattlegroundSpamProtect.h10
-rw-r--r--src/server/game/Battlegrounds/Zones/BattlegroundAB.cpp19
-rw-r--r--src/server/game/Battlegrounds/Zones/BattlegroundAB.h18
-rw-r--r--src/server/game/Battlegrounds/Zones/BattlegroundAV.cpp79
-rw-r--r--src/server/game/Battlegrounds/Zones/BattlegroundAV.h11
-rw-r--r--src/server/game/Battlegrounds/Zones/BattlegroundBE.cpp10
-rw-r--r--src/server/game/Battlegrounds/Zones/BattlegroundBE.h10
-rw-r--r--src/server/game/Battlegrounds/Zones/BattlegroundDS.cpp10
-rw-r--r--src/server/game/Battlegrounds/Zones/BattlegroundDS.h10
-rw-r--r--src/server/game/Battlegrounds/Zones/BattlegroundEY.cpp22
-rw-r--r--src/server/game/Battlegrounds/Zones/BattlegroundEY.h21
-rw-r--r--src/server/game/Battlegrounds/Zones/BattlegroundIC.cpp10
-rw-r--r--src/server/game/Battlegrounds/Zones/BattlegroundIC.h10
-rw-r--r--src/server/game/Battlegrounds/Zones/BattlegroundNA.cpp10
-rw-r--r--src/server/game/Battlegrounds/Zones/BattlegroundNA.h10
-rw-r--r--src/server/game/Battlegrounds/Zones/BattlegroundRL.cpp10
-rw-r--r--src/server/game/Battlegrounds/Zones/BattlegroundRL.h10
-rw-r--r--src/server/game/Battlegrounds/Zones/BattlegroundRV.cpp10
-rw-r--r--src/server/game/Battlegrounds/Zones/BattlegroundRV.h10
-rw-r--r--src/server/game/Battlegrounds/Zones/BattlegroundSA.cpp16
-rw-r--r--src/server/game/Battlegrounds/Zones/BattlegroundSA.h10
-rw-r--r--src/server/game/Battlegrounds/Zones/BattlegroundWS.cpp28
-rw-r--r--src/server/game/Battlegrounds/Zones/BattlegroundWS.h21
-rw-r--r--src/server/game/Battlegrounds/enuminfo_ArenaTeam.cpp10
-rw-r--r--src/server/game/Cache/CharacterCache.cpp10
-rw-r--r--src/server/game/Cache/CharacterCache.h10
-rw-r--r--src/server/game/Cache/WhoListCacheMgr.cpp10
-rw-r--r--src/server/game/Cache/WhoListCacheMgr.h10
-rw-r--r--src/server/game/Calendar/CalendarMgr.cpp10
-rw-r--r--src/server/game/Calendar/CalendarMgr.h10
-rw-r--r--src/server/game/Chat/Channels/Channel.cpp18
-rw-r--r--src/server/game/Chat/Channels/Channel.h10
-rw-r--r--src/server/game/Chat/Channels/ChannelMgr.cpp12
-rw-r--r--src/server/game/Chat/Channels/ChannelMgr.h10
-rw-r--r--src/server/game/Chat/Channels/enuminfo_Channel.cpp10
-rw-r--r--src/server/game/Chat/Chat.cpp10
-rw-r--r--src/server/game/Chat/Chat.h10
-rw-r--r--src/server/game/Chat/ChatCommands/ChatCommand.cpp10
-rw-r--r--src/server/game/Chat/ChatCommands/ChatCommand.h10
-rw-r--r--src/server/game/Chat/ChatCommands/ChatCommandArgs.cpp10
-rw-r--r--src/server/game/Chat/ChatCommands/ChatCommandArgs.h10
-rw-r--r--src/server/game/Chat/ChatCommands/ChatCommandHelpers.cpp10
-rw-r--r--src/server/game/Chat/ChatCommands/ChatCommandHelpers.h10
-rw-r--r--src/server/game/Chat/ChatCommands/ChatCommandTags.cpp10
-rw-r--r--src/server/game/Chat/ChatCommands/ChatCommandTags.h10
-rw-r--r--src/server/game/Chat/HyperlinkTags.cpp10
-rw-r--r--src/server/game/Chat/Hyperlinks.cpp10
-rw-r--r--src/server/game/Chat/Hyperlinks.h10
-rw-r--r--src/server/game/Combat/HostileRefMgr.cpp10
-rw-r--r--src/server/game/Combat/HostileRefMgr.h10
-rw-r--r--src/server/game/Combat/ThreatMgr.cpp10
-rw-r--r--src/server/game/Combat/ThreatMgr.h10
-rw-r--r--src/server/game/Combat/UnitEvents.h10
-rw-r--r--src/server/game/Conditions/ConditionMgr.cpp10
-rw-r--r--src/server/game/Conditions/ConditionMgr.h10
-rw-r--r--src/server/game/Conditions/DisableMgr.cpp61
-rw-r--r--src/server/game/Conditions/DisableMgr.h10
-rw-r--r--src/server/game/DataStores/DBCStores.cpp10
-rw-r--r--src/server/game/DataStores/DBCStores.h10
-rw-r--r--src/server/game/DataStores/M2Stores.cpp10
-rw-r--r--src/server/game/DataStores/M2Stores.h10
-rw-r--r--src/server/game/DataStores/M2Structure.h10
-rw-r--r--src/server/game/DungeonFinding/LFG.cpp10
-rw-r--r--src/server/game/DungeonFinding/LFG.h18
-rw-r--r--src/server/game/DungeonFinding/LFGGroupData.cpp10
-rw-r--r--src/server/game/DungeonFinding/LFGGroupData.h10
-rw-r--r--src/server/game/DungeonFinding/LFGMgr.cpp70
-rw-r--r--src/server/game/DungeonFinding/LFGMgr.h16
-rw-r--r--src/server/game/DungeonFinding/LFGPlayerData.cpp10
-rw-r--r--src/server/game/DungeonFinding/LFGPlayerData.h10
-rw-r--r--src/server/game/DungeonFinding/LFGQueue.cpp10
-rw-r--r--src/server/game/DungeonFinding/LFGQueue.h10
-rw-r--r--src/server/game/DungeonFinding/LFGScripts.cpp10
-rw-r--r--src/server/game/DungeonFinding/LFGScripts.h10
-rw-r--r--src/server/game/Entities/Corpse/Corpse.cpp12
-rw-r--r--src/server/game/Entities/Corpse/Corpse.h12
-rw-r--r--src/server/game/Entities/Creature/Creature.cpp279
-rw-r--r--src/server/game/Entities/Creature/Creature.h32
-rw-r--r--src/server/game/Entities/Creature/CreatureData.h22
-rw-r--r--src/server/game/Entities/Creature/CreatureGroups.cpp10
-rw-r--r--src/server/game/Entities/Creature/CreatureGroups.h10
-rw-r--r--src/server/game/Entities/Creature/GossipDef.cpp10
-rw-r--r--src/server/game/Entities/Creature/GossipDef.h10
-rw-r--r--src/server/game/Entities/Creature/TemporarySummon.cpp17
-rw-r--r--src/server/game/Entities/Creature/TemporarySummon.h13
-rw-r--r--src/server/game/Entities/Creature/enuminfo_CreatureData.cpp10
-rw-r--r--src/server/game/Entities/DynamicObject/DynamicObject.cpp10
-rw-r--r--src/server/game/Entities/DynamicObject/DynamicObject.h10
-rw-r--r--src/server/game/Entities/GameObject/GameObject.cpp77
-rw-r--r--src/server/game/Entities/GameObject/GameObject.h16
-rw-r--r--src/server/game/Entities/GameObject/GameObjectData.h10
-rw-r--r--src/server/game/Entities/Item/Container/Bag.cpp10
-rw-r--r--src/server/game/Entities/Item/Container/Bag.h10
-rw-r--r--src/server/game/Entities/Item/Item.cpp14
-rw-r--r--src/server/game/Entities/Item/Item.h10
-rw-r--r--src/server/game/Entities/Item/ItemEnchantmentMgr.cpp10
-rw-r--r--src/server/game/Entities/Item/ItemEnchantmentMgr.h10
-rw-r--r--src/server/game/Entities/Item/ItemTemplate.h10
-rw-r--r--src/server/game/Entities/Item/enuminfo_Item.cpp10
-rw-r--r--src/server/game/Entities/Object/Object.cpp104
-rw-r--r--src/server/game/Entities/Object/Object.h24
-rw-r--r--src/server/game/Entities/Object/ObjectDefines.h10
-rw-r--r--src/server/game/Entities/Object/ObjectGuid.cpp10
-rw-r--r--src/server/game/Entities/Object/ObjectGuid.h12
-rw-r--r--src/server/game/Entities/Object/ObjectPosSelector.cpp10
-rw-r--r--src/server/game/Entities/Object/ObjectPosSelector.h10
-rw-r--r--src/server/game/Entities/Object/ObjectVisibilityContainer.cpp10
-rw-r--r--src/server/game/Entities/Object/ObjectVisibilityContainer.h10
-rw-r--r--src/server/game/Entities/Object/Position.cpp10
-rw-r--r--src/server/game/Entities/Object/Position.h10
-rw-r--r--src/server/game/Entities/Object/Updates/UpdateData.cpp10
-rw-r--r--src/server/game/Entities/Object/Updates/UpdateData.h10
-rw-r--r--src/server/game/Entities/Object/Updates/UpdateFieldFlags.cpp10
-rw-r--r--src/server/game/Entities/Object/Updates/UpdateFieldFlags.h10
-rw-r--r--src/server/game/Entities/Object/Updates/UpdateFields.h10
-rw-r--r--src/server/game/Entities/Object/Updates/UpdateMask.h10
-rw-r--r--src/server/game/Entities/Pet/Pet.cpp50
-rw-r--r--src/server/game/Entities/Pet/Pet.h12
-rw-r--r--src/server/game/Entities/Pet/PetDefines.h23
-rw-r--r--src/server/game/Entities/Player/CinematicMgr.cpp10
-rw-r--r--src/server/game/Entities/Player/CinematicMgr.h10
-rw-r--r--src/server/game/Entities/Player/KillRewarder.cpp15
-rw-r--r--src/server/game/Entities/Player/KillRewarder.h10
-rw-r--r--src/server/game/Entities/Player/Player.cpp885
-rw-r--r--src/server/game/Entities/Player/Player.h87
-rw-r--r--src/server/game/Entities/Player/PlayerGossip.cpp10
-rw-r--r--src/server/game/Entities/Player/PlayerMisc.cpp32
-rw-r--r--src/server/game/Entities/Player/PlayerQuest.cpp40
-rw-r--r--src/server/game/Entities/Player/PlayerSettings.cpp10
-rw-r--r--src/server/game/Entities/Player/PlayerSettings.h10
-rw-r--r--src/server/game/Entities/Player/PlayerStorage.cpp130
-rw-r--r--src/server/game/Entities/Player/PlayerTaxi.cpp10
-rw-r--r--src/server/game/Entities/Player/PlayerTaxi.h10
-rw-r--r--src/server/game/Entities/Player/PlayerUpdates.cpp36
-rw-r--r--src/server/game/Entities/Player/SocialMgr.cpp36
-rw-r--r--src/server/game/Entities/Player/SocialMgr.h36
-rw-r--r--src/server/game/Entities/Player/TradeData.cpp10
-rw-r--r--src/server/game/Entities/Player/TradeData.h10
-rw-r--r--src/server/game/Entities/Totem/Totem.cpp16
-rw-r--r--src/server/game/Entities/Totem/Totem.h12
-rw-r--r--src/server/game/Entities/Transport/Transport.cpp10
-rw-r--r--src/server/game/Entities/Transport/Transport.h10
-rw-r--r--src/server/game/Entities/Unit/CharmInfo.cpp10
-rw-r--r--src/server/game/Entities/Unit/CharmInfo.h10
-rw-r--r--src/server/game/Entities/Unit/StatSystem.cpp144
-rw-r--r--src/server/game/Entities/Unit/Unit.cpp1857
-rw-r--r--src/server/game/Entities/Unit/Unit.h160
-rw-r--r--src/server/game/Entities/Unit/UnitDefines.h16
-rw-r--r--src/server/game/Entities/Unit/UnitUtils.h10
-rw-r--r--src/server/game/Entities/Unit/enuminfo_Unit.cpp10
-rw-r--r--src/server/game/Entities/Vehicle/Vehicle.cpp14
-rw-r--r--src/server/game/Entities/Vehicle/Vehicle.h14
-rw-r--r--src/server/game/Entities/Vehicle/VehicleDefines.h10
-rw-r--r--src/server/game/Events/GameEventMgr.cpp10
-rw-r--r--src/server/game/Events/GameEventMgr.h10
-rw-r--r--src/server/game/Globals/ObjectAccessor.cpp34
-rw-r--r--src/server/game/Globals/ObjectAccessor.h34
-rw-r--r--src/server/game/Globals/ObjectMgr.cpp28
-rw-r--r--src/server/game/Globals/ObjectMgr.h10
-rw-r--r--src/server/game/Globals/WorldGlobals.cpp10
-rw-r--r--src/server/game/Globals/WorldGlobals.h10
-rw-r--r--src/server/game/Grids/Cells/Cell.h10
-rw-r--r--src/server/game/Grids/Cells/CellImpl.h10
-rw-r--r--src/server/game/Grids/GridCell.h10
-rw-r--r--src/server/game/Grids/GridDefines.h10
-rw-r--r--src/server/game/Grids/GridObjectLoader.cpp10
-rw-r--r--src/server/game/Grids/GridObjectLoader.h10
-rw-r--r--src/server/game/Grids/GridRefMgr.h10
-rw-r--r--src/server/game/Grids/GridReference.h10
-rw-r--r--src/server/game/Grids/GridTerrainData.cpp6
-rw-r--r--src/server/game/Grids/GridTerrainData.h14
-rw-r--r--src/server/game/Grids/GridTerrainLoader.h10
-rw-r--r--src/server/game/Grids/MapGrid.h10
-rw-r--r--src/server/game/Grids/MapGridManager.h10
-rw-r--r--src/server/game/Grids/Notifiers/GridNotifiers.cpp12
-rw-r--r--src/server/game/Grids/Notifiers/GridNotifiers.h21
-rw-r--r--src/server/game/Grids/Notifiers/GridNotifiersImpl.h10
-rw-r--r--src/server/game/Groups/Group.cpp38
-rw-r--r--src/server/game/Groups/Group.h10
-rw-r--r--src/server/game/Groups/GroupMgr.cpp10
-rw-r--r--src/server/game/Groups/GroupMgr.h10
-rw-r--r--src/server/game/Groups/GroupRefMgr.h10
-rw-r--r--src/server/game/Groups/GroupReference.cpp10
-rw-r--r--src/server/game/Groups/GroupReference.h10
-rw-r--r--src/server/game/Guilds/Guild.cpp16
-rw-r--r--src/server/game/Guilds/Guild.h10
-rw-r--r--src/server/game/Guilds/GuildMgr.cpp10
-rw-r--r--src/server/game/Guilds/GuildMgr.h10
-rw-r--r--src/server/game/Handlers/AddonHandler.cpp10
-rw-r--r--src/server/game/Handlers/AddonHandler.h10
-rw-r--r--src/server/game/Handlers/ArenaTeamHandler.cpp12
-rw-r--r--src/server/game/Handlers/AuctionHouseHandler.cpp10
-rw-r--r--src/server/game/Handlers/AuthHandler.cpp10
-rw-r--r--src/server/game/Handlers/BankHandler.cpp10
-rw-r--r--src/server/game/Handlers/BattleGroundHandler.cpp22
-rw-r--r--src/server/game/Handlers/CalendarHandler.cpp46
-rw-r--r--src/server/game/Handlers/ChannelHandler.cpp10
-rw-r--r--src/server/game/Handlers/CharacterHandler.cpp91
-rw-r--r--src/server/game/Handlers/ChatHandler.cpp56
-rw-r--r--src/server/game/Handlers/CombatHandler.cpp10
-rw-r--r--src/server/game/Handlers/DuelHandler.cpp10
-rw-r--r--src/server/game/Handlers/GroupHandler.cpp16
-rw-r--r--src/server/game/Handlers/GuildHandler.cpp10
-rw-r--r--src/server/game/Handlers/ItemHandler.cpp14
-rw-r--r--src/server/game/Handlers/LFGHandler.cpp10
-rw-r--r--src/server/game/Handlers/LootHandler.cpp12
-rw-r--r--src/server/game/Handlers/MailHandler.cpp10
-rw-r--r--src/server/game/Handlers/MiscHandler.cpp105
-rw-r--r--src/server/game/Handlers/MovementHandler.cpp545
-rw-r--r--src/server/game/Handlers/NPCHandler.cpp10
-rw-r--r--src/server/game/Handlers/NPCHandler.h10
-rw-r--r--src/server/game/Handlers/PetHandler.cpp33
-rw-r--r--src/server/game/Handlers/PetitionsHandler.cpp18
-rw-r--r--src/server/game/Handlers/QueryHandler.cpp10
-rw-r--r--src/server/game/Handlers/QuestHandler.cpp12
-rw-r--r--src/server/game/Handlers/ReferAFriendHandler.cpp12
-rw-r--r--src/server/game/Handlers/SkillHandler.cpp10
-rw-r--r--src/server/game/Handlers/Socialhandler.cpp10
-rw-r--r--src/server/game/Handlers/SpellHandler.cpp10
-rw-r--r--src/server/game/Handlers/TaxiHandler.cpp92
-rw-r--r--src/server/game/Handlers/TicketHandler.cpp10
-rw-r--r--src/server/game/Handlers/TradeHandler.cpp12
-rw-r--r--src/server/game/Handlers/VehicleHandler.cpp15
-rw-r--r--src/server/game/Handlers/VoiceChatHandler.cpp10
-rw-r--r--src/server/game/Instances/InstanceSaveMgr.cpp10
-rw-r--r--src/server/game/Instances/InstanceSaveMgr.h10
-rw-r--r--src/server/game/Instances/InstanceScript.cpp10
-rw-r--r--src/server/game/Instances/InstanceScript.h10
-rw-r--r--src/server/game/Loot/LootItemStorage.cpp10
-rw-r--r--src/server/game/Loot/LootItemStorage.h10
-rw-r--r--src/server/game/Loot/LootMgr.cpp10
-rw-r--r--src/server/game/Loot/LootMgr.h10
-rw-r--r--src/server/game/Mails/Mail.cpp10
-rw-r--r--src/server/game/Mails/Mail.h10
-rw-r--r--src/server/game/Mails/ServerMailMgr.cpp10
-rw-r--r--src/server/game/Mails/ServerMailMgr.h10
-rw-r--r--src/server/game/Maps/AreaBoundary.cpp10
-rw-r--r--src/server/game/Maps/AreaBoundary.h10
-rw-r--r--src/server/game/Maps/AreaDefines.h10
-rw-r--r--src/server/game/Maps/Map.cpp275
-rw-r--r--src/server/game/Maps/Map.h55
-rw-r--r--src/server/game/Maps/MapInstanced.cpp10
-rw-r--r--src/server/game/Maps/MapInstanced.h10
-rw-r--r--src/server/game/Maps/MapMgr.cpp12
-rw-r--r--src/server/game/Maps/MapMgr.h10
-rw-r--r--src/server/game/Maps/MapRefMgr.h10
-rw-r--r--src/server/game/Maps/MapReference.h10
-rw-r--r--src/server/game/Maps/MapUpdater.cpp10
-rw-r--r--src/server/game/Maps/MapUpdater.h10
-rw-r--r--src/server/game/Maps/TransportMgr.cpp52
-rw-r--r--src/server/game/Maps/TransportMgr.h12
-rw-r--r--src/server/game/Maps/ZoneScript.h10
-rw-r--r--src/server/game/Misc/BanMgr.cpp10
-rw-r--r--src/server/game/Misc/BanMgr.h10
-rw-r--r--src/server/game/Misc/DynamicVisibility.cpp10
-rw-r--r--src/server/game/Misc/DynamicVisibility.h10
-rw-r--r--src/server/game/Misc/GameGraveyard.cpp10
-rw-r--r--src/server/game/Misc/GameGraveyard.h10
-rw-r--r--src/server/game/Miscellaneous/Formulas.cpp19
-rw-r--r--src/server/game/Miscellaneous/Formulas.h10
-rw-r--r--src/server/game/Miscellaneous/Language.h18
-rw-r--r--src/server/game/Modules/ModuleMgr.cpp10
-rw-r--r--src/server/game/Modules/ModuleMgr.h10
-rw-r--r--src/server/game/Motd/MotdMgr.cpp10
-rw-r--r--src/server/game/Motd/MotdMgr.h10
-rw-r--r--src/server/game/Movement/FollowerRefMgr.h10
-rw-r--r--src/server/game/Movement/FollowerReference.cpp10
-rw-r--r--src/server/game/Movement/FollowerReference.h10
-rw-r--r--src/server/game/Movement/MotionMaster.cpp105
-rw-r--r--src/server/game/Movement/MotionMaster.h47
-rw-r--r--src/server/game/Movement/MovementGenerator.cpp10
-rw-r--r--src/server/game/Movement/MovementGenerator.h10
-rw-r--r--src/server/game/Movement/MovementGenerators/ConfusedMovementGenerator.cpp11
-rw-r--r--src/server/game/Movement/MovementGenerators/ConfusedMovementGenerator.h10
-rw-r--r--src/server/game/Movement/MovementGenerators/EscortMovementGenerator.cpp20
-rw-r--r--src/server/game/Movement/MovementGenerators/EscortMovementGenerator.h13
-rw-r--r--src/server/game/Movement/MovementGenerators/FleeingMovementGenerator.cpp10
-rw-r--r--src/server/game/Movement/MovementGenerators/FleeingMovementGenerator.h10
-rw-r--r--src/server/game/Movement/MovementGenerators/HomeMovementGenerator.cpp12
-rw-r--r--src/server/game/Movement/MovementGenerators/HomeMovementGenerator.h10
-rw-r--r--src/server/game/Movement/MovementGenerators/IdleMovementGenerator.cpp10
-rw-r--r--src/server/game/Movement/MovementGenerators/IdleMovementGenerator.h10
-rw-r--r--src/server/game/Movement/MovementGenerators/PathGenerator.cpp16
-rw-r--r--src/server/game/Movement/MovementGenerators/PathGenerator.h10
-rw-r--r--src/server/game/Movement/MovementGenerators/PointMovementGenerator.cpp40
-rw-r--r--src/server/game/Movement/MovementGenerators/PointMovementGenerator.h31
-rw-r--r--src/server/game/Movement/MovementGenerators/RandomMovementGenerator.cpp27
-rw-r--r--src/server/game/Movement/MovementGenerators/RandomMovementGenerator.h10
-rw-r--r--src/server/game/Movement/MovementGenerators/TargetedMovementGenerator.cpp41
-rw-r--r--src/server/game/Movement/MovementGenerators/TargetedMovementGenerator.h10
-rw-r--r--src/server/game/Movement/MovementGenerators/WaypointMovementGenerator.cpp103
-rw-r--r--src/server/game/Movement/MovementGenerators/WaypointMovementGenerator.h15
-rw-r--r--src/server/game/Movement/Spline/MoveSpline.cpp10
-rw-r--r--src/server/game/Movement/Spline/MoveSpline.h11
-rw-r--r--src/server/game/Movement/Spline/MoveSplineFlag.h10
-rw-r--r--src/server/game/Movement/Spline/MoveSplineInit.cpp19
-rw-r--r--src/server/game/Movement/Spline/MoveSplineInit.h22
-rw-r--r--src/server/game/Movement/Spline/MoveSplineInitArgs.h10
-rw-r--r--src/server/game/Movement/Spline/MovementPacketBuilder.cpp10
-rw-r--r--src/server/game/Movement/Spline/MovementPacketBuilder.h10
-rw-r--r--src/server/game/Movement/Spline/MovementTypedefs.h10
-rw-r--r--src/server/game/Movement/Spline/MovementUtil.cpp10
-rw-r--r--src/server/game/Movement/Spline/Spline.cpp10
-rw-r--r--src/server/game/Movement/Spline/Spline.h10
-rw-r--r--src/server/game/Movement/Spline/SplineImpl.h10
-rw-r--r--src/server/game/Movement/Waypoints/WaypointMgr.cpp79
-rw-r--r--src/server/game/Movement/Waypoints/WaypointMgr.h19
-rw-r--r--src/server/game/OutdoorPvP/OutdoorPvP.cpp12
-rw-r--r--src/server/game/OutdoorPvP/OutdoorPvP.h10
-rw-r--r--src/server/game/OutdoorPvP/OutdoorPvPMgr.cpp10
-rw-r--r--src/server/game/OutdoorPvP/OutdoorPvPMgr.h10
-rw-r--r--src/server/game/Petitions/PetitionMgr.cpp10
-rw-r--r--src/server/game/Petitions/PetitionMgr.h10
-rw-r--r--src/server/game/Pools/PoolMgr.cpp10
-rw-r--r--src/server/game/Pools/PoolMgr.h10
-rw-r--r--src/server/game/PrecompiledHeaders/gamePCH.h10
-rw-r--r--src/server/game/Quests/QuestDef.cpp10
-rw-r--r--src/server/game/Quests/QuestDef.h10
-rw-r--r--src/server/game/Quests/enuminfo_QuestDef.cpp10
-rw-r--r--src/server/game/Reputation/ReputationMgr.cpp10
-rw-r--r--src/server/game/Reputation/ReputationMgr.h10
-rw-r--r--src/server/game/Scripting/MapScripts.cpp19
-rw-r--r--src/server/game/Scripting/ScriptDefines/ALEScript.cpp (renamed from src/server/game/Scripting/ScriptDefines/ElunaScript.cpp)18
-rw-r--r--src/server/game/Scripting/ScriptDefines/ALEScript.h (renamed from src/server/game/Scripting/ScriptDefines/ElunaScript.h)18
-rw-r--r--src/server/game/Scripting/ScriptDefines/AccountScript.cpp10
-rw-r--r--src/server/game/Scripting/ScriptDefines/AccountScript.h10
-rw-r--r--src/server/game/Scripting/ScriptDefines/AchievementCriteriaScript.cpp10
-rw-r--r--src/server/game/Scripting/ScriptDefines/AchievementCriteriaScript.h10
-rw-r--r--src/server/game/Scripting/ScriptDefines/AchievementScript.cpp10
-rw-r--r--src/server/game/Scripting/ScriptDefines/AchievementScript.h10
-rw-r--r--src/server/game/Scripting/ScriptDefines/AllBattlegroundScript.cpp10
-rw-r--r--src/server/game/Scripting/ScriptDefines/AllBattlegroundScript.h10
-rw-r--r--src/server/game/Scripting/ScriptDefines/AllCommandScript.cpp10
-rw-r--r--src/server/game/Scripting/ScriptDefines/AllCommandScript.h10
-rw-r--r--src/server/game/Scripting/ScriptDefines/AllCreatureScript.cpp10
-rw-r--r--src/server/game/Scripting/ScriptDefines/AllCreatureScript.h10
-rw-r--r--src/server/game/Scripting/ScriptDefines/AllGameObjectScript.cpp10
-rw-r--r--src/server/game/Scripting/ScriptDefines/AllGameObjectScript.h10
-rw-r--r--src/server/game/Scripting/ScriptDefines/AllItemScript.cpp10
-rw-r--r--src/server/game/Scripting/ScriptDefines/AllItemScript.h10
-rw-r--r--src/server/game/Scripting/ScriptDefines/AllMapScript.cpp10
-rw-r--r--src/server/game/Scripting/ScriptDefines/AllMapScript.h10
-rw-r--r--src/server/game/Scripting/ScriptDefines/AllScriptsObjects.h12
-rw-r--r--src/server/game/Scripting/ScriptDefines/AllSpellScript.cpp20
-rw-r--r--src/server/game/Scripting/ScriptDefines/AllSpellScript.h16
-rw-r--r--src/server/game/Scripting/ScriptDefines/AreaTriggerScript.cpp14
-rw-r--r--src/server/game/Scripting/ScriptDefines/AreaTriggerScript.h10
-rw-r--r--src/server/game/Scripting/ScriptDefines/ArenaScript.cpp10
-rw-r--r--src/server/game/Scripting/ScriptDefines/ArenaScript.h10
-rw-r--r--src/server/game/Scripting/ScriptDefines/ArenaTeamScript.cpp10
-rw-r--r--src/server/game/Scripting/ScriptDefines/ArenaTeamScript.h10
-rw-r--r--src/server/game/Scripting/ScriptDefines/AuctionHouseScript.cpp10
-rw-r--r--src/server/game/Scripting/ScriptDefines/AuctionHouseScript.h10
-rw-r--r--src/server/game/Scripting/ScriptDefines/BattlegroundMapScript.cpp10
-rw-r--r--src/server/game/Scripting/ScriptDefines/BattlegroundMapScript.h10
-rw-r--r--src/server/game/Scripting/ScriptDefines/BattlegroundScript.cpp10
-rw-r--r--src/server/game/Scripting/ScriptDefines/BattlegroundScript.h10
-rw-r--r--src/server/game/Scripting/ScriptDefines/CommandScript.cpp10
-rw-r--r--src/server/game/Scripting/ScriptDefines/CommandScript.h10
-rw-r--r--src/server/game/Scripting/ScriptDefines/ConditionScript.cpp10
-rw-r--r--src/server/game/Scripting/ScriptDefines/ConditionScript.h10
-rw-r--r--src/server/game/Scripting/ScriptDefines/CreatureScript.cpp10
-rw-r--r--src/server/game/Scripting/ScriptDefines/CreatureScript.h10
-rw-r--r--src/server/game/Scripting/ScriptDefines/DatabaseScript.cpp10
-rw-r--r--src/server/game/Scripting/ScriptDefines/DatabaseScript.h10
-rw-r--r--src/server/game/Scripting/ScriptDefines/DynamicObjectScript.cpp10
-rw-r--r--src/server/game/Scripting/ScriptDefines/DynamicObjectScript.h10
-rw-r--r--src/server/game/Scripting/ScriptDefines/FormulaScript.cpp10
-rw-r--r--src/server/game/Scripting/ScriptDefines/FormulaScript.h10
-rw-r--r--src/server/game/Scripting/ScriptDefines/GameEventScript.cpp10
-rw-r--r--src/server/game/Scripting/ScriptDefines/GameEventScript.h10
-rw-r--r--src/server/game/Scripting/ScriptDefines/GameObjectScript.cpp10
-rw-r--r--src/server/game/Scripting/ScriptDefines/GameObjectScript.h10
-rw-r--r--src/server/game/Scripting/ScriptDefines/GlobalScript.cpp10
-rw-r--r--src/server/game/Scripting/ScriptDefines/GlobalScript.h10
-rw-r--r--src/server/game/Scripting/ScriptDefines/GroupScript.cpp10
-rw-r--r--src/server/game/Scripting/ScriptDefines/GroupScript.h10
-rw-r--r--src/server/game/Scripting/ScriptDefines/GuildScript.cpp10
-rw-r--r--src/server/game/Scripting/ScriptDefines/GuildScript.h10
-rw-r--r--src/server/game/Scripting/ScriptDefines/InstanceMapScript.cpp10
-rw-r--r--src/server/game/Scripting/ScriptDefines/InstanceMapScript.h10
-rw-r--r--src/server/game/Scripting/ScriptDefines/ItemScript.h10
-rw-r--r--src/server/game/Scripting/ScriptDefines/LootScript.cpp10
-rw-r--r--src/server/game/Scripting/ScriptDefines/LootScript.h10
-rw-r--r--src/server/game/Scripting/ScriptDefines/MailScript.cpp10
-rw-r--r--src/server/game/Scripting/ScriptDefines/MailScript.h10
-rw-r--r--src/server/game/Scripting/ScriptDefines/MiscScript.cpp10
-rw-r--r--src/server/game/Scripting/ScriptDefines/MiscScript.h10
-rw-r--r--src/server/game/Scripting/ScriptDefines/ModuleScript.cpp10
-rw-r--r--src/server/game/Scripting/ScriptDefines/ModuleScript.h10
-rw-r--r--src/server/game/Scripting/ScriptDefines/MovementHandlerScript.cpp10
-rw-r--r--src/server/game/Scripting/ScriptDefines/MovementHandlerScript.h10
-rw-r--r--src/server/game/Scripting/ScriptDefines/OutdoorPvPScript.cpp10
-rw-r--r--src/server/game/Scripting/ScriptDefines/OutdoorPvPScript.h10
-rw-r--r--src/server/game/Scripting/ScriptDefines/PetScript.cpp10
-rw-r--r--src/server/game/Scripting/ScriptDefines/PetScript.h10
-rw-r--r--src/server/game/Scripting/ScriptDefines/PlayerScript.cpp35
-rw-r--r--src/server/game/Scripting/ScriptDefines/PlayerScript.h25
-rw-r--r--src/server/game/Scripting/ScriptDefines/ServerScript.cpp10
-rw-r--r--src/server/game/Scripting/ScriptDefines/ServerScript.h10
-rw-r--r--src/server/game/Scripting/ScriptDefines/SpellScriptLoader.cpp10
-rw-r--r--src/server/game/Scripting/ScriptDefines/SpellScriptLoader.h10
-rw-r--r--src/server/game/Scripting/ScriptDefines/TicketScript.cpp10
-rw-r--r--src/server/game/Scripting/ScriptDefines/TicketScript.h10
-rw-r--r--src/server/game/Scripting/ScriptDefines/TransportScript.cpp10
-rw-r--r--src/server/game/Scripting/ScriptDefines/TransportScript.h10
-rw-r--r--src/server/game/Scripting/ScriptDefines/UnitScript.cpp25
-rw-r--r--src/server/game/Scripting/ScriptDefines/UnitScript.h19
-rw-r--r--src/server/game/Scripting/ScriptDefines/VehicleScript.cpp10
-rw-r--r--src/server/game/Scripting/ScriptDefines/VehicleScript.h10
-rw-r--r--src/server/game/Scripting/ScriptDefines/WeatherScript.cpp14
-rw-r--r--src/server/game/Scripting/ScriptDefines/WeatherScript.h10
-rw-r--r--src/server/game/Scripting/ScriptDefines/WorldMapScript.cpp10
-rw-r--r--src/server/game/Scripting/ScriptDefines/WorldMapScript.h10
-rw-r--r--src/server/game/Scripting/ScriptDefines/WorldObjectScript.cpp10
-rw-r--r--src/server/game/Scripting/ScriptDefines/WorldObjectScript.h10
-rw-r--r--src/server/game/Scripting/ScriptDefines/WorldScript.cpp10
-rw-r--r--src/server/game/Scripting/ScriptDefines/WorldScript.h10
-rw-r--r--src/server/game/Scripting/ScriptMgr.cpp12
-rw-r--r--src/server/game/Scripting/ScriptMgr.h20
-rw-r--r--src/server/game/Scripting/ScriptMgrMacros.h10
-rw-r--r--src/server/game/Scripting/ScriptObject.cpp10
-rw-r--r--src/server/game/Scripting/ScriptObject.h10
-rw-r--r--src/server/game/Scripting/ScriptObjectFwd.h12
-rw-r--r--src/server/game/Scripting/ScriptSystem.cpp10
-rw-r--r--src/server/game/Scripting/ScriptSystem.h10
-rw-r--r--src/server/game/Server/Packet.cpp10
-rw-r--r--src/server/game/Server/Packet.h10
-rw-r--r--src/server/game/Server/Packets/AllPackets.h11
-rw-r--r--src/server/game/Server/Packets/BankPackets.cpp10
-rw-r--r--src/server/game/Server/Packets/BankPackets.h10
-rw-r--r--src/server/game/Server/Packets/CalendarPackets.cpp41
-rw-r--r--src/server/game/Server/Packets/CalendarPackets.h73
-rw-r--r--src/server/game/Server/Packets/CharacterPackets.cpp10
-rw-r--r--src/server/game/Server/Packets/CharacterPackets.h10
-rw-r--r--src/server/game/Server/Packets/ChatPackets.cpp10
-rw-r--r--src/server/game/Server/Packets/ChatPackets.h10
-rw-r--r--src/server/game/Server/Packets/CombatLogPackets.cpp10
-rw-r--r--src/server/game/Server/Packets/CombatLogPackets.h10
-rw-r--r--src/server/game/Server/Packets/CombatPackets.cpp10
-rw-r--r--src/server/game/Server/Packets/CombatPackets.h10
-rw-r--r--src/server/game/Server/Packets/GuildPackets.cpp10
-rw-r--r--src/server/game/Server/Packets/GuildPackets.h10
-rw-r--r--src/server/game/Server/Packets/ItemPackets.cpp10
-rw-r--r--src/server/game/Server/Packets/ItemPackets.h10
-rw-r--r--src/server/game/Server/Packets/LFGPackets.cpp10
-rw-r--r--src/server/game/Server/Packets/LFGPackets.h10
-rw-r--r--src/server/game/Server/Packets/MiscPackets.cpp38
-rw-r--r--src/server/game/Server/Packets/MiscPackets.h36
-rw-r--r--src/server/game/Server/Packets/PacketUtilities.cpp10
-rw-r--r--src/server/game/Server/Packets/PacketUtilities.h10
-rw-r--r--src/server/game/Server/Packets/PetPackets.cpp26
-rw-r--r--src/server/game/Server/Packets/PetPackets.h35
-rw-r--r--src/server/game/Server/Packets/QueryPackets.cpp10
-rw-r--r--src/server/game/Server/Packets/QueryPackets.h10
-rw-r--r--src/server/game/Server/Packets/TotemPackets.cpp10
-rw-r--r--src/server/game/Server/Packets/TotemPackets.h10
-rw-r--r--src/server/game/Server/Packets/WorldStatePackets.cpp10
-rw-r--r--src/server/game/Server/Packets/WorldStatePackets.h10
-rw-r--r--src/server/game/Server/Protocol/Opcodes.cpp28
-rw-r--r--src/server/game/Server/Protocol/Opcodes.h10
-rw-r--r--src/server/game/Server/Protocol/PacketLog.cpp10
-rw-r--r--src/server/game/Server/Protocol/PacketLog.h10
-rw-r--r--src/server/game/Server/Protocol/ServerPktHeader.h10
-rw-r--r--src/server/game/Server/WorldPacket.h10
-rw-r--r--src/server/game/Server/WorldSession.cpp21
-rw-r--r--src/server/game/Server/WorldSession.h50
-rw-r--r--src/server/game/Server/WorldSessionMgr.cpp41
-rw-r--r--src/server/game/Server/WorldSessionMgr.h12
-rw-r--r--src/server/game/Server/WorldSocket.cpp16
-rw-r--r--src/server/game/Server/WorldSocket.h15
-rw-r--r--src/server/game/Server/WorldSocketMgr.cpp10
-rw-r--r--src/server/game/Server/WorldSocketMgr.h10
-rw-r--r--src/server/game/Skills/SkillDiscovery.cpp10
-rw-r--r--src/server/game/Skills/SkillDiscovery.h10
-rw-r--r--src/server/game/Skills/SkillExtraItems.cpp10
-rw-r--r--src/server/game/Skills/SkillExtraItems.h10
-rw-r--r--src/server/game/Spells/Auras/SpellAuraDefines.h10
-rw-r--r--src/server/game/Spells/Auras/SpellAuraEffects.cpp417
-rw-r--r--src/server/game/Spells/Auras/SpellAuraEffects.h15
-rw-r--r--src/server/game/Spells/Auras/SpellAuras.cpp138
-rw-r--r--src/server/game/Spells/Auras/SpellAuras.h13
-rw-r--r--src/server/game/Spells/Spell.cpp120
-rw-r--r--src/server/game/Spells/Spell.h13
-rw-r--r--src/server/game/Spells/SpellDefines.h10
-rw-r--r--src/server/game/Spells/SpellEffects.cpp67
-rw-r--r--src/server/game/Spells/SpellInfo.cpp191
-rw-r--r--src/server/game/Spells/SpellInfo.h20
-rw-r--r--src/server/game/Spells/SpellInfoCorrections.cpp65
-rw-r--r--src/server/game/Spells/SpellMgr.cpp389
-rw-r--r--src/server/game/Spells/SpellMgr.h112
-rw-r--r--src/server/game/Spells/SpellScript.cpp10
-rw-r--r--src/server/game/Spells/SpellScript.h10
-rw-r--r--src/server/game/Texts/ChatTextBuilder.cpp10
-rw-r--r--src/server/game/Texts/ChatTextBuilder.h10
-rw-r--r--src/server/game/Texts/CreatureTextMgr.cpp101
-rw-r--r--src/server/game/Texts/CreatureTextMgr.h19
-rw-r--r--src/server/game/Tickets/TicketMgr.cpp10
-rw-r--r--src/server/game/Tickets/TicketMgr.h10
-rw-r--r--src/server/game/Time/GameTime.cpp10
-rw-r--r--src/server/game/Time/GameTime.h10
-rw-r--r--src/server/game/Time/UpdateTime.cpp12
-rw-r--r--src/server/game/Time/UpdateTime.h10
-rw-r--r--src/server/game/Tools/CharacterDatabaseCleaner.cpp10
-rw-r--r--src/server/game/Tools/CharacterDatabaseCleaner.h10
-rw-r--r--src/server/game/Tools/PlayerDump.cpp10
-rw-r--r--src/server/game/Tools/PlayerDump.h10
-rw-r--r--src/server/game/Warden/Modules/WardenModuleMac.h10
-rw-r--r--src/server/game/Warden/Modules/WardenModuleWin.h10
-rw-r--r--src/server/game/Warden/Warden.cpp10
-rw-r--r--src/server/game/Warden/Warden.h10
-rw-r--r--src/server/game/Warden/WardenCheckMgr.cpp10
-rw-r--r--src/server/game/Warden/WardenCheckMgr.h10
-rw-r--r--src/server/game/Warden/WardenMac.cpp10
-rw-r--r--src/server/game/Warden/WardenMac.h10
-rw-r--r--src/server/game/Warden/WardenPayloadMgr.cpp10
-rw-r--r--src/server/game/Warden/WardenPayloadMgr.h10
-rw-r--r--src/server/game/Warden/WardenWin.cpp10
-rw-r--r--src/server/game/Warden/WardenWin.h10
-rw-r--r--src/server/game/Warden/enuminfo_WardenCheckMgr.cpp10
-rw-r--r--src/server/game/Weather/Weather.cpp24
-rw-r--r--src/server/game/Weather/Weather.h15
-rw-r--r--src/server/game/Weather/WeatherMgr.cpp87
-rw-r--r--src/server/game/Weather/WeatherMgr.h21
-rw-r--r--src/server/game/World/IWorld.h10
-rw-r--r--src/server/game/World/World.cpp18
-rw-r--r--src/server/game/World/World.h11
-rw-r--r--src/server/game/World/WorldConfig.cpp15
-rw-r--r--src/server/game/World/WorldConfig.h14
-rw-r--r--src/server/game/World/WorldState.cpp14
-rw-r--r--src/server/game/World/WorldState.h10
-rw-r--r--src/server/game/World/WorldStateDefines.h10
-rw-r--r--src/server/scripts/Commands/PlayerCommand.cpp10
-rw-r--r--src/server/scripts/Commands/PlayerCommand.h10
-rw-r--r--src/server/scripts/Commands/cs_account.cpp10
-rw-r--r--src/server/scripts/Commands/cs_achievement.cpp10
-rw-r--r--src/server/scripts/Commands/cs_arena.cpp28
-rw-r--r--src/server/scripts/Commands/cs_bag.cpp10
-rw-r--r--src/server/scripts/Commands/cs_ban.cpp10
-rw-r--r--src/server/scripts/Commands/cs_bf.cpp10
-rw-r--r--src/server/scripts/Commands/cs_cache.cpp10
-rw-r--r--src/server/scripts/Commands/cs_cast.cpp10
-rw-r--r--src/server/scripts/Commands/cs_character.cpp10
-rw-r--r--src/server/scripts/Commands/cs_cheat.cpp14
-rw-r--r--src/server/scripts/Commands/cs_debug.cpp40
-rw-r--r--src/server/scripts/Commands/cs_deserter.cpp10
-rw-r--r--src/server/scripts/Commands/cs_disable.cpp10
-rw-r--r--src/server/scripts/Commands/cs_event.cpp10
-rw-r--r--src/server/scripts/Commands/cs_gear.cpp10
-rw-r--r--src/server/scripts/Commands/cs_gm.cpp22
-rw-r--r--src/server/scripts/Commands/cs_go.cpp15
-rw-r--r--src/server/scripts/Commands/cs_gobject.cpp10
-rw-r--r--src/server/scripts/Commands/cs_group.cpp10
-rw-r--r--src/server/scripts/Commands/cs_guild.cpp10
-rw-r--r--src/server/scripts/Commands/cs_honor.cpp10
-rw-r--r--src/server/scripts/Commands/cs_instance.cpp10
-rw-r--r--src/server/scripts/Commands/cs_inventory.cpp10
-rw-r--r--src/server/scripts/Commands/cs_item.cpp10
-rw-r--r--src/server/scripts/Commands/cs_learn.cpp10
-rw-r--r--src/server/scripts/Commands/cs_lfg.cpp10
-rw-r--r--src/server/scripts/Commands/cs_list.cpp10
-rw-r--r--src/server/scripts/Commands/cs_lookup.cpp10
-rw-r--r--src/server/scripts/Commands/cs_message.cpp10
-rw-r--r--src/server/scripts/Commands/cs_misc.cpp101
-rw-r--r--src/server/scripts/Commands/cs_mmaps.cpp45
-rw-r--r--src/server/scripts/Commands/cs_modify.cpp20
-rw-r--r--src/server/scripts/Commands/cs_npc.cpp10
-rw-r--r--src/server/scripts/Commands/cs_pet.cpp10
-rw-r--r--src/server/scripts/Commands/cs_player.cpp10
-rw-r--r--src/server/scripts/Commands/cs_player_settings.cpp10
-rw-r--r--src/server/scripts/Commands/cs_quest.cpp58
-rw-r--r--src/server/scripts/Commands/cs_reload.cpp10
-rw-r--r--src/server/scripts/Commands/cs_reset.cpp10
-rw-r--r--src/server/scripts/Commands/cs_script_loader.cpp10
-rw-r--r--src/server/scripts/Commands/cs_send.cpp10
-rw-r--r--src/server/scripts/Commands/cs_server.cpp10
-rw-r--r--src/server/scripts/Commands/cs_spectator.cpp10
-rw-r--r--src/server/scripts/Commands/cs_tele.cpp10
-rw-r--r--src/server/scripts/Commands/cs_ticket.cpp24
-rw-r--r--src/server/scripts/Commands/cs_titles.cpp10
-rw-r--r--src/server/scripts/Commands/cs_worldstate.cpp10
-rw-r--r--src/server/scripts/Commands/cs_wp.cpp10
-rw-r--r--src/server/scripts/Custom/custom_script_loader.cpp10
-rw-r--r--src/server/scripts/EasternKingdoms/AlteracValley/alterac_valley.cpp12
-rw-r--r--src/server/scripts/EasternKingdoms/AlteracValley/boss_balinda.cpp10
-rw-r--r--src/server/scripts/EasternKingdoms/AlteracValley/boss_drekthar.cpp10
-rw-r--r--src/server/scripts/EasternKingdoms/AlteracValley/boss_galvangar.cpp10
-rw-r--r--src/server/scripts/EasternKingdoms/AlteracValley/boss_vanndar.cpp10
-rw-r--r--src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockDepths/blackrock_depths.cpp25
-rw-r--r--src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockDepths/blackrock_depths.h10
-rw-r--r--src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockDepths/boss_ambassador_flamelash.cpp10
-rw-r--r--src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockDepths/boss_anubshiah.cpp41
-rw-r--r--src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockDepths/boss_emperor_dagran_thaurissan.cpp10
-rw-r--r--src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockDepths/boss_eviscerator.cpp29
-rw-r--r--src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockDepths/boss_general_angerforge.cpp10
-rw-r--r--src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockDepths/boss_gorosh_the_dervish.cpp35
-rw-r--r--src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockDepths/boss_grizzle.cpp29
-rw-r--r--src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockDepths/boss_hedrum.cpp31
-rw-r--r--src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockDepths/boss_high_interrogator_gerstahn.cpp10
-rw-r--r--src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockDepths/boss_magmus.cpp10
-rw-r--r--src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockDepths/boss_moira_bronzebeard.cpp47
-rw-r--r--src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockDepths/boss_okthor.cpp39
-rw-r--r--src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockDepths/boss_tomb_of_seven.cpp10
-rw-r--r--src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockDepths/instance_blackrock_depths.cpp12
-rw-r--r--src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockSpire/blackrock_spire.h10
-rw-r--r--src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockSpire/boss_drakkisath.cpp10
-rw-r--r--src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockSpire/boss_gyth.cpp14
-rw-r--r--src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockSpire/boss_halycon.cpp10
-rw-r--r--src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockSpire/boss_highlord_omokk.cpp10
-rw-r--r--src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockSpire/boss_lord_valthalak.cpp18
-rw-r--r--src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockSpire/boss_mor_grayhoof.cpp14
-rw-r--r--src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockSpire/boss_overlord_wyrmthalak.cpp10
-rw-r--r--src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockSpire/boss_pyroguard_emberseer.cpp10
-rw-r--r--src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockSpire/boss_quartermaster_zigris.cpp20
-rw-r--r--src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockSpire/boss_rend_blackhand.cpp28
-rw-r--r--src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockSpire/boss_solakar_flamewreath.cpp10
-rw-r--r--src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockSpire/boss_the_beast.cpp22
-rw-r--r--src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockSpire/boss_urok_doomhowl.cpp10
-rw-r--r--src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockSpire/boss_warmaster_voone.cpp24
-rw-r--r--src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockSpire/instance_blackrock_spire.cpp17
-rw-r--r--src/server/scripts/EasternKingdoms/BlackrockMountain/BlackwingLair/blackwing_lair.h10
-rw-r--r--src/server/scripts/EasternKingdoms/BlackrockMountain/BlackwingLair/boss_broodlord_lashlayer.cpp10
-rw-r--r--src/server/scripts/EasternKingdoms/BlackrockMountain/BlackwingLair/boss_chromaggus.cpp14
-rw-r--r--src/server/scripts/EasternKingdoms/BlackrockMountain/BlackwingLair/boss_ebonroc.cpp12
-rw-r--r--src/server/scripts/EasternKingdoms/BlackrockMountain/BlackwingLair/boss_firemaw.cpp10
-rw-r--r--src/server/scripts/EasternKingdoms/BlackrockMountain/BlackwingLair/boss_flamegor.cpp10
-rw-r--r--src/server/scripts/EasternKingdoms/BlackrockMountain/BlackwingLair/boss_nefarian.cpp22
-rw-r--r--src/server/scripts/EasternKingdoms/BlackrockMountain/BlackwingLair/boss_razorgore.cpp12
-rw-r--r--src/server/scripts/EasternKingdoms/BlackrockMountain/BlackwingLair/boss_vaelastrasz.cpp10
-rw-r--r--src/server/scripts/EasternKingdoms/BlackrockMountain/BlackwingLair/instance_blackwing_lair.cpp16
-rw-r--r--src/server/scripts/EasternKingdoms/BlackrockMountain/MoltenCore/boss_baron_geddon.cpp16
-rw-r--r--src/server/scripts/EasternKingdoms/BlackrockMountain/MoltenCore/boss_garr.cpp14
-rw-r--r--src/server/scripts/EasternKingdoms/BlackrockMountain/MoltenCore/boss_gehennas.cpp16
-rw-r--r--src/server/scripts/EasternKingdoms/BlackrockMountain/MoltenCore/boss_golemagg.cpp10
-rw-r--r--src/server/scripts/EasternKingdoms/BlackrockMountain/MoltenCore/boss_lucifron.cpp16
-rw-r--r--src/server/scripts/EasternKingdoms/BlackrockMountain/MoltenCore/boss_magmadar.cpp18
-rw-r--r--src/server/scripts/EasternKingdoms/BlackrockMountain/MoltenCore/boss_majordomo_executus.cpp18
-rw-r--r--src/server/scripts/EasternKingdoms/BlackrockMountain/MoltenCore/boss_ragnaros.cpp22
-rw-r--r--src/server/scripts/EasternKingdoms/BlackrockMountain/MoltenCore/boss_shazzrah.cpp20
-rw-r--r--src/server/scripts/EasternKingdoms/BlackrockMountain/MoltenCore/boss_sulfuron_harbinger.cpp28
-rw-r--r--src/server/scripts/EasternKingdoms/BlackrockMountain/MoltenCore/instance_molten_core.cpp10
-rw-r--r--src/server/scripts/EasternKingdoms/BlackrockMountain/MoltenCore/molten_core.cpp12
-rw-r--r--src/server/scripts/EasternKingdoms/BlackrockMountain/MoltenCore/molten_core.h10
-rw-r--r--src/server/scripts/EasternKingdoms/Deadmines/boss_mr_smite.cpp14
-rw-r--r--src/server/scripts/EasternKingdoms/Deadmines/deadmines.h10
-rw-r--r--src/server/scripts/EasternKingdoms/Deadmines/instance_deadmines.cpp10
-rw-r--r--src/server/scripts/EasternKingdoms/Gnomeregan/gnomeregan.h10
-rw-r--r--src/server/scripts/EasternKingdoms/Gnomeregan/instance_gnomeregan.cpp14
-rw-r--r--src/server/scripts/EasternKingdoms/Karazhan/boss_chess_event.cpp10
-rw-r--r--src/server/scripts/EasternKingdoms/Karazhan/boss_curator.cpp10
-rw-r--r--src/server/scripts/EasternKingdoms/Karazhan/boss_maiden_of_virtue.cpp10
-rw-r--r--src/server/scripts/EasternKingdoms/Karazhan/boss_midnight.cpp10
-rw-r--r--src/server/scripts/EasternKingdoms/Karazhan/boss_moroes.cpp10
-rw-r--r--src/server/scripts/EasternKingdoms/Karazhan/boss_netherspite.cpp10
-rw-r--r--src/server/scripts/EasternKingdoms/Karazhan/boss_nightbane.cpp14
-rw-r--r--src/server/scripts/EasternKingdoms/Karazhan/boss_prince_malchezaar.cpp10
-rw-r--r--src/server/scripts/EasternKingdoms/Karazhan/boss_servant_quarters.cpp10
-rw-r--r--src/server/scripts/EasternKingdoms/Karazhan/boss_shade_of_aran.cpp12
-rw-r--r--src/server/scripts/EasternKingdoms/Karazhan/boss_tenris_mirkblood.cpp27
-rw-r--r--src/server/scripts/EasternKingdoms/Karazhan/boss_terestian_illhoof.cpp12
-rw-r--r--src/server/scripts/EasternKingdoms/Karazhan/bosses_opera.cpp10
-rw-r--r--src/server/scripts/EasternKingdoms/Karazhan/instance_karazhan.cpp10
-rw-r--r--src/server/scripts/EasternKingdoms/Karazhan/karazhan.cpp42
-rw-r--r--src/server/scripts/EasternKingdoms/Karazhan/karazhan.h10
-rw-r--r--src/server/scripts/EasternKingdoms/MagistersTerrace/boss_felblood_kaelthas.cpp12
-rw-r--r--src/server/scripts/EasternKingdoms/MagistersTerrace/boss_priestess_delrissa.cpp10
-rw-r--r--src/server/scripts/EasternKingdoms/MagistersTerrace/boss_selin_fireheart.cpp12
-rw-r--r--src/server/scripts/EasternKingdoms/MagistersTerrace/boss_vexallus.cpp12
-rw-r--r--src/server/scripts/EasternKingdoms/MagistersTerrace/instance_magisters_terrace.cpp12
-rw-r--r--src/server/scripts/EasternKingdoms/MagistersTerrace/magisters_terrace.h10
-rw-r--r--src/server/scripts/EasternKingdoms/ScarletEnclave/chapter1.cpp321
-rw-r--r--src/server/scripts/EasternKingdoms/ScarletEnclave/chapter2.cpp86
-rw-r--r--src/server/scripts/EasternKingdoms/ScarletEnclave/chapter3.cpp10
-rw-r--r--src/server/scripts/EasternKingdoms/ScarletEnclave/chapter5.cpp44
-rw-r--r--src/server/scripts/EasternKingdoms/ScarletEnclave/zone_the_scarlet_enclave.cpp10
-rw-r--r--src/server/scripts/EasternKingdoms/ScarletMonastery/instance_scarlet_monastery.cpp10
-rw-r--r--src/server/scripts/EasternKingdoms/ScarletMonastery/scarletmonastery.h10
-rw-r--r--src/server/scripts/EasternKingdoms/Scholomance/boss_darkmaster_gandling.cpp33
-rw-r--r--src/server/scripts/EasternKingdoms/Scholomance/boss_kirtonos_the_herald.cpp16
-rw-r--r--src/server/scripts/EasternKingdoms/Scholomance/boss_kormok.cpp10
-rw-r--r--src/server/scripts/EasternKingdoms/Scholomance/instance_scholomance.cpp20
-rw-r--r--src/server/scripts/EasternKingdoms/Scholomance/scholomance.h10
-rw-r--r--src/server/scripts/EasternKingdoms/ShadowfangKeep/boss_apothecary_hummel.cpp10
-rw-r--r--src/server/scripts/EasternKingdoms/ShadowfangKeep/instance_shadowfang_keep.cpp10
-rw-r--r--src/server/scripts/EasternKingdoms/ShadowfangKeep/shadowfang_keep.h10
-rw-r--r--src/server/scripts/EasternKingdoms/Stratholme/boss_baroness_anastari.cpp10
-rw-r--r--src/server/scripts/EasternKingdoms/Stratholme/boss_jarien_and_sothos.cpp10
-rw-r--r--src/server/scripts/EasternKingdoms/Stratholme/instance_stratholme.cpp32
-rw-r--r--src/server/scripts/EasternKingdoms/Stratholme/stratholme.h10
-rw-r--r--src/server/scripts/EasternKingdoms/SunkenTemple/instance_sunken_temple.cpp10
-rw-r--r--src/server/scripts/EasternKingdoms/SunkenTemple/sunken_temple.h10
-rw-r--r--src/server/scripts/EasternKingdoms/SunwellPlateau/boss_brutallus.cpp76
-rw-r--r--src/server/scripts/EasternKingdoms/SunwellPlateau/boss_eredar_twins.cpp10
-rw-r--r--src/server/scripts/EasternKingdoms/SunwellPlateau/boss_felmyst.cpp35
-rw-r--r--src/server/scripts/EasternKingdoms/SunwellPlateau/boss_kalecgos.cpp10
-rw-r--r--src/server/scripts/EasternKingdoms/SunwellPlateau/boss_kiljaeden.cpp106
-rw-r--r--src/server/scripts/EasternKingdoms/SunwellPlateau/boss_muru.cpp12
-rw-r--r--src/server/scripts/EasternKingdoms/SunwellPlateau/instance_sunwell_plateau.cpp10
-rw-r--r--src/server/scripts/EasternKingdoms/SunwellPlateau/sunwell_plateau.h10
-rw-r--r--src/server/scripts/EasternKingdoms/TheStockade/instance_the_stockade.cpp10
-rw-r--r--src/server/scripts/EasternKingdoms/Uldaman/instance_uldaman.cpp10
-rw-r--r--src/server/scripts/EasternKingdoms/Uldaman/uldaman.h10
-rw-r--r--src/server/scripts/EasternKingdoms/ZulAman/boss_akilzon.cpp10
-rw-r--r--src/server/scripts/EasternKingdoms/ZulAman/boss_halazzi.cpp10
-rw-r--r--src/server/scripts/EasternKingdoms/ZulAman/boss_hexlord.cpp90
-rw-r--r--src/server/scripts/EasternKingdoms/ZulAman/boss_janalai.cpp10
-rw-r--r--src/server/scripts/EasternKingdoms/ZulAman/boss_nalorakk.cpp16
-rw-r--r--src/server/scripts/EasternKingdoms/ZulAman/boss_zuljin.cpp15
-rw-r--r--src/server/scripts/EasternKingdoms/ZulAman/instance_zulaman.cpp10
-rw-r--r--src/server/scripts/EasternKingdoms/ZulAman/zulaman.cpp40
-rw-r--r--src/server/scripts/EasternKingdoms/ZulAman/zulaman.h10
-rw-r--r--src/server/scripts/EasternKingdoms/ZulGurub/boss_arlokk.cpp24
-rw-r--r--src/server/scripts/EasternKingdoms/ZulGurub/boss_gahzranka.cpp12
-rw-r--r--src/server/scripts/EasternKingdoms/ZulGurub/boss_grilek.cpp10
-rw-r--r--src/server/scripts/EasternKingdoms/ZulGurub/boss_hakkar.cpp10
-rw-r--r--src/server/scripts/EasternKingdoms/ZulGurub/boss_hazzarah.cpp10
-rw-r--r--src/server/scripts/EasternKingdoms/ZulGurub/boss_jeklik.cpp16
-rw-r--r--src/server/scripts/EasternKingdoms/ZulGurub/boss_jindo.cpp10
-rw-r--r--src/server/scripts/EasternKingdoms/ZulGurub/boss_mandokir.cpp22
-rw-r--r--src/server/scripts/EasternKingdoms/ZulGurub/boss_marli.cpp20
-rw-r--r--src/server/scripts/EasternKingdoms/ZulGurub/boss_renataki.cpp10
-rw-r--r--src/server/scripts/EasternKingdoms/ZulGurub/boss_thekal.cpp10
-rw-r--r--src/server/scripts/EasternKingdoms/ZulGurub/boss_venoxis.cpp10
-rw-r--r--src/server/scripts/EasternKingdoms/ZulGurub/boss_wushoolay.cpp10
-rw-r--r--src/server/scripts/EasternKingdoms/ZulGurub/instance_zulgurub.cpp10
-rw-r--r--src/server/scripts/EasternKingdoms/ZulGurub/zulgurub.cpp10
-rw-r--r--src/server/scripts/EasternKingdoms/ZulGurub/zulgurub.h10
-rw-r--r--src/server/scripts/EasternKingdoms/eastern_kingdoms_script_loader.cpp10
-rw-r--r--src/server/scripts/EasternKingdoms/zone_arathi_highlands.cpp15
-rw-r--r--src/server/scripts/EasternKingdoms/zone_blasted_lands.cpp10
-rw-r--r--src/server/scripts/EasternKingdoms/zone_burning_steppes.cpp10
-rw-r--r--src/server/scripts/EasternKingdoms/zone_duskwood.cpp12
-rw-r--r--src/server/scripts/EasternKingdoms/zone_eastern_plaguelands.cpp18
-rw-r--r--src/server/scripts/EasternKingdoms/zone_elwynn_forest.cpp30
-rw-r--r--src/server/scripts/EasternKingdoms/zone_eversong_woods.cpp14
-rw-r--r--src/server/scripts/EasternKingdoms/zone_ghostlands.cpp39
-rw-r--r--src/server/scripts/EasternKingdoms/zone_hinterlands.cpp15
-rw-r--r--src/server/scripts/EasternKingdoms/zone_isle_of_queldanas.cpp170
-rw-r--r--src/server/scripts/EasternKingdoms/zone_redridge_mountains.cpp13
-rw-r--r--src/server/scripts/EasternKingdoms/zone_silverpine_forest.cpp31
-rw-r--r--src/server/scripts/EasternKingdoms/zone_stormwind_city.cpp16
-rw-r--r--src/server/scripts/EasternKingdoms/zone_undercity.cpp108
-rw-r--r--src/server/scripts/EasternKingdoms/zone_western_plaguelands.cpp10
-rw-r--r--src/server/scripts/EasternKingdoms/zone_westfall.cpp15
-rw-r--r--src/server/scripts/EasternKingdoms/zone_wetlands.cpp19
-rw-r--r--src/server/scripts/Events/brewfest.cpp26
-rw-r--r--src/server/scripts/Events/childrens_week.cpp10
-rw-r--r--src/server/scripts/Events/events_script_loader.cpp10
-rw-r--r--src/server/scripts/Events/firework_show/firework_show.cpp10
-rw-r--r--src/server/scripts/Events/firework_show/firework_show.h10
-rw-r--r--src/server/scripts/Events/firework_show/firework_show_BootyBay.h10
-rw-r--r--src/server/scripts/Events/firework_show/firework_show_Exodar.h10
-rw-r--r--src/server/scripts/Events/firework_show/firework_show_Ironforge.h10
-rw-r--r--src/server/scripts/Events/firework_show/firework_show_Orgrimmar.h10
-rw-r--r--src/server/scripts/Events/firework_show/firework_show_Shattrath.h10
-rw-r--r--src/server/scripts/Events/firework_show/firework_show_Silvermoon.h10
-rw-r--r--src/server/scripts/Events/firework_show/firework_show_Stormwind.h10
-rw-r--r--src/server/scripts/Events/firework_show/firework_show_Teldrassil.h10
-rw-r--r--src/server/scripts/Events/firework_show/firework_show_ThunderBluff.h10
-rw-r--r--src/server/scripts/Events/firework_show/firework_show_Undercity.h10
-rw-r--r--src/server/scripts/Events/hallows_end.cpp44
-rw-r--r--src/server/scripts/Events/love_in_air.cpp12
-rw-r--r--src/server/scripts/Events/midsummer.cpp10
-rw-r--r--src/server/scripts/Events/noblegarden.cpp10
-rw-r--r--src/server/scripts/Events/pilgrims_bounty.cpp10
-rw-r--r--src/server/scripts/Events/winter_veil.cpp12
-rw-r--r--src/server/scripts/Kalimdor/BlackfathomDeeps/blackfathom_deeps.h10
-rw-r--r--src/server/scripts/Kalimdor/BlackfathomDeeps/instance_blackfathom_deeps.cpp10
-rw-r--r--src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/boss_anetheron.cpp14
-rw-r--r--src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/boss_archimonde.cpp14
-rw-r--r--src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/boss_azgalor.cpp14
-rw-r--r--src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/boss_kazrogal.cpp18
-rw-r--r--src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/boss_rage_winterchill.cpp14
-rw-r--r--src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/hyjal.cpp32
-rw-r--r--src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/hyjal.h10
-rw-r--r--src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/instance_hyjal.cpp26
-rw-r--r--src/server/scripts/Kalimdor/CavernsOfTime/CullingOfStratholme/boss_epoch.cpp41
-rw-r--r--src/server/scripts/Kalimdor/CavernsOfTime/CullingOfStratholme/boss_infinite.cpp26
-rw-r--r--src/server/scripts/Kalimdor/CavernsOfTime/CullingOfStratholme/boss_mal_ganis.cpp43
-rw-r--r--src/server/scripts/Kalimdor/CavernsOfTime/CullingOfStratholme/boss_meathook.cpp32
-rw-r--r--src/server/scripts/Kalimdor/CavernsOfTime/CullingOfStratholme/boss_salramm.cpp40
-rw-r--r--src/server/scripts/Kalimdor/CavernsOfTime/CullingOfStratholme/culling_of_stratholme.cpp220
-rw-r--r--src/server/scripts/Kalimdor/CavernsOfTime/CullingOfStratholme/culling_of_stratholme.h10
-rw-r--r--src/server/scripts/Kalimdor/CavernsOfTime/CullingOfStratholme/instance_culling_of_stratholme.cpp12
-rw-r--r--src/server/scripts/Kalimdor/CavernsOfTime/EscapeFromDurnholdeKeep/boss_captain_skarloc.cpp10
-rw-r--r--src/server/scripts/Kalimdor/CavernsOfTime/EscapeFromDurnholdeKeep/boss_epoch_hunter.cpp10
-rw-r--r--src/server/scripts/Kalimdor/CavernsOfTime/EscapeFromDurnholdeKeep/boss_lieutenant_drake.cpp18
-rw-r--r--src/server/scripts/Kalimdor/CavernsOfTime/EscapeFromDurnholdeKeep/instance_old_hillsbrad.cpp24
-rw-r--r--src/server/scripts/Kalimdor/CavernsOfTime/EscapeFromDurnholdeKeep/old_hillsbrad.cpp169
-rw-r--r--src/server/scripts/Kalimdor/CavernsOfTime/EscapeFromDurnholdeKeep/old_hillsbrad.h10
-rw-r--r--src/server/scripts/Kalimdor/CavernsOfTime/TheBlackMorass/boss_aeonus.cpp10
-rw-r--r--src/server/scripts/Kalimdor/CavernsOfTime/TheBlackMorass/boss_chrono_lord_deja.cpp10
-rw-r--r--src/server/scripts/Kalimdor/CavernsOfTime/TheBlackMorass/boss_temporus.cpp10
-rw-r--r--src/server/scripts/Kalimdor/CavernsOfTime/TheBlackMorass/instance_the_black_morass.cpp12
-rw-r--r--src/server/scripts/Kalimdor/CavernsOfTime/TheBlackMorass/the_black_morass.cpp66
-rw-r--r--src/server/scripts/Kalimdor/CavernsOfTime/TheBlackMorass/the_black_morass.h10
-rw-r--r--src/server/scripts/Kalimdor/DireMaul/boss_isalien.cpp10
-rw-r--r--src/server/scripts/Kalimdor/DireMaul/dire_maul.h10
-rw-r--r--src/server/scripts/Kalimdor/DireMaul/instance_dire_maul.cpp12
-rw-r--r--src/server/scripts/Kalimdor/Maraudon/instance_maraudon.cpp10
-rw-r--r--src/server/scripts/Kalimdor/Maraudon/maraudon.h10
-rw-r--r--src/server/scripts/Kalimdor/OnyxiasLair/boss_onyxia.cpp90
-rw-r--r--src/server/scripts/Kalimdor/OnyxiasLair/instance_onyxias_lair.cpp10
-rw-r--r--src/server/scripts/Kalimdor/OnyxiasLair/onyxias_lair.h10
-rw-r--r--src/server/scripts/Kalimdor/RagefireChasm/instance_ragefire_chasm.cpp10
-rw-r--r--src/server/scripts/Kalimdor/RazorfenDowns/instance_razorfen_downs.cpp10
-rw-r--r--src/server/scripts/Kalimdor/RazorfenDowns/razorfen_downs.cpp16
-rw-r--r--src/server/scripts/Kalimdor/RazorfenDowns/razorfen_downs.h10
-rw-r--r--src/server/scripts/Kalimdor/RazorfenKraul/instance_razorfen_kraul.cpp10
-rw-r--r--src/server/scripts/Kalimdor/RuinsOfAhnQiraj/boss_ayamiss.cpp18
-rw-r--r--src/server/scripts/Kalimdor/RuinsOfAhnQiraj/boss_buru.cpp12
-rw-r--r--src/server/scripts/Kalimdor/RuinsOfAhnQiraj/boss_kurinnaxx.cpp10
-rw-r--r--src/server/scripts/Kalimdor/RuinsOfAhnQiraj/boss_moam.cpp10
-rw-r--r--src/server/scripts/Kalimdor/RuinsOfAhnQiraj/boss_ossirian.cpp16
-rw-r--r--src/server/scripts/Kalimdor/RuinsOfAhnQiraj/boss_rajaxx.cpp12
-rw-r--r--src/server/scripts/Kalimdor/RuinsOfAhnQiraj/instance_ruins_of_ahnqiraj.cpp10
-rw-r--r--src/server/scripts/Kalimdor/RuinsOfAhnQiraj/ruins_of_ahnqiraj.cpp10
-rw-r--r--src/server/scripts/Kalimdor/RuinsOfAhnQiraj/ruins_of_ahnqiraj.h10
-rw-r--r--src/server/scripts/Kalimdor/TempleOfAhnQiraj/boss_bug_trio.cpp14
-rw-r--r--src/server/scripts/Kalimdor/TempleOfAhnQiraj/boss_cthun.cpp10
-rw-r--r--src/server/scripts/Kalimdor/TempleOfAhnQiraj/boss_fankriss.cpp10
-rw-r--r--src/server/scripts/Kalimdor/TempleOfAhnQiraj/boss_huhuran.cpp10
-rw-r--r--src/server/scripts/Kalimdor/TempleOfAhnQiraj/boss_ouro.cpp16
-rw-r--r--src/server/scripts/Kalimdor/TempleOfAhnQiraj/boss_sartura.cpp10
-rw-r--r--src/server/scripts/Kalimdor/TempleOfAhnQiraj/boss_skeram.cpp10
-rw-r--r--src/server/scripts/Kalimdor/TempleOfAhnQiraj/boss_twinemperors.cpp12
-rw-r--r--src/server/scripts/Kalimdor/TempleOfAhnQiraj/boss_viscidus.cpp12
-rw-r--r--src/server/scripts/Kalimdor/TempleOfAhnQiraj/instance_temple_of_ahnqiraj.cpp10
-rw-r--r--src/server/scripts/Kalimdor/TempleOfAhnQiraj/mob_anubisath_sentinel.cpp10
-rw-r--r--src/server/scripts/Kalimdor/TempleOfAhnQiraj/temple_of_ahnqiraj.cpp18
-rw-r--r--src/server/scripts/Kalimdor/TempleOfAhnQiraj/temple_of_ahnqiraj.h10
-rw-r--r--src/server/scripts/Kalimdor/WailingCaverns/instance_wailing_caverns.cpp10
-rw-r--r--src/server/scripts/Kalimdor/WailingCaverns/wailing_caverns.h10
-rw-r--r--src/server/scripts/Kalimdor/ZulFarrak/instance_zulfarrak.cpp12
-rw-r--r--src/server/scripts/Kalimdor/ZulFarrak/zulfarrak.cpp22
-rw-r--r--src/server/scripts/Kalimdor/ZulFarrak/zulfarrak.h10
-rw-r--r--src/server/scripts/Kalimdor/boss_azuregos.cpp10
-rw-r--r--src/server/scripts/Kalimdor/kalimdor_script_loader.cpp12
-rw-r--r--src/server/scripts/Kalimdor/zone_ashenvale.cpp13
-rw-r--r--src/server/scripts/Kalimdor/zone_azshara.cpp361
-rw-r--r--src/server/scripts/Kalimdor/zone_azuremyst_isle.cpp15
-rw-r--r--src/server/scripts/Kalimdor/zone_bloodmyst_isle.cpp12
-rw-r--r--src/server/scripts/Kalimdor/zone_darkshore.cpp19
-rw-r--r--src/server/scripts/Kalimdor/zone_desolace.cpp26
-rw-r--r--src/server/scripts/Kalimdor/zone_durotar.cpp10
-rw-r--r--src/server/scripts/Kalimdor/zone_dustwallow_marsh.cpp10
-rw-r--r--src/server/scripts/Kalimdor/zone_felwood.cpp10
-rw-r--r--src/server/scripts/Kalimdor/zone_feralas.cpp10
-rw-r--r--src/server/scripts/Kalimdor/zone_moonglade.cpp13
-rw-r--r--src/server/scripts/Kalimdor/zone_orgrimmar.cpp10
-rw-r--r--src/server/scripts/Kalimdor/zone_silithus.cpp14
-rw-r--r--src/server/scripts/Kalimdor/zone_stonetalon_mountains.cpp15
-rw-r--r--src/server/scripts/Kalimdor/zone_tanaris.cpp13
-rw-r--r--src/server/scripts/Kalimdor/zone_the_barrens.cpp28
-rw-r--r--src/server/scripts/Kalimdor/zone_thousand_needles.cpp20
-rw-r--r--src/server/scripts/Kalimdor/zone_thunder_bluff.cpp10
-rw-r--r--src/server/scripts/Kalimdor/zone_ungoro_crater.cpp13
-rw-r--r--src/server/scripts/Kalimdor/zone_winterspring.cpp23
-rw-r--r--src/server/scripts/Northrend/AzjolNerub/AzjolNerub/azjol_nerub.h22
-rw-r--r--src/server/scripts/Northrend/AzjolNerub/AzjolNerub/boss_anubarak.cpp492
-rw-r--r--src/server/scripts/Northrend/AzjolNerub/AzjolNerub/boss_hadronox.cpp20
-rw-r--r--src/server/scripts/Northrend/AzjolNerub/AzjolNerub/boss_krikthir_the_gatewatcher.cpp60
-rw-r--r--src/server/scripts/Northrend/AzjolNerub/AzjolNerub/instance_azjol_nerub.cpp26
-rw-r--r--src/server/scripts/Northrend/AzjolNerub/ahnkahet/ahnkahet.h11
-rw-r--r--src/server/scripts/Northrend/AzjolNerub/ahnkahet/boss_amanitar.cpp10
-rw-r--r--src/server/scripts/Northrend/AzjolNerub/ahnkahet/boss_elder_nadox.cpp10
-rw-r--r--src/server/scripts/Northrend/AzjolNerub/ahnkahet/boss_herald_volazj.cpp121
-rw-r--r--src/server/scripts/Northrend/AzjolNerub/ahnkahet/boss_jedoga_shadowseeker.cpp73
-rw-r--r--src/server/scripts/Northrend/AzjolNerub/ahnkahet/boss_prince_taldaram.cpp18
-rw-r--r--src/server/scripts/Northrend/AzjolNerub/ahnkahet/instance_ahnkahet.cpp10
-rw-r--r--src/server/scripts/Northrend/ChamberOfAspects/ObsidianSanctum/boss_sartharion.cpp34
-rw-r--r--src/server/scripts/Northrend/ChamberOfAspects/ObsidianSanctum/instance_obsidian_sanctum.cpp10
-rw-r--r--src/server/scripts/Northrend/ChamberOfAspects/ObsidianSanctum/obsidian_sanctum.h10
-rw-r--r--src/server/scripts/Northrend/ChamberOfAspects/RubySanctum/boss_baltharus_the_warborn.cpp18
-rw-r--r--src/server/scripts/Northrend/ChamberOfAspects/RubySanctum/boss_general_zarithrian.cpp15
-rw-r--r--src/server/scripts/Northrend/ChamberOfAspects/RubySanctum/boss_halion.cpp26
-rw-r--r--src/server/scripts/Northrend/ChamberOfAspects/RubySanctum/boss_saviana_ragefire.cpp18
-rw-r--r--src/server/scripts/Northrend/ChamberOfAspects/RubySanctum/instance_ruby_sanctum.cpp10
-rw-r--r--src/server/scripts/Northrend/ChamberOfAspects/RubySanctum/ruby_sanctum.h10
-rw-r--r--src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheChampion/boss_argent_challenge.cpp87
-rw-r--r--src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheChampion/boss_black_knight.cpp131
-rw-r--r--src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheChampion/boss_grand_champions.cpp71
-rw-r--r--src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheChampion/instance_trial_of_the_champion.cpp23
-rw-r--r--src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheChampion/trial_of_the_champion.cpp10
-rw-r--r--src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheChampion/trial_of_the_champion.h10
-rw-r--r--src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheCrusader/boss_anubarak_trial.cpp25
-rw-r--r--src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheCrusader/boss_faction_champions.cpp230
-rw-r--r--src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheCrusader/boss_lord_jaraxxus.cpp14
-rw-r--r--src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheCrusader/boss_northrend_beasts.cpp12
-rw-r--r--src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheCrusader/boss_twin_valkyr.cpp20
-rw-r--r--src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheCrusader/instance_trial_of_the_crusader.cpp154
-rw-r--r--src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheCrusader/trial_of_the_crusader.cpp10
-rw-r--r--src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheCrusader/trial_of_the_crusader.h13
-rw-r--r--src/server/scripts/Northrend/DraktharonKeep/boss_dred.cpp149
-rw-r--r--src/server/scripts/Northrend/DraktharonKeep/boss_novos.cpp349
-rw-r--r--src/server/scripts/Northrend/DraktharonKeep/boss_tharon_ja.cpp68
-rw-r--r--src/server/scripts/Northrend/DraktharonKeep/boss_trollgore.cpp24
-rw-r--r--src/server/scripts/Northrend/DraktharonKeep/drak_tharon_keep.h11
-rw-r--r--src/server/scripts/Northrend/DraktharonKeep/instance_drak_tharon_keep.cpp75
-rw-r--r--src/server/scripts/Northrend/FrozenHalls/ForgeOfSouls/boss_bronjahm.cpp14
-rw-r--r--src/server/scripts/Northrend/FrozenHalls/ForgeOfSouls/boss_devourer_of_souls.cpp16
-rw-r--r--src/server/scripts/Northrend/FrozenHalls/ForgeOfSouls/forge_of_souls.cpp10
-rw-r--r--src/server/scripts/Northrend/FrozenHalls/ForgeOfSouls/forge_of_souls.h10
-rw-r--r--src/server/scripts/Northrend/FrozenHalls/ForgeOfSouls/instance_forge_of_souls.cpp12
-rw-r--r--src/server/scripts/Northrend/FrozenHalls/HallsOfReflection/boss_falric.cpp20
-rw-r--r--src/server/scripts/Northrend/FrozenHalls/HallsOfReflection/boss_marwyn.cpp10
-rw-r--r--src/server/scripts/Northrend/FrozenHalls/HallsOfReflection/halls_of_reflection.cpp38
-rw-r--r--src/server/scripts/Northrend/FrozenHalls/HallsOfReflection/halls_of_reflection.h10
-rw-r--r--src/server/scripts/Northrend/FrozenHalls/HallsOfReflection/instance_halls_of_reflection.cpp38
-rw-r--r--src/server/scripts/Northrend/FrozenHalls/PitOfSaron/boss_forgemaster_garfrost.cpp80
-rw-r--r--src/server/scripts/Northrend/FrozenHalls/PitOfSaron/boss_krickandick.cpp22
-rw-r--r--src/server/scripts/Northrend/FrozenHalls/PitOfSaron/boss_scourgelord_tyrannus.cpp14
-rw-r--r--src/server/scripts/Northrend/FrozenHalls/PitOfSaron/instance_pit_of_saron.cpp10
-rw-r--r--src/server/scripts/Northrend/FrozenHalls/PitOfSaron/pit_of_saron.cpp38
-rw-r--r--src/server/scripts/Northrend/FrozenHalls/PitOfSaron/pit_of_saron.h10
-rw-r--r--src/server/scripts/Northrend/Gundrak/boss_drakkari_colossus.cpp65
-rw-r--r--src/server/scripts/Northrend/Gundrak/boss_eck.cpp50
-rw-r--r--src/server/scripts/Northrend/Gundrak/boss_gal_darah.cpp249
-rw-r--r--src/server/scripts/Northrend/Gundrak/boss_moorabi.cpp92
-rw-r--r--src/server/scripts/Northrend/Gundrak/boss_slad_ran.cpp27
-rw-r--r--src/server/scripts/Northrend/Gundrak/gundrak.h23
-rw-r--r--src/server/scripts/Northrend/Gundrak/instance_gundrak.cpp55
-rw-r--r--src/server/scripts/Northrend/IcecrownCitadel/boss_blood_prince_council.cpp28
-rw-r--r--src/server/scripts/Northrend/IcecrownCitadel/boss_blood_queen_lana_thel.cpp12
-rw-r--r--src/server/scripts/Northrend/IcecrownCitadel/boss_deathbringer_saurfang.cpp29
-rw-r--r--src/server/scripts/Northrend/IcecrownCitadel/boss_festergut.cpp68
-rw-r--r--src/server/scripts/Northrend/IcecrownCitadel/boss_icecrown_gunship_battle.cpp51
-rw-r--r--src/server/scripts/Northrend/IcecrownCitadel/boss_lady_deathwhisper.cpp18
-rw-r--r--src/server/scripts/Northrend/IcecrownCitadel/boss_lord_marrowgar.cpp22
-rw-r--r--src/server/scripts/Northrend/IcecrownCitadel/boss_professor_putricide.cpp32
-rw-r--r--src/server/scripts/Northrend/IcecrownCitadel/boss_rotface.cpp30
-rw-r--r--src/server/scripts/Northrend/IcecrownCitadel/boss_sindragosa.cpp44
-rw-r--r--src/server/scripts/Northrend/IcecrownCitadel/boss_the_lich_king.cpp127
-rw-r--r--src/server/scripts/Northrend/IcecrownCitadel/boss_valithria_dreamwalker.cpp53
-rw-r--r--src/server/scripts/Northrend/IcecrownCitadel/icecrown_citadel.cpp94
-rw-r--r--src/server/scripts/Northrend/IcecrownCitadel/icecrown_citadel.h10
-rw-r--r--src/server/scripts/Northrend/IcecrownCitadel/icecrown_citadel_teleport.cpp10
-rw-r--r--src/server/scripts/Northrend/IcecrownCitadel/instance_icecrown_citadel.cpp22
-rw-r--r--src/server/scripts/Northrend/Naxxramas/boss_anubrekhan.cpp20
-rw-r--r--src/server/scripts/Northrend/Naxxramas/boss_faerlina.cpp14
-rw-r--r--src/server/scripts/Northrend/Naxxramas/boss_four_horsemen.cpp40
-rw-r--r--src/server/scripts/Northrend/Naxxramas/boss_gluth.cpp26
-rw-r--r--src/server/scripts/Northrend/Naxxramas/boss_gothik.cpp21
-rw-r--r--src/server/scripts/Northrend/Naxxramas/boss_grobbulus.cpp49
-rw-r--r--src/server/scripts/Northrend/Naxxramas/boss_heigan.cpp15
-rw-r--r--src/server/scripts/Northrend/Naxxramas/boss_kelthuzad.cpp24
-rw-r--r--src/server/scripts/Northrend/Naxxramas/boss_loatheb.cpp20
-rw-r--r--src/server/scripts/Northrend/Naxxramas/boss_maexxna.cpp30
-rw-r--r--src/server/scripts/Northrend/Naxxramas/boss_noth.cpp20
-rw-r--r--src/server/scripts/Northrend/Naxxramas/boss_patchwerk.cpp15
-rw-r--r--src/server/scripts/Northrend/Naxxramas/boss_razuvious.cpp15
-rw-r--r--src/server/scripts/Northrend/Naxxramas/boss_sapphiron.cpp29
-rw-r--r--src/server/scripts/Northrend/Naxxramas/boss_thaddius.cpp48
-rw-r--r--src/server/scripts/Northrend/Naxxramas/instance_naxxramas.cpp19
-rw-r--r--src/server/scripts/Northrend/Naxxramas/naxxramas.h22
-rw-r--r--src/server/scripts/Northrend/Nexus/EyeOfEternity/boss_malygos.cpp82
-rw-r--r--src/server/scripts/Northrend/Nexus/EyeOfEternity/eye_of_eternity.h15
-rw-r--r--src/server/scripts/Northrend/Nexus/EyeOfEternity/instance_eye_of_eternity.cpp14
-rw-r--r--src/server/scripts/Northrend/Nexus/Nexus/boss_anomalus.cpp17
-rw-r--r--src/server/scripts/Northrend/Nexus/Nexus/boss_commander_stoutbeard_kolurg.cpp10
-rw-r--r--src/server/scripts/Northrend/Nexus/Nexus/boss_keristrasza.cpp16
-rw-r--r--src/server/scripts/Northrend/Nexus/Nexus/boss_magus_telestra.cpp14
-rw-r--r--src/server/scripts/Northrend/Nexus/Nexus/boss_ormorok.cpp12
-rw-r--r--src/server/scripts/Northrend/Nexus/Nexus/instance_nexus.cpp10
-rw-r--r--src/server/scripts/Northrend/Nexus/Nexus/nexus.h10
-rw-r--r--src/server/scripts/Northrend/Nexus/Oculus/boss_drakos.cpp15
-rw-r--r--src/server/scripts/Northrend/Nexus/Oculus/boss_eregos.cpp21
-rw-r--r--src/server/scripts/Northrend/Nexus/Oculus/boss_urom.cpp25
-rw-r--r--src/server/scripts/Northrend/Nexus/Oculus/boss_varos.cpp23
-rw-r--r--src/server/scripts/Northrend/Nexus/Oculus/instance_oculus.cpp26
-rw-r--r--src/server/scripts/Northrend/Nexus/Oculus/oculus.cpp19
-rw-r--r--src/server/scripts/Northrend/Nexus/Oculus/oculus.h10
-rw-r--r--src/server/scripts/Northrend/Ulduar/HallsOfLightning/boss_bjarngrim.cpp551
-rw-r--r--src/server/scripts/Northrend/Ulduar/HallsOfLightning/boss_ionar.cpp322
-rw-r--r--src/server/scripts/Northrend/Ulduar/HallsOfLightning/boss_loken.cpp273
-rw-r--r--src/server/scripts/Northrend/Ulduar/HallsOfLightning/boss_volkhan.cpp670
-rw-r--r--src/server/scripts/Northrend/Ulduar/HallsOfLightning/halls_of_lightning.h51
-rw-r--r--src/server/scripts/Northrend/Ulduar/HallsOfLightning/instance_halls_of_lightning.cpp239
-rw-r--r--src/server/scripts/Northrend/Ulduar/HallsOfStone/boss_krystallus.cpp46
-rw-r--r--src/server/scripts/Northrend/Ulduar/HallsOfStone/boss_maiden_of_grief.cpp63
-rw-r--r--src/server/scripts/Northrend/Ulduar/HallsOfStone/boss_sjonnir.cpp380
-rw-r--r--src/server/scripts/Northrend/Ulduar/HallsOfStone/brann_bronzebeard.cpp122
-rw-r--r--src/server/scripts/Northrend/Ulduar/HallsOfStone/halls_of_stone.h11
-rw-r--r--src/server/scripts/Northrend/Ulduar/HallsOfStone/instance_halls_of_stone.cpp41
-rw-r--r--src/server/scripts/Northrend/Ulduar/Ulduar/boss_algalon_the_observer.cpp58
-rw-r--r--src/server/scripts/Northrend/Ulduar/Ulduar/boss_assembly_of_iron.cpp78
-rw-r--r--src/server/scripts/Northrend/Ulduar/Ulduar/boss_auriaya.cpp43
-rw-r--r--src/server/scripts/Northrend/Ulduar/Ulduar/boss_flame_leviathan.cpp26
-rw-r--r--src/server/scripts/Northrend/Ulduar/Ulduar/boss_freya.cpp117
-rw-r--r--src/server/scripts/Northrend/Ulduar/Ulduar/boss_general_vezax.cpp18
-rw-r--r--src/server/scripts/Northrend/Ulduar/Ulduar/boss_hodir.cpp53
-rw-r--r--src/server/scripts/Northrend/Ulduar/Ulduar/boss_ignis.cpp102
-rw-r--r--src/server/scripts/Northrend/Ulduar/Ulduar/boss_kologarn.cpp69
-rw-r--r--src/server/scripts/Northrend/Ulduar/Ulduar/boss_mimiron.cpp116
-rw-r--r--src/server/scripts/Northrend/Ulduar/Ulduar/boss_razorscale.cpp44
-rw-r--r--src/server/scripts/Northrend/Ulduar/Ulduar/boss_thorim.cpp81
-rw-r--r--src/server/scripts/Northrend/Ulduar/Ulduar/boss_xt002.cpp39
-rw-r--r--src/server/scripts/Northrend/Ulduar/Ulduar/boss_yoggsaron.cpp67
-rw-r--r--src/server/scripts/Northrend/Ulduar/Ulduar/instance_ulduar.cpp10
-rw-r--r--src/server/scripts/Northrend/Ulduar/Ulduar/ulduar.cpp20
-rw-r--r--src/server/scripts/Northrend/Ulduar/Ulduar/ulduar.h10
-rw-r--r--src/server/scripts/Northrend/UtgardeKeep/UtgardeKeep/boss_ingvar_the_plunderer.cpp36
-rw-r--r--src/server/scripts/Northrend/UtgardeKeep/UtgardeKeep/boss_keleseth.cpp17
-rw-r--r--src/server/scripts/Northrend/UtgardeKeep/UtgardeKeep/boss_skarvald_dalronn.cpp15
-rw-r--r--src/server/scripts/Northrend/UtgardeKeep/UtgardeKeep/instance_utgarde_keep.cpp10
-rw-r--r--src/server/scripts/Northrend/UtgardeKeep/UtgardeKeep/utgarde_keep.cpp80
-rw-r--r--src/server/scripts/Northrend/UtgardeKeep/UtgardeKeep/utgarde_keep.h10
-rw-r--r--src/server/scripts/Northrend/UtgardeKeep/UtgardePinnacle/boss_palehoof.cpp50
-rw-r--r--src/server/scripts/Northrend/UtgardeKeep/UtgardePinnacle/boss_skadi.cpp37
-rw-r--r--src/server/scripts/Northrend/UtgardeKeep/UtgardePinnacle/boss_svala.cpp19
-rw-r--r--src/server/scripts/Northrend/UtgardeKeep/UtgardePinnacle/boss_ymiron.cpp37
-rw-r--r--src/server/scripts/Northrend/UtgardeKeep/UtgardePinnacle/instance_utgarde_pinnacle.cpp10
-rw-r--r--src/server/scripts/Northrend/UtgardeKeep/UtgardePinnacle/utgarde_pinnacle.cpp10
-rw-r--r--src/server/scripts/Northrend/UtgardeKeep/UtgardePinnacle/utgarde_pinnacle.h10
-rw-r--r--src/server/scripts/Northrend/VaultOfArchavon/boss_archavon.cpp37
-rw-r--r--src/server/scripts/Northrend/VaultOfArchavon/boss_emalon.cpp20
-rw-r--r--src/server/scripts/Northrend/VaultOfArchavon/boss_koralon.cpp10
-rw-r--r--src/server/scripts/Northrend/VaultOfArchavon/boss_toravon.cpp10
-rw-r--r--src/server/scripts/Northrend/VaultOfArchavon/instance_vault_of_archavon.cpp10
-rw-r--r--src/server/scripts/Northrend/VaultOfArchavon/vault_of_archavon.h10
-rw-r--r--src/server/scripts/Northrend/VioletHold/boss_cyanigosa.cpp10
-rw-r--r--src/server/scripts/Northrend/VioletHold/boss_erekem.cpp10
-rw-r--r--src/server/scripts/Northrend/VioletHold/boss_ichoron.cpp12
-rw-r--r--src/server/scripts/Northrend/VioletHold/boss_lavanthor.cpp10
-rw-r--r--src/server/scripts/Northrend/VioletHold/boss_moragg.cpp10
-rw-r--r--src/server/scripts/Northrend/VioletHold/boss_xevozz.cpp14
-rw-r--r--src/server/scripts/Northrend/VioletHold/boss_zuramat.cpp12
-rw-r--r--src/server/scripts/Northrend/VioletHold/instance_violet_hold.cpp14
-rw-r--r--src/server/scripts/Northrend/VioletHold/violet_hold.cpp77
-rw-r--r--src/server/scripts/Northrend/VioletHold/violet_hold.h13
-rw-r--r--src/server/scripts/Northrend/isle_of_conquest.cpp20
-rw-r--r--src/server/scripts/Northrend/northrend_script_loader.cpp10
-rw-r--r--src/server/scripts/Northrend/zone_borean_tundra.cpp279
-rw-r--r--src/server/scripts/Northrend/zone_crystalsong_forest.cpp157
-rw-r--r--src/server/scripts/Northrend/zone_dalaran.cpp18
-rw-r--r--src/server/scripts/Northrend/zone_dragonblight.cpp60
-rw-r--r--src/server/scripts/Northrend/zone_grizzly_hills.cpp188
-rw-r--r--src/server/scripts/Northrend/zone_howling_fjord.cpp270
-rw-r--r--src/server/scripts/Northrend/zone_icecrown.cpp60
-rw-r--r--src/server/scripts/Northrend/zone_sholazar_basin.cpp127
-rw-r--r--src/server/scripts/Northrend/zone_storm_peaks.cpp300
-rw-r--r--src/server/scripts/Northrend/zone_wintergrasp.cpp12
-rw-r--r--src/server/scripts/Northrend/zone_zuldrak.cpp613
-rw-r--r--src/server/scripts/OutdoorPvP/OutdoorPvPEP.cpp50
-rw-r--r--src/server/scripts/OutdoorPvP/OutdoorPvPEP.h10
-rw-r--r--src/server/scripts/OutdoorPvP/OutdoorPvPGH.cpp10
-rw-r--r--src/server/scripts/OutdoorPvP/OutdoorPvPGH.h10
-rw-r--r--src/server/scripts/OutdoorPvP/OutdoorPvPHP.cpp18
-rw-r--r--src/server/scripts/OutdoorPvP/OutdoorPvPHP.h10
-rw-r--r--src/server/scripts/OutdoorPvP/OutdoorPvPNA.cpp20
-rw-r--r--src/server/scripts/OutdoorPvP/OutdoorPvPNA.h10
-rw-r--r--src/server/scripts/OutdoorPvP/OutdoorPvPSI.cpp14
-rw-r--r--src/server/scripts/OutdoorPvP/OutdoorPvPSI.h10
-rw-r--r--src/server/scripts/OutdoorPvP/OutdoorPvPTF.cpp18
-rw-r--r--src/server/scripts/OutdoorPvP/OutdoorPvPTF.h10
-rw-r--r--src/server/scripts/OutdoorPvP/OutdoorPvPZM.cpp26
-rw-r--r--src/server/scripts/OutdoorPvP/OutdoorPvPZM.h10
-rw-r--r--src/server/scripts/OutdoorPvP/outdoorpvp_script_loader.cpp10
-rw-r--r--src/server/scripts/Outland/Auchindoun/AuchenaiCrypts/auchenai_crypts.h10
-rw-r--r--src/server/scripts/Outland/Auchindoun/AuchenaiCrypts/boss_exarch_maladaar.cpp12
-rw-r--r--src/server/scripts/Outland/Auchindoun/AuchenaiCrypts/boss_shirrak_the_dead_watcher.cpp10
-rw-r--r--src/server/scripts/Outland/Auchindoun/AuchenaiCrypts/instance_auchenai_crypts.cpp10
-rw-r--r--src/server/scripts/Outland/Auchindoun/ManaTombs/boss_nexusprince_shaffar.cpp10
-rw-r--r--src/server/scripts/Outland/Auchindoun/ManaTombs/boss_pandemonius.cpp10
-rw-r--r--src/server/scripts/Outland/Auchindoun/ManaTombs/boss_tavarok.cpp10
-rw-r--r--src/server/scripts/Outland/Auchindoun/ManaTombs/instance_mana_tombs.cpp10
-rw-r--r--src/server/scripts/Outland/Auchindoun/ManaTombs/mana_tombs.h10
-rw-r--r--src/server/scripts/Outland/Auchindoun/SethekkHalls/boss_anzu.cpp10
-rw-r--r--src/server/scripts/Outland/Auchindoun/SethekkHalls/boss_darkweaver_syth.cpp10
-rw-r--r--src/server/scripts/Outland/Auchindoun/SethekkHalls/boss_talon_king_ikiss.cpp10
-rw-r--r--src/server/scripts/Outland/Auchindoun/SethekkHalls/instance_sethekk_halls.cpp10
-rw-r--r--src/server/scripts/Outland/Auchindoun/SethekkHalls/sethekk_halls.h10
-rw-r--r--src/server/scripts/Outland/Auchindoun/ShadowLabyrinth/boss_ambassador_hellmaw.cpp16
-rw-r--r--src/server/scripts/Outland/Auchindoun/ShadowLabyrinth/boss_blackheart_the_inciter.cpp10
-rw-r--r--src/server/scripts/Outland/Auchindoun/ShadowLabyrinth/boss_grandmaster_vorpil.cpp12
-rw-r--r--src/server/scripts/Outland/Auchindoun/ShadowLabyrinth/boss_murmur.cpp12
-rw-r--r--src/server/scripts/Outland/Auchindoun/ShadowLabyrinth/instance_shadow_labyrinth.cpp10
-rw-r--r--src/server/scripts/Outland/Auchindoun/ShadowLabyrinth/shadow_labyrinth.h10
-rw-r--r--src/server/scripts/Outland/BlackTemple/black_temple.h10
-rw-r--r--src/server/scripts/Outland/BlackTemple/boss_bloodboil.cpp10
-rw-r--r--src/server/scripts/Outland/BlackTemple/boss_illidan.cpp30
-rw-r--r--src/server/scripts/Outland/BlackTemple/boss_illidari_council.cpp16
-rw-r--r--src/server/scripts/Outland/BlackTemple/boss_mother_shahraz.cpp10
-rw-r--r--src/server/scripts/Outland/BlackTemple/boss_reliquary_of_souls.cpp26
-rw-r--r--src/server/scripts/Outland/BlackTemple/boss_shade_of_akama.cpp14
-rw-r--r--src/server/scripts/Outland/BlackTemple/boss_supremus.cpp10
-rw-r--r--src/server/scripts/Outland/BlackTemple/boss_teron_gorefiend.cpp10
-rw-r--r--src/server/scripts/Outland/BlackTemple/boss_warlord_najentus.cpp10
-rw-r--r--src/server/scripts/Outland/BlackTemple/instance_black_temple.cpp10
-rw-r--r--src/server/scripts/Outland/CoilfangReservoir/SerpentShrine/boss_fathomlord_karathress.cpp18
-rw-r--r--src/server/scripts/Outland/CoilfangReservoir/SerpentShrine/boss_hydross_the_unstable.cpp16
-rw-r--r--src/server/scripts/Outland/CoilfangReservoir/SerpentShrine/boss_lady_vashj.cpp12
-rw-r--r--src/server/scripts/Outland/CoilfangReservoir/SerpentShrine/boss_leotheras_the_blind.cpp10
-rw-r--r--src/server/scripts/Outland/CoilfangReservoir/SerpentShrine/boss_lurker_below.cpp16
-rw-r--r--src/server/scripts/Outland/CoilfangReservoir/SerpentShrine/boss_morogrim_tidewalker.cpp10
-rw-r--r--src/server/scripts/Outland/CoilfangReservoir/SerpentShrine/instance_serpent_shrine.cpp12
-rw-r--r--src/server/scripts/Outland/CoilfangReservoir/SerpentShrine/serpent_shrine.h10
-rw-r--r--src/server/scripts/Outland/CoilfangReservoir/SlavePens/boss_ahune.cpp52
-rw-r--r--src/server/scripts/Outland/CoilfangReservoir/SlavePens/boss_mennu_the_betrayer.cpp10
-rw-r--r--src/server/scripts/Outland/CoilfangReservoir/SlavePens/boss_quagmirran.cpp10
-rw-r--r--src/server/scripts/Outland/CoilfangReservoir/SlavePens/boss_rokmar_the_crackler.cpp15
-rw-r--r--src/server/scripts/Outland/CoilfangReservoir/SlavePens/instance_the_slave_pens.cpp10
-rw-r--r--src/server/scripts/Outland/CoilfangReservoir/SlavePens/the_slave_pens.cpp12
-rw-r--r--src/server/scripts/Outland/CoilfangReservoir/SlavePens/the_slave_pens.h10
-rw-r--r--src/server/scripts/Outland/CoilfangReservoir/SteamVault/boss_hydromancer_thespia.cpp10
-rw-r--r--src/server/scripts/Outland/CoilfangReservoir/SteamVault/boss_mekgineer_steamrigger.cpp10
-rw-r--r--src/server/scripts/Outland/CoilfangReservoir/SteamVault/boss_warlord_kalithresh.cpp10
-rw-r--r--src/server/scripts/Outland/CoilfangReservoir/SteamVault/instance_steam_vault.cpp10
-rw-r--r--src/server/scripts/Outland/CoilfangReservoir/SteamVault/steam_vault.h10
-rw-r--r--src/server/scripts/Outland/CoilfangReservoir/underbog/boss_ghazan.cpp14
-rw-r--r--src/server/scripts/Outland/CoilfangReservoir/underbog/boss_hungarfen.cpp12
-rw-r--r--src/server/scripts/Outland/CoilfangReservoir/underbog/boss_swamplord_muselek.cpp10
-rw-r--r--src/server/scripts/Outland/CoilfangReservoir/underbog/boss_the_black_stalker.cpp10
-rw-r--r--src/server/scripts/Outland/CoilfangReservoir/underbog/instance_the_underbog.cpp10
-rw-r--r--src/server/scripts/Outland/CoilfangReservoir/underbog/the_underbog.h10
-rw-r--r--src/server/scripts/Outland/CoilfangReservoir/underbog/underbog.cpp10
-rw-r--r--src/server/scripts/Outland/GruulsLair/boss_gruul.cpp14
-rw-r--r--src/server/scripts/Outland/GruulsLair/boss_high_king_maulgar.cpp12
-rw-r--r--src/server/scripts/Outland/GruulsLair/gruuls_lair.h10
-rw-r--r--src/server/scripts/Outland/GruulsLair/instance_gruuls_lair.cpp10
-rw-r--r--src/server/scripts/Outland/HellfireCitadel/BloodFurnace/blood_furnace.h10
-rw-r--r--src/server/scripts/Outland/HellfireCitadel/BloodFurnace/boss_broggok.cpp10
-rw-r--r--src/server/scripts/Outland/HellfireCitadel/BloodFurnace/boss_kelidan_the_breaker.cpp10
-rw-r--r--src/server/scripts/Outland/HellfireCitadel/BloodFurnace/boss_the_maker.cpp10
-rw-r--r--src/server/scripts/Outland/HellfireCitadel/BloodFurnace/instance_blood_furnace.cpp10
-rw-r--r--src/server/scripts/Outland/HellfireCitadel/HellfireRamparts/boss_omor_the_unscarred.cpp10
-rw-r--r--src/server/scripts/Outland/HellfireCitadel/HellfireRamparts/boss_vazruden_the_herald.cpp20
-rw-r--r--src/server/scripts/Outland/HellfireCitadel/HellfireRamparts/boss_watchkeeper_gargolmar.cpp10
-rw-r--r--src/server/scripts/Outland/HellfireCitadel/HellfireRamparts/hellfire_ramparts.h10
-rw-r--r--src/server/scripts/Outland/HellfireCitadel/HellfireRamparts/instance_hellfire_ramparts.cpp10
-rw-r--r--src/server/scripts/Outland/HellfireCitadel/MagtheridonsLair/boss_magtheridon.cpp12
-rw-r--r--src/server/scripts/Outland/HellfireCitadel/MagtheridonsLair/instance_magtheridons_lair.cpp10
-rw-r--r--src/server/scripts/Outland/HellfireCitadel/MagtheridonsLair/magtheridons_lair.h10
-rw-r--r--src/server/scripts/Outland/HellfireCitadel/ShatteredHalls/boss_nethekurse.cpp10
-rw-r--r--src/server/scripts/Outland/HellfireCitadel/ShatteredHalls/boss_porung.cpp14
-rw-r--r--src/server/scripts/Outland/HellfireCitadel/ShatteredHalls/boss_warbringer_omrogg.cpp10
-rw-r--r--src/server/scripts/Outland/HellfireCitadel/ShatteredHalls/boss_warchief_kargath_bladefist.cpp10
-rw-r--r--src/server/scripts/Outland/HellfireCitadel/ShatteredHalls/instance_shattered_halls.cpp10
-rw-r--r--src/server/scripts/Outland/HellfireCitadel/ShatteredHalls/shattered_halls.h10
-rw-r--r--src/server/scripts/Outland/TempestKeep/Eye/boss_alar.cpp36
-rw-r--r--src/server/scripts/Outland/TempestKeep/Eye/boss_astromancer.cpp14
-rw-r--r--src/server/scripts/Outland/TempestKeep/Eye/boss_kaelthas.cpp62
-rw-r--r--src/server/scripts/Outland/TempestKeep/Eye/boss_void_reaver.cpp10
-rw-r--r--src/server/scripts/Outland/TempestKeep/Eye/instance_the_eye.cpp10
-rw-r--r--src/server/scripts/Outland/TempestKeep/Eye/the_eye.h10
-rw-r--r--src/server/scripts/Outland/TempestKeep/Mechanar/boss_gatewatcher_gyrokill.cpp10
-rw-r--r--src/server/scripts/Outland/TempestKeep/Mechanar/boss_gatewatcher_ironhand.cpp10
-rw-r--r--src/server/scripts/Outland/TempestKeep/Mechanar/boss_mechano_lord_capacitus.cpp10
-rw-r--r--src/server/scripts/Outland/TempestKeep/Mechanar/boss_nethermancer_sepethrea.cpp10
-rw-r--r--src/server/scripts/Outland/TempestKeep/Mechanar/boss_pathaleon_the_calculator.cpp10
-rw-r--r--src/server/scripts/Outland/TempestKeep/Mechanar/instance_mechanar.cpp10
-rw-r--r--src/server/scripts/Outland/TempestKeep/Mechanar/mechanar.h10
-rw-r--r--src/server/scripts/Outland/TempestKeep/arcatraz/arcatraz.cpp110
-rw-r--r--src/server/scripts/Outland/TempestKeep/arcatraz/arcatraz.h10
-rw-r--r--src/server/scripts/Outland/TempestKeep/arcatraz/boss_dalliah_the_doomsayer.cpp10
-rw-r--r--src/server/scripts/Outland/TempestKeep/arcatraz/boss_harbinger_skyriss.cpp10
-rw-r--r--src/server/scripts/Outland/TempestKeep/arcatraz/boss_wrath_scryer_soccothrates.cpp28
-rw-r--r--src/server/scripts/Outland/TempestKeep/arcatraz/boss_zereketh_the_unbound.cpp10
-rw-r--r--src/server/scripts/Outland/TempestKeep/arcatraz/instance_arcatraz.cpp10
-rw-r--r--src/server/scripts/Outland/TempestKeep/botanica/boss_commander_sarannis.cpp10
-rw-r--r--src/server/scripts/Outland/TempestKeep/botanica/boss_high_botanist_freywinn.cpp10
-rw-r--r--src/server/scripts/Outland/TempestKeep/botanica/boss_laj.cpp10
-rw-r--r--src/server/scripts/Outland/TempestKeep/botanica/boss_thorngrin_the_tender.cpp10
-rw-r--r--src/server/scripts/Outland/TempestKeep/botanica/boss_warp_splinter.cpp10
-rw-r--r--src/server/scripts/Outland/TempestKeep/botanica/instance_the_botanica.cpp10
-rw-r--r--src/server/scripts/Outland/TempestKeep/botanica/the_botanica.h10
-rw-r--r--src/server/scripts/Outland/boss_doomlord_kazzak.cpp10
-rw-r--r--src/server/scripts/Outland/boss_doomwalker.cpp10
-rw-r--r--src/server/scripts/Outland/outland_script_loader.cpp10
-rw-r--r--src/server/scripts/Outland/zone_blades_edge_mountains.cpp44
-rw-r--r--src/server/scripts/Outland/zone_hellfire_peninsula.cpp22
-rw-r--r--src/server/scripts/Outland/zone_nagrand.cpp24
-rw-r--r--src/server/scripts/Outland/zone_netherstorm.cpp26
-rw-r--r--src/server/scripts/Outland/zone_shadowmoon_valley.cpp42
-rw-r--r--src/server/scripts/Outland/zone_shattrath_city.cpp15
-rw-r--r--src/server/scripts/Outland/zone_terokkar_forest.cpp25
-rw-r--r--src/server/scripts/Pet/pet_dk.cpp10
-rw-r--r--src/server/scripts/Pet/pet_generic.cpp32
-rw-r--r--src/server/scripts/Pet/pet_hunter.cpp12
-rw-r--r--src/server/scripts/Pet/pet_mage.cpp27
-rw-r--r--src/server/scripts/Pet/pet_priest.cpp10
-rw-r--r--src/server/scripts/Pet/pet_shaman.cpp24
-rw-r--r--src/server/scripts/Pet/pets_script_loader.cpp10
-rw-r--r--src/server/scripts/ScriptLoader.cpp.in.cmake10
-rw-r--r--src/server/scripts/ScriptLoader.h10
-rw-r--r--src/server/scripts/ScriptPCH.h10
-rw-r--r--src/server/scripts/Spells/spell_dk.cpp34
-rw-r--r--src/server/scripts/Spells/spell_druid.cpp21
-rw-r--r--src/server/scripts/Spells/spell_generic.cpp207
-rw-r--r--src/server/scripts/Spells/spell_hunter.cpp12
-rw-r--r--src/server/scripts/Spells/spell_item.cpp110
-rw-r--r--src/server/scripts/Spells/spell_mage.cpp10
-rw-r--r--src/server/scripts/Spells/spell_paladin.cpp35
-rw-r--r--src/server/scripts/Spells/spell_priest.cpp10
-rw-r--r--src/server/scripts/Spells/spell_quest.cpp57
-rw-r--r--src/server/scripts/Spells/spell_rogue.cpp10
-rw-r--r--src/server/scripts/Spells/spell_shaman.cpp10
-rw-r--r--src/server/scripts/Spells/spell_warlock.cpp127
-rw-r--r--src/server/scripts/Spells/spell_warrior.cpp10
-rw-r--r--src/server/scripts/Spells/spells_script_loader.cpp10
-rw-r--r--src/server/scripts/World/achievement_scripts.cpp10
-rw-r--r--src/server/scripts/World/action_ip_logger.cpp10
-rw-r--r--src/server/scripts/World/areatrigger_scripts.cpp12
-rw-r--r--src/server/scripts/World/boss_emerald_dragons.cpp42
-rw-r--r--src/server/scripts/World/chat_log.cpp46
-rw-r--r--src/server/scripts/World/go_scripts.cpp68
-rw-r--r--src/server/scripts/World/guards.cpp10
-rw-r--r--src/server/scripts/World/item_scripts.cpp10
-rw-r--r--src/server/scripts/World/mob_generic_creature.cpp10
-rw-r--r--src/server/scripts/World/npc_innkeeper.cpp10
-rw-r--r--src/server/scripts/World/npc_professions.cpp10
-rw-r--r--src/server/scripts/World/npc_stave_of_ancients.cpp130
-rw-r--r--src/server/scripts/World/npc_stave_of_ancients.h10
-rw-r--r--src/server/scripts/World/npc_taxi.cpp10
-rw-r--r--src/server/scripts/World/npcs_special.cpp21
-rw-r--r--src/server/scripts/World/player_scripts.cpp10
-rw-r--r--src/server/scripts/World/scourge_invasion.cpp30
-rw-r--r--src/server/scripts/World/scourge_invasion.h10
-rw-r--r--src/server/scripts/World/server_mail.cpp10
-rw-r--r--src/server/scripts/World/suns_reach_reclamation.cpp10
-rw-r--r--src/server/scripts/World/transport_zeppelin.h10
-rw-r--r--src/server/scripts/World/transport_zeppelins.cpp10
-rw-r--r--src/server/scripts/World/world_script_loader.cpp10
-rw-r--r--src/server/shared/DataStores/DBCDatabaseLoader.cpp10
-rw-r--r--src/server/shared/DataStores/DBCDatabaseLoader.h10
-rw-r--r--src/server/shared/DataStores/DBCEnums.h10
-rw-r--r--src/server/shared/DataStores/DBCStorageIterator.h10
-rw-r--r--src/server/shared/DataStores/DBCStore.cpp10
-rw-r--r--src/server/shared/DataStores/DBCStore.h10
-rw-r--r--src/server/shared/DataStores/DBCStructure.h19
-rw-r--r--src/server/shared/DataStores/DBCfmt.h10
-rw-r--r--src/server/shared/Network/AsyncAcceptor.h62
-rw-r--r--src/server/shared/Network/NetworkThread.h10
-rw-r--r--src/server/shared/Network/Socket.h10
-rw-r--r--src/server/shared/Network/SocketMgr.h14
-rw-r--r--src/server/shared/Packets/ByteBuffer.cpp10
-rw-r--r--src/server/shared/Packets/ByteBuffer.h10
-rw-r--r--src/server/shared/Realms/Realm.cpp10
-rw-r--r--src/server/shared/Realms/Realm.h10
-rw-r--r--src/server/shared/Realms/RealmList.cpp10
-rw-r--r--src/server/shared/Realms/RealmList.h10
-rw-r--r--src/server/shared/Secrets/SecretMgr.cpp10
-rw-r--r--src/server/shared/Secrets/SecretMgr.h10
-rw-r--r--src/server/shared/SharedDefines.cpp10
-rw-r--r--src/server/shared/SharedDefines.h27
-rw-r--r--src/server/shared/enuminfo_SharedDefines.cpp10
-rw-r--r--src/test/common/Configuration/Config.cpp10
-rw-r--r--src/test/mocks/WorldMock.h10
-rw-r--r--src/test/server/game/Battlegrounds/ArenaSeason/ArenaSeasonRewardDistributorTest.cpp10
-rw-r--r--src/test/server/game/Battlegrounds/ArenaSeason/ArenaTeamFilterTest.cpp10
-rw-r--r--src/test/server/game/Commands/GmVisibleCommandTest.cpp10
-rw-r--r--src/test/server/game/Miscellaneous/FormulasTest.cpp10
-rw-r--r--src/tools/CMakeLists.txt7
-rw-r--r--src/tools/dbimport/Main.cpp17
-rw-r--r--src/tools/map_extractor/System.cpp10
-rw-r--r--src/tools/map_extractor/adt.cpp10
-rw-r--r--src/tools/map_extractor/adt.h10
-rw-r--r--src/tools/map_extractor/dbcfile.cpp10
-rw-r--r--src/tools/map_extractor/dbcfile.h10
-rw-r--r--src/tools/map_extractor/loadlib.cpp10
-rw-r--r--src/tools/map_extractor/loadlib/loadlib.h10
-rw-r--r--src/tools/map_extractor/mpq_libmpq.cpp10
-rw-r--r--src/tools/map_extractor/mpq_libmpq04.h10
-rw-r--r--src/tools/map_extractor/wdt.cpp10
-rw-r--r--src/tools/map_extractor/wdt.h10
-rw-r--r--src/tools/mmaps_generator/Config.cpp276
-rw-r--r--src/tools/mmaps_generator/Config.h159
-rw-r--r--src/tools/mmaps_generator/Info/readme.txt39
-rw-r--r--src/tools/mmaps_generator/IntermediateValues.cpp52
-rw-r--r--src/tools/mmaps_generator/IntermediateValues.h14
-rw-r--r--src/tools/mmaps_generator/MapBuilder.cpp166
-rw-r--r--src/tools/mmaps_generator/MapBuilder.h49
-rw-r--r--src/tools/mmaps_generator/PathCommon.h16
-rw-r--r--src/tools/mmaps_generator/PathGenerator.cpp171
-rw-r--r--src/tools/mmaps_generator/TerrainBuilder.cpp34
-rw-r--r--src/tools/mmaps_generator/TerrainBuilder.h15
-rw-r--r--src/tools/mmaps_generator/mmaps-config.yaml150
-rw-r--r--src/tools/vmap4_assembler/VMapAssembler.cpp10
-rw-r--r--src/tools/vmap4_extractor/adtfile.cpp10
-rw-r--r--src/tools/vmap4_extractor/adtfile.h10
-rw-r--r--src/tools/vmap4_extractor/dbcfile.cpp10
-rw-r--r--src/tools/vmap4_extractor/dbcfile.h10
-rw-r--r--src/tools/vmap4_extractor/gameobject_extract.cpp10
-rw-r--r--src/tools/vmap4_extractor/loadlib/loadlib.h10
-rw-r--r--src/tools/vmap4_extractor/model.cpp10
-rw-r--r--src/tools/vmap4_extractor/model.h10
-rw-r--r--src/tools/vmap4_extractor/modelheaders.h10
-rw-r--r--src/tools/vmap4_extractor/mpq_libmpq.cpp10
-rw-r--r--src/tools/vmap4_extractor/mpq_libmpq04.h10
-rw-r--r--src/tools/vmap4_extractor/vec3d.h10
-rw-r--r--src/tools/vmap4_extractor/vmapexport.cpp17
-rw-r--r--src/tools/vmap4_extractor/vmapexport.h14
-rw-r--r--src/tools/vmap4_extractor/wdtfile.cpp10
-rw-r--r--src/tools/vmap4_extractor/wdtfile.h10
-rw-r--r--src/tools/vmap4_extractor/wmo.cpp31
-rw-r--r--src/tools/vmap4_extractor/wmo.h12
1898 files changed, 46145 insertions, 21747 deletions
diff --git a/.github/ISSUE_TEMPLATE/bb_crash_issues.yml b/.github/ISSUE_TEMPLATE/bb_crash_issues.yml
index 43b07bf793..9e94e5bbc2 100644
--- a/.github/ISSUE_TEMPLATE/bb_crash_issues.yml
+++ b/.github/ISSUE_TEMPLATE/bb_crash_issues.yml
@@ -31,7 +31,7 @@ body:
description: |
Do you have any logs or screenshots that can be useful?
Crash logs in text are preffered over screenshots.
- If you have logs in text form please upload them to [Gist](https://gist.github.com/) or PasteBin and upload the link.
+ DO NOT POST THE FULL CRASH LOG IN THE ISSUE BODY. DO NOT UPLOAD TEXT FILES. USE [GITHUB GIST](https://gist.github.com/), PASTEBIN, OR ANY SIMILAR SERVICE INSTEAD.
validations:
required: false
- type: input
diff --git a/.github/ISSUE_TEMPLATE/ee_cc.yml b/.github/ISSUE_TEMPLATE/ee_cc.yml
index 4ed34e08e0..ad7d6744a6 100644
--- a/.github/ISSUE_TEMPLATE/ee_cc.yml
+++ b/.github/ISSUE_TEMPLATE/ee_cc.yml
@@ -8,5 +8,10 @@ body:
label: Triage
description: |
Paste the issue from ChromieCraft here.
+ value: |
+ Issue linked from CC:
+ Triage Notes:
+ Original Post Below:
+ ---
validations:
required: true
diff --git a/.github/README.md b/.github/README.md
index d699c621b3..3a9e654d62 100644
--- a/.github/README.md
+++ b/.github/README.md
@@ -4,6 +4,7 @@
[![CodeFactor](https://www.codefactor.io/repository/github/azerothcore/azerothcore-wotlk/badge)](https://www.codefactor.io/repository/github/azerothcore/azerothcore-wotlk)
[![StackOverflow](http://img.shields.io/badge/stackoverflow-azerothcore-blue.svg?logo=stackoverflow)](https://stackoverflow.com/questions/tagged/azerothcore?sort=newest "Ask / browse questions here")
[![Discord](https://img.shields.io/discord/217589275766685707?logo=discord&logoColor=white)](https://discord.gg/gkt4y2x "Our community hub on Discord")
+[![Bounties on BountyHub](https://img.shields.io/badge/Bounties-on%20BountyHub-yellow)](https://www.bountyhub.dev/bounties?repo=azerothcore)
## Build Status
@@ -14,6 +15,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
@@ -80,8 +82,7 @@ You can check the [authors](https://github.com/azerothcore/azerothcore-wotlk/blo
## License
-- The new AzerothCore source components are released under the [GNU AGPL v3](https://www.gnu.org/licenses/agpl-3.0.en.html)
-- The old sources based on MaNGOS/TrinityCore are released under the [GNU GPL v2](https://www.gnu.org/licenses/old-licenses/gpl-2.0.en.html)
+- The AzerothCore source code is released under the [GNU GPL v2](https://www.gnu.org/licenses/old-licenses/gpl-2.0.en.html)
It's important to note that AzerothCore is not an official Blizzard Entertainment product, and it is not affiliated with or endorsed by World of Warcraft or Blizzard Entertainment. AzerothCore does not in any case sponsor nor support illegal public servers. If you use this project to run an illegal public server and not for testing and learning it is your own personal choice.
diff --git a/.github/actions/linux-build/action.yml b/.github/actions/linux-build/action.yml
index 4da8f39b9b..42938553f2 100644
--- a/.github/actions/linux-build/action.yml
+++ b/.github/actions/linux-build/action.yml
@@ -39,16 +39,17 @@ inputs:
runs:
using: composite
steps:
+ - name: echo cache key
+ shell: bash
+ run: echo "Cache key -> ccache:${{ runner.os }}:${{ inputs.CC }}_${{ inputs.CXX }}:${{ inputs.modules }}:pch=${{ inputs.pch }}:${{ github.ref_name }}"
+
- name: Cache
uses: actions/cache@v4
- if: inputs.pch != 'true'
with:
path: ${{ github.workspace }}/var/ccache
- # format
- # ccache:OS:CC_CXX:MODULES:GITHUB_REF:GITHUB_SHA
- key: ccache:${{ runner.os }}:${{ inputs.CC }}_${{ inputs.CXX }}:${{ inputs.modules }}:${{ github.ref }}:${{ github.sha }}
+ key: ccache:${{ runner.os }}:${{ inputs.CC }}_${{ inputs.CXX }}:${{ inputs.modules }}:pch=${{ inputs.pch }}:${{ github.ref_name }}
restore-keys: |
- ccache:${{ runner.os }}:${{ inputs.CC }}_${{ inputs.CXX }}:${{ inputs.modules }}:${{ github.ref }}
+ ccache:${{ runner.os }}:${{ inputs.CC }}_${{ inputs.CXX }}:${{ inputs.modules }}:pch=${{ inputs.pch }}
ccache:${{ runner.os }}:${{ inputs.CC }}_${{ inputs.CXX }}:${{ inputs.modules }}
ccache:${{ runner.os }}:${{ inputs.CC }}_${{ inputs.CXX }}
@@ -73,12 +74,12 @@ runs:
UBUNTU_VERSION="$(grep VERSION_ID /etc/os-release | cut -f2 -d\")"
source /etc/os-release
if [[ "$VERSION_CODENAME" == "jammy" ]]; then
- if [[ "${{ inputs.cc }}" =~ "clang-" ]]; then
- CLANG_VERSION="$(echo '${{ inputs.cc }}' | cut -f2 -d\-)"
+ if [[ "${{ inputs.CC }}" =~ "clang-" ]]; then
+ CLANG_VERSION="$(echo '${{ inputs.CC }}' | cut -f2 -d\-)"
wget -qO- https://apt.llvm.org/llvm-snapshot.gpg.key | sudo apt-key add -
sudo add-apt-repository "deb http://apt.llvm.org/$VERSION_CODENAME/ llvm-toolchain-$VERSION_CODENAME-$CLANG_VERSION main"
sudo apt-get -qq update
- sudo apt-get -qq install '${{ inputs.cc }}'
+ sudo apt-get -qq install '${{ inputs.CC }}'
fi
fi
@@ -87,19 +88,44 @@ runs:
env:
CCACHE_DIR: $GITHUB_WORKSPACE/var/ccache
run: |
- cat <<EOF >> $GITHUB_ENV
+ mkdir -p "$CCACHE_DIR"
+ cat <<EOF >> "$GITHUB_ENV"
+ CCACHE_BASEDIR=${GITHUB_WORKSPACE}
CCACHE_DIR=${{ env.CCACHE_DIR }}
- CCACHE_MAXSIZE=1000MB
+ CCACHE_HASHDIR=1
+ CCACHE_MAXSIZE=5G
CCACHE_SLOPPINESS=pch_defines,time_macros,include_file_mtime
- CCACHE_CPP2=true
CCACHE_COMPRESS=1
CCACHE_COMPRESSLEVEL=9
CCACHE_COMPILERCHECK=content
- CCACHE_LOGFILE=$CCACHE_DIR/cache.debug
+ CCACHE_LOGFILE=${{ env.CCACHE_DIR }}/cache.debug
CC=${{ inputs.CC }}
CXX=${{ inputs.CXX }}
EOF
+ - name: ccache config snapshot
+ shell: bash
+ run: |
+ echo "==== Effective ccache configuration ===="
+ ccache -p | egrep 'base_dir|hash_dir|compiler_check|sloppiness|max_size' || true
+
+ echo
+ echo "==== Compiler info ===="
+ which ${{ inputs.CC }} && ${{ inputs.CC }} --version || true
+ which ${{ inputs.CXX }} && ${{ inputs.CXX }} --version || true
+
+ echo
+ echo "==== Previous cache stats ===="
+ ccache -s || true
+
+ echo
+ echo "==== Top cache results ===="
+ grep -o 'result: .*' "$CCACHE_DIR/cache.debug" 2>/dev/null | sort | uniq -c | sort -nr | head || true
+
+ - name: reset ccache stats
+ shell: bash
+ run: ccache -z || true
+
- name: Configure
shell: bash
run: |
@@ -107,6 +133,8 @@ runs:
mkdir build
cd build
cmake "$GITHUB_WORKSPACE" \
+ -DCMAKE_C_COMPILER="${{ inputs.CC }}" \
+ -DCMAKE_CXX_COMPILER="${{ inputs.CXX }}" \
-DCMAKE_INSTALL_PREFIX="$GITHUB_WORKSPACE/env/dist" \
-DAPPS_BUILD="all" \
-DTOOLS_BUILD=${{ inputs.tools }} \
@@ -116,8 +144,8 @@ runs:
-DCMAKE_BUILD_TYPE="Release" \
-DCMAKE_CXX_COMPILER_LAUNCHER="ccache" \
-DCMAKE_C_COMPILER_LAUNCHER="ccache" \
- -DCMAKE_C_FLAGS="-Werror ${{ startsWith(inputs.cc, 'clang') && '-ferror-limit=' || '-fmax-errors=' }}${{inputs.maxerrors}} " \
- -DCMAKE_CXX_FLAGS="-Werror ${{ startsWith(inputs.cxx, 'clang') && '-ferror-limit=' || '-fmax-errors=' }}${{inputs.maxerrors}}" \
+ -DCMAKE_C_FLAGS="-Werror ${{ startsWith(inputs.CC, 'clang') && '-ferror-limit=' || '-fmax-errors=' }}${{inputs.maxerrors}} -fdebug-prefix-map=${GITHUB_WORKSPACE}=." \
+ -DCMAKE_CXX_FLAGS="-Werror ${{ startsWith(inputs.CXX, 'clang') && '-ferror-limit=' || '-fmax-errors=' }}${{inputs.maxerrors}} -fdebug-prefix-map=${GITHUB_WORKSPACE}=." \
-DBUILD_TESTING="ON" \
-DUSE_SCRIPTPCH=${{ inputs.pch == 'true' && 'ON' || '' }} \
-DUSE_COREPCH=${{ inputs.pch == 'true' && 'ON' || '' }} \
@@ -190,3 +218,7 @@ runs:
else
exit 0
fi
+
+ - name: ccache stats
+ shell: bash
+ run: ccache -s || true
diff --git a/.github/workflows/core-build-nopch.yml b/.github/workflows/core-build-nopch.yml
index e64fbffcc0..e67e9463c9 100644
--- a/.github/workflows/core-build-nopch.yml
+++ b/.github/workflows/core-build-nopch.yml
@@ -10,9 +10,13 @@ on:
- synchronize
concurrency:
- group: ${{ github.head_ref }} || concat(${{ github.ref }}, ${{ github.workflow }})
+ group: ${{ github.head_ref }} || concat(${{ github.ref_name }}, ${{ github.workflow }})
cancel-in-progress: true
+permissions:
+ actions: write
+ contents: read
+
jobs:
build:
strategy:
diff --git a/.github/workflows/core-build-pch.yml b/.github/workflows/core-build-pch.yml
index f6c989346d..8a752e450f 100644
--- a/.github/workflows/core-build-pch.yml
+++ b/.github/workflows/core-build-pch.yml
@@ -10,9 +10,13 @@ on:
- synchronize
concurrency:
- group: ${{ github.head_ref }} || concat(${{ github.ref }}, ${{ github.workflow }})
+ group: ${{ github.head_ref }} || concat(${{ github.ref_name }}, ${{ github.workflow }})
cancel-in-progress: true
+permissions:
+ actions: write
+ contents: read
+
jobs:
build:
strategy:
diff --git a/.github/workflows/core_modules_build.yml b/.github/workflows/core_modules_build.yml
index 45683f2b4f..1ae3a1c027 100644
--- a/.github/workflows/core_modules_build.yml
+++ b/.github/workflows/core_modules_build.yml
@@ -19,8 +19,12 @@ on:
- 'src/server/shared/**/*'
- 'src/tools/**/*'
+permissions:
+ actions: write
+ contents: read
+
concurrency:
- group: ${{ github.head_ref }} || concat(${{ github.ref }}, ${{ github.workflow }})
+ group: ${{ github.head_ref }} || concat(${{ github.ref_name }}, ${{ github.workflow }})
cancel-in-progress: true
jobs:
diff --git a/.github/workflows/dashboard-ci.yml b/.github/workflows/dashboard-ci.yml
index 1bbad51c39..9e92a909f9 100644
--- a/.github/workflows/dashboard-ci.yml
+++ b/.github/workflows/dashboard-ci.yml
@@ -16,9 +16,13 @@ on:
workflow_dispatch:
concurrency:
- group: ${{ github.head_ref }} || concat(${{ github.ref }}, ${{ github.workflow }})
+ group: ${{ github.head_ref }} || concat(${{ github.ref_name }}, ${{ github.workflow }})
cancel-in-progress: true
+permissions:
+ actions: write
+ contents: read
+
env:
CONTINUOUS_INTEGRATION: true
MYSQL_ROOT_PASSWORD: root
@@ -72,13 +76,125 @@ jobs:
with:
fetch-depth: 1
+ - name: Install ccache
+ shell: bash
+ run: |
+ sudo apt-get update
+ sudo apt-get install -y ccache
+ ccache --version
+
+ # Detect the compilers that acore.sh / CMake will end up using.
+ # We record both the binary name and a short version tag for the cache key.
+ - name: Detect compiler
+ id: detect
+ shell: bash
+ run: |
+ set -euo pipefail
+ CC_BIN="${CC:-}"
+ CXX_BIN="${CXX:-}"
+ [[ -z "$CC_BIN" ]] && CC_BIN="$(command -v clang || command -v gcc)"
+ [[ -z "$CXX_BIN" ]] && CXX_BIN="$(command -v clang++ || command -v g++)"
+
+ make_ver_id() {
+ local bin="$1"; local base="$(basename "$bin")"
+ case "$base" in
+ clang)
+ maj="$("$bin" -dumpversion 2>/dev/null | cut -d. -f1)"; [[ -z "$maj" ]] && maj="$( "$bin" --version | sed -n 's/.*version \([0-9][0-9]*\).*/\1/p' | head -1 )"
+ echo "clang-${maj:-unknown}"
+ ;;
+ clang++)
+ maj="$("$bin" -dumpversion 2>/dev/null | cut -d. -f1)"; [[ -z "$maj" ]] && maj="$( "$bin" --version | sed -n 's/.*version \([0-9][0-9]*\).*/\1/p' | head -1 )"
+ echo "clang++-${maj:-unknown}"
+ ;;
+ gcc)
+ maj="$("$bin" -dumpfullversion -dumpversion 2>/dev/null || "$bin" -dumpversion 2>/dev/null)"; maj="${maj%%.*}"
+ echo "gcc-${maj:-unknown}"
+ ;;
+ g++)
+ maj="$("$bin" -dumpfullversion -dumpversion 2>/dev/null || "$bin" -dumpversion 2>/dev/null)"; maj="${maj%%.*}"
+ echo "g++-${maj:-unknown}"
+ ;;
+ *)
+ echo "$base"
+ ;;
+ esac
+ }
+
+ echo "cc_id=$(make_ver_id "$CC_BIN")" >> "$GITHUB_OUTPUT"
+ echo "cxx_id=$(make_ver_id "$CXX_BIN")" >> "$GITHUB_OUTPUT"
+ echo "Detected: $CC_BIN, $CXX_BIN"
+
+ - name: Prepare ccache dir
+ shell: bash
+ run: mkdir -p "${{ github.workspace }}/var/ccache"
+
+ - name: Echo cache key
+ shell: bash
+ run: echo "Cache key -> ccache:${{ runner.os }}:${{ steps.detect.outputs.cc_id }}_${{ steps.detect.outputs.cxx_id }}:${{ github.ref_name }}"
+
+ - name: Restore ccache
+ id: restore_ccache
+ uses: actions/cache/restore@v4
+ with:
+ path: ${{ github.workspace }}/var/ccache
+ key: ccache:${{ runner.os }}:${{ steps.detect.outputs.cc_id }}_${{ steps.detect.outputs.cxx_id }}:${{ github.ref_name }}
+ restore-keys: |
+ ccache:${{ runner.os }}:${{ steps.detect.outputs.cc_id }}_${{ steps.detect.outputs.cxx_id }}:true:pch=false:
+ ccache:${{ runner.os }}:${{ steps.detect.outputs.cc_id }}_${{ steps.detect.outputs.cxx_id }}:false:pch=false:
+ ccache:${{ runner.os }}:${{ steps.detect.outputs.cc_id }}_${{ steps.detect.outputs.cxx_id }}:true:pch=true:
+ ccache:${{ runner.os }}:${{ steps.detect.outputs.cc_id }}_${{ steps.detect.outputs.cxx_id }}:false:pch=true:
+ ccache:${{ runner.os }}:${{ steps.detect.outputs.cc_id }}_${{ steps.detect.outputs.cxx_id }}:true:
+ ccache:${{ runner.os }}:${{ steps.detect.outputs.cc_id }}_${{ steps.detect.outputs.cxx_id }}:false:
+ ccache:${{ runner.os }}:${{ steps.detect.outputs.cc_id }}_${{ steps.detect.outputs.cxx_id }}:
+
+ - name: Setup ccache env
+ shell: bash
+ env:
+ CCACHE_DIR: ${{ github.workspace }}/var/ccache
+ run: |
+ mkdir -p "$CCACHE_DIR"
+ cat <<EOF >> "$GITHUB_ENV"
+ CCACHE_BASEDIR=${{ github.workspace }}
+ CCACHE_DIR=${{ github.workspace }}/var/ccache
+ CCACHE_HASHDIR=1
+ CCACHE_MAXSIZE=5G
+ CCACHE_SLOPPINESS=pch_defines,time_macros,include_file_mtime
+ CCACHE_COMPRESS=1
+ CCACHE_COMPRESSLEVEL=9
+ CCACHE_COMPILERCHECK=content
+ CCACHE_LOGFILE=${{ github.workspace }}/var/ccache/cache.debug
+ CMAKE_C_COMPILER_LAUNCHER=ccache
+ CMAKE_CXX_COMPILER_LAUNCHER=ccache
+ EOF
+
+ - name: ccache snapshot (before)
+ shell: bash
+ run: |
+ echo "==== Effective ccache configuration ===="
+ ccache -p | egrep 'base_dir|hash_dir|compiler_check|sloppiness|max_size' || true
+ echo
+ echo "==== Previous cache stats ===="
+ ccache -s || true
+ echo
+ echo "==== Top cache results (from prior runs) ===="
+ grep -o 'result: .*' "${{ github.workspace }}/var/ccache/cache.debug" 2>/dev/null | sort | uniq -c | sort -nr | head || true
+
+ - name: Reset ccache stats
+ shell: bash
+ run: ccache -z || true
+
- name: Configure AzerothCore settings
run: |
- # Create basic configuration
- cp conf/dist/config.sh conf/config.sh
- # Configure dashboard
- sed -i 's/MTHREADS=.*/MTHREADS="4"/' conf/config.sh
- sed -i 's/CBUILD_TESTING=.*/CBUILD_TESTING="ON"/' conf/config.sh
+ touch conf/config.sh
+ echo 'MTHREADS=4' >> conf/config.sh
+ echo 'CBUILD_TESTING=ON' >> conf/config.sh
+ echo 'AC_ENABLE_ROOT_CMAKE_INSTALL=1' >> conf/config.sh
+ echo 'export AC_CONFIG_POLICY=$AC_CONFIG_POLICY_PRESET_ZERO_CONF' >> conf/config.sh
+ echo 'AC_ENABLE_CONF_COPY_ON_INSTALL=0' >> conf/config.sh
+ cat conf/config.sh
+
+ # debug content of AC_CONFIG_POLICY
+ ./acore.sh config show AC_CONFIG_POLICY
- name: Test module commands
run: |
@@ -111,12 +227,14 @@ jobs:
- name: Test authserver dry-run
run: |
+ source ./acore.sh config load
cd env/dist/bin
timeout 5m ./authserver -dry-run
continue-on-error: false
- name: Test worldserver dry-run
run: |
+ source ./acore.sh config load
cd env/dist/bin
timeout 5m ./worldserver -dry-run
continue-on-error: false
@@ -147,3 +265,15 @@ jobs:
./acore.sh sm delete authserver
timeout-minutes: 30
continue-on-error: false
+
+ # save only if we didn't hit the cache
+ - name: Save ccache
+ if: steps.restore_ccache.outputs.cache-hit != 'true'
+ uses: actions/cache/save@v4
+ with:
+ path: ${{ github.workspace }}/var/ccache
+ key: ccache:${{ runner.os }}:${{ steps.detect.outputs.cc_id }}_${{ steps.detect.outputs.cxx_id }}:${{ github.ref_name }}
+
+ - name: ccache stats (after)
+ shell: bash
+ run: ccache -s || true \ No newline at end of file
diff --git a/.github/workflows/docker_build.yml b/.github/workflows/docker_build.yml
index 1b8c87660d..eee506a149 100644
--- a/.github/workflows/docker_build.yml
+++ b/.github/workflows/docker_build.yml
@@ -9,7 +9,7 @@ on:
- synchronize
concurrency:
- group: ${{ github.head_ref }} || concat(${{ github.ref }}, ${{ github.workflow }})
+ group: ${{ github.head_ref }} || concat(${{ github.ref_name }}, ${{ github.workflow }})
cancel-in-progress: true
env:
@@ -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'
@@ -115,6 +115,6 @@ jobs:
event-type: azerothcore-new-images
client-payload: >
{
- "ref": "${{ github.ref }}",
+ "ref": "${{ github.ref_name }}",
"sha": "${{ github.sha }}"
}
diff --git a/.github/workflows/macos_build.yml b/.github/workflows/macos_build.yml
index 039cc53153..09ae976a22 100644
--- a/.github/workflows/macos_build.yml
+++ b/.github/workflows/macos_build.yml
@@ -9,9 +9,13 @@ on:
- synchronize
concurrency:
- group: ${{ github.head_ref }} || concat(${{ github.ref }}, ${{ github.workflow }})
+ group: ${{ github.head_ref }} || concat(${{ github.ref_name }}, ${{ github.workflow }})
cancel-in-progress: true
+permissions:
+ actions: write
+ contents: read
+
jobs:
macos-build:
strategy:
@@ -31,13 +35,19 @@ jobs:
uses: actions/cache@v4
with:
path: ~/Library/Caches/ccache
- key: ccache:${{ matrix.os }}:${{ github.ref }}:${{ github.sha }}
+ key: ccache:${{ matrix.os }}:${{ github.ref_name }}
restore-keys: |
- ccache:${{ matrix.os }}:${{ github.ref }}
+ ccache:${{ matrix.os }}:${{ github.ref_name }}
ccache:${{ matrix.os }}
+ - name: reset ccache stats
+ shell: bash
+ run: ccache -z || true
- name: Install latest bash
run: brew install bash
- name: Configure OS
run: source ./acore.sh install-deps
- name: Build
run: source ./apps/ci/mac/ci-compile.sh
+ - name: ccache stats
+ shell: bash
+ run: ccache -s || true
diff --git a/.github/workflows/tools_build.yml b/.github/workflows/tools_build.yml
index 09a8d68c1c..5ad3bf3bfd 100644
--- a/.github/workflows/tools_build.yml
+++ b/.github/workflows/tools_build.yml
@@ -9,7 +9,7 @@ on:
- synchronize
concurrency:
- group: ${{ github.head_ref }} || concat(${{ github.ref }}, ${{ github.workflow }})
+ group: ${{ github.head_ref }} || concat(${{ github.ref_name }}, ${{ github.workflow }})
cancel-in-progress: true
jobs:
diff --git a/.github/workflows/windows_build.yml b/.github/workflows/windows_build.yml
index aa87007781..c01e3ff3cb 100644
--- a/.github/workflows/windows_build.yml
+++ b/.github/workflows/windows_build.yml
@@ -9,7 +9,7 @@ on:
- synchronize
concurrency:
- group: ${{ github.head_ref }} || concat(${{ github.ref }}, ${{ github.workflow }})
+ group: ${{ github.head_ref }} || concat(${{ github.ref_name }}, ${{ github.workflow }})
cancel-in-progress: true
jobs:
diff --git a/.vscode/settings.json b/.vscode/settings.json
index dcc292e7a3..077d1618fe 100644
--- a/.vscode/settings.json
+++ b/.vscode/settings.json
@@ -122,5 +122,7 @@
"C_Cpp.default.compileCommands": "${workspaceFolder}/build/compile_commands.json",
"C_Cpp.default.cppStandard": "c++17",
"C_Cpp.default.configurationProvider": "ms-vscode.cmake-tools",
- "C_Cpp.default.compilerPath": "/usr/bin/clang"
+ "C_Cpp.default.compilerPath": "/usr/bin/clang",
+ "cmake.sourceDirectory": ["${workspaceFolder}"],
+ "cmake.buildDirectory": "${workspaceFolder}/var/build",
}
diff --git a/AUTHORS b/AUTHORS
index 63425cea72..c9155fdca5 100644
--- a/AUTHORS
+++ b/AUTHORS
@@ -1,10 +1,5 @@
# List of AUTHORS who contributed over time to the AzerothCore project
-## Warning
-The code of AzerothCore is shipped as it is without any form of warranty,
-and - except for third party libraries licensed under the AGPL 3,
-which you can read from the file "LICENSE".
-
## Point of current development
The project is currently hosted at https://www.azerothcore.org/ and developed under https://github.com/azerothcore
diff --git a/LICENSE b/LICENSE
index dbbe355815..ecbc059373 100644
--- a/LICENSE
+++ b/LICENSE
@@ -1,620 +1,281 @@
- GNU AFFERO GENERAL PUBLIC LICENSE
- Version 3, 19 November 2007
+ GNU GENERAL PUBLIC LICENSE
+ Version 2, June 1991
- Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>
+ Copyright (C) 1989, 1991 Free Software Foundation, Inc.,
+ 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
Preamble
- The GNU Affero General Public License is a free, copyleft license for
-software and other kinds of works, specifically designed to ensure
-cooperation with the community in the case of network server software.
-
- The licenses for most software and other practical works are designed
-to take away your freedom to share and change the works. By contrast,
-our General Public Licenses are intended to guarantee your freedom to
-share and change all versions of a program--to make sure it remains free
-software for all its users.
+ The licenses for most software are designed to take away your
+freedom to share and change it. By contrast, the GNU General Public
+License is intended to guarantee your freedom to share and change free
+software--to make sure the software is free for all its users. This
+General Public License applies to most of the Free Software
+Foundation's software and to any other program whose authors commit to
+using it. (Some other Free Software Foundation software is covered by
+the GNU Lesser General Public License instead.) You can apply it to
+your programs, too.
When we speak of free software, we are referring to freedom, not
price. Our General Public Licenses are designed to make sure that you
have the freedom to distribute copies of free software (and charge for
-them if you wish), that you receive source code or can get it if you
-want it, that you can change the software or use pieces of it in new
-free programs, and that you know you can do these things.
-
- Developers that use our General Public Licenses protect your rights
-with two steps: (1) assert copyright on the software, and (2) offer
-you this License which gives you legal permission to copy, distribute
-and/or modify the software.
-
- A secondary benefit of defending all users' freedom is that
-improvements made in alternate versions of the program, if they
-receive widespread use, become available for other developers to
-incorporate. Many developers of free software are heartened and
-encouraged by the resulting cooperation. However, in the case of
-software used on network servers, this result may fail to come about.
-The GNU General Public License permits making a modified version and
-letting the public access it on a server without ever releasing its
-source code to the public.
-
- The GNU Affero General Public License is designed specifically to
-ensure that, in such cases, the modified source code becomes available
-to the community. It requires the operator of a network server to
-provide the source code of the modified version running there to the
-users of that server. Therefore, public use of a modified version, on
-a publicly accessible server, gives the public access to the source
-code of the modified version.
-
- An older license, called the Affero General Public License and
-published by Affero, was designed to accomplish similar goals. This is
-a different license, not a version of the Affero GPL, but Affero has
-released a new version of the Affero GPL which permits relicensing under
-this license.
+this service if you wish), that you receive source code or can get it
+if you want it, that you can change the software or use pieces of it
+in new free programs; and that you know you can do these things.
+
+ To protect your rights, we need to make restrictions that forbid
+anyone to deny you these rights or to ask you to surrender the rights.
+These restrictions translate to certain responsibilities for you if you
+distribute copies of the software, or if you modify it.
+
+ For example, if you distribute copies of such a program, whether
+gratis or for a fee, you must give the recipients all the rights that
+you have. You must make sure that they, too, receive or can get the
+source code. And you must show them these terms so they know their
+rights.
+
+ We protect your rights with two steps: (1) copyright the software, and
+(2) offer you this license which gives you legal permission to copy,
+distribute and/or modify the software.
+
+ Also, for each author's protection and ours, we want to make certain
+that everyone understands that there is no warranty for this free
+software. If the software is modified by someone else and passed on, we
+want its recipients to know that what they have is not the original, so
+that any problems introduced by others will not reflect on the original
+authors' reputations.
+
+ Finally, any free program is threatened constantly by software
+patents. We wish to avoid the danger that redistributors of a free
+program will individually obtain patent licenses, in effect making the
+program proprietary. To prevent this, we have made it clear that any
+patent must be licensed for everyone's free use or not licensed at all.
The precise terms and conditions for copying, distribution and
modification follow.
- TERMS AND CONDITIONS
-
- 0. Definitions.
-
- "This License" refers to version 3 of the GNU Affero General Public License.
-
- "Copyright" also means copyright-like laws that apply to other kinds of
-works, such as semiconductor masks.
-
- "The Program" refers to any copyrightable work licensed under this
-License. Each licensee is addressed as "you". "Licensees" and
-"recipients" may be individuals or organizations.
-
- To "modify" a work means to copy from or adapt all or part of the work
-in a fashion requiring copyright permission, other than the making of an
-exact copy. The resulting work is called a "modified version" of the
-earlier work or a work "based on" the earlier work.
-
- A "covered work" means either the unmodified Program or a work based
-on the Program.
-
- To "propagate" a work means to do anything with it that, without
-permission, would make you directly or secondarily liable for
-infringement under applicable copyright law, except executing it on a
-computer or modifying a private copy. Propagation includes copying,
-distribution (with or without modification), making available to the
-public, and in some countries other activities as well.
-
- To "convey" a work means any kind of propagation that enables other
-parties to make or receive copies. Mere interaction with a user through
-a computer network, with no transfer of a copy, is not conveying.
-
- An interactive user interface displays "Appropriate Legal Notices"
-to the extent that it includes a convenient and prominently visible
-feature that (1) displays an appropriate copyright notice, and (2)
-tells the user that there is no warranty for the work (except to the
-extent that warranties are provided), that licensees may convey the
-work under this License, and how to view a copy of this License. If
-the interface presents a list of user commands or options, such as a
-menu, a prominent item in the list meets this criterion.
-
- 1. Source Code.
-
- The "source code" for a work means the preferred form of the work
-for making modifications to it. "Object code" means any non-source
-form of a work.
-
- A "Standard Interface" means an interface that either is an official
-standard defined by a recognized standards body, or, in the case of
-interfaces specified for a particular programming language, one that
-is widely used among developers working in that language.
-
- The "System Libraries" of an executable work include anything, other
-than the work as a whole, that (a) is included in the normal form of
-packaging a Major Component, but which is not part of that Major
-Component, and (b) serves only to enable use of the work with that
-Major Component, or to implement a Standard Interface for which an
-implementation is available to the public in source code form. A
-"Major Component", in this context, means a major essential component
-(kernel, window system, and so on) of the specific operating system
-(if any) on which the executable work runs, or a compiler used to
-produce the work, or an object code interpreter used to run it.
-
- The "Corresponding Source" for a work in object code form means all
-the source code needed to generate, install, and (for an executable
-work) run the object code and to modify the work, including scripts to
-control those activities. However, it does not include the work's
-System Libraries, or general-purpose tools or generally available free
-programs which are used unmodified in performing those activities but
-which are not part of the work. For example, Corresponding Source
-includes interface definition files associated with source files for
-the work, and the source code for shared libraries and dynamically
-linked subprograms that the work is specifically designed to require,
-such as by intimate data communication or control flow between those
-subprograms and other parts of the work.
-
- The Corresponding Source need not include anything that users
-can regenerate automatically from other parts of the Corresponding
-Source.
-
- The Corresponding Source for a work in source code form is that
-same work.
-
- 2. Basic Permissions.
-
- All rights granted under this License are granted for the term of
-copyright on the Program, and are irrevocable provided the stated
-conditions are met. This License explicitly affirms your unlimited
-permission to run the unmodified Program. The output from running a
-covered work is covered by this License only if the output, given its
-content, constitutes a covered work. This License acknowledges your
-rights of fair use or other equivalent, as provided by copyright law.
-
- You may make, run and propagate covered works that you do not
-convey, without conditions so long as your license otherwise remains
-in force. You may convey covered works to others for the sole purpose
-of having them make modifications exclusively for you, or provide you
-with facilities for running those works, provided that you comply with
-the terms of this License in conveying all material for which you do
-not control copyright. Those thus making or running the covered works
-for you must do so exclusively on your behalf, under your direction
-and control, on terms that prohibit them from making any copies of
-your copyrighted material outside their relationship with you.
-
- Conveying under any other circumstances is permitted solely under
-the conditions stated below. Sublicensing is not allowed; section 10
-makes it unnecessary.
-
- 3. Protecting Users' Legal Rights From Anti-Circumvention Law.
-
- No covered work shall be deemed part of an effective technological
-measure under any applicable law fulfilling obligations under article
-11 of the WIPO copyright treaty adopted on 20 December 1996, or
-similar laws prohibiting or restricting circumvention of such
-measures.
-
- When you convey a covered work, you waive any legal power to forbid
-circumvention of technological measures to the extent such circumvention
-is effected by exercising rights under this License with respect to
-the covered work, and you disclaim any intention to limit operation or
-modification of the work as a means of enforcing, against the work's
-users, your or third parties' legal rights to forbid circumvention of
-technological measures.
-
- 4. Conveying Verbatim Copies.
-
- You may convey verbatim copies of the Program's source code as you
-receive it, in any medium, provided that you conspicuously and
-appropriately publish on each copy an appropriate copyright notice;
-keep intact all notices stating that this License and any
-non-permissive terms added in accord with section 7 apply to the code;
-keep intact all notices of the absence of any warranty; and give all
-recipients a copy of this License along with the Program.
-
- You may charge any price or no price for each copy that you convey,
-and you may offer support or warranty protection for a fee.
-
- 5. Conveying Modified Source Versions.
-
- You may convey a work based on the Program, or the modifications to
-produce it from the Program, in the form of source code under the
-terms of section 4, provided that you also meet all of these conditions:
-
- a) The work must carry prominent notices stating that you modified
- it, and giving a relevant date.
-
- b) The work must carry prominent notices stating that it is
- released under this License and any conditions added under section
- 7. This requirement modifies the requirement in section 4 to
- "keep intact all notices".
-
- c) You must license the entire work, as a whole, under this
- License to anyone who comes into possession of a copy. This
- License will therefore apply, along with any applicable section 7
- additional terms, to the whole of the work, and all its parts,
- regardless of how they are packaged. This License gives no
- permission to license the work in any other way, but it does not
- invalidate such permission if you have separately received it.
-
- d) If the work has interactive user interfaces, each must display
- Appropriate Legal Notices; however, if the Program has interactive
- interfaces that do not display Appropriate Legal Notices, your
- work need not make them do so.
-
- A compilation of a covered work with other separate and independent
-works, which are not by their nature extensions of the covered work,
-and which are not combined with it such as to form a larger program,
-in or on a volume of a storage or distribution medium, is called an
-"aggregate" if the compilation and its resulting copyright are not
-used to limit the access or legal rights of the compilation's users
-beyond what the individual works permit. Inclusion of a covered work
-in an aggregate does not cause this License to apply to the other
-parts of the aggregate.
-
- 6. Conveying Non-Source Forms.
-
- You may convey a covered work in object code form under the terms
-of sections 4 and 5, provided that you also convey the
-machine-readable Corresponding Source under the terms of this License,
-in one of these ways:
-
- a) Convey the object code in, or embodied in, a physical product
- (including a physical distribution medium), accompanied by the
- Corresponding Source fixed on a durable physical medium
- customarily used for software interchange.
-
- b) Convey the object code in, or embodied in, a physical product
- (including a physical distribution medium), accompanied by a
- written offer, valid for at least three years and valid for as
- long as you offer spare parts or customer support for that product
- model, to give anyone who possesses the object code either (1) a
- copy of the Corresponding Source for all the software in the
- product that is covered by this License, on a durable physical
- medium customarily used for software interchange, for a price no
- more than your reasonable cost of physically performing this
- conveying of source, or (2) access to copy the
- Corresponding Source from a network server at no charge.
-
- c) Convey individual copies of the object code with a copy of the
- written offer to provide the Corresponding Source. This
- alternative is allowed only occasionally and noncommercially, and
- only if you received the object code with such an offer, in accord
- with subsection 6b.
-
- d) Convey the object code by offering access from a designated
- place (gratis or for a charge), and offer equivalent access to the
- Corresponding Source in the same way through the same place at no
- further charge. You need not require recipients to copy the
- Corresponding Source along with the object code. If the place to
- copy the object code is a network server, the Corresponding Source
- may be on a different server (operated by you or a third party)
- that supports equivalent copying facilities, provided you maintain
- clear directions next to the object code saying where to find the
- Corresponding Source. Regardless of what server hosts the
- Corresponding Source, you remain obligated to ensure that it is
- available for as long as needed to satisfy these requirements.
-
- e) Convey the object code using peer-to-peer transmission, provided
- you inform other peers where the object code and Corresponding
- Source of the work are being offered to the general public at no
- charge under subsection 6d.
-
- A separable portion of the object code, whose source code is excluded
-from the Corresponding Source as a System Library, need not be
-included in conveying the object code work.
-
- A "User Product" is either (1) a "consumer product", which means any
-tangible personal property which is normally used for personal, family,
-or household purposes, or (2) anything designed or sold for incorporation
-into a dwelling. In determining whether a product is a consumer product,
-doubtful cases shall be resolved in favor of coverage. For a particular
-product received by a particular user, "normally used" refers to a
-typical or common use of that class of product, regardless of the status
-of the particular user or of the way in which the particular user
-actually uses, or expects or is expected to use, the product. A product
-is a consumer product regardless of whether the product has substantial
-commercial, industrial or non-consumer uses, unless such uses represent
-the only significant mode of use of the product.
-
- "Installation Information" for a User Product means any methods,
-procedures, authorization keys, or other information required to install
-and execute modified versions of a covered work in that User Product from
-a modified version of its Corresponding Source. The information must
-suffice to ensure that the continued functioning of the modified object
-code is in no case prevented or interfered with solely because
-modification has been made.
-
- If you convey an object code work under this section in, or with, or
-specifically for use in, a User Product, and the conveying occurs as
-part of a transaction in which the right of possession and use of the
-User Product is transferred to the recipient in perpetuity or for a
-fixed term (regardless of how the transaction is characterized), the
-Corresponding Source conveyed under this section must be accompanied
-by the Installation Information. But this requirement does not apply
-if neither you nor any third party retains the ability to install
-modified object code on the User Product (for example, the work has
-been installed in ROM).
-
- The requirement to provide Installation Information does not include a
-requirement to continue to provide support service, warranty, or updates
-for a work that has been modified or installed by the recipient, or for
-the User Product in which it has been modified or installed. Access to a
-network may be denied when the modification itself materially and
-adversely affects the operation of the network or violates the rules and
-protocols for communication across the network.
-
- Corresponding Source conveyed, and Installation Information provided,
-in accord with this section must be in a format that is publicly
-documented (and with an implementation available to the public in
-source code form), and must require no special password or key for
-unpacking, reading or copying.
-
- 7. Additional Terms.
-
- "Additional permissions" are terms that supplement the terms of this
-License by making exceptions from one or more of its conditions.
-Additional permissions that are applicable to the entire Program shall
-be treated as though they were included in this License, to the extent
-that they are valid under applicable law. If additional permissions
-apply only to part of the Program, that part may be used separately
-under those permissions, but the entire Program remains governed by
-this License without regard to the additional permissions.
-
- When you convey a copy of a covered work, you may at your option
-remove any additional permissions from that copy, or from any part of
-it. (Additional permissions may be written to require their own
-removal in certain cases when you modify the work.) You may place
-additional permissions on material, added by you to a covered work,
-for which you have or can give appropriate copyright permission.
-
- Notwithstanding any other provision of this License, for material you
-add to a covered work, you may (if authorized by the copyright holders of
-that material) supplement the terms of this License with terms:
-
- a) Disclaiming warranty or limiting liability differently from the
- terms of sections 15 and 16 of this License; or
-
- b) Requiring preservation of specified reasonable legal notices or
- author attributions in that material or in the Appropriate Legal
- Notices displayed by works containing it; or
-
- c) Prohibiting misrepresentation of the origin of that material, or
- requiring that modified versions of such material be marked in
- reasonable ways as different from the original version; or
-
- d) Limiting the use for publicity purposes of names of licensors or
- authors of the material; or
-
- e) Declining to grant rights under trademark law for use of some
- trade names, trademarks, or service marks; or
-
- f) Requiring indemnification of licensors and authors of that
- material by anyone who conveys the material (or modified versions of
- it) with contractual assumptions of liability to the recipient, for
- any liability that these contractual assumptions directly impose on
- those licensors and authors.
-
- All other non-permissive additional terms are considered "further
-restrictions" within the meaning of section 10. If the Program as you
-received it, or any part of it, contains a notice stating that it is
-governed by this License along with a term that is a further
-restriction, you may remove that term. If a license document contains
-a further restriction but permits relicensing or conveying under this
-License, you may add to a covered work material governed by the terms
-of that license document, provided that the further restriction does
-not survive such relicensing or conveying.
-
- If you add terms to a covered work in accord with this section, you
-must place, in the relevant source files, a statement of the
-additional terms that apply to those files, or a notice indicating
-where to find the applicable terms.
-
- Additional terms, permissive or non-permissive, may be stated in the
-form of a separately written license, or stated as exceptions;
-the above requirements apply either way.
-
- 8. Termination.
-
- You may not propagate or modify a covered work except as expressly
-provided under this License. Any attempt otherwise to propagate or
-modify it is void, and will automatically terminate your rights under
-this License (including any patent licenses granted under the third
-paragraph of section 11).
-
- However, if you cease all violation of this License, then your
-license from a particular copyright holder is reinstated (a)
-provisionally, unless and until the copyright holder explicitly and
-finally terminates your license, and (b) permanently, if the copyright
-holder fails to notify you of the violation by some reasonable means
-prior to 60 days after the cessation.
-
- Moreover, your license from a particular copyright holder is
-reinstated permanently if the copyright holder notifies you of the
-violation by some reasonable means, this is the first time you have
-received notice of violation of this License (for any work) from that
-copyright holder, and you cure the violation prior to 30 days after
-your receipt of the notice.
-
- Termination of your rights under this section does not terminate the
-licenses of parties who have received copies or rights from you under
-this License. If your rights have been terminated and not permanently
-reinstated, you do not qualify to receive new licenses for the same
-material under section 10.
-
- 9. Acceptance Not Required for Having Copies.
-
- You are not required to accept this License in order to receive or
-run a copy of the Program. Ancillary propagation of a covered work
-occurring solely as a consequence of using peer-to-peer transmission
-to receive a copy likewise does not require acceptance. However,
-nothing other than this License grants you permission to propagate or
-modify any covered work. These actions infringe copyright if you do
-not accept this License. Therefore, by modifying or propagating a
-covered work, you indicate your acceptance of this License to do so.
-
- 10. Automatic Licensing of Downstream Recipients.
-
- Each time you convey a covered work, the recipient automatically
-receives a license from the original licensors, to run, modify and
-propagate that work, subject to this License. You are not responsible
-for enforcing compliance by third parties with this License.
-
- An "entity transaction" is a transaction transferring control of an
-organization, or substantially all assets of one, or subdividing an
-organization, or merging organizations. If propagation of a covered
-work results from an entity transaction, each party to that
-transaction who receives a copy of the work also receives whatever
-licenses to the work the party's predecessor in interest had or could
-give under the previous paragraph, plus a right to possession of the
-Corresponding Source of the work from the predecessor in interest, if
-the predecessor has it or can get it with reasonable efforts.
-
- You may not impose any further restrictions on the exercise of the
-rights granted or affirmed under this License. For example, you may
-not impose a license fee, royalty, or other charge for exercise of
-rights granted under this License, and you may not initiate litigation
-(including a cross-claim or counterclaim in a lawsuit) alleging that
-any patent claim is infringed by making, using, selling, offering for
-sale, or importing the Program or any portion of it.
-
- 11. Patents.
-
- A "contributor" is a copyright holder who authorizes use under this
-License of the Program or a work on which the Program is based. The
-work thus licensed is called the contributor's "contributor version".
-
- A contributor's "essential patent claims" are all patent claims
-owned or controlled by the contributor, whether already acquired or
-hereafter acquired, that would be infringed by some manner, permitted
-by this License, of making, using, or selling its contributor version,
-but do not include claims that would be infringed only as a
-consequence of further modification of the contributor version. For
-purposes of this definition, "control" includes the right to grant
-patent sublicenses in a manner consistent with the requirements of
+ GNU GENERAL PUBLIC LICENSE
+ TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
+
+ 0. This License applies to any program or other work which contains
+a notice placed by the copyright holder saying it may be distributed
+under the terms of this General Public License. The "Program", below,
+refers to any such program or work, and a "work based on the Program"
+means either the Program or any derivative work under copyright law:
+that is to say, a work containing the Program or a portion of it,
+either verbatim or with modifications and/or translated into another
+language. (Hereinafter, translation is included without limitation in
+the term "modification".) Each licensee is addressed as "you".
+
+Activities other than copying, distribution and modification are not
+covered by this License; they are outside its scope. The act of
+running the Program is not restricted, and the output from the Program
+is covered only if its contents constitute a work based on the
+Program (independent of having been made by running the Program).
+Whether that is true depends on what the Program does.
+
+ 1. You may copy and distribute verbatim copies of the Program's
+source code as you receive it, in any medium, provided that you
+conspicuously and appropriately publish on each copy an appropriate
+copyright notice and disclaimer of warranty; keep intact all the
+notices that refer to this License and to the absence of any warranty;
+and give any other recipients of the Program a copy of this License
+along with the Program.
+
+You may charge a fee for the physical act of transferring a copy, and
+you may at your option offer warranty protection in exchange for a fee.
+
+ 2. You may modify your copy or copies of the Program or any portion
+of it, thus forming a work based on the Program, and copy and
+distribute such modifications or work under the terms of Section 1
+above, provided that you also meet all of these conditions:
+
+ a) You must cause the modified files to carry prominent notices
+ stating that you changed the files and the date of any change.
+
+ b) You must cause any work that you distribute or publish, that in
+ whole or in part contains or is derived from the Program or any
+ part thereof, to be licensed as a whole at no charge to all third
+ parties under the terms of this License.
+
+ c) If the modified program normally reads commands interactively
+ when run, you must cause it, when started running for such
+ interactive use in the most ordinary way, to print or display an
+ announcement including an appropriate copyright notice and a
+ notice that there is no warranty (or else, saying that you provide
+ a warranty) and that users may redistribute the program under
+ these conditions, and telling the user how to view a copy of this
+ License. (Exception: if the Program itself is interactive but
+ does not normally print such an announcement, your work based on
+ the Program is not required to print an announcement.)
+
+These requirements apply to the modified work as a whole. If
+identifiable sections of that work are not derived from the Program,
+and can be reasonably considered independent and separate works in
+themselves, then this License, and its terms, do not apply to those
+sections when you distribute them as separate works. But when you
+distribute the same sections as part of a whole which is a work based
+on the Program, the distribution of the whole must be on the terms of
+this License, whose permissions for other licensees extend to the
+entire whole, and thus to each and every part regardless of who wrote it.
+
+Thus, it is not the intent of this section to claim rights or contest
+your rights to work written entirely by you; rather, the intent is to
+exercise the right to control the distribution of derivative or
+collective works based on the Program.
+
+In addition, mere aggregation of another work not based on the Program
+with the Program (or with a work based on the Program) on a volume of
+a storage or distribution medium does not bring the other work under
+the scope of this License.
+
+ 3. You may copy and distribute the Program (or a work based on it,
+under Section 2) in object code or executable form under the terms of
+Sections 1 and 2 above provided that you also do one of the following:
+
+ a) Accompany it with the complete corresponding machine-readable
+ source code, which must be distributed under the terms of Sections
+ 1 and 2 above on a medium customarily used for software interchange; or,
+
+ b) Accompany it with a written offer, valid for at least three
+ years, to give any third party, for a charge no more than your
+ cost of physically performing source distribution, a complete
+ machine-readable copy of the corresponding source code, to be
+ distributed under the terms of Sections 1 and 2 above on a medium
+ customarily used for software interchange; or,
+
+ c) Accompany it with the information you received as to the offer
+ to distribute corresponding source code. (This alternative is
+ allowed only for noncommercial distribution and only if you
+ received the program in object code or executable form with such
+ an offer, in accord with Subsection b above.)
+
+The source code for a work means the preferred form of the work for
+making modifications to it. For an executable work, complete source
+code means all the source code for all modules it contains, plus any
+associated interface definition files, plus the scripts used to
+control compilation and installation of the executable. However, as a
+special exception, the source code distributed need not include
+anything that is normally distributed (in either source or binary
+form) with the major components (compiler, kernel, and so on) of the
+operating system on which the executable runs, unless that component
+itself accompanies the executable.
+
+If distribution of executable or object code is made by offering
+access to copy from a designated place, then offering equivalent
+access to copy the source code from the same place counts as
+distribution of the source code, even though third parties are not
+compelled to copy the source along with the object code.
+
+ 4. You may not copy, modify, sublicense, or distribute the Program
+except as expressly provided under this License. Any attempt
+otherwise to copy, modify, sublicense or distribute the Program is
+void, and will automatically terminate your rights under this License.
+However, parties who have received copies, or rights, from you under
+this License will not have their licenses terminated so long as such
+parties remain in full compliance.
+
+ 5. You are not required to accept this License, since you have not
+signed it. However, nothing else grants you permission to modify or
+distribute the Program or its derivative works. These actions are
+prohibited by law if you do not accept this License. Therefore, by
+modifying or distributing the Program (or any work based on the
+Program), you indicate your acceptance of this License to do so, and
+all its terms and conditions for copying, distributing or modifying
+the Program or works based on it.
+
+ 6. Each time you redistribute the Program (or any work based on the
+Program), the recipient automatically receives a license from the
+original licensor to copy, distribute or modify the Program subject to
+these terms and conditions. You may not impose any further
+restrictions on the recipients' exercise of the rights granted herein.
+You are not responsible for enforcing compliance by third parties to
this License.
- Each contributor grants you a non-exclusive, worldwide, royalty-free
-patent license under the contributor's essential patent claims, to
-make, use, sell, offer for sale, import and otherwise run, modify and
-propagate the contents of its contributor version.
-
- In the following three paragraphs, a "patent license" is any express
-agreement or commitment, however denominated, not to enforce a patent
-(such as an express permission to practice a patent or covenant not to
-sue for patent infringement). To "grant" such a patent license to a
-party means to make such an agreement or commitment not to enforce a
-patent against the party.
-
- If you convey a covered work, knowingly relying on a patent license,
-and the Corresponding Source of the work is not available for anyone
-to copy, free of charge and under the terms of this License, through a
-publicly available network server or other readily accessible means,
-then you must either (1) cause the Corresponding Source to be so
-available, or (2) arrange to deprive yourself of the benefit of the
-patent license for this particular work, or (3) arrange, in a manner
-consistent with the requirements of this License, to extend the patent
-license to downstream recipients. "Knowingly relying" means you have
-actual knowledge that, but for the patent license, your conveying the
-covered work in a country, or your recipient's use of the covered work
-in a country, would infringe one or more identifiable patents in that
-country that you have reason to believe are valid.
-
- If, pursuant to or in connection with a single transaction or
-arrangement, you convey, or propagate by procuring conveyance of, a
-covered work, and grant a patent license to some of the parties
-receiving the covered work authorizing them to use, propagate, modify
-or convey a specific copy of the covered work, then the patent license
-you grant is automatically extended to all recipients of the covered
-work and works based on it.
-
- A patent license is "discriminatory" if it does not include within
-the scope of its coverage, prohibits the exercise of, or is
-conditioned on the non-exercise of one or more of the rights that are
-specifically granted under this License. You may not convey a covered
-work if you are a party to an arrangement with a third party that is
-in the business of distributing software, under which you make payment
-to the third party based on the extent of your activity of conveying
-the work, and under which the third party grants, to any of the
-parties who would receive the covered work from you, a discriminatory
-patent license (a) in connection with copies of the covered work
-conveyed by you (or copies made from those copies), or (b) primarily
-for and in connection with specific products or compilations that
-contain the covered work, unless you entered into that arrangement,
-or that patent license was granted, prior to 28 March 2007.
-
- Nothing in this License shall be construed as excluding or limiting
-any implied license or other defenses to infringement that may
-otherwise be available to you under applicable patent law.
-
- 12. No Surrender of Others' Freedom.
-
- If conditions are imposed on you (whether by court order, agreement or
+ 7. If, as a consequence of a court judgment or allegation of patent
+infringement or for any other reason (not limited to patent issues),
+conditions are imposed on you (whether by court order, agreement or
otherwise) that contradict the conditions of this License, they do not
-excuse you from the conditions of this License. If you cannot convey a
-covered work so as to satisfy simultaneously your obligations under this
-License and any other pertinent obligations, then as a consequence you may
-not convey it at all. For example, if you agree to terms that obligate you
-to collect a royalty for further conveying from those to whom you convey
-the Program, the only way you could satisfy both those terms and this
-License would be to refrain entirely from conveying the Program.
-
- 13. Remote Network Interaction; Use with the GNU General Public License.
-
- Notwithstanding any other provision of this License, if you modify the
-Program, your modified version must prominently offer all users
-interacting with it remotely through a computer network (if your version
-supports such interaction) an opportunity to receive the Corresponding
-Source of your version by providing access to the Corresponding Source
-from a network server at no charge, through some standard or customary
-means of facilitating copying of software. This Corresponding Source
-shall include the Corresponding Source for any work covered by version 3
-of the GNU General Public License that is incorporated pursuant to the
-following paragraph.
-
- Notwithstanding any other provision of this License, you have
-permission to link or combine any covered work with a work licensed
-under version 3 of the GNU General Public License into a single
-combined work, and to convey the resulting work. The terms of this
-License will continue to apply to the part which is the covered work,
-but the work with which it is combined will remain governed by version
-3 of the GNU General Public License.
-
- 14. Revised Versions of this License.
-
- The Free Software Foundation may publish revised and/or new versions of
-the GNU Affero General Public License from time to time. Such new versions
-will be similar in spirit to the present version, but may differ in detail to
+excuse you from the conditions of this License. If you cannot
+distribute so as to satisfy simultaneously your obligations under this
+License and any other pertinent obligations, then as a consequence you
+may not distribute the Program at all. For example, if a patent
+license would not permit royalty-free redistribution of the Program by
+all those who receive copies directly or indirectly through you, then
+the only way you could satisfy both it and this License would be to
+refrain entirely from distribution of the Program.
+
+If any portion of this section is held invalid or unenforceable under
+any particular circumstance, the balance of the section is intended to
+apply and the section as a whole is intended to apply in other
+circumstances.
+
+It is not the purpose of this section to induce you to infringe any
+patents or other property right claims or to contest validity of any
+such claims; this section has the sole purpose of protecting the
+integrity of the free software distribution system, which is
+implemented by public license practices. Many people have made
+generous contributions to the wide range of software distributed
+through that system in reliance on consistent application of that
+system; it is up to the author/donor to decide if he or she is willing
+to distribute software through any other system and a licensee cannot
+impose that choice.
+
+This section is intended to make thoroughly clear what is believed to
+be a consequence of the rest of this License.
+
+ 8. If the distribution and/or use of the Program is restricted in
+certain countries either by patents or by copyrighted interfaces, the
+original copyright holder who places the Program under this License
+may add an explicit geographical distribution limitation excluding
+those countries, so that distribution is permitted only in or among
+countries not thus excluded. In such case, this License incorporates
+the limitation as if written in the body of this License.
+
+ 9. The Free Software Foundation may publish revised and/or new versions
+of the General Public License from time to time. Such new versions will
+be similar in spirit to the present version, but may differ in detail to
address new problems or concerns.
- Each version is given a distinguishing version number. If the
-Program specifies that a certain numbered version of the GNU Affero General
-Public License "or any later version" applies to it, you have the
-option of following the terms and conditions either of that numbered
-version or of any later version published by the Free Software
-Foundation. If the Program does not specify a version number of the
-GNU Affero General Public License, you may choose any version ever published
-by the Free Software Foundation.
-
- If the Program specifies that a proxy can decide which future
-versions of the GNU Affero General Public License can be used, that proxy's
-public statement of acceptance of a version permanently authorizes you
-to choose that version for the Program.
-
- Later license versions may give you additional or different
-permissions. However, no additional obligations are imposed on any
-author or copyright holder as a result of your choosing to follow a
-later version.
-
- 15. Disclaimer of Warranty.
-
- THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
-APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
-HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
-OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
-THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
-PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
-IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
-ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
-
- 16. Limitation of Liability.
-
- IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
-WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
-THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
-GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
-USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
-DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
-PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
-EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
-SUCH DAMAGES.
-
- 17. Interpretation of Sections 15 and 16.
-
- If the disclaimer of warranty and limitation of liability provided
-above cannot be given local legal effect according to their terms,
-reviewing courts shall apply local law that most closely approximates
-an absolute waiver of all civil liability in connection with the
-Program, unless a warranty or assumption of liability accompanies a
-copy of the Program in return for a fee.
+Each version is given a distinguishing version number. If the Program
+specifies a version number of this License which applies to it and "any
+later version", you have the option of following the terms and conditions
+either of that version or of any later version published by the Free
+Software Foundation. If the Program does not specify a version number of
+this License, you may choose any version ever published by the Free Software
+Foundation.
+
+ 10. If you wish to incorporate parts of the Program into other free
+programs whose distribution conditions are different, write to the author
+to ask for permission. For software which is copyrighted by the Free
+Software Foundation, write to the Free Software Foundation; we sometimes
+make exceptions for this. Our decision will be guided by the two goals
+of preserving the free status of all derivatives of our free software and
+of promoting the sharing and reuse of software generally.
+
+ NO WARRANTY
+
+ 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
+FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
+OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
+PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
+OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
+TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
+PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
+REPAIR OR CORRECTION.
+
+ 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
+WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
+REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
+INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
+OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
+TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
+YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
+PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
+POSSIBILITY OF SUCH DAMAGES.
END OF TERMS AND CONDITIONS
@@ -626,36 +287,53 @@ free software which everyone can redistribute and change under these terms.
To do so, attach the following notices to the program. It is safest
to attach them to the start of each source file to most effectively
-state the exclusion of warranty; and each file should have at least
+convey the exclusion of warranty; and each file should have at least
the "copyright" line and a pointer to where the full notice is found.
<one line to give the program's name and a brief idea of what it does.>
Copyright (C) <year> <name of author>
- This program is free software: you can redistribute it and/or modify
- it under the terms of the GNU Affero General Public License as published
- by the Free Software Foundation, either version 3 of the License, or
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU Affero General Public License for more details.
+ GNU General Public License for more details.
- You should have received a copy of the GNU Affero General Public License
- along with this program. If not, see <http://www.gnu.org/licenses/>.
+ You should have received a copy of the GNU General Public License along
+ with this program; if not, write to the Free Software Foundation, Inc.,
+ 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
Also add information on how to contact you by electronic and paper mail.
- If your software can interact with users remotely through a computer
-network, you should also make sure that it provides a way for users to
-get its source. For example, if your program is a web application, its
-interface could display a "Source" link that leads users to an archive
-of the code. There are many ways you could offer source, and different
-solutions will be better for different programs; see section 13 for the
-specific requirements.
-
- You should also get your employer (if you work as a programmer) or school,
-if any, to sign a "copyright disclaimer" for the program, if necessary.
-For more information on this, and how to apply and follow the GNU AGPL, see
-<http://www.gnu.org/licenses/>.
+If the program is interactive, make it output a short notice like this
+when it starts in an interactive mode:
+
+ Gnomovision version 69, Copyright (C) year name of author
+ Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
+ This is free software, and you are welcome to redistribute it
+ under certain conditions; type `show c' for details.
+
+The hypothetical commands `show w' and `show c' should show the appropriate
+parts of the General Public License. Of course, the commands you use may
+be called something other than `show w' and `show c'; they could even be
+mouse-clicks or menu items--whatever suits your program.
+
+You should also get your employer (if you work as a programmer) or your
+school, if any, to sign a "copyright disclaimer" for the program, if
+necessary. Here is a sample; alter the names:
+
+ Yoyodyne, Inc., hereby disclaims all copyright interest in the program
+ `Gnomovision' (which makes passes at compilers) written by James Hacker.
+
+ <signature of Ty Coon>, 1 April 1989
+ Ty Coon, President of Vice
+
+This General Public License does not permit incorporating your program into
+proprietary programs. If your program is a subroutine library, you may
+consider it more useful to permit linking proprietary applications with the
+library. If this is what you want to do, use the GNU Lesser General
+Public License instead of this License. \ No newline at end of file
diff --git a/acore.json b/acore.json
index b64f6494dd..9fa27c4de3 100644
--- a/acore.json
+++ b/acore.json
@@ -1,5 +1,5 @@
{
"name": "azerothcore-wotlk",
"version": "14.0.0-dev",
- "license": "AGPL3"
+ "license": "GPL2"
}
diff --git a/apps/EnumUtils/enumutils_describe.py b/apps/EnumUtils/enumutils_describe.py
index ef9bf72a4f..b1adee2aba 100644
--- a/apps/EnumUtils/enumutils_describe.py
+++ b/apps/EnumUtils/enumutils_describe.py
@@ -4,14 +4,14 @@ from os import walk, getcwd
notice = ('''/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/apps/bash_shared/common.sh b/apps/bash_shared/common.sh
index acd23eacdf..46422119b1 100644
--- a/apps/bash_shared/common.sh
+++ b/apps/bash_shared/common.sh
@@ -1,17 +1,19 @@
function registerHooks() { acore_event_registerHooks "$@"; }
function runHooks() { acore_event_runHooks "$@"; }
-#shellcheck source=../../conf/dist/config.sh
-source "$AC_PATH_CONF/dist/config.sh" # include dist to avoid missing conf variables
+function acore_common_loadConfig() {
+ #shellcheck source=../../conf/dist/config.sh
+ source "$AC_PATH_CONF/dist/config.sh" # include dist to avoid missing conf variables
-# first check if it's defined in env, otherwise use the default
-USER_CONF_PATH=${USER_CONF_PATH:-"$AC_PATH_CONF/config.sh"}
+ # first check if it's defined in env, otherwise use the default
+ USER_CONF_PATH=${USER_CONF_PATH:-"$AC_PATH_CONF/config.sh"}
-if [ -f "$USER_CONF_PATH" ]; then
- source "$USER_CONF_PATH" # should overwrite previous
-else
- echo "NOTICE: file <$USER_CONF_PATH> not found, we use default configuration only."
-fi
+ if [ -f "$USER_CONF_PATH" ]; then
+ source "$USER_CONF_PATH" # should overwrite previous
+ else
+ echo "NOTICE: file <$USER_CONF_PATH> not found, we use default configuration only."
+ fi
+}
#
# Load modules
diff --git a/apps/bash_shared/defines.sh b/apps/bash_shared/defines.sh
index 4b014bd9c1..af9e9dfc97 100644
--- a/apps/bash_shared/defines.sh
+++ b/apps/bash_shared/defines.sh
@@ -25,4 +25,6 @@ export AC_PATH_MODULES="$AC_PATH_ROOT/modules"
export AC_PATH_DEPS="$AC_PATH_ROOT/deps"
+export AC_BASH_LIB_PATH="$AC_PATH_DEPS/acore/bash-lib/src"
+
export AC_PATH_VAR="$AC_PATH_ROOT/var"
diff --git a/apps/bash_shared/includes.sh b/apps/bash_shared/includes.sh
index d2bf07db12..679fc8e6d3 100644
--- a/apps/bash_shared/includes.sh
+++ b/apps/bash_shared/includes.sh
@@ -16,6 +16,8 @@ source "$AC_PATH_DEPS/acore/bash-lib/src/event/hooks.sh"
# shellcheck source=./common.sh
source "$AC_PATH_SHARED/common.sh"
+acore_common_loadConfig
+
if [[ "$OSTYPE" = "msys" ]]; then
AC_BINPATH_FULL="$BINPATH"
else
diff --git a/apps/ci/ci-install-modules.sh b/apps/ci/ci-install-modules.sh
index 5987eaf7ad..7ff6470750 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
diff --git a/apps/compiler/includes/functions.sh b/apps/compiler/includes/functions.sh
index c608cff24d..4428f9132f 100644
--- a/apps/compiler/includes/functions.sh
+++ b/apps/compiler/includes/functions.sh
@@ -1,5 +1,8 @@
#!/usr/bin/env bash
+# shellcheck source=../../../deps/acore/bash-lib/src/common/boolean.sh
+source "$AC_BASH_LIB_PATH/common/boolean.sh"
+
# Set SUDO variable - one liner
SUDO=""
@@ -135,7 +138,8 @@ function comp_compile() {
echo "Done"
;;
linux*|darwin*)
- local confDir=${CONFDIR:-"$AC_BINPATH_FULL/../etc"}
+ local confDir
+ confDir=${CONFDIR:-"$AC_BINPATH_FULL/../etc"}
# create the folders before installing to
# set the current user and permissions
@@ -143,6 +147,9 @@ function comp_compile() {
mkdir -p "$AC_BINPATH_FULL"
echo "Creating $confDir..."
mkdir -p "$confDir"
+ mkdir -p "$confDir/modules"
+
+ confDir=$(realpath "$confDir")
echo "Cmake install..."
$SUDO cmake --install . --config $CTYPE
@@ -156,14 +163,29 @@ function comp_compile() {
echo "Setting permissions on binary files"
find "$AC_BINPATH_FULL" -mindepth 1 -maxdepth 1 -type f -exec $SUDO chown root:root -- {} +
find "$AC_BINPATH_FULL" -mindepth 1 -maxdepth 1 -type f -exec $SUDO chmod u+s -- {} +
+ $SUDO setcap cap_sys_nice=eip "$AC_BINPATH_FULL/worldserver"
+ $SUDO setcap cap_sys_nice=eip "$AC_BINPATH_FULL/authserver"
fi
- [[ -f "$confDir/worldserver.conf.dist" ]] && \
- cp -v --no-clobber "$confDir/worldserver.conf.dist" "$confDir/worldserver.conf"
- [[ -f "$confDir/authserver.conf.dist" ]] && \
- cp -v --no-clobber "$confDir/authserver.conf.dist" "$confDir/authserver.conf"
- [[ -f "$confDir/dbimport.conf.dist" ]] && \
- cp -v --no-clobber "$confDir/dbimport.conf.dist" "$confDir/dbimport.conf"
+
+ if ( isTrue "$AC_ENABLE_CONF_COPY_ON_INSTALL" ) then
+ echo "Copying default configuration files to $confDir ..."
+ [[ -f "$confDir/worldserver.conf.dist" && ! -f "$confDir/worldserver.conf" ]] && \
+ cp -v "$confDir/worldserver.conf.dist" "$confDir/worldserver.conf"
+ [[ -f "$confDir/authserver.conf.dist" && ! -f "$confDir/authserver.conf" ]] && \
+ cp -v "$confDir/authserver.conf.dist" "$confDir/authserver.conf"
+ [[ -f "$confDir/dbimport.conf.dist" && ! -f "$confDir/dbimport.conf" ]] && \
+ cp -v "$confDir/dbimport.conf.dist" "$confDir/dbimport.conf"
+
+ for f in "$confDir/modules/"*.dist
+ do
+ [[ -e $f ]] || break # handle the case of no *.dist files
+ if [[ ! -f "${f%.dist}" ]]; then
+ echo "Copying module config $(basename "${f%.dist}")"
+ cp -v "$f" "${f%.dist}";
+ fi
+ done
+ fi
echo "Done"
;;
diff --git a/apps/installer/includes/config/config-main.sh b/apps/installer/includes/config/config-main.sh
new file mode 100644
index 0000000000..f5f0c01f64
--- /dev/null
+++ b/apps/installer/includes/config/config-main.sh
@@ -0,0 +1,9 @@
+#!/usr/bin/env bash
+
+CURRENT_PATH=$( cd "$(dirname "${BASH_SOURCE[0]}")" || exit ; pwd )
+
+# shellcheck source=./config.sh
+source "$CURRENT_PATH/config.sh"
+
+acore_dash_config "$@"
+
diff --git a/apps/installer/includes/config/config.sh b/apps/installer/includes/config/config.sh
new file mode 100644
index 0000000000..40192c4008
--- /dev/null
+++ b/apps/installer/includes/config/config.sh
@@ -0,0 +1,60 @@
+#!/usr/bin/env bash
+
+CURRENT_PATH=$( cd "$(dirname "${BASH_SOURCE[0]}")" || exit ; pwd )
+
+# shellcheck source=../../../bash_shared/includes.sh
+source "$CURRENT_PATH/../../../bash_shared/includes.sh"
+# shellcheck source=../includes.sh
+source "$CURRENT_PATH/../includes.sh"
+# shellcheck source=../../../bash_shared/menu_system.sh
+source "$AC_PATH_APPS/bash_shared/menu_system.sh"
+
+function acore_dash_configShowValue() {
+ if [ $# -ne 1 ]; then
+ echo "Usage: show <VAR_NAME>"
+ return 1
+ fi
+
+ local varName="$1"
+ local varValue="${!varName}"
+ if [ -z "$varValue" ]; then
+ echo "$varName is not set."
+ else
+ echo "$varName=$varValue"
+ fi
+}
+
+function acore_dash_configLoad() {
+ acore_common_loadConfig
+ echo "Configuration loaded into the current shell session."
+}
+
+# Configuration management menu definition
+# Format: "key|short|description"
+config_menu_items=(
+ "show|s|Show configuration variable value"
+ "load|l|Load configurations variables within the current shell session"
+ "help|h|Show detailed help"
+ "quit|q|Close this menu"
+)
+
+# Menu command handler for configuration operations
+function handle_config_command() {
+ local key="$1"
+ shift
+
+ case "$key" in
+ "show")
+ acore_dash_configShowValue "$@"
+ ;;
+ "load")
+ acore_dash_configLoad
+ ;;
+ esac
+}
+
+function acore_dash_config() {
+ menu_run_with_items "CONFIG MANAGER" handle_config_command -- "${config_menu_items[@]}" -- "$@"
+ return $?
+}
+
diff --git a/apps/installer/includes/functions.sh b/apps/installer/includes/functions.sh
index 9dbe2652c1..79fbb355d9 100644
--- a/apps/installer/includes/functions.sh
+++ b/apps/installer/includes/functions.sh
@@ -155,7 +155,7 @@ function inst_simple_restarter {
function inst_download_client_data {
# change the following version when needed
- local VERSION=v16
+ local VERSION=v19
echo "#######################"
echo "Client data downloader"
@@ -183,3 +183,5 @@ function inst_download_client_data {
&& echo "Remove downloaded file" && rm "$zipPath" \
&& echo "INSTALLED_VERSION=$VERSION" > "$dataVersionFile"
}
+
+
diff --git a/apps/installer/includes/includes.sh b/apps/installer/includes/includes.sh
index c0d6bb8bd6..e4c1b9f2b5 100644
--- a/apps/installer/includes/includes.sh
+++ b/apps/installer/includes/includes.sh
@@ -2,6 +2,7 @@
CURRENT_PATH=$( cd "$(dirname "${BASH_SOURCE[0]}")" ; pwd )
+# shellcheck source=../../bash_shared/includes.sh
source "$CURRENT_PATH/../../bash_shared/includes.sh"
AC_PATH_INSTALLER="$AC_PATH_APPS/installer"
@@ -9,14 +10,14 @@ AC_PATH_INSTALLER="$AC_PATH_APPS/installer"
J_PATH="$AC_PATH_DEPS/acore/joiner"
J_PATH_MODULES="$AC_PATH_MODULES"
+# shellcheck source=../../../deps/acore/joiner/joiner.sh
source "$J_PATH/joiner.sh"
-if [ -f "$AC_PATH_INSTALLER/config.sh" ]; then
- source "$AC_PATH_INSTALLER/config.sh" # should overwrite previous
-fi
-
+# shellcheck source=../../compiler/includes/includes.sh
source "$AC_PATH_APPS/compiler/includes/includes.sh"
+# shellcheck source=../../../deps/semver_bash/semver.sh
source "$AC_PATH_DEPS/semver_bash/semver.sh"
+# shellcheck source=../includes/functions.sh
source "$AC_PATH_INSTALLER/includes/functions.sh"
diff --git a/apps/installer/includes/modules-manager/README.md b/apps/installer/includes/modules-manager/README.md
index 93496a91a6..d6a160b6c7 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:
diff --git a/apps/installer/includes/modules-manager/modules.sh b/apps/installer/includes/modules-manager/modules.sh
index 787d07677c..89c7ea50ac 100644
--- a/apps/installer/includes/modules-manager/modules.sh
+++ b/apps/installer/includes/modules-manager/modules.sh
@@ -59,7 +59,6 @@ else
C_GREEN=''
C_YELLOW=''
C_BLUE=''
- C_MAGENTA=''
C_CYAN=''
fi
@@ -127,10 +126,13 @@ function inst_module_help() {
echo " ./acore.sh module # Interactive menu"
echo " ./acore.sh module search [terms...]"
echo " ./acore.sh module install [--all | modules...]"
- echo " ./acore.sh module update [--all | modules...]"
+ echo " ./acore.sh module update [--discard-changes] [--all | modules...]"
echo " ./acore.sh module remove [modules...]"
echo " ./acore.sh module list # List installed modules"
echo ""
+ echo "Options:"
+ echo " --discard-changes Reset module repositories to a clean state before updating"
+ echo ""
echo "Module Specification Syntax:"
echo " name # Simple name (e.g., mod-transmog)"
echo " owner/name # GitHub repository"
@@ -171,42 +173,8 @@ function inst_module_list() {
# Usage: ./acore.sh module <search|install|update|remove> [args...]
# ./acore.sh module # Interactive menu
function inst_module() {
- # If no arguments provided, start interactive menu
- if [[ $# -eq 0 ]]; then
- menu_run_with_items "MODULE MANAGER" handle_module_command -- "${module_menu_items[@]}" --
- return $?
- fi
-
- # Normalize arguments into an array
- local tokens=()
- read -r -a tokens <<< "$*"
- local cmd="${tokens[0]}"
- local args=("${tokens[@]:1}")
-
- case "$cmd" in
- ""|"help"|"-h"|"--help")
- inst_module_help
- ;;
- "search"|"s")
- inst_module_search "${args[@]}"
- ;;
- "install"|"i")
- inst_module_install "${args[@]}"
- ;;
- "update"|"u")
- inst_module_update "${args[@]}"
- ;;
- "remove"|"r")
- inst_module_remove "${args[@]}"
- ;;
- "list"|"l")
- inst_module_list "${args[@]}"
- ;;
- *)
- print_error "Unknown module command: $cmd. Use 'help' to see available commands."
- return 1
- ;;
- esac
+ menu_run_with_items "MODULE MANAGER" handle_module_command -- "${module_menu_items[@]}" -- "$@"
+ return $?
}
# =============================================================================
@@ -602,6 +570,37 @@ function inst_mod_is_installed() {
return 1
}
+# Discard local changes from a module repository to guarantee a clean update.
+function inst_module_reset_repo() {
+ local repo_ref="$1"
+ local dirname="$2"
+ local repo_path="$J_PATH_MODULES/$dirname"
+
+ if [ ! -d "$repo_path" ]; then
+ print_error "[$repo_ref] Cannot discard changes; path not found ($repo_path)."
+ return 1
+ fi
+
+ if [ ! -d "$repo_path/.git" ]; then
+ print_error "[$repo_ref] Cannot discard changes; $repo_path is not a git repository."
+ return 1
+ fi
+
+ print_warn "[$repo_ref] Discarding local changes (--discard-changes)."
+
+ if ! git -C "$repo_path" reset --hard >/dev/null 2>&1; then
+ print_error "[$repo_ref] Failed to reset repository at $repo_path."
+ return 1
+ fi
+
+ if ! git -C "$repo_path" clean -fd >/dev/null 2>&1; then
+ print_error "[$repo_ref] Failed to remove untracked files from $repo_path."
+ return 1
+ fi
+
+ return 0
+}
+
# =============================================================================
# Conflict Detection and Validation
# =============================================================================
@@ -649,7 +648,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]}"
@@ -901,31 +900,48 @@ function inst_module_install {
# Update one or more modules
function inst_module_update {
- # Handle help request
- if [[ "$1" == "--help" || "$1" == "-h" ]]; then
- inst_module_help
- return 0
- fi
-
- # Support multiple modules and the --all flag; prompt if none specified.
- local args=("$@")
+ local modules=()
local use_all=false
- if [ ${#args[@]} -gt 0 ] && { [ "${args[0]}" = "--all" ] || [ "${args[0]}" = "-a" ]; }; then
- use_all=true
+ local discard_changes=false
+ local had_errors=0
+
+ while [[ $# -gt 0 ]]; do
+ case "$1" in
+ --help|-h)
+ inst_module_help
+ return 0
+ ;;
+ --all|-a)
+ use_all=true
+ ;;
+ --discard-changes|--reset|-r)
+ discard_changes=true
+ ;;
+ --)
+ shift || true
+ while [[ $# -gt 0 ]]; do
+ modules+=("$1")
+ shift || true
+ done
+ break
+ ;;
+ *)
+ modules+=("$1")
+ ;;
+ esac
shift || true
- fi
-
- local _tmp=$PWD
+ done
if $use_all; then
- local line repo_ref branch commit newCommit owner modname url dirname
+ local repo_ref branch commit owner modname url dirname newCommit
+ local parsed_output
while read -r repo_ref branch commit; do
[ -z "$repo_ref" ] && continue
- # Skip excluded modules during update --all
if inst_mod_is_excluded "$repo_ref"; then
print_warn "[$repo_ref] Excluded by MODULES_EXCLUDE_LIST (skipping)."
continue
fi
+
parsed_output=$(inst_parse_module_spec "$repo_ref")
IFS=' ' read -r _ owner modname _ _ url dirname <<< "$parsed_output"
@@ -935,16 +951,23 @@ function inst_module_update {
continue
fi
+ if $discard_changes; then
+ if ! inst_module_reset_repo "$repo_ref" "$dirname"; then
+ had_errors=1
+ continue
+ fi
+ fi
+
if Joiner:upd_repo "$url" "$dirname" "$branch" ""; then
newCommit=$(git -C "$J_PATH_MODULES/$dirname" rev-parse HEAD 2>/dev/null || echo "")
inst_mod_list_upsert "$repo_ref" "$branch" "$newCommit"
print_success "[$repo_ref] Updated to latest commit on '$branch'."
else
print_error "[$repo_ref] Cannot update"
+ had_errors=1
fi
done < <(inst_mod_list_read)
else
- local modules=("$@")
if [ ${#modules[@]} -eq 0 ]; then
echo "Type the name(s) of the module(s) to update"
read -p "Insert name(s): " _line
@@ -952,6 +975,7 @@ function inst_module_update {
fi
local spec repo_ref override_branch override_commit owner modname url dirname v b branch def newCommit
+ local parsed_output
for spec in "${modules[@]}"; do
[ -z "$spec" ] && continue
parsed_output=$(inst_parse_module_spec "$spec")
@@ -959,11 +983,10 @@ function inst_module_update {
dirname="${dirname:-$modname}"
if [ -d "$J_PATH_MODULES/$dirname/" ]; then
- # determine preferred branch if not provided
+ b=""
if [ -n "$override_branch" ] && [ "$override_branch" != "-" ]; then
b="$override_branch"
else
- # try reading acore-module.json for this repo
if [[ "$url" =~ github.com ]]; then
read v b < <(inst_getVersionBranch "https://raw.githubusercontent.com/${owner}/${modname}/master/acore-module.json")
else
@@ -981,21 +1004,35 @@ function inst_module_update {
fi
fi
+ if $discard_changes; then
+ if ! inst_module_reset_repo "$repo_ref" "$dirname"; then
+ had_errors=1
+ continue
+ fi
+ fi
+
if Joiner:upd_repo "$url" "$dirname" "$b" ""; then
newCommit=$(git -C "$J_PATH_MODULES/$dirname" rev-parse HEAD 2>/dev/null || echo "")
inst_mod_list_upsert "$repo_ref" "$b" "$newCommit"
print_success "[$repo_ref] Done, please re-run compiling and db assembly"
else
print_error "[$repo_ref] Cannot update"
+ had_errors=1
fi
else
print_error "[$repo_ref] Cannot update! Path doesn't exist ($J_PATH_MODULES/$dirname/)"
+ had_errors=1
fi
done
fi
echo ""
echo ""
+
+ if [ "$had_errors" -ne 0 ]; then
+ return 1
+ fi
+ return 0
}
# Remove one or more modules
diff --git a/apps/installer/includes/os_configs/debian.sh b/apps/installer/includes/os_configs/debian.sh
index 5bfc93f8f8..1aecbe3d26 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 cd3944fa6d..c2c84fff35 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
diff --git a/apps/installer/includes/os_configs/windows.sh b/apps/installer/includes/os_configs/windows.sh
index b99c2bfebf..cdba50c27f 100644
--- a/apps/installer/includes/os_configs/windows.sh
+++ b/apps/installer/includes/os_configs/windows.sh
@@ -24,7 +24,6 @@ fi
choco install -y --skip-checksums "${INSTALL_ARGS[@]}" cmake.install -y --installargs 'ADD_CMAKE_TO_PATH=System'
choco install -y --skip-checksums "${INSTALL_ARGS[@]}" visualstudio2022-workload-nativedesktop
-choco install -y --skip-checksums "${INSTALL_ARGS[@]}" openssl --force --version=3.5.3
+choco install -y --skip-checksums "${INSTALL_ARGS[@]}" openssl --force --version=3.5.4
choco install -y --skip-checksums "${INSTALL_ARGS[@]}" boost-msvc-14.3 --force --version=1.87.0
-choco install -y --skip-checksums "${INSTALL_ARGS[@]}" mysql --force --version=8.4.4
-
+choco install -y --skip-checksums "${INSTALL_ARGS[@]}" mysql --force --version=8.4.6
diff --git a/apps/installer/main.sh b/apps/installer/main.sh
index fea9dc3acf..a64787269e 100644
--- a/apps/installer/main.sh
+++ b/apps/installer/main.sh
@@ -45,6 +45,7 @@ menu_items=(
"docker|dr|Run docker tools"
"version|v|Show AzerothCore version"
"service-manager|sm|Run service manager to run authserver and worldserver in background"
+ "config|cf|Configuration manager"
"quit|q|Exit from this menu"
)
@@ -100,6 +101,9 @@ function handle_menu_command() {
bash "$AC_PATH_APPS/startup-scripts/src/service-manager.sh" "$@"
exit
;;
+ "config")
+ bash "$AC_PATH_APPS/installer/includes/config/config-main.sh" "$@"
+ ;;
"quit")
echo "Goodbye!"
exit
diff --git a/apps/installer/test/test_module_commands.bats b/apps/installer/test/test_module_commands.bats
index 1223a80a6d..d829c1a32b 100755
--- a/apps/installer/test/test_module_commands.bats
+++ b/apps/installer/test/test_module_commands.bats
@@ -751,5 +751,5 @@ EOF
run inst_module "unknown-command"
[ "$status" -eq 1 ]
- [[ "$output" =~ "Unknown module command" ]]
+ [[ "$output" =~ "Invalid option" ]]
} \ No newline at end of file
diff --git a/apps/startup-scripts/README.md b/apps/startup-scripts/README.md
index 0c7cb0940d..b99c38bd68 100644
--- a/apps/startup-scripts/README.md
+++ b/apps/startup-scripts/README.md
@@ -453,6 +453,40 @@ This is particularly useful for:
- **Multiple Projects**: Separate service configurations per project
- **Team Collaboration**: Share service setups across development teams
+#### Service Configuration Portability
+
+The service manager automatically stores binary and configuration paths as relative paths when they are located under the `AC_SERVICE_CONFIG_DIR`, making service configurations portable across environments:
+
+```bash
+# Set up a portable project structure
+export AC_SERVICE_CONFIG_DIR="/opt/myproject/services"
+mkdir -p "$AC_SERVICE_CONFIG_DIR"/{bin,etc}
+
+# Copy your binaries and configs
+cp /path/to/compiled/authserver "$AC_SERVICE_CONFIG_DIR/bin/"
+cp /path/to/authserver.conf "$AC_SERVICE_CONFIG_DIR/etc/"
+
+# Create service - paths under AC_SERVICE_CONFIG_DIR will be stored as relative
+./service-manager.sh create auth authserver \
+ --bin-path "$AC_SERVICE_CONFIG_DIR/bin" \
+ --server-config "$AC_SERVICE_CONFIG_DIR/etc/authserver.conf"
+
+# Registry will contain relative paths like "bin/authserver" and "etc/authserver.conf"
+# instead of absolute paths, making the entire directory portable
+```
+
+**Benefits:**
+- **Environment Independence**: Move the entire services directory between machines
+- **Container Friendly**: Perfect for Docker volumes and bind mounts
+- **Backup/Restore**: Archive and restore complete service configurations
+- **Development/Production Parity**: Same relative structure across environments
+
+**How it works:**
+- Paths under `AC_SERVICE_CONFIG_DIR` are automatically stored as relative paths
+- Paths outside `AC_SERVICE_CONFIG_DIR` are stored as absolute paths for safety
+- When services are restored or started, relative paths are resolved from `AC_SERVICE_CONFIG_DIR`
+- If `AC_SERVICE_CONFIG_DIR` is not set, all paths are stored as absolute paths (traditional behavior)
+
#### Migration from Legacy Format
If you have existing services in the old format, use the migration script:
diff --git a/apps/startup-scripts/src/run-engine b/apps/startup-scripts/src/run-engine
index 761e51b3d5..72a3f304ca 100755
--- a/apps/startup-scripts/src/run-engine
+++ b/apps/startup-scripts/src/run-engine
@@ -219,6 +219,13 @@ function parse_arguments() {
export PARSED_CONFIG_FILE="$config_file"
export PARSED_SERVERCONFIG="$serverconfig"
export PARSED_SESSION_MANAGER="$session_manager"
+
+ echo "Parsed arguments:"
+ echo " Mode: $PARSED_MODE"
+ echo " Server Binary: $PARSED_SERVERBIN"
+ echo " Config File: $PARSED_CONFIG_FILE"
+ echo " Server Config: $PARSED_SERVERCONFIG"
+ echo " Session Manager: $PARSED_SESSION_MANAGER"
}
# Start service (single run or with simple-restarter)
diff --git a/apps/startup-scripts/src/service-manager.sh b/apps/startup-scripts/src/service-manager.sh
index ccc4e8e359..4f597fbebe 100755
--- a/apps/startup-scripts/src/service-manager.sh
+++ b/apps/startup-scripts/src/service-manager.sh
@@ -16,6 +16,19 @@ ROOT_DIR="$(cd "$CURRENT_PATH/../../.." && pwd)"
# Configuration directory (can be overridden with AC_SERVICE_CONFIG_DIR)
CONFIG_DIR="${AC_SERVICE_CONFIG_DIR:-${XDG_CONFIG_HOME:-$HOME/.config}/azerothcore/services}"
REGISTRY_FILE="$CONFIG_DIR/service_registry.json"
+export AC_SERVICE_CONFIG_DIR="${AC_SERVICE_CONFIG_DIR:-$CONFIG_DIR}"
+
+# Default values for variables that might be loaded from config files
+# This prevents "unbound variable" errors when sourcing configuration files
+RUN_ENGINE_CONFIG_FILE="${RUN_ENGINE_CONFIG_FILE:-}"
+SESSION_MANAGER="${SESSION_MANAGER:-}"
+SESSION_NAME="${SESSION_NAME:-}"
+BINPATH="${BINPATH:-}"
+SERVERBIN="${SERVERBIN:-}"
+CONFIG="${CONFIG:-}"
+RESTART_POLICY="${RESTART_POLICY:-}"
+GDB_ENABLED="${GDB_ENABLED:-}"
+SERVER_CONFIG="${SERVER_CONFIG:-}"
# Colors for output
readonly YELLOW='\033[1;33m'
@@ -32,6 +45,114 @@ if [ ! -f "$REGISTRY_FILE" ]; then
echo "[]" > "$REGISTRY_FILE"
fi
+# Path conversion utilities for portability
+# When AC_SERVICE_CONFIG_DIR (hence CONFIG_DIR) is set, always store paths
+# relative to it. Resolve relative paths back against CONFIG_DIR.
+function make_path_relative() {
+ local input="$1"
+
+ # Pass through empty or non-absolute inputs
+ if [ -z "$input" ] || [[ ! "$input" = /* ]]; then
+ echo "$input"
+ return
+ fi
+
+ # If AC_SERVICE_CONFIG_DIR is explicitly set, check if path is under it
+ if [ -n "${AC_SERVICE_CONFIG_DIR:-}" ]; then
+ local config_dir_abs
+ config_dir_abs="$(realpath -m "$AC_SERVICE_CONFIG_DIR" 2>/dev/null || echo "$AC_SERVICE_CONFIG_DIR")"
+ local rel_path=""
+
+ if command -v realpath >/dev/null 2>&1; then
+ rel_path="$(realpath --relative-to="$config_dir_abs" "$input" 2>/dev/null || true)"
+ if [ -z "$rel_path" ]; then
+ rel_path="$(realpath -m --relative-to="$config_dir_abs" "$input" 2>/dev/null || true)"
+ fi
+ fi
+
+ if [ -z "$rel_path" ] && command -v python3 >/dev/null 2>&1; then
+ rel_path="$(python3 -c 'import os,sys; print(os.path.relpath(sys.argv[1], sys.argv[2]))' "$input" "$config_dir_abs" 2>/dev/null || true)"
+ fi
+
+ if [ -n "$rel_path" ]; then
+ echo "$rel_path"
+ return
+ fi
+ fi
+
+ # If not under AC_SERVICE_CONFIG_DIR or AC_SERVICE_CONFIG_DIR not set, return absolute path unchanged
+ echo "$input"
+}
+
+function make_path_absolute() {
+ local input="$1"
+
+ # Already absolute
+ if [[ "$input" = /* ]]; then
+ echo "$input"
+ return
+ fi
+
+ # Resolve relative paths against AC_SERVICE_CONFIG_DIR when explicitly set
+ if [ -n "${AC_SERVICE_CONFIG_DIR:-}" ] && [ -n "$input" ]; then
+ local config_dir_abs
+ config_dir_abs="$(realpath "$AC_SERVICE_CONFIG_DIR" 2>/dev/null || echo "$AC_SERVICE_CONFIG_DIR")"
+ # Join and normalize; do not require the target to exist
+ realpath -m "$config_dir_abs/$input" 2>/dev/null || echo "$config_dir_abs/$input"
+ return
+ fi
+
+ # Fallback: try to normalize relative to current directory
+ realpath -m "$input" 2>/dev/null || echo "$input"
+}
+
+# Tokenize a shell command string without executing it. Supports basic quoting
+# and escaping rules so paths with spaces remain intact.
+# Serialize a command definition (binary + args) to JSON while converting paths
+# to be relative to CONFIG_DIR when possible.
+function serialize_exec_definition() {
+ local command_path="$1"
+ shift
+ local -a args=("$@")
+ local rel_command="$command_path"
+
+ if [[ -n "$command_path" ]]; then
+ rel_command="$(make_path_relative "$command_path")"
+ fi
+
+ local -a rel_args=()
+ local arg
+ for arg in "${args[@]}"; do
+ if [[ "$arg" == /* ]]; then
+ rel_args+=("$(make_path_relative "$arg")")
+ else
+ rel_args+=("$arg")
+ fi
+ done
+
+ local args_json
+ args_json=$(printf '%s\0' "${rel_args[@]}" | jq -R -s 'split("\u0000")[:-1]')
+
+ jq -n --arg command "$rel_command" --argjson args "$args_json" '{command: $command, args: $args}'
+}
+
+# Combine command + args into a shell-safe string suitable for pm2/systemd
+# ExecStart lines. Each token is bash-quoted to preserve spaces.
+function render_exec_command() {
+ local command_path="$1"
+ shift
+ local -a args=("$@")
+ local parts=()
+ local token
+
+ parts+=("$(printf '%q' "$command_path")")
+ for token in "${args[@]}"; do
+ parts+=("$(printf '%q' "$token")")
+ done
+
+ (IFS=' '; printf '%s' "${parts[*]}")
+}
+
# Check dependencies
check_dependencies() {
command -v jq >/dev/null 2>&1 || {
@@ -53,6 +174,18 @@ function add_service_to_registry() {
local gdb_enabled="$9"
local pm2_opts="${10}"
local server_config="${11}"
+ local exec_definition="${12:-}" # JSON payload describing command + args
+
+ # Convert paths to relative if possible for portability
+ local relative_bin_path="$(make_path_relative "$bin_path")"
+
+ # Convert server_config to relative if possible for portability
+ local relative_server_config=""
+ if [ -n "$server_config" ] && [ "$server_config" != "null" ]; then
+ relative_server_config="$(make_path_relative "$server_config")"
+ else
+ relative_server_config="$server_config"
+ fi
# Remove any existing entry with the same service name to avoid duplicates
local tmp_file
@@ -61,10 +194,14 @@ function add_service_to_registry() {
# Add the new entry to the registry
tmp_file=$(mktemp)
+ local exec_json_payload="null"
+ if [ -n "$exec_definition" ]; then
+ exec_json_payload="$exec_definition"
+ fi
jq --arg name "$service_name" \
--arg provider "$provider" \
--arg type "$service_type" \
- --arg bin_path "$bin_path" \
+ --arg bin_path "$relative_bin_path" \
--arg args "$args" \
--arg created "$(date -Iseconds)" \
--arg systemd_type "$systemd_type" \
@@ -72,8 +209,9 @@ function add_service_to_registry() {
--arg session_manager "$session_manager" \
--arg gdb_enabled "$gdb_enabled" \
--arg pm2_opts "$pm2_opts" \
- --arg server_config "$server_config" \
- '. += [{"name": $name, "provider": $provider, "type": $type, "bin_path": $bin_path, "args": $args, "created": $created, "status": "active", "systemd_type": $systemd_type, "restart_policy": $restart_policy, "session_manager": $session_manager, "gdb_enabled": $gdb_enabled, "pm2_opts": $pm2_opts, "server_config": $server_config}]' \
+ --arg server_config "$relative_server_config" \
+ --argjson exec "$exec_json_payload" \
+ '. += [{"name": $name, "provider": $provider, "type": $type, "bin_path": $bin_path, "exec": $exec, "args": $args, "created": $created, "status": "active", "systemd_type": $systemd_type, "restart_policy": $restart_policy, "session_manager": $session_manager, "gdb_enabled": $gdb_enabled, "pm2_opts": $pm2_opts, "server_config": $server_config}]' \
"$REGISTRY_FILE" > "$tmp_file" && mv "$tmp_file" "$REGISTRY_FILE"
echo -e "${GREEN}Service '$service_name' added to registry${NC}"
@@ -117,7 +255,7 @@ function restore_missing_services() {
local name=$(echo "$service" | jq -r '.name')
local provider=$(echo "$service" | jq -r '.provider')
local service_type=$(echo "$service" | jq -r '.type')
- local bin_path=$(echo "$service" | jq -r '.bin_path // "unknown"')
+ local bin_path_raw=$(echo "$service" | jq -r '.bin_path // "unknown"')
local args=$(echo "$service" | jq -r '.args // ""')
local status=$(echo "$service" | jq -r '.status // "active"')
local systemd_type=$(echo "$service" | jq -r '.systemd_type // "--user"')
@@ -125,11 +263,23 @@ function restore_missing_services() {
local session_manager=$(echo "$service" | jq -r '.session_manager // "none"')
local gdb_enabled=$(echo "$service" | jq -r '.gdb_enabled // "0"')
local pm2_opts=$(echo "$service" | jq -r '.pm2_opts // ""')
- local server_config=$(echo "$service" | jq -r '.server_config // ""')
+ local server_config_raw=$(echo "$service" | jq -r '.server_config // ""')
+
+ # Convert paths back to absolute for operation
+ local bin_path="$(make_path_absolute "$bin_path_raw")"
+ local server_config=""
+ if [ -n "$server_config_raw" ] && [ "$server_config_raw" != "null" ] && [ "$server_config_raw" != "" ]; then
+ server_config="$(make_path_absolute "$server_config_raw")"
+ else
+ server_config="$server_config_raw"
+ fi
local service_exists=false
if [ "$provider" = "pm2" ]; then
+ echo "Check if PM2 is installed..."
+ check_pm2 || { echo -e "${RED}PM2 is not installed. Cannot check service status.${NC}"; exit 1; }
+
if pm2 describe "$name" >/dev/null 2>&1; then
service_exists=true
fi
@@ -166,14 +316,61 @@ function restore_missing_services() {
local name=$(echo "$service" | jq -r '.name')
local provider=$(echo "$service" | jq -r '.provider')
local service_type=$(echo "$service" | jq -r '.type')
- local bin_path=$(echo "$service" | jq -r '.bin_path')
- local args=$(echo "$service" | jq -r '.args')
local systemd_type=$(echo "$service" | jq -r '.systemd_type // "--user"')
local restart_policy=$(echo "$service" | jq -r '.restart_policy // "always"')
local session_manager=$(echo "$service" | jq -r '.session_manager // "none"')
local gdb_enabled=$(echo "$service" | jq -r '.gdb_enabled // "0"')
local pm2_opts=$(echo "$service" | jq -r '.pm2_opts // ""')
- local server_config=$(echo "$service" | jq -r '.server_config // ""')
+ local status=$(echo "$service" | jq -r '.status // "active"')
+ local service_resolved="$(get_service_info_resolved "$name")"
+ local bin_path="$(echo "$service_resolved" | jq -r '.bin_path // "unknown"')"
+ local server_config="$(echo "$service_resolved" | jq -r '.server_config // ""')"
+ if [ "$server_config" = "null" ]; then
+ server_config=""
+ fi
+ local exec_definition_raw="$(echo "$service" | jq -c '.exec // null')"
+ local exec_command_abs="$(echo "$service_resolved" | jq -r '.exec.command // ""')"
+ local -a exec_args_abs=()
+ if [ -n "$exec_definition_raw" ] && [ "$exec_definition_raw" != "null" ]; then
+ while IFS= read -r arg; do
+ exec_args_abs+=("$arg")
+ done < <(echo "$service_resolved" | jq -r '.exec.args[]?')
+ fi
+ local exec_command_string=""
+ if [ -n "$exec_command_abs" ] && [ "$exec_command_abs" != "null" ]; then
+ exec_command_string="$(render_exec_command "$exec_command_abs" "${exec_args_abs[@]}")"
+ fi
+ local server_binary_path_for_configs="$bin_path"
+ local run_engine_config_path=""
+ if [ ${#exec_args_abs[@]} -gt 0 ]; then
+ if [ -n "${exec_args_abs[1]:-}" ] && [ "${exec_args_abs[1]}" != "null" ]; then
+ server_binary_path_for_configs="${exec_args_abs[1]}"
+ fi
+ local arg_index
+ for arg_index in "${!exec_args_abs[@]}"; do
+ if [ "${exec_args_abs[$arg_index]}" = "--config" ]; then
+ local next_index=$((arg_index + 1))
+ if [ $next_index -lt ${#exec_args_abs[@]} ]; then
+ run_engine_config_path="${exec_args_abs[$next_index]}"
+ fi
+ break
+ fi
+ done
+ fi
+ if [ -n "$server_binary_path_for_configs" ] && [ "$server_binary_path_for_configs" != "unknown" ] && [ "$server_binary_path_for_configs" != "null" ]; then
+ server_binary_path_for_configs="$(make_path_absolute "$server_binary_path_for_configs")"
+ fi
+ if [ -z "$run_engine_config_path" ] || [ "$run_engine_config_path" = "null" ]; then
+ run_engine_config_path="$CONFIG_DIR/$name-run-engine.conf"
+ else
+ run_engine_config_path="$(make_path_absolute "$run_engine_config_path")"
+ fi
+ if [ -d "$run_engine_config_path" ]; then
+ run_engine_config_path="$CONFIG_DIR/$name-run-engine.conf"
+ fi
+ if [[ "$run_engine_config_path" != /* ]]; then
+ run_engine_config_path="$(make_path_absolute "$run_engine_config_path")"
+ fi
echo ""
echo -e "${YELLOW}Service '$name' ($provider) is missing${NC}"
@@ -182,13 +379,20 @@ function restore_missing_services() {
if [ "$bin_path" = "unknown" ] || [ "$bin_path" = "null" ] || [ "$status" = "migrated" ]; then
echo " Binary: <needs manual configuration>"
- echo " Args: <needs manual configuration>"
+ echo " Exec: <needs manual configuration>"
echo ""
echo -e "${YELLOW}This service needs to be recreated manually:${NC}"
echo " $0 create $service_type $name --provider $provider --bin-path /path/to/your/bin"
else
echo " Binary: $bin_path"
- echo " Args: $args"
+ if [ -n "$exec_command_string" ]; then
+ echo " Exec: $exec_command_string"
+ else
+ echo " Exec: <unavailable>"
+ fi
+ if [ -n "$server_config" ]; then
+ echo " Server config: $server_config"
+ fi
fi
echo ""
@@ -204,19 +408,30 @@ function restore_missing_services() {
fi
else
echo -e "${BLUE}Recreating service '$name'...${NC}"
+ if ! ensure_service_configs_restored "$name" "$service_type" "$provider" "$server_binary_path_for_configs" "$server_config" "$restart_policy" "$session_manager" "$gdb_enabled" "$systemd_type" "$pm2_opts" "$run_engine_config_path" "false"; then
+ echo -e "${YELLOW}Warning: Unable to restore configuration files for '$name'${NC}"
+ fi
if [ "$provider" = "pm2" ]; then
- if [ "$args" != "null" ] && [ -n "$args" ]; then
- pm2_create_service "$name" "$bin_path $args" "$restart_policy" $pm2_opts
+ if [ -z "$exec_command_string" ] || [ "$exec_definition_raw" = "null" ]; then
+ echo -e "${RED}Cannot recreate PM2 service automatically: missing exec definition${NC}"
else
- pm2_create_service "$name" "$bin_path" "$restart_policy" $pm2_opts
+ if [ -n "$pm2_opts" ]; then
+ pm2_create_service "$name" "$exec_command_string" "$restart_policy" "$bin_path" "$server_config" "$exec_definition_raw" $pm2_opts
+ else
+ pm2_create_service "$name" "$exec_command_string" "$restart_policy" "$bin_path" "$server_config" "$exec_definition_raw"
+ fi
fi
elif [ "$provider" = "systemd" ]; then
echo -e "${BLUE}Attempting to recreate systemd service '$name' automatically...${NC}"
- if systemd_create_service "$name" "$bin_path $args" "$restart_policy" "$systemd_type" "$session_manager" "$gdb_enabled" "$server_config"; then
- echo -e "${GREEN}Systemd service '$name' recreated successfully${NC}"
+ if [ -z "$exec_command_string" ] || [ "$exec_definition_raw" = "null" ]; then
+ echo -e "${RED}Cannot recreate systemd service automatically: missing exec definition${NC}"
else
- echo -e "${RED}Failed to recreate systemd service '$name'. Please recreate manually.${NC}"
- echo " $0 create $name $service_type --provider systemd --bin-path $bin_path"
+ if systemd_create_service "$name" "$exec_command_string" "$restart_policy" "$bin_path" "$server_config" "$exec_definition_raw" "$systemd_type"; then
+ echo -e "${GREEN}Systemd service '$name' recreated successfully${NC}"
+ else
+ echo -e "${RED}Failed to recreate systemd service '$name'. Please recreate manually.${NC}"
+ echo " $0 create $name $service_type --provider systemd --bin-path $bin_path"
+ fi
fi
fi
fi
@@ -275,7 +490,7 @@ function print_help() {
echo " $base_name update <service-name> [options]"
echo " $base_name delete <service-name>"
echo " $base_name list [provider]"
- echo " $base_name restore"
+ echo " $base_name restore [--sync-only]"
echo " $base_name start|stop|restart|status <service-name>"
echo " $base_name logs <service-name> [--follow]"
echo " $base_name attach <service-name>"
@@ -342,6 +557,9 @@ function print_help() {
echo " # Restore missing services from registry"
echo " $base_name restore"
echo ""
+ echo " # Normalize registry paths to be relative to AC_SERVICE_CONFIG_DIR"
+ echo " $base_name registry-normalize"
+ echo ""
echo "Notes:"
echo " - Configuration editing modifies run-engine settings (GDB, session manager, etc.)"
echo " - Use --server-config for the actual server configuration file"
@@ -353,10 +571,13 @@ function print_help() {
echo " - attach command automatically detects the configured session manager and connects appropriately"
echo " - attach always provides interactive access to the server console"
echo " - Use 'logs' command to view service logs without interaction"
- echo " - restore command checks registry and helps recreate missing services"
+ echo " - restore command first normalizes registry paths, syncs config files, and then recreates missing services"
echo ""
echo "Environment Variables:"
echo " AC_SERVICE_CONFIG_DIR - Override default config directory for services registry"
+ echo " When set, binary and configuration paths under this directory"
+ echo " are stored as relative paths for improved portability."
+ echo " Use '$base_name registry-normalize' to rewrite existing entries."
}
@@ -442,19 +663,314 @@ function get_service_info() {
jq --arg name "$service_name" '.[] | select(.name == $name)' "$REGISTRY_FILE"
}
+# Get service info with resolved paths (relative paths converted to absolute)
+function get_service_info_resolved() {
+ local service_name="$1"
+ local service_info="$(get_service_info "$service_name")"
+
+ if [ -z "$service_info" ] || [ "$service_info" = "null" ]; then
+ echo ""
+ return
+ fi
+
+ # Extract paths and convert them
+ local bin_path_raw="$(echo "$service_info" | jq -r '.bin_path // ""')"
+ local server_config_raw="$(echo "$service_info" | jq -r '.server_config // ""')"
+ local exec_command_raw="$(echo "$service_info" | jq -r '.exec.command // ""')"
+ local exec_args_raw_json="$(echo "$service_info" | jq -c '.exec.args // []')"
+
+ local bin_path_resolved=""
+ local server_config_resolved=""
+ local exec_command_resolved=""
+ local -a exec_args_resolved=()
+
+ if [ -n "$bin_path_raw" ] && [ "$bin_path_raw" != "null" ] && [ "$bin_path_raw" != "" ]; then
+ bin_path_resolved="$(make_path_absolute "$bin_path_raw")"
+ else
+ bin_path_resolved="$bin_path_raw"
+ fi
+
+ if [ -n "$exec_command_raw" ] && [ "$exec_command_raw" != "null" ]; then
+ exec_command_resolved="$(make_path_absolute "$exec_command_raw")"
+ else
+ exec_command_resolved="$exec_command_raw"
+ fi
+
+ if [ -n "$exec_args_raw_json" ] && [ "$exec_args_raw_json" != "null" ]; then
+ local prev_arg=""
+ while IFS= read -r arg; do
+ if [[ -z "$arg" ]]; then
+ exec_args_resolved+=("$arg")
+ elif [ "$prev_arg" = "--config" ]; then
+ exec_args_resolved+=("$(make_path_absolute "$arg")")
+ elif [[ "$arg" == /* ]]; then
+ exec_args_resolved+=("$(make_path_absolute "$arg")")
+ elif [[ "$arg" == */* && "$arg" != -* ]]; then
+ exec_args_resolved+=("$(make_path_absolute "$arg")")
+ else
+ exec_args_resolved+=("$arg")
+ fi
+ prev_arg="$arg"
+ done < <(echo "$exec_args_raw_json" | jq -r '.[]?')
+ fi
+
+ if [ -n "$server_config_raw" ] && [ "$server_config_raw" != "null" ] && [ "$server_config_raw" != "" ]; then
+ server_config_resolved="$(make_path_absolute "$server_config_raw")"
+ else
+ server_config_resolved="$server_config_raw"
+ fi
+
+ local exec_args_resolved_json
+ exec_args_resolved_json=$(printf '%s\0' "${exec_args_resolved[@]}" | jq -R -s 'split("\u0000")[:-1]')
+ local exec_resolved_json
+ exec_resolved_json=$(jq -n --arg command "${exec_command_resolved:-}" --argjson args "$exec_args_resolved_json" '{command: $command, args: $args}')
+
+ # Return the service info with resolved paths
+ echo "$service_info" | jq --arg bin_path "$bin_path_resolved" \
+ --arg server_config "$server_config_resolved" \
+ --argjson exec "$exec_resolved_json" \
+ '.bin_path = $bin_path | .exec = $exec | .server_config = $server_config'
+}
+
+function ensure_service_configs_restored() {
+ local service_name="$1"
+ local service_type="$2"
+ local provider="$3"
+ local server_binary_path="$4"
+ local server_config_path="$5"
+ local restart_policy="$6"
+ local session_manager="$7"
+ local gdb_enabled="$8"
+ local systemd_type="$9"
+ local pm2_opts="${10:-}"
+ local run_engine_config_path="${11:-}"
+ local force_rewrite="${12:-false}"
+
+ if [ -z "$service_name" ]; then
+ return 1
+ fi
+
+ if [ -z "$server_binary_path" ] || [ "$server_binary_path" = "null" ] || [ "$server_binary_path" = "unknown" ]; then
+ return 0
+ fi
+
+ if [ "$server_config_path" = "null" ]; then
+ server_config_path=""
+ fi
+
+ if [ -z "$restart_policy" ] || [ "$restart_policy" = "null" ]; then
+ restart_policy="always"
+ fi
+
+ if [ -z "$session_manager" ] || [ "$session_manager" = "null" ]; then
+ session_manager="none"
+ fi
+
+ if [ -z "$gdb_enabled" ] || [ "$gdb_enabled" = "null" ]; then
+ gdb_enabled="0"
+ fi
+
+ if [ -z "$systemd_type" ] || [ "$systemd_type" = "null" ]; then
+ systemd_type="--user"
+ fi
+
+ pm2_opts="${pm2_opts:-}"
+ pm2_opts="${pm2_opts//$'\n'/ }"
+ pm2_opts="${pm2_opts#"${pm2_opts%%[![:space:]]*}"}"
+ pm2_opts="${pm2_opts%"${pm2_opts##*[![:space:]]}"}"
+
+ if [ -z "$run_engine_config_path" ] || [ "$run_engine_config_path" = "null" ]; then
+ run_engine_config_path="$CONFIG_DIR/$service_name-run-engine.conf"
+ fi
+
+ local service_conf_path="$CONFIG_DIR/$service_name.conf"
+ local server_binary_dir
+ local server_binary_name
+
+ server_binary_dir="$(dirname "$server_binary_path")"
+ server_binary_name="$(basename "$server_binary_path")"
+
+ mkdir -p "$(dirname "$run_engine_config_path")"
+
+ if [ "$force_rewrite" = "true" ] || [ ! -f "$run_engine_config_path" ]; then
+ echo -e "${BLUE}Restoring run-engine config: $run_engine_config_path${NC}"
+ cat > "$run_engine_config_path" << EOF
+# run-engine configuration for service: $service_name
+# Restored: $(date)
+
+# Enable/disable GDB execution
+export GDB_ENABLED=$gdb_enabled
+
+# Session manager (none|auto|tmux|screen)
+export SESSION_MANAGER="$session_manager"
+
+# Restart policy (on-failure|always)
+export RESTART_POLICY="$restart_policy"
+
+# Service mode - indicates this is running under a service manager (systemd/pm2)
+# When true, AC_DISABLE_INTERACTIVE will be set if no interactive session manager is used
+export SERVICE_MODE="true"
+
+# Session name for tmux/screen (optional)
+export SESSION_NAME="${service_name}"
+
+# Binary directory path
+export BINPATH="$server_binary_dir"
+
+# Server binary name
+export SERVERBIN="$server_binary_name"
+
+# Server configuration file path
+export CONFIG="$server_config_path"
+
+# Show console output for easier debugging
+export WITH_CONSOLE=1
+EOF
+ fi
+
+ if [ "$force_rewrite" = "true" ] || [ ! -f "$service_conf_path" ]; then
+ echo -e "${BLUE}Restoring service metadata: $service_conf_path${NC}"
+ cat > "$service_conf_path" << EOF
+# AzerothCore service configuration for $service_name
+# Restored: $(date)
+# Provider: $provider
+# Service Type: $service_type
+
+# run-engine configuration file
+RUN_ENGINE_CONFIG_FILE="$run_engine_config_path"
+
+# Restart policy
+RESTART_POLICY="$restart_policy"
+
+# Provider-specific options
+SYSTEMD_TYPE="$systemd_type"
+PM2_OPTS="$pm2_opts"
+EOF
+ fi
+
+ return 0
+}
+
+function sync_service_configs_from_registry() {
+ echo -e "${BLUE}Syncing service configuration files from registry...${NC}"
+
+ if [ ! -f "$REGISTRY_FILE" ] || [ ! -s "$REGISTRY_FILE" ]; then
+ echo -e "${YELLOW}No services registry found or empty${NC}"
+ return 0
+ fi
+
+ local services_count
+ services_count=$(jq length "$REGISTRY_FILE")
+ if [ "$services_count" -eq 0 ]; then
+ echo -e "${YELLOW}No services registered${NC}"
+ return 0
+ fi
+
+ local synced=0
+
+ for i in $(seq 0 $((services_count - 1))); do
+ local entry
+ entry=$(jq -c ".[$i]" "$REGISTRY_FILE")
+ [ -z "$entry" ] && continue
+
+ local name
+ name=$(echo "$entry" | jq -r '.name // empty')
+ [ -z "$name" ] && continue
+
+ local service_resolved
+ service_resolved="$(get_service_info_resolved "$name")"
+ [ -z "$service_resolved" ] && continue
+
+ local service_type provider restart_policy session_manager gdb_enabled systemd_type pm2_opts
+ service_type=$(echo "$entry" | jq -r '.type // ""')
+ provider=$(echo "$entry" | jq -r '.provider // ""')
+ restart_policy=$(echo "$entry" | jq -r '.restart_policy // "always"')
+ session_manager=$(echo "$entry" | jq -r '.session_manager // "none"')
+ gdb_enabled=$(echo "$entry" | jq -r '.gdb_enabled // "0"')
+ systemd_type=$(echo "$entry" | jq -r '.systemd_type // "--user"')
+ pm2_opts=$(echo "$entry" | jq -r '.pm2_opts // ""')
+
+ local server_binary_path
+ server_binary_path=$(echo "$service_resolved" | jq -r '.bin_path // ""')
+ if [ -z "$server_binary_path" ] || [ "$server_binary_path" = "null" ] || [ "$server_binary_path" = "unknown" ]; then
+ server_binary_path=""
+ fi
+
+ local server_config_path
+ server_config_path=$(echo "$service_resolved" | jq -r '.server_config // ""')
+ if [ -n "$server_config_path" ] && [ "$server_config_path" != "null" ]; then
+ server_config_path="$(make_path_absolute "$server_config_path")"
+ else
+ server_config_path=""
+ fi
+
+ local exec_definition
+ exec_definition=$(echo "$entry" | jq -c '.exec // null')
+ local -a exec_args=()
+ if [ -n "$exec_definition" ] && [ "$exec_definition" != "null" ]; then
+ while IFS= read -r arg; do
+ exec_args+=("$arg")
+ done < <(echo "$exec_definition" | jq -r '.args[]?')
+ fi
+
+ if { [ -z "$server_binary_path" ] || [ "$server_binary_path" = "null" ]; } && [ ${#exec_args[@]} -ge 2 ]; then
+ server_binary_path="$(make_path_absolute "${exec_args[1]}")"
+ fi
+
+ local run_engine_config_rel=""
+ for idx in "${!exec_args[@]}"; do
+ if [ "${exec_args[$idx]}" = "--config" ]; then
+ local next_idx=$((idx + 1))
+ if [ $next_idx -lt ${#exec_args[@]} ]; then
+ run_engine_config_rel="${exec_args[$next_idx]}"
+ fi
+ break
+ fi
+ done
+
+ if [ -z "$run_engine_config_rel" ] || [ "$run_engine_config_rel" = "null" ]; then
+ run_engine_config_rel="$name-run-engine.conf"
+ fi
+
+ local run_engine_config_path
+ if [[ "$run_engine_config_rel" = /* ]]; then
+ run_engine_config_path="$run_engine_config_rel"
+ else
+ run_engine_config_path="$CONFIG_DIR/$run_engine_config_rel"
+ fi
+ run_engine_config_path="$(realpath -m "$run_engine_config_path" 2>/dev/null || echo "$run_engine_config_path")"
+
+ if [ -n "$server_binary_path" ]; then
+ server_binary_path="$(make_path_absolute "$server_binary_path")"
+ fi
+
+ ensure_service_configs_restored "$name" "$service_type" "$provider" "$server_binary_path" "$server_config_path" "$restart_policy" "$session_manager" "$gdb_enabled" "$systemd_type" "$pm2_opts" "$run_engine_config_path" "true"
+ synced=$((synced + 1))
+ done
+
+ if [ "$synced" -gt 0 ]; then
+ echo -e "${GREEN}Synchronized $synced service configuration file(s)${NC}"
+ else
+ echo -e "${YELLOW}No service configuration files required synchronization${NC}"
+ fi
+}
+
# PM2 service management functions
function pm2_create_service() {
local service_name="$1"
- local command="$2"
+ local command_string="$2"
local restart_policy="$3"
- shift 3
+ local real_bin_path="$4"
+ local server_config_path="$5"
+ local exec_definition="$6"
+ shift 6
check_pm2 || return 1
# Parse additional PM2 options
local max_memory=""
local max_restarts=""
- local additional_args=""
+ local -a extra_pm2_args=()
while [[ $# -gt 0 ]]; do
case "$1" in
@@ -467,39 +983,79 @@ function pm2_create_service() {
shift 2
;;
*)
- additional_args+=" $1"
+ extra_pm2_args+=("$1")
shift
;;
esac
done
-
+
+ if [ -z "$exec_definition" ] || [ "$exec_definition" = "null" ]; then
+ echo -e "${RED}Error: Missing exec definition for PM2 service '$service_name'${NC}"
+ return 1
+ fi
+
+ local exec_command_rel
+ exec_command_rel=$(echo "$exec_definition" | jq -r '.command // empty')
+ if [ -z "$exec_command_rel" ] || [ "$exec_command_rel" = "null" ]; then
+ echo -e "${RED}Error: Exec command not defined for service '$service_name'${NC}"
+ return 1
+ fi
+
+ local exec_command_abs
+ exec_command_abs="$(make_path_absolute "$exec_command_rel")"
+ local -a exec_args_abs=()
+ local prev_arg=""
+ while IFS= read -r arg; do
+ if [[ -z "$arg" ]]; then
+ exec_args_abs+=("$arg")
+ elif [ "$prev_arg" = "--config" ]; then
+ exec_args_abs+=("$(make_path_absolute "$arg")")
+ elif [[ "$arg" == /* ]]; then
+ exec_args_abs+=("$(make_path_absolute "$arg")")
+ elif [[ "$arg" == */* && "$arg" != -* ]]; then
+ exec_args_abs+=("$(make_path_absolute "$arg")")
+ else
+ exec_args_abs+=("$arg")
+ fi
+ prev_arg="$arg"
+ done < <(echo "$exec_definition" | jq -r '.args[]?')
# Set stop exit codes based on restart policy
- local stop_exit_codes=""
+ local -a pm2_args=(start "$exec_command_abs" --interpreter none --name "$service_name")
if [ "$restart_policy" = "always" ]; then
# PM2 will restart on any exit code (including 0)
- stop_exit_codes=""
+ :
else
# PM2 will not restart on clean shutdown (exit code 0)
- stop_exit_codes=" --stop-exit-codes 0"
+ pm2_args+=("--stop-exit-codes" "0")
fi
- # Build PM2 start command with AzerothCore environment variable
- local pm2_cmd="AC_LAUNCHED_BY_PM2=1 pm2 start '$command$additional_args' --name '$service_name'$stop_exit_codes"
# Add memory limit if specified
if [ -n "$max_memory" ]; then
- pm2_cmd+=" --max-memory-restart $max_memory"
+ pm2_args+=("--max-memory-restart" "$max_memory")
fi
# Add max restarts if specified
if [ -n "$max_restarts" ]; then
- pm2_cmd+=" --max-restarts $max_restarts"
+ pm2_args+=("--max-restarts" "$max_restarts")
+ fi
+
+ if [ ${#extra_pm2_args[@]} -gt 0 ]; then
+ pm2_args+=("${extra_pm2_args[@]}")
+ fi
+
+ if [ ${#exec_args_abs[@]} -gt 0 ]; then
+ pm2_args+=("--")
+ pm2_args+=("${exec_args_abs[@]}")
fi
# Execute command
echo -e "${YELLOW}Creating PM2 service: $service_name${NC}"
+ if [ -n "$command_string" ]; then
+ echo " Exec: $command_string"
+ fi
- if eval "$pm2_cmd"; then
+ if AC_LAUNCHED_BY_PM2=1 pm2 "${pm2_args[@]}"; then
echo -e "${GREEN}PM2 service '$service_name' created successfully${NC}"
pm2 save
@@ -507,9 +1063,13 @@ function pm2_create_service() {
echo -e "${BLUE}Configuring PM2 startup for persistence...${NC}"
pm2 startup --auto >/dev/null 2>&1 || true
- # Add to registry (extract command and args from the full command)
- local clean_command="$command$additional_args"
- add_service_to_registry "$service_name" "pm2" "executable" "$command" "$additional_args" "" "$restart_policy" "none" "0" "$max_memory $max_restarts" ""
+ # Add to registry (use real binary path instead of command for portability)
+ local extra_args_serialized=""
+ if [ ${#extra_pm2_args[@]} -gt 0 ]; then
+ extra_args_serialized="$(printf '%s ' "${extra_pm2_args[@]}")"
+ extra_args_serialized="${extra_args_serialized% }"
+ fi
+ add_service_to_registry "$service_name" "pm2" "executable" "$real_bin_path" "$extra_args_serialized" "" "$restart_policy" "none" "0" "$max_memory $max_restarts" "$server_config_path" "$exec_definition"
return 0
else
@@ -552,12 +1112,12 @@ function pm2_remove_service() {
pm2 save
echo -e "${GREEN}PM2 service '$service_name' stopped and removed${NC}"
- # Remove from registry
- remove_service_from_registry "$service_name"
+ # Note: Registry removal is handled by the caller (delete_service)
+ return 0
else
- echo -e "${YELLOW}PM2 service '$service_name' not found or already removed${NC}"
- # Still try to remove from registry in case it's orphaned
- remove_service_from_registry "$service_name"
+ echo -e "${YELLOW}PM2 service '$service_name' not found${NC}"
+ # Service not found in PM2 - let caller decide about registry
+ return 0
fi
return 0
@@ -602,11 +1162,14 @@ function systemd_create_service() {
local service_name="$1"
local command="$2"
local restart_policy="$3"
+ local real_bin_path="$4"
+ local server_config_path="$5"
+ local exec_definition="$6"
local systemd_type="--user"
local bin_path=""
local gdb_enabled="0"
local server_config=""
- shift 3
+ shift 6
check_systemd || return 1
@@ -743,7 +1306,7 @@ EOF
echo -e "${GREEN}Systemd service '$service_name' created successfully with session manager '$session_manager'${NC}"
# Add to registry
- add_service_to_registry "$service_name" "systemd" "service" "$command" "" "$systemd_type" "$restart_policy" "$session_manager" "$gdb_enabled" "" "$server_config"
+ add_service_to_registry "$service_name" "systemd" "service" "$real_bin_path" "" "$systemd_type" "$restart_policy" "$session_manager" "$gdb_enabled" "" "$server_config_path" "$exec_definition"
return 0
}
@@ -805,9 +1368,7 @@ function systemd_remove_service() {
echo -e "${YELLOW}Note: Service may still be running but configuration was removed${NC}"
fi
- # Remove from registry
- remove_service_from_registry "$service_name"
-
+ # Note: Registry removal is handled by the caller (delete_service)
return 0
else
echo -e "${RED}Failed to remove systemd service file '$service_file'${NC}"
@@ -1051,24 +1612,29 @@ SYSTEMD_TYPE="$systemd_type"
PM2_OPTS="$pm2_opts"
EOF
- # Build run-engine command
- local run_engine_cmd="$SCRIPT_DIR/run-engine start $server_binary_path --config $run_engine_config"
+ # Build run-engine command definition
+ local run_engine_path="$SCRIPT_DIR/run-engine"
+ local -a run_engine_args=("start" "$server_binary_path" "--config" "$run_engine_config")
+ local run_engine_cmd
+ run_engine_cmd="$(render_exec_command "$run_engine_path" "${run_engine_args[@]}")"
+ local exec_definition
+ exec_definition="$(serialize_exec_definition "$run_engine_path" "${run_engine_args[@]}")"
# Create the actual service
local service_creation_success=false
if [ "$provider" = "pm2" ]; then
if [ -n "$pm2_opts" ]; then
- if pm2_create_service "$service_name" "$run_engine_cmd" "$restart_policy" $pm2_opts; then
+ if pm2_create_service "$service_name" "$run_engine_cmd" "$restart_policy" "$server_binary_path" "$server_config" "$exec_definition" $pm2_opts; then
service_creation_success=true
fi
else
- if pm2_create_service "$service_name" "$run_engine_cmd" "$restart_policy"; then
+ if pm2_create_service "$service_name" "$run_engine_cmd" "$restart_policy" "$server_binary_path" "$server_config" "$exec_definition"; then
service_creation_success=true
fi
fi
elif [ "$provider" = "systemd" ]; then
- if systemd_create_service "$service_name" "$run_engine_cmd" "$restart_policy" "$systemd_type"; then
+ if systemd_create_service "$service_name" "$run_engine_cmd" "$restart_policy" "$server_binary_path" "$server_config" "$exec_definition" "$systemd_type"; then
service_creation_success=true
fi
fi
@@ -1124,10 +1690,10 @@ function update_service() {
source "$config_file"
# Load current run-engine configuration
- if [ -f "$RUN_ENGINE_CONFIG_FILE" ]; then
+ if [ -n "${RUN_ENGINE_CONFIG_FILE:-}" ] && [ -f "$RUN_ENGINE_CONFIG_FILE" ]; then
source "$RUN_ENGINE_CONFIG_FILE"
else
- echo -e "${YELLOW}Warning: Run-engine configuration file not found: $RUN_ENGINE_CONFIG_FILE${NC}"
+ echo -e "${YELLOW}Warning: Run-engine configuration file not found: ${RUN_ENGINE_CONFIG_FILE:-<unset>}${NC}"
fi
# Parse options to update
@@ -1284,8 +1850,11 @@ function delete_service() {
fi
if [ "$removal_success" = "true" ]; then
+ # Remove from registry only after successful service removal
+ remove_service_from_registry "$service_name"
+
# Remove run-engine configuration file
- if [ -n "$RUN_ENGINE_CONFIG_FILE" ] && [ -f "$RUN_ENGINE_CONFIG_FILE" ]; then
+ if [ -n "${RUN_ENGINE_CONFIG_FILE:-}" ] && [ -f "$RUN_ENGINE_CONFIG_FILE" ]; then
rm -f "$RUN_ENGINE_CONFIG_FILE"
echo -e "${GREEN}Removed run-engine config: $RUN_ENGINE_CONFIG_FILE${NC}"
fi
@@ -1296,6 +1865,7 @@ function delete_service() {
echo -e "${GREEN}Service '$service_name' deleted successfully${NC}"
else
echo -e "${RED}Failed to remove service '$service_name' from $provider${NC}"
+ echo -e "${YELLOW}Registry entry preserved. Service may need manual cleanup.${NC}"
return 1
fi
}
@@ -1416,7 +1986,11 @@ function edit_config() {
# Open run-engine configuration file in editor
echo -e "${YELLOW}Editing run-engine configuration for: $service_name${NC}"
- echo -e "${BLUE}File: $RUN_ENGINE_CONFIG_FILE${NC}"
+ echo -e "${BLUE}File: ${RUN_ENGINE_CONFIG_FILE:-<unset>}${NC}"
+ if [ -z "${RUN_ENGINE_CONFIG_FILE:-}" ] || [ ! -f "$RUN_ENGINE_CONFIG_FILE" ]; then
+ echo -e "${RED}Error: Run-engine configuration file not found: ${RUN_ENGINE_CONFIG_FILE:-<unset>}${NC}"
+ return 1
+ fi
${EDITOR:-nano} "$RUN_ENGINE_CONFIG_FILE"
echo -e "${GREEN}Configuration updated. Run '$0 restart $service_name' to apply changes.${NC}"
@@ -1445,16 +2019,12 @@ function attach_to_service() {
source "$config_file"
# Load run-engine configuration
- if [ ! -f "$RUN_ENGINE_CONFIG_FILE" ]; then
- echo -e "${RED}Error: Run-engine configuration file not found: $RUN_ENGINE_CONFIG_FILE${NC}"
+ if [ -z "${RUN_ENGINE_CONFIG_FILE:-}" ] || [ ! -f "$RUN_ENGINE_CONFIG_FILE" ]; then
+ echo -e "${RED}Error: Run-engine configuration file not found: ${RUN_ENGINE_CONFIG_FILE:-<unset>}${NC}"
return 1
fi
- if [ ! -f "$RUN_ENGINE_CONFIG_FILE" ]; then
- echo -e "${RED}Error: Run-engine configuration file not found: $RUN_ENGINE_CONFIG_FILE${NC}"
- return 1
- fi
-
+ # Now safe to source
source "$RUN_ENGINE_CONFIG_FILE"
# Auto-detect session manager and attach accordingly
@@ -1721,6 +2291,9 @@ function wait_service_uptime() {
sleep 1
waited=$((waited + 1))
done
+ # show service logs for debugging
+ echo -e "${YELLOW}Service logs for '$service_name':${NC}"
+ service_logs "$service_name" true
echo -e "${RED}Timeout: $service_name did not reach ${min_seconds}s uptime within ${timeout}s${NC}" >&2
return 1
}
@@ -1770,8 +2343,8 @@ function attach_interactive_shell() {
source "$config_file"
# Check if RUN_ENGINE_CONFIG_FILE exists before sourcing
- if [ ! -f "$RUN_ENGINE_CONFIG_FILE" ]; then
- echo -e "${RED}Error: Run-engine configuration file not found: $RUN_ENGINE_CONFIG_FILE${NC}"
+ if [ -z "${RUN_ENGINE_CONFIG_FILE:-}" ] || [ ! -f "$RUN_ENGINE_CONFIG_FILE" ]; then
+ echo -e "${RED}Error: Run-engine configuration file not found: ${RUN_ENGINE_CONFIG_FILE:-<unset>}${NC}"
return 1
fi
@@ -1796,6 +2369,96 @@ function attach_interactive_shell() {
return 1
}
+# Normalize existing registry entries to use relative paths for fields that
+# represent filesystem paths (bin_path, server_config) and refresh exec command
+# definitions to the new schema.
+function normalize_registry_paths() {
+ if [ ! -f "$REGISTRY_FILE" ]; then
+ echo -e "${YELLOW}No registry file found at: $REGISTRY_FILE${NC}"
+ return 0
+ fi
+
+ # Validate JSON
+ if ! jq empty "$REGISTRY_FILE" >/dev/null 2>&1; then
+ echo -e "${RED}Error: Invalid JSON in $REGISTRY_FILE${NC}"
+ return 1
+ fi
+
+ local tmp_file
+ tmp_file=$(mktemp)
+ echo "[]" > "$tmp_file"
+
+ local count=0
+ while IFS= read -r entry; do
+ [ -z "$entry" ] && continue
+
+ # Extract raw values (empty if null or missing)
+ local bin_path_raw server_config_raw
+ bin_path_raw=$(echo "$entry" | jq -r '.bin_path // empty')
+ server_config_raw=$(echo "$entry" | jq -r '.server_config // empty')
+
+ # Compute normalized values
+ local bin_path_new server_config_new
+ if [ -n "$bin_path_raw" ]; then
+ bin_path_new="$(make_path_relative "$bin_path_raw")"
+ else
+ bin_path_new=""
+ fi
+ if [ -n "$server_config_raw" ]; then
+ server_config_new="$(make_path_relative "$server_config_raw")"
+ else
+ server_config_new=""
+ fi
+
+ local exec_command_raw
+ exec_command_raw=$(echo "$entry" | jq -r '.exec.command // empty')
+ local exec_args_array=()
+ local exec_json_new="null"
+ if [ -n "$exec_command_raw" ]; then
+ while IFS= read -r arg; do
+ exec_args_array+=("$arg")
+ done < <(echo "$entry" | jq -r '.exec.args[]?')
+ exec_json_new="$(serialize_exec_definition "$exec_command_raw" "${exec_args_array[@]}")"
+ fi
+
+ # Update entry (only override when non-empty; preserve nulls)
+ local updated
+ if [ "$exec_json_new" != "null" ]; then
+ updated=$(echo "$entry" | jq \
+ --arg bin "$bin_path_new" \
+ --arg srv "$server_config_new" \
+ --argjson exec "$exec_json_new" \
+ '
+ (.bin_path) |= (if $bin != "" then $bin else . end) |
+ (.server_config) |= (if $srv != "" then $srv else . end) |
+ (.exec) = $exec |
+ del(.real_bin_path)
+ ')
+ else
+ updated=$(echo "$entry" | jq \
+ --arg bin "$bin_path_new" \
+ --arg srv "$server_config_new" \
+ '
+ (.bin_path) |= (if $bin != "" then $bin else . end) |
+ (.server_config) |= (if $srv != "" then $srv else . end) |
+ del(.real_bin_path)
+ ')
+ fi
+
+ # Append to new array
+ if ! jq --argjson e "$updated" '. += [$e]' "$tmp_file" > "$tmp_file.new"; then
+ rm -f "$tmp_file" "$tmp_file.new"
+ echo -e "${RED}Error: Failed updating registry${NC}"
+ return 1
+ fi
+ mv "$tmp_file.new" "$tmp_file"
+ count=$((count+1))
+ done < <(jq -c '.[]?' "$REGISTRY_FILE")
+
+ mv "$tmp_file" "$REGISTRY_FILE"
+ echo -e "${GREEN}Normalized $count registry entrie(s) to relative paths${NC}"
+}
+
function attach_tmux_session() {
local service_name="$1"
local provider="$2"
@@ -1852,10 +2515,12 @@ function attach_screen_session() {
# Main execution
-check_dependencies
+# Only run the main logic if this script is executed directly (not sourced)
+if [[ "${BASH_SOURCE[0]}" == "${0}" ]]; then
+ check_dependencies
-# Main command processing
-case "${1:-help}" in
+ # Main command processing
+ case "${1:-help}" in
create)
if [ $# -lt 3 ]; then
echo -e "${RED}Error: Not enough arguments for create command${NC}"
@@ -1884,7 +2549,26 @@ case "${1:-help}" in
list_services "${2:-}"
;;
restore)
- restore_missing_services
+ sync_only=false
+ if [ $# -gt 1 ]; then
+ for opt in "${@:2}"; do
+ case "$opt" in
+ --sync-only)
+ sync_only=true
+ ;;
+ *)
+ echo -e "${RED}Error: Unknown option for restore command: $opt${NC}"
+ print_help
+ exit 1
+ ;;
+ esac
+ done
+ fi
+ normalize_registry_paths
+ sync_service_configs_from_registry
+ if [ "$sync_only" = "false" ]; then
+ restore_missing_services
+ fi
;;
start|stop|restart|status)
if [ $# -lt 2 ]; then
@@ -1900,12 +2584,15 @@ case "${1:-help}" in
print_help
exit 1
fi
- if [ "$3" = "--follow" ]; then
+ if [ "${3:-}" = "--follow" ]; then
service_logs "$2" "true"
else
service_logs "$2" "false"
fi
;;
+ registry-normalize)
+ normalize_registry_paths
+ ;;
edit-config)
if [ $# -lt 2 ]; then
echo -e "${RED}Error: Service name required for edit-config command${NC}"
@@ -1977,3 +2664,5 @@ case "${1:-help}" in
exit 1
;;
esac
+
+fi # End of main execution block
diff --git a/apps/startup-scripts/src/simple-restarter b/apps/startup-scripts/src/simple-restarter
index a158b38bef..1865eaa87d 100755
--- a/apps/startup-scripts/src/simple-restarter
+++ b/apps/startup-scripts/src/simple-restarter
@@ -50,6 +50,8 @@ fi
# Main restart loop
while true; do
STARTING_TIME=$(date +%s)
+
+ echo "AC_CONFIG_POLICY: $AC_CONFIG_POLICY"
# Use starter script to launch the binary with all parameters
"$STARTER_SCRIPT" "$BINPATH" "$BINFILE" "$GDB_FILE" "$CONFIG" "$SYSLOG" "$SYSERR" "$GDB_ENABLED" "$CRASHES_PATH"
diff --git a/apps/startup-scripts/test/test_startup_scripts.bats b/apps/startup-scripts/test/test_startup_scripts.bats
index 119a8c80cc..c7a90c7f61 100644..100755
--- a/apps/startup-scripts/test/test_startup_scripts.bats
+++ b/apps/startup-scripts/test/test_startup_scripts.bats
@@ -160,7 +160,19 @@ teardown() {
# Create registry with pm2 provider service
cat > "$AC_SERVICE_CONFIG_DIR/service_registry.json" << 'EOF'
[
- {"name":"test-world","provider":"pm2","type":"service","bin_path":"/bin/worldserver","args":"","systemd_type":"--user","restart_policy":"always"}
+ {
+ "name":"test-world",
+ "provider":"pm2",
+ "type":"service",
+ "bin_path":"/bin/worldserver",
+ "args":"",
+ "systemd_type":"--user",
+ "restart_policy":"always",
+ "exec":{
+ "command":"/bin/true",
+ "args":[]
+ }
+ }
]
EOF
# Create minimal service config and run-engine config files required by 'send'
@@ -215,7 +227,19 @@ EOF
# Create registry and config as in previous test
cat > "$AC_SERVICE_CONFIG_DIR/service_registry.json" << 'EOF'
[
- {"name":"test-world","provider":"pm2","type":"service","bin_path":"/bin/worldserver","args":"","systemd_type":"--user","restart_policy":"always"}
+ {
+ "name":"test-world",
+ "provider":"pm2",
+ "type":"service",
+ "bin_path":"/bin/worldserver",
+ "args":"",
+ "systemd_type":"--user",
+ "restart_policy":"always",
+ "exec":{
+ "command":"/bin/true",
+ "args":[]
+ }
+ }
]
EOF
echo "RUN_ENGINE_CONFIG_FILE=\"$AC_SERVICE_CONFIG_DIR/test-world-run-engine.conf\"" > "$AC_SERVICE_CONFIG_DIR/test-world.conf"
@@ -258,6 +282,31 @@ EOF
[ "$status" -eq 0 ]
}
+@test "service-manager: restore helper recreates missing configs" {
+ command -v jq >/dev/null 2>&1 || skip "jq not installed"
+ export AC_SERVICE_CONFIG_DIR="$TEST_DIR/services"
+ mkdir -p "$AC_SERVICE_CONFIG_DIR"
+ source "$SCRIPT_DIR/service-manager.sh"
+
+ local service_name="restore-test"
+ local run_engine_config="$AC_SERVICE_CONFIG_DIR/$service_name-run-engine.conf"
+ local service_conf="$AC_SERVICE_CONFIG_DIR/$service_name.conf"
+ rm -f "$run_engine_config" "$service_conf"
+
+ mkdir -p "$TEST_DIR/bin" "$TEST_DIR/etc"
+ touch "$TEST_DIR/bin/worldserver"
+ touch "$TEST_DIR/etc/worldserver.conf"
+
+ ensure_service_configs_restored "$service_name" "world" "systemd" "$TEST_DIR/bin/worldserver" "$TEST_DIR/etc/worldserver.conf" "always" "none" "0" "--user" "" "$run_engine_config"
+
+ [ -f "$run_engine_config" ]
+ [ -f "$service_conf" ]
+ grep -Fq 'export SESSION_MANAGER="none"' "$run_engine_config"
+ grep -Fq 'export BINPATH="'$TEST_DIR'/bin"' "$run_engine_config"
+ grep -Fq "RUN_ENGINE_CONFIG_FILE=\"$run_engine_config\"" "$service_conf"
+ grep -Fq 'RESTART_POLICY="always"' "$service_conf"
+}
+
@test "service-manager: wait-uptime times out for unknown service" {
command -v jq >/dev/null 2>&1 || skip "jq not installed"
export AC_SERVICE_CONFIG_DIR="$TEST_DIR/services"
@@ -279,6 +328,136 @@ EOF
[[ "$output" =~ "Configuration file not found" ]]
}
+# ===== PATH PORTABILITY TESTS =====
+
+@test "service-manager: path conversion functions work correctly" {
+ # Source the service-manager script to access helper functions
+ source "$SCRIPT_DIR/service-manager.sh"
+
+ # Test make_path_relative without AC_SERVICE_CONFIG_DIR
+ unset AC_SERVICE_CONFIG_DIR
+ result=$(make_path_relative "/absolute/path/test")
+ [[ "$result" == "/absolute/path/test" ]]
+
+ # Test make_path_relative with AC_SERVICE_CONFIG_DIR
+ export AC_SERVICE_CONFIG_DIR="/tmp/test-config"
+ mkdir -p "$AC_SERVICE_CONFIG_DIR/subdir"
+
+ result=$(make_path_relative "$AC_SERVICE_CONFIG_DIR/subdir/binary")
+ [[ "$result" == "subdir/binary" ]]
+
+ result=$(make_path_relative "/opt/bin/authserver")
+ [[ "$result" == "../../opt/bin/authserver" ]]
+
+ # Test make_path_absolute
+ result=$(make_path_absolute "subdir/binary")
+ [[ "$result" == "$AC_SERVICE_CONFIG_DIR/subdir/binary" ]]
+
+ result=$(make_path_absolute "../../opt/bin/authserver")
+ [[ "$result" == "/opt/bin/authserver" ]]
+
+ # Test absolute path stays absolute
+ result=$(make_path_absolute "/absolute/path")
+ [[ "$result" == "/absolute/path" ]]
+
+ # Cleanup
+ rm -rf "$AC_SERVICE_CONFIG_DIR"
+ unset AC_SERVICE_CONFIG_DIR
+}
+
+@test "service-manager: registry stores relative paths when possible" {
+ # Set up test environment
+ export AC_SERVICE_CONFIG_DIR="$TEST_DIR/service-config"
+ mkdir -p "$AC_SERVICE_CONFIG_DIR"
+
+ # Create a temporary service registry in our test directory
+ local test_registry="$AC_SERVICE_CONFIG_DIR/test_registry.json"
+ echo "[]" > "$test_registry"
+
+ # Source the service-manager and override REGISTRY_FILE
+ source "$SCRIPT_DIR/service-manager.sh"
+ REGISTRY_FILE="$test_registry"
+
+ # Create test binary directory under config dir
+ mkdir -p "$AC_SERVICE_CONFIG_DIR/bin"
+
+ # Test that paths under AC_SERVICE_CONFIG_DIR are stored as relative
+ add_service_to_registry "test-service" "pm2" "auth" "$AC_SERVICE_CONFIG_DIR/bin/authserver" "--config test.conf" "" "always" "none" "0" "" "$AC_SERVICE_CONFIG_DIR/etc/test.conf"
+
+ # Check that paths were stored as relative
+ local stored_bin_path=$(jq -r '.[0].bin_path' "$test_registry")
+ local stored_config_path=$(jq -r '.[0].server_config' "$test_registry")
+
+ [[ "$stored_bin_path" == "bin/authserver" ]]
+ [[ "$stored_config_path" == "etc/test.conf" ]]
+
+ # Test that absolute paths outside config dir are stored as absolute
+ add_service_to_registry "test-service2" "pm2" "auth" "/opt/azerothcore/bin/authserver" "--config test.conf" "" "always" "none" "0" "" "/opt/azerothcore/etc/test.conf"
+
+ local stored_bin_path2=$(jq -r '.[1].bin_path' "$test_registry")
+ local stored_config_path2=$(jq -r '.[1].server_config' "$test_registry")
+
+ local expected_bin_rel=$(make_path_relative "/opt/azerothcore/bin/authserver")
+ local expected_cfg_rel=$(make_path_relative "/opt/azerothcore/etc/test.conf")
+
+ [[ "$stored_bin_path2" == "$expected_bin_rel" ]]
+ [[ "$stored_config_path2" == "$expected_cfg_rel" ]]
+
+ # Cleanup
+ rm -rf "$AC_SERVICE_CONFIG_DIR"
+ unset AC_SERVICE_CONFIG_DIR
+}
+
+@test "service-manager: restore --sync-only recreates config files" {
+ command -v jq >/dev/null 2>&1 || skip "jq not installed"
+ export AC_SERVICE_CONFIG_DIR="$TEST_DIR/services"
+ mkdir -p "$AC_SERVICE_CONFIG_DIR"
+
+ cat > "$AC_SERVICE_CONFIG_DIR/service_registry.json" <<'EOF'
+[
+ {
+ "name": "sync-test",
+ "provider": "pm2",
+ "type": "auth",
+ "bin_path": "bin/authserver",
+ "exec": {
+ "command": "../src/run-engine",
+ "args": [
+ "start",
+ "bin/authserver",
+ "--config",
+ "sync-test-run-engine.conf"
+ ]
+ },
+ "args": "",
+ "created": "2025-10-12T20:00:54+02:00",
+ "status": "active",
+ "systemd_type": "--user",
+ "restart_policy": "always",
+ "session_manager": "none",
+ "gdb_enabled": "0",
+ "pm2_opts": " ",
+ "server_config": "etc/authserver.conf"
+ }
+]
+EOF
+
+ rm -f "$AC_SERVICE_CONFIG_DIR/sync-test.conf" "$AC_SERVICE_CONFIG_DIR/sync-test-run-engine.conf"
+
+ mkdir -p "$AC_SERVICE_CONFIG_DIR/bin" "$AC_SERVICE_CONFIG_DIR/etc"
+ touch "$AC_SERVICE_CONFIG_DIR/bin/authserver"
+ touch "$AC_SERVICE_CONFIG_DIR/etc/authserver.conf"
+
+ run "$SCRIPT_DIR/service-manager.sh" restore --sync-only
+ debug_on_failure
+ [ "$status" -eq 0 ]
+
+ [ -f "$AC_SERVICE_CONFIG_DIR/sync-test.conf" ]
+ [ -f "$AC_SERVICE_CONFIG_DIR/sync-test-run-engine.conf" ]
+ grep -Fq "RUN_ENGINE_CONFIG_FILE=\"$AC_SERVICE_CONFIG_DIR/sync-test-run-engine.conf\"" "$AC_SERVICE_CONFIG_DIR/sync-test.conf"
+ grep -Fq "export BINPATH=\"$AC_SERVICE_CONFIG_DIR/bin\"" "$AC_SERVICE_CONFIG_DIR/sync-test-run-engine.conf"
+}
+
@test "examples: restarter-auth should show configuration error" {
run "$SCRIPT_DIR/examples/restarter-auth.sh"
[[ "$output" =~ "Configuration file not found" ]]
diff --git a/conf/dist/config.cmake b/conf/dist/config.cmake
index ab370f4587..66f3294495 100644
--- a/conf/dist/config.cmake
+++ b/conf/dist/config.cmake
@@ -1,5 +1,5 @@
#
-# Copyright (C) 2016+ AzerothCore <www.azerothcore.org>, released under GNU AGPL v3 license: https://github.com/azerothcore/azerothcore-wotlk/blob/master/LICENSE
+# Copyright (C) 2016+ AzerothCore <www.azerothcore.org>
# Copyright (C) 2021+ WarheadCore <https://github.com/WarheadCore>
#
# This file is free software; as a special exception the author gives
diff --git a/conf/dist/config.sh b/conf/dist/config.sh
index e33d19f212..5860cb2a85 100644
--- a/conf/dist/config.sh
+++ b/conf/dist/config.sh
@@ -112,11 +112,18 @@ export CCACHE_DIR=${CCACHE_DIR:-"$AC_PATH_VAR/ccache"}
# Enable running the cmake install as root
# Installing as root allows to set the SUID bit on
# the worldserver binary. This is required if you want
-# to bind the worldserver to reserved ports
+# to bind the worldserver to reserved ports and allow
+# it to set higher process priority.
# Default: 0 (false)
#
export AC_ENABLE_ROOT_CMAKE_INSTALL=${AC_ENABLE_ROOT_CMAKE_INSTALL:-0}
+#
+# Enable copying configuration files on install
+# Default: 1 (true)
+#
+export AC_ENABLE_CONF_COPY_ON_INSTALL=${AC_ENABLE_CONF_COPY_ON_INSTALL:-1}
+
##############################################
#
# GOOGLE PERF TOOLS
@@ -181,4 +188,34 @@ export MODULES_EXCLUDE_LIST=""
NO_COLOR=${NO_COLOR:-}
FORCE_COLOR=${FORCE_COLOR:-}
+##############################################
+#
+# CONFIGURATION SEVERITY POLICY
+#
+# Controls how the core reacts to missing configuration files,
+# missing/unknown options and invalid values.
+# The policy string follows the format "key=severity" separated by commas.
+# Supported severities: skip, warn, error, fatal.
+# Possible keys: default, missing_file, missing_option, critical_option,
+# unknown_option, value_error.
+#
+# Examples:
+# export AC_CONFIG_POLICY="$AC_CONFIG_POLICY_PRESET_DEFAULT"
+# export AC_CONFIG_POLICY="default=skip,critical_option=fatal,unknown_option=warn"
+# export AC_CONFIG_POLICY="missing_file=fatal,missing_option=error"
+#
+# Presets:
+# AC_CONFIG_POLICY_PRESET_DEFAULT -> mirrors the core default behaviour
+# (errors on missing files, fatal on critical)
+# AC_CONFIG_POLICY_PRESET_ZERO_CONF -> skips non-critical gaps so the core
+# can boot from environment defaults
+# AC_CONFIG_POLICY_PRESET_STRICT -> escalates everything to errors/fatals
+#
+
+export AC_CONFIG_POLICY_PRESET_ZERO_CONF='default=skip'
+export AC_CONFIG_POLICY_PRESET_DEFAULT='missing_file=error,missing_option=warn,critical_option=fatal,unknown_option=error,value_error=error'
+export AC_CONFIG_POLICY_PRESET_STRICT='default=error,missing_file=fatal,missing_option=error,critical_option=fatal,unknown_option=error,value_error=error'
+
+export AC_CONFIG_POLICY=$AC_CONFIG_POLICY_PRESET_DEFAULT
+
diff --git a/data/sql/updates/pending_db_world/rev_1758965186881591714.sql b/data/sql/updates/db_world/2025_09_28_01.sql
index 92ed4fcab8..13f7b906f1 100644
--- a/data/sql/updates/pending_db_world/rev_1758965186881591714.sql
+++ b/data/sql/updates/db_world/2025_09_28_01.sql
@@ -1,3 +1,4 @@
+-- DB update 2025_09_28_00 -> 2025_09_28_01
--
DELETE FROM `spell_cooldown_overrides` WHERE `Id` IN (56570, 56585);
INSERT INTO `spell_cooldown_overrides` (`Id`, `RecoveryTime`, `CategoryRecoveryTime`, `StartRecoveryTime`, `StartRecoveryCategory`, `Comment`) VALUES
diff --git a/data/sql/updates/db_world/2025_09_29_00.sql b/data/sql/updates/db_world/2025_09_29_00.sql
new file mode 100644
index 0000000000..4fb84247d1
--- /dev/null
+++ b/data/sql/updates/db_world/2025_09_29_00.sql
@@ -0,0 +1,19 @@
+-- DB update 2025_09_28_01 -> 2025_09_29_00
+
+-- Update SmartAI (Bleeding Hollow Necrolyte and Tunneler)
+UPDATE `creature_template` SET `AIName` = 'SmartAI' WHERE (`entry` IN (16968, 19422));
+
+DELETE FROM `smart_scripts` WHERE (`source_type` = 0) AND (`entryorguid` IN (16968, 19422));
+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
+(19422, 0, 0, 0, 0, 0, 100, 0, 0, 0, 2400, 3800, 0, 0, 11, 9053, 64, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 'Bleeding Hollow Necrolyte - In Combat - Cast \'Fireball\''),
+(19422, 0, 1, 0, 0, 0, 100, 0, 8000, 12000, 30000, 45000, 0, 0, 11, 34073, 33, 0, 0, 0, 0, 5, 0, 0, 0, 34073, 0, 0, 0, 0, 'Bleeding Hollow Necrolyte - In Combat - Cast \'Curse of the Bleeding Hollow\''),
+(19422, 0, 2, 0, 2, 0, 100, 512, 0, 15, 0, 0, 0, 0, 25, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Bleeding Hollow Necrolyte - Between 0-15% Health - Flee For Assist'),
+(19422, 0, 3, 0, 5, 0, 100, 1, 0, 0, 0, 0, 0, 0, 11, 34019, 1, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 0, 'Bleeding Hollow Necrolyte - On Killed Unit - Cast \'Raise Dead\' (No Repeat)'),
+(16968, 0, 0, 1, 25, 0, 100, 512, 0, 0, 0, 0, 0, 0, 18, 33554432, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Tunneler - On Reset - Set Flags Not Selectable'),
+(16968, 0, 1, 2, 61, 0, 100, 512, 0, 0, 0, 0, 0, 0, 11, 29147, 2, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Tunneler - On Reset - Cast \'Tunnel Bore Passive\''),
+(16968, 0, 2, 0, 61, 0, 100, 512, 0, 0, 0, 0, 0, 0, 90, 9, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Tunneler - On Reset - Set Flag Standstate Submerged'),
+(16968, 0, 3, 4, 4, 0, 100, 512, 0, 0, 0, 0, 0, 0, 19, 33554432, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Tunneler - On Aggro - Remove Flags Not Selectable'),
+(16968, 0, 4, 5, 61, 0, 100, 512, 0, 0, 0, 0, 0, 0, 28, 29147, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Tunneler - On Aggro - Remove Aura \'Tunnel Bore Passive\''),
+(16968, 0, 5, 0, 61, 0, 100, 513, 0, 0, 0, 0, 0, 0, 91, 9, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Tunneler - On Aggro - Remove FlagStandstate Submerged'),
+(16968, 0, 6, 0, 0, 0, 100, 0, 1000, 6000, 8000, 11000, 0, 0, 11, 32738, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 'Tunneler - In Combat - Cast \'Bore\''),
+(16968, 0, 7, 0, 9, 0, 100, 0, 0, 0, 2000, 3500, 4, 50, 11, 31747, 64, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 'Tunneler - Within 4-50 Range - Cast \'Poison\'');
diff --git a/data/sql/updates/db_world/2025_09_30_00.sql b/data/sql/updates/db_world/2025_09_30_00.sql
new file mode 100644
index 0000000000..c4fbf8264a
--- /dev/null
+++ b/data/sql/updates/db_world/2025_09_30_00.sql
@@ -0,0 +1,6 @@
+-- DB update 2025_09_29_00 -> 2025_09_30_00
+DELETE FROM `creature_formations` WHERE (`leaderGUID` = 127046);
+INSERT INTO `creature_formations` (`leaderGUID`, `memberGUID`, `dist`, `angle`, `groupAI`, `point_1`, `point_2`) VALUES
+(127046, 127046, 0, 0, 1, 0, 0),
+(127046, 127080, 0, 0, 1, 0, 0),
+(127046, 127081, 0, 0, 1, 0, 0);
diff --git a/data/sql/updates/db_world/2025_09_30_01.sql b/data/sql/updates/db_world/2025_09_30_01.sql
new file mode 100644
index 0000000000..1d4899fe1e
--- /dev/null
+++ b/data/sql/updates/db_world/2025_09_30_01.sql
@@ -0,0 +1,4 @@
+-- DB update 2025_09_30_00 -> 2025_09_30_01
+-- Drakkari Colossus - Mortal Strike spell difficulty
+DELETE FROM `spelldifficulty_dbc` WHERE `ID` = 54715;
+INSERT INTO `spelldifficulty_dbc` (`ID`, `DifficultySpellID_1`, `DifficultySpellID_2`, `DifficultySpellID_3`, `DifficultySpellID_4`) VALUES (54715, 54715, 59454, 0, 0);
diff --git a/data/sql/updates/db_world/2025_09_30_02.sql b/data/sql/updates/db_world/2025_09_30_02.sql
new file mode 100644
index 0000000000..15ed01d1af
--- /dev/null
+++ b/data/sql/updates/db_world/2025_09_30_02.sql
@@ -0,0 +1,3 @@
+-- DB update 2025_09_30_01 -> 2025_09_30_02
+--
+UPDATE `creature_template` SET `type` = 8 WHERE `entry` = 8881;
diff --git a/data/sql/updates/db_world/2025_10_01_00.sql b/data/sql/updates/db_world/2025_10_01_00.sql
new file mode 100644
index 0000000000..b3ff20f890
--- /dev/null
+++ b/data/sql/updates/db_world/2025_10_01_00.sql
@@ -0,0 +1,6 @@
+-- DB update 2025_09_30_02 -> 2025_10_01_00
+-- Update gameobject '186957' with sniffed values
+-- updated spawns
+DELETE FROM `gameobject` WHERE (`id` IN (186957)) AND (`guid` IN (65654));
+INSERT INTO `gameobject` (`guid`, `id`, `map`, `zoneId`, `areaId`, `spawnMask`, `phaseMask`, `position_x`, `position_y`, `position_z`, `orientation`, `rotation0`, `rotation1`, `rotation2`, `rotation3`, `spawntimesecs`, `animprogress`, `state`, `ScriptName`, `VerifiedBuild`, `Comment`) VALUES
+(65654, 186957, 571, 0, 0, 1, 1, 514.50347900390625, -5936.9287109375, 313.857574462890625, 3.141527414321899414, -0.02631568908691406, 0.036975860595703125, 0.998969078063964843, 0.001006617560051381, 120, 255, 0, "", 48632, NULL);
diff --git a/data/sql/updates/db_world/2025_10_01_01.sql b/data/sql/updates/db_world/2025_10_01_01.sql
new file mode 100644
index 0000000000..b1f4556d39
--- /dev/null
+++ b/data/sql/updates/db_world/2025_10_01_01.sql
@@ -0,0 +1,2 @@
+-- DB update 2025_10_01_00 -> 2025_10_01_01
+UPDATE `gameobject` SET `position_x` = 5716.26, `position_y` = -4369.34, `position_z` = 385.885 WHERE `guid` = 99747 AND `id` = 190739;
diff --git a/data/sql/updates/db_world/2025_10_01_02.sql b/data/sql/updates/db_world/2025_10_01_02.sql
new file mode 100644
index 0000000000..748f761d5c
--- /dev/null
+++ b/data/sql/updates/db_world/2025_10_01_02.sql
@@ -0,0 +1,3 @@
+-- DB update 2025_10_01_01 -> 2025_10_01_02
+UPDATE `creature_template_model` SET `VerifiedBuild` = 51831 WHERE `CreatureID` IN (33666, 33669);
+UPDATE `creature_template_model` SET `Probability` = 0 WHERE `CreatureID` = 33669 AND `CreatureDisplayID` = 27343;
diff --git a/data/sql/updates/db_world/2025_10_02_00.sql b/data/sql/updates/db_world/2025_10_02_00.sql
new file mode 100644
index 0000000000..107ab5ee9a
--- /dev/null
+++ b/data/sql/updates/db_world/2025_10_02_00.sql
@@ -0,0 +1,6 @@
+-- DB update 2025_10_01_02 -> 2025_10_02_00
+--
+DELETE FROM `smart_scripts` WHERE (`source_type` = 0 AND `entryorguid` = 31157);
+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
+(31157, 0, 0, 0, 27, 0, 100, 512, 0, 0, 0, 0, 0, 0, 53, 0, 31157, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Skeletal Assault Gryphon - On Passenger Boarded - Start Waypoint Path 31157'),
+(31157, 0, 1, 0, 40, 0, 100, 512, 35, 31157, 0, 0, 0, 0, 11, 50630, 2, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Skeletal Assault Gryphon - On Point 35 of Path 31157 Reached - Cast \'Eject All Passengers\'');
diff --git a/data/sql/updates/db_world/2025_10_02_01.sql b/data/sql/updates/db_world/2025_10_02_01.sql
new file mode 100644
index 0000000000..df79b81c29
--- /dev/null
+++ b/data/sql/updates/db_world/2025_10_02_01.sql
@@ -0,0 +1,11 @@
+-- DB update 2025_10_02_00 -> 2025_10_02_01
+--
+DELETE FROM `creature_template_spell` WHERE (`CreatureID` = 30108);
+INSERT INTO `creature_template_spell` (`CreatureID`, `Index`, `Spell`, `VerifiedBuild`) VALUES
+(30108, 0, 55936, 0),
+(30108, 1, 55951, 0),
+(30108, 2, 55958, 0);
+
+DELETE FROM `conditions` WHERE (`SourceTypeOrReferenceId` = 17) AND (`SourceGroup` = 0) AND (`SourceEntry` = 55951) AND (`SourceId` = 0) AND (`ElseGroup` = 0) AND (`ConditionTypeOrReference` = 31) AND (`ConditionTarget` = 1) AND (`ConditionValue1` = 3) AND (`ConditionValue2` = 29753) AND (`ConditionValue3` = 0);
+INSERT INTO `conditions` (`SourceTypeOrReferenceId`, `SourceGroup`, `SourceEntry`, `SourceId`, `ElseGroup`, `ConditionTypeOrReference`, `ConditionTarget`, `ConditionValue1`, `ConditionValue2`, `ConditionValue3`, `NegativeCondition`, `ErrorType`, `ErrorTextId`, `ScriptName`, `Comment`) VALUES
+(17, 0, 55951, 0, 0, 31, 1, 3, 29753, 0, 0, 0, 0, '', '');
diff --git a/data/sql/updates/db_world/2025_10_04_00.sql b/data/sql/updates/db_world/2025_10_04_00.sql
new file mode 100644
index 0000000000..8c69861799
--- /dev/null
+++ b/data/sql/updates/db_world/2025_10_04_00.sql
@@ -0,0 +1,13 @@
+-- DB update 2025_10_02_01 -> 2025_10_04_00
+-- Update gameobject 'Big Rancid Meat' with sniffed values
+-- updated spawns
+DELETE FROM `gameobject` WHERE (`id` IN (177665)) AND (`guid` IN (45717));
+INSERT INTO `gameobject` (`guid`, `id`, `map`, `zoneId`, `areaId`, `spawnMask`, `phaseMask`, `position_x`, `position_y`, `position_z`, `orientation`, `rotation0`, `rotation1`, `rotation2`, `rotation3`, `spawntimesecs`, `animprogress`, `state`, `ScriptName`, `VerifiedBuild`, `Comment`) VALUES
+(45717, 177665, 0, 0, 0, 1, 1, 1598.3446044921875, -3246.51708984375, 66.82944488525390625, 5.480334281921386718, 0, 0, -0.39073085784912109, 0.920504987239837646, 120, 255, 1, "", 46248, NULL);
+
+-- new spawns
+DELETE FROM `gameobject` WHERE (`id` IN (191789)) AND (`guid` IN (178, 179, 180));
+INSERT INTO `gameobject` (`guid`, `id`, `map`, `zoneId`, `areaId`, `spawnMask`, `phaseMask`, `position_x`, `position_y`, `position_z`, `orientation`, `rotation0`, `rotation1`, `rotation2`, `rotation3`, `spawntimesecs`, `animprogress`, `state`, `ScriptName`, `VerifiedBuild`, `Comment`) VALUES
+(178, 191789, 571, 0, 0, 1, 1, 8322.1416015625, 2812.73779296875, 655.9156494140625, 2.042035102844238281, 0, 0, 0.852640151977539062, 0.522498607635498046, 120, 255, 1, "", 46368, NULL),
+(179, 191789, 571, 0, 0, 1, 1, 8340.8603515625, 2739.64208984375, 655.246337890625, 4.97418975830078125, 0, 0, -0.60876083374023437, 0.793353796005249023, 120, 255, 1, "", 46368, NULL),
+(180, 191789, 571, 0, 0, 1, 1, 8347.0751953125, 2816.0400390625, 655.16448974609375, 6.248279094696044921, 0, 0, -0.01745223999023437, 0.999847710132598876, 120, 255, 1, "", 46368, NULL);
diff --git a/data/sql/updates/db_world/2025_10_04_01.sql b/data/sql/updates/db_world/2025_10_04_01.sql
new file mode 100644
index 0000000000..82575f58c8
--- /dev/null
+++ b/data/sql/updates/db_world/2025_10_04_01.sql
@@ -0,0 +1,6 @@
+-- DB update 2025_10_04_00 -> 2025_10_04_01
+-- Update gameobject 'Stolen Pack' with sniffed values
+-- new spawns
+DELETE FROM `gameobject` WHERE (`id` IN (191726)) AND (`guid` IN (42));
+INSERT INTO `gameobject` (`guid`, `id`, `map`, `zoneId`, `areaId`, `spawnMask`, `phaseMask`, `position_x`, `position_y`, `position_z`, `orientation`, `rotation0`, `rotation1`, `rotation2`, `rotation3`, `spawntimesecs`, `animprogress`, `state`, `ScriptName`, `VerifiedBuild`, `Comment`) VALUES
+(42, 191726, 571, 0, 0, 1, 1, 7312.4150390625, -1610.486572265625, 944.2940673828125, 4.991643905639648437, 0, 0, -0.60181427001953125, 0.798636078834533691, 120, 255, 1, "", 47720, NULL);
diff --git a/data/sql/updates/db_world/2025_10_04_02.sql b/data/sql/updates/db_world/2025_10_04_02.sql
new file mode 100644
index 0000000000..d12c1542b1
--- /dev/null
+++ b/data/sql/updates/db_world/2025_10_04_02.sql
@@ -0,0 +1,45 @@
+-- DB update 2025_10_04_01 -> 2025_10_04_02
+--
+SET @PATH := 29677;
+DELETE FROM `script_waypoint` WHERE `entry`=@PATH;
+INSERT INTO `script_waypoint` (`entry`, `pointid`, `location_x`, `location_y`, `location_z`, `waittime`) VALUES
+(@PATH, 0, 7157.85, -749.79016, 891.31964, 0),
+(@PATH, 1, 7164.398, -764.5809, 892.379, 0),
+(@PATH, 2, 7173.0713, -777.02747, 899.1467, 0),
+(@PATH, 3, 7182.944, -781.4821, 904.5898, 0),
+(@PATH, 4, 7193.046, -787.17285, 910.80505, 0),
+(@PATH, 5, 7205.2866, -793.2994, 917.2018, 0),
+(@PATH, 6, 7218.268, -802.1098, 921.5436, 0),
+(@PATH, 7, 7230.444, -816.3606, 924.7782, 0),
+(@PATH, 8, 7232.167, -834.23175, 926.6067, 0),
+(@PATH, 9, 7247.4736, -848.1854, 925.8038, 0),
+(@PATH, 10, 7263.3325, -875.33746, 925.0643, 0),
+(@PATH, 11, 7275.5557, -895.33954, 926.41693, 0),
+(@PATH, 12, 7283.677, -922.1367, 922.6736, 0),
+(@PATH, 13, 7284.9517, -947.7603, 918.92914, 0),
+(@PATH, 14, 7294.8335, -985.7026, 915.495, 0),
+(@PATH, 15, 7310.106, -1018.042, 913.71466, 0),
+(@PATH, 16, 7321.158, -1040.3647, 912.26416, 0),
+(@PATH, 17, 7341.2275, -1082.5309, 905.9852, 0),
+(@PATH, 18, 7355.9634, -1127.9506, 907.5246, 0),
+(@PATH, 19, 7359.7407, -1156.9366, 910.2179, 0),
+(@PATH, 20, 7352.724, -1172.65, 912.25995, 0),
+(@PATH, 21, 7340.049, -1188.0729, 914.70184, 0),
+(@PATH, 22, 7330.8037, -1201.4724, 915.6217, 0),
+(@PATH, 23, 7323.1274, -1228.3346, 909.4873, 0),
+(@PATH, 24, 7316.8394, -1268.2141, 902.8047, 0),
+(@PATH, 25, 7316.317, -1300.7645, 904.0472, 0),
+(@PATH, 26, 7315.278, -1332.3418, 904.6077, 0),
+(@PATH, 27, 7313.0195, -1366.2754, 907.04065, 0),
+(@PATH, 28, 7312.0806, -1399.7428, 910.6963, 0),
+(@PATH, 29, 7312.83, -1434.0999, 912.7638, 0),
+(@PATH, 30, 7311.606, -1466.3434, 916.6626, 0),
+(@PATH, 31, 7309.7144, -1498.7023, 921.09863, 0),
+(@PATH, 32, 7306.8794, -1531.1903, 928.2958, 0),
+(@PATH, 33, 7305.797, -1558.9252, 939.31244, 0),
+(@PATH, 34, 7305.19, -1566.0189, 940.9037, 0);
+
+-- set StandState to sitting
+DELETE FROM `creature_template_addon` WHERE (`entry` = 29695);
+INSERT INTO `creature_template_addon` (`entry`, `path_id`, `mount`, `bytes1`, `bytes2`, `emote`, `visibilityDistanceType`, `auras`) VALUES
+(29695, 0, 0, 1, 0, 0, 0, '');
diff --git a/data/sql/updates/db_world/2025_10_04_03.sql b/data/sql/updates/db_world/2025_10_04_03.sql
new file mode 100644
index 0000000000..bd4a85489b
--- /dev/null
+++ b/data/sql/updates/db_world/2025_10_04_03.sql
@@ -0,0 +1,28 @@
+-- DB update 2025_10_04_02 -> 2025_10_04_03
+
+-- Set MT and WD
+UPDATE `creature` SET `wander_distance` = 0, `MovementType` = 0 WHERE (`id1` = 27482) AND (`guid` IN (104181));
+
+-- Set byte1 (Kneel)
+UPDATE `creature_addon` SET `bytes1` = 8 WHERE (`guid` IN (104181, 104184));
+
+-- Update SmartAI
+UPDATE `creature_template` SET `AIName` = 'SmartAI' WHERE `entry` = 27482;
+
+DELETE FROM `smart_scripts` WHERE (`source_type` = 0 AND `entryorguid` = 27482);
+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
+(27482, 0, 0, 0, 25, 0, 100, 0, 0, 0, 0, 0, 0, 0, 8, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Wounded Westfall Infantry - On Reset - Set Reactstate Passive'),
+(27482, 0, 1, 0, 4, 0, 100, 0, 0, 0, 0, 0, 0, 0, 8, 2, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Wounded Westfall Infantry - On Aggro - Set Reactstate Aggressive'),
+(27482, 0, 2, 0, 0, 0, 100, 0, 2000, 4000, 8000, 12000, 0, 0, 11, 32771, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 'Wounded Westfall Infantry - In Combat - Cast \'Holy Shock\''),
+(27482, 0, 3, 0, 0, 0, 100, 0, 3000, 6000, 32000, 36000, 0, 0, 11, 29385, 32, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Wounded Westfall Infantry - In Combat - Cast \'Seal of Command\''),
+(27482, 0, 4, 0, 8, 0, 100, 512, 48845, 0, 0, 0, 0, 0, 80, 2748200, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Wounded Westfall Infantry - On Spellhit \'Renew Infantry\' - Run Script');
+
+-- Set Action List
+DELETE FROM `smart_scripts` WHERE (`source_type` = 9 AND `entryorguid` = 2748200);
+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
+(2748200, 9, 0, 0, 0, 0, 100, 0, 0, 0, 0, 0, 0, 0, 11, 48813, 2, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 0, 'Wounded Westfall Infantry - Actionlist - Cast \'Kill Credit\''),
+(2748200, 9, 1, 0, 0, 0, 100, 0, 500, 500, 0, 0, 0, 0, 91, 8, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Wounded Westfall Infantry - Actionlist - Remove FlagStandstate Kneel'),
+(2748200, 9, 2, 0, 0, 0, 100, 0, 2500, 2500, 0, 0, 0, 0, 66, 1, 0, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 0, 'Wounded Westfall Infantry - Actionlist - Set Orientation Invoker'),
+(2748200, 9, 3, 0, 0, 0, 100, 0, 1000, 1000, 0, 0, 0, 0, 5, 113, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Wounded Westfall Infantry - Actionlist - Play Emote 113'),
+(2748200, 9, 4, 0, 0, 0, 100, 0, 100, 100, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 0, 'Wounded Westfall Infantry - Actionlist - Say Line 0'),
+(2748200, 9, 5, 0, 0, 0, 100, 0, 4000, 4000, 0, 0, 0, 0, 53, 1, 27482, 0, 0, 2000, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Wounded Westfall Infantry - Actionlist - Start Waypoint Path 27482');
diff --git a/data/sql/updates/db_world/2025_10_04_04.sql b/data/sql/updates/db_world/2025_10_04_04.sql
new file mode 100644
index 0000000000..6c37e61065
--- /dev/null
+++ b/data/sql/updates/db_world/2025_10_04_04.sql
@@ -0,0 +1,7 @@
+-- DB update 2025_10_04_03 -> 2025_10_04_04
+--
+DELETE FROM `conditions` WHERE (`SourceTypeOrReferenceId` = 13) AND (`SourceGroup` = 1) AND (`SourceEntry` = 50674);
+INSERT INTO `conditions` (`SourceTypeOrReferenceId`, `SourceGroup`, `SourceEntry`, `SourceId`, `ElseGroup`, `ConditionTypeOrReference`, `ConditionTarget`, `ConditionValue1`, `ConditionValue2`, `ConditionValue3`, `NegativeCondition`, `ErrorType`, `ErrorTextId`, `ScriptName`, `Comment`) VALUES
+(13, 1, 50674, 0, 0, 31, 0, 3, 25469, 0, 0, 0, 0, '', 'The Demoralizer only hits Mindless Aberration'),
+(13, 1, 50674, 0, 1, 31, 0, 3, 25332, 0, 0, 0, 0, '', 'The Demoralizer only hits Stitched Warsong Horror'),
+(13, 1, 50674, 0, 2, 31, 0, 3, 25333, 0, 0, 0, 0, '', 'The Demoralizer only hits Undying Aggressor');
diff --git a/data/sql/updates/db_world/2025_10_04_05.sql b/data/sql/updates/db_world/2025_10_04_05.sql
new file mode 100644
index 0000000000..a2f9d56acd
--- /dev/null
+++ b/data/sql/updates/db_world/2025_10_04_05.sql
@@ -0,0 +1,12 @@
+-- DB update 2025_10_04_04 -> 2025_10_04_05
+
+-- Update SmartAI (Horde Siege Tank and Barrels).
+UPDATE `creature_template` SET `AIName` = 'SmartAI' WHERE (`entry` IN (25334, 27064));
+
+DELETE FROM `smart_scripts` WHERE (`source_type` = 0) AND (`entryorguid` IN (25334, 27064));
+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
+(27064, 0, 0, 1, 103, 0, 100, 512, 0, 25334, 1, 2, 0, 0, 11, 47916, 2, 0, 1, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Abandoned Fuel Tank - On 1 or More Units in Range - Cast \'Fuel\''),
+(27064, 0, 1, 0, 61, 0, 100, 0, 0, 0, 0, 0, 0, 0, 41, 4000, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Abandoned Fuel Tank - On 1 or More Units in Range - Despawn In 4000 ms'),
+(27064, 0, 2, 0, 11, 0, 100, 512, 0, 0, 0, 0, 0, 0, 20, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Abandoned Fuel Tank - On Respawn - Stop Attacking'),
+(25334, 0, 0, 0, 8, 0, 100, 512, 47916, 0, 2000, 2000, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Horde Siege Tank - On Spellhit \'Fuel\' - Say Line 0'),
+(25334, 0, 1, 0, 28, 0, 100, 0, 0, 0, 0, 0, 0, 0, 41, 1000, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Horde Siege Tank - On Passenger Removed - Despawn In 1000 ms');
diff --git a/data/sql/updates/db_world/2025_10_04_06.sql b/data/sql/updates/db_world/2025_10_04_06.sql
new file mode 100644
index 0000000000..d89fd5b643
--- /dev/null
+++ b/data/sql/updates/db_world/2025_10_04_06.sql
@@ -0,0 +1,13 @@
+-- DB update 2025_10_04_05 -> 2025_10_04_06
+-- Update gameobject 'Doodad_Nox_portal_top01' with sniffed values
+-- updated spawns
+DELETE FROM `gameobject` WHERE (`id` IN (191542)) AND (`guid` IN (57145, 57146));
+INSERT INTO `gameobject` (`guid`, `id`, `map`, `zoneId`, `areaId`, `spawnMask`, `phaseMask`, `position_x`, `position_y`, `position_z`, `orientation`, `rotation0`, `rotation1`, `rotation2`, `rotation3`, `spawntimesecs`, `animprogress`, `state`, `ScriptName`, `VerifiedBuild`, `Comment`) VALUES
+(57145, 191542, 571, 0, 0, 1, 1, 6175.19140625, -2017.2734375, 241.0088348388671875, 2.312558174133300781, 0, 0, 0.915310859680175781, 0.402748137712478637, 120, 255, 1, "", 48019, NULL),
+(57146, 191542, 571, 0, 0, 1, 1, 5171.69140625, -1666.64453125, 242.7811279296875, 2.888511419296264648, 0, 0, 0.99200439453125, 0.126203224062919616, 120, 255, 1, "", 46368, NULL);
+
+-- new spawns
+DELETE FROM `gameobject` WHERE (`id` IN (191542, 192613)) AND (`guid` IN (149, 150));
+INSERT INTO `gameobject` (`guid`, `id`, `map`, `zoneId`, `areaId`, `spawnMask`, `phaseMask`, `position_x`, `position_y`, `position_z`, `orientation`, `rotation0`, `rotation1`, `rotation2`, `rotation3`, `spawntimesecs`, `animprogress`, `state`, `ScriptName`, `VerifiedBuild`, `Comment`) VALUES
+(149, 191542, 571, 0, 0, 1, 1, 2418.4443359375, 6456.0224609375, 50.21396255493164062, 1.608663797378540039, 0, 0, 0.720367431640625, 0.693592667579650878, 120, 255, 1, "", 45772, NULL),
+(150, 192613, 571, 0, 0, 1, 1, 3669.799072265625, -1269.822021484375, 251.2554931640625, 2.404482841491699218, 0, 0, 0.932848930358886718, 0.360267788171768188, 120, 255, 1, "", 45854, NULL);
diff --git a/data/sql/updates/db_world/2025_10_06_00.sql b/data/sql/updates/db_world/2025_10_06_00.sql
new file mode 100644
index 0000000000..4406e18577
--- /dev/null
+++ b/data/sql/updates/db_world/2025_10_06_00.sql
@@ -0,0 +1,9 @@
+-- DB update 2025_10_04_06 -> 2025_10_06_00
+--
+DELETE FROM `smart_scripts` WHERE (`source_type` = 0 AND `entryorguid` = -127203);
+
+DELETE FROM `creature_formations` WHERE `leaderGUID` = 127203;
+INSERT INTO `creature_formations` (`leaderGUID`, `memberGUID`, `dist`, `angle`, `groupAI`, `point_1`, `point_2`) VALUES
+(127203, 127203, 0, 0, 3, 0, 0),
+(127203, 127201, 0, 0, 3, 0, 0),
+(127203, 127202, 0, 0, 3, 0, 0);
diff --git a/data/sql/updates/db_world/2025_10_07_00.sql b/data/sql/updates/db_world/2025_10_07_00.sql
new file mode 100644
index 0000000000..deaa9dd34b
--- /dev/null
+++ b/data/sql/updates/db_world/2025_10_07_00.sql
@@ -0,0 +1,4 @@
+-- DB update 2025_10_06_00 -> 2025_10_07_00
+
+-- Remove Disarm Immunity
+UPDATE `creature_template` SET `mechanic_immune_mask` = `mechanic_immune_mask` &~ 4 WHERE (`entry` IN (31368, 29306));
diff --git a/data/sql/updates/db_world/2025_10_07_01.sql b/data/sql/updates/db_world/2025_10_07_01.sql
new file mode 100644
index 0000000000..7f4116a8cd
--- /dev/null
+++ b/data/sql/updates/db_world/2025_10_07_01.sql
@@ -0,0 +1,17 @@
+-- DB update 2025_10_07_00 -> 2025_10_07_01
+--
+UPDATE `creature_template` SET `AIName` = 'SmartAI', `ScriptName` = '' WHERE `entry` = 25084;
+
+DELETE FROM `smart_scripts` WHERE (`source_type` = 0 AND `entryorguid` = 25084);
+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
+(25084, 0, 0, 1, 8, 0, 100, 1, 45109, 0, 0, 0, 0, 0, 11, 45110, 0, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 0, 'Greengill Slave - On Spellhit \'Orb of Murloc Control\' - Cast \'Greengill Slave Freed\' (No Repeat)'),
+(25084, 0, 1, 2, 61, 0, 100, 0, 0, 0, 0, 0, 0, 0, 11, 45111, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Greengill Slave - On Spellhit \'Orb of Murloc Control\' - Cast \'Enrage\' (No Repeat)'),
+(25084, 0, 2, 3, 61, 0, 100, 0, 0, 0, 0, 0, 0, 0, 36, 25085, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Greengill Slave - On Spellhit \'Orb of Murloc Control\' - Update Template To \'Freed Greengill Slave\' (No Repeat)'),
+(25084, 0, 3, 4, 61, 0, 100, 0, 0, 0, 0, 0, 0, 0, 49, 0, 0, 0, 0, 0, 0, 9, 25073, 0, 100, 0, 0, 0, 0, 0, 'Greengill Slave - On Spellhit \'Orb of Murloc Control\' - Start Attacking (No Repeat)'),
+(25084, 0, 4, 0, 61, 0, 100, 0, 0, 0, 0, 0, 0, 0, 49, 0, 0, 0, 0, 0, 0, 19, 25060, 100, 0, 0, 0, 0, 0, 0, 'Greengill Slave - On Spellhit \'Orb of Murloc Control\' - Start Attacking (No Repeat)'),
+(25084, 0, 5, 6, 7, 0, 100, 0, 0, 0, 0, 0, 0, 0, 41, 5000, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Greengill Slave - On Evade - Despawn In 5000 ms'),
+(25084, 0, 6, 0, 61, 0, 100, 0, 0, 0, 0, 0, 0, 0, 89, 5, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Greengill Slave - On Evade - Start Random Movement');
+
+DELETE FROM `spell_custom_attr` WHERE `spell_id` = 45111;
+INSERT INTO `spell_custom_attr` (`spell_id`, `attributes`) VALUES
+(45111, 0x00000800);
diff --git a/data/sql/updates/db_world/2025_10_09_00.sql b/data/sql/updates/db_world/2025_10_09_00.sql
new file mode 100644
index 0000000000..3eaa715666
--- /dev/null
+++ b/data/sql/updates/db_world/2025_10_09_00.sql
@@ -0,0 +1,39 @@
+-- DB update 2025_10_07_01 -> 2025_10_09_00
+
+-- Add Npcs to Rhino.
+DELETE FROM `vehicle_template_accessory` WHERE `entry` = 29931;
+INSERT INTO `vehicle_template_accessory` (`entry`, `accessory_entry`, `seat_id`, `minion`, `description`, `summontype`, `summontimer`) VALUES
+(29931, 29982, 0, 0, 'Drakkari Raider', 7, 0),
+(29931, 29982, 1, 0, 'Drakkari Raider', 7, 0),
+(29931, 29982, 2, 0, 'Drakkari Raider', 7, 0);
+
+-- Remove Spawns (Drakkari Raider)
+DELETE FROM `creature` WHERE `id1` = 29982;
+
+-- Remove Guid SmartAI (Drakkari Raider)
+DELETE FROM `smart_scripts` WHERE (`entryorguid` IN (-127226, -127225, -127217)) AND (`source_type` = 0);
+
+-- Remove Extra Flag Dont_override (Drakkari Raider)
+UPDATE `creature_template` SET `flags_extra` = `flags_extra` &~ 134217728 WHERE (`entry` = 29982);
+
+-- Edit SmartAI (Drakkari Rhino and Drakkari Raider)
+UPDATE `creature_template` SET `AIName` = 'SmartAI' WHERE (`entry` IN (29931, 29982));
+
+DELETE FROM `smart_scripts` WHERE (`source_type` = 0) AND (`entryorguid` IN (29931, 29982));
+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
+(29931, 0, 0, 0, 9, 0, 100, 514, 0, 0, 8000, 8000, 5, 40, 11, 55530, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 'Drakkari Rhino - Within 5-40 Range - Cast \'Charge\' (Normal Dungeon)'),
+(29931, 0, 1, 0, 9, 0, 100, 516, 0, 0, 8000, 8000, 5, 40, 11, 58991, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 'Drakkari Rhino - Within 5-40 Range - Cast \'Charge\' (Heroic Dungeon)'),
+(29931, 0, 2, 0, 0, 0, 100, 514, 0, 10000, 8000, 22000, 0, 0, 11, 55663, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Drakkari Rhino - In Combat - Cast \'Deafening Roar\' (Normal Dungeon)'),
+(29931, 0, 3, 0, 0, 0, 100, 516, 0, 10000, 8000, 22000, 0, 0, 11, 58992, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Drakkari Rhino - In Combat - Cast \'Deafening Roar\' (Heroic Dungeon)'),
+(29931, 0, 4, 0, 38, 0, 100, 0, 0, 2, 0, 0, 0, 0, 232, 1272070, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Drakkari Rhino - On Data Set 0 2 - Start Path 1272070'),
+(29931, 0, 5, 6, 108, 0, 100, 0, 3, 1272070, 0, 0, 0, 0, 101, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Drakkari Rhino - On Point 3 of Path 1272070 Reached - Set Home Position'),
+(29931, 0, 6, 7, 61, 0, 100, 0, 0, 0, 0, 0, 0, 0, 223, 150, 0, 0, 0, 0, 0, 29, 0, 0, 0, 0, 0, 0, 0, 0, 'Drakkari Rhino - On Point 3 of Path 1272070 Reached - Do Action ID 150'),
+(29931, 0, 7, 8, 61, 0, 100, 0, 0, 0, 0, 0, 0, 0, 223, 151, 0, 0, 0, 0, 0, 29, 1, 0, 0, 0, 0, 0, 0, 0, 'Drakkari Rhino - On Point 3 of Path 1272070 Reached - Do Action ID 151'),
+(29931, 0, 8, 0, 61, 0, 100, 0, 0, 0, 0, 0, 0, 0, 223, 152, 0, 0, 0, 0, 0, 29, 2, 0, 0, 0, 0, 0, 0, 0, 'Drakkari Rhino - On Point 3 of Path 1272070 Reached - Do Action ID 152'),
+(29982, 0, 0, 0, 0, 0, 100, 0, 2000, 6000, 5000, 11000, 0, 0, 11, 15496, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 'Drakkari Raider - In Combat - Cast \'Cleave\''),
+(29982, 0, 1, 2, 72, 0, 100, 0, 150, 0, 0, 0, 0, 0, 203, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Drakkari Raider - On Action 150 Done - Exit vehicle'),
+(29982, 0, 2, 0, 61, 0, 100, 0, 0, 0, 0, 0, 0, 0, 101, 0, 0, 0, 0, 0, 0, 8, 0, 0, 0, 0, 1773.92, 748.702, 119.4, 3.1151, 'Drakkari Raider - On Action 150 Done - Set Home Position'),
+(29982, 0, 3, 4, 72, 0, 100, 0, 151, 0, 0, 0, 0, 0, 203, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Drakkari Raider - On Action 151 Done - Exit vehicle'),
+(29982, 0, 4, 0, 61, 0, 100, 0, 0, 0, 0, 0, 0, 0, 101, 0, 0, 0, 0, 0, 0, 8, 0, 0, 0, 0, 1769.33, 743.685, 119.4, 3.1151, 'Drakkari Raider - On Action 151 Done - Set Home Position'),
+(29982, 0, 5, 6, 72, 0, 100, 0, 152, 0, 0, 0, 0, 0, 203, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Drakkari Raider - On Action 152 Done - Exit vehicle'),
+(29982, 0, 6, 0, 61, 0, 100, 0, 0, 0, 0, 0, 0, 0, 101, 0, 0, 0, 0, 0, 0, 8, 0, 0, 0, 0, 1771.29, 738.667, 119.4, 3.1151, 'Drakkari Raider - On Action 152 Done - Set Home Position');
diff --git a/data/sql/updates/db_world/2025_10_09_01.sql b/data/sql/updates/db_world/2025_10_09_01.sql
new file mode 100644
index 0000000000..a9384e49cc
--- /dev/null
+++ b/data/sql/updates/db_world/2025_10_09_01.sql
@@ -0,0 +1,16 @@
+-- DB update 2025_10_09_00 -> 2025_10_09_01
+-- Update gameobject 'Lava' with sniffed values
+-- updated spawns
+DELETE FROM `gameobject` WHERE (`id` IN (191854, 191858, 191859, 191855, 191856, 191857)) AND (`guid` IN (58982, 59037, 59050, 67174, 67176, 67178));
+INSERT INTO `gameobject` (`guid`, `id`, `map`, `zoneId`, `areaId`, `spawnMask`, `phaseMask`, `position_x`, `position_y`, `position_z`, `orientation`, `rotation0`, `rotation1`, `rotation2`, `rotation3`, `spawntimesecs`, `animprogress`, `state`, `ScriptName`, `VerifiedBuild`, `Comment`) VALUES
+(58982, 191854, 571, 0, 0, 1, 1, 4397.71826171875, 1617.9945068359375, 129.1055908203125, 4.520402908325195312, 0, 0, -0.77162456512451171, 0.636078238487243652, 120, 255, 1, "", 46158, NULL),
+(59037, 191858, 571, 0, 0, 1, 1, 4435.0810546875, 1672.25341796875, 131.871307373046875, 3.90954136848449707, 0, 0, -0.92718315124511718, 0.37460830807685852, 120, 255, 1, "", 46158, NULL),
+(59050, 191859, 571, 0, 0, 1, 1, 4537.86279296875, 1702.455078125, 158.952392578125, 3.063024282455444335, 0, 0, 0.999228477478027343, 0.039274025708436965, 120, 255, 1, "", 46158, NULL),
+(67174, 191855, 571, 0, 0, 1, 1, 4423.2138671875, 1815.5992431640625, 160.35821533203125, 4.982916831970214843, 0, 0, -0.60529327392578125, 0.796002507209777832, 120, 255, 1, "", 46158, NULL),
+(67176, 191856, 571, 0, 0, 1, 1, 4511.74365234375, 1860.2879638671875, 161.1739959716796875, 4.982916831970214843, 0, 0, -0.60529327392578125, 0.796002507209777832, 120, 255, 1, "", 46158, NULL),
+(67178, 191857, 571, 0, 0, 1, 1, 4299.21142578125, 1867.4713134765625, 160.4115753173828125, 0.026179106906056404, 0, 0, 0.013089179992675781, 0.999914348125457763, 120, 255, 1, "", 47720, NULL);
+
+-- new spawns
+DELETE FROM `gameobject` WHERE (`id` IN (191861)) AND (`guid` IN (44));
+INSERT INTO `gameobject` (`guid`, `id`, `map`, `zoneId`, `areaId`, `spawnMask`, `phaseMask`, `position_x`, `position_y`, `position_z`, `orientation`, `rotation0`, `rotation1`, `rotation2`, `rotation3`, `spawntimesecs`, `animprogress`, `state`, `ScriptName`, `VerifiedBuild`, `Comment`) VALUES
+(44, 191861, 571, 0, 0, 1, 1, 4567.751953125, 1630.7730712890625, 164.80889892578125, 2.975770950317382812, 0, 0, 0.996564865112304687, 0.082815870642662048, 120, 255, 1, "", 46158, NULL);
diff --git a/data/sql/updates/db_world/2025_10_09_02.sql b/data/sql/updates/db_world/2025_10_09_02.sql
new file mode 100644
index 0000000000..e86101035e
--- /dev/null
+++ b/data/sql/updates/db_world/2025_10_09_02.sql
@@ -0,0 +1,6 @@
+-- DB update 2025_10_09_01 -> 2025_10_09_02
+-- Update gameobject 'Frostglow' with sniffed values
+-- new spawns
+DELETE FROM `gameobject` WHERE (`id` IN (192077)) AND (`guid` IN (46));
+INSERT INTO `gameobject` (`guid`, `id`, `map`, `zoneId`, `areaId`, `spawnMask`, `phaseMask`, `position_x`, `position_y`, `position_z`, `orientation`, `rotation0`, `rotation1`, `rotation2`, `rotation3`, `spawntimesecs`, `animprogress`, `state`, `ScriptName`, `VerifiedBuild`, `Comment`) VALUES
+(46, 192077, 571, 0, 0, 1, 8, 7214.13720703125, -2652.241455078125, 820.3399658203125, 0.24434557557106018, 0, 0, 0.121869087219238281, 0.9925462007522583, 120, 255, 1, "", 46248, NULL);
diff --git a/data/sql/updates/db_world/2025_10_09_03.sql b/data/sql/updates/db_world/2025_10_09_03.sql
new file mode 100644
index 0000000000..fe1979d2d0
--- /dev/null
+++ b/data/sql/updates/db_world/2025_10_09_03.sql
@@ -0,0 +1,34 @@
+-- DB update 2025_10_09_02 -> 2025_10_09_03
+-- Update gameobject 'Torch' with sniffed values
+-- updated spawns
+DELETE FROM `gameobject` WHERE (`id` IN (192618, 97701, 177385, 176767, 179507, 179508, 179513, 192562, 192563, 191836, 191837, 191838, 191839, 192620, 192621, 192614, 192615)) AND (`guid` IN (100103, 11894, 43177, 45428, 49958, 49960, 49967, 57030, 57079, 58173, 58174, 58190, 58206, 58207, 58218, 58219, 58968, 58975, 7094, 7095));
+INSERT INTO `gameobject` (`guid`, `id`, `map`, `zoneId`, `areaId`, `spawnMask`, `phaseMask`, `position_x`, `position_y`, `position_z`, `orientation`, `rotation0`, `rotation1`, `rotation2`, `rotation3`, `spawntimesecs`, `animprogress`, `state`, `ScriptName`, `VerifiedBuild`, `Comment`) VALUES
+(100103, 192618, 571, 0, 0, 1, 1, 5931.291015625, -3036.54443359375, 393.401611328125, 2.015851974487304687, 0, 0, 0.845726966857910156, 0.533615827560424804, 120, 255, 1, "", 46368, NULL),
+(11894, 97701, 189, 0, 0, 1, 1, 1169.0335693359375, 1345.62841796875, 33.04557037353515625, 3.141592741012573242, 0, 0, -1, 0, 7200, 255, 1, "", 48632, NULL),
+(43177, 177385, 289, 0, 0, 1, 1, 227.2589263916015625, 88.310302734375, 99.19482421875, 0.017452461645007133, 0, 0, 0.008726119995117187, 0.999961912631988525, 7200, 255, 1, "", 50664, NULL),
+(45428, 176767, 0, 0, 0, 1, 1, 1262.9735107421875, -2563.075927734375, 96.84517669677734375, 0.479964137077331542, 0, 0, 0.237685203552246093, 0.971342265605926513, 120, 255, 1, "", 46248, NULL),
+(49958, 179507, 1, 0, 0, 1, 1, -3821.48828125, 1253.965087890625, 162.3778533935546875, 4.703663349151611328, 0, 0, -0.71018505096435546, 0.704015016555786132, 120, 255, 1, "", 46248, NULL),
+(49960, 179508, 1, 0, 0, 1, 1, -3757.915283203125, 1252.9454345703125, 162.3778533935546875, 4.703663349151611328, 0, 0, -0.71018505096435546, 0.704015016555786132, 120, 255, 1, "", 46248, NULL),
+(49967, 179513, 1, 0, 0, 1, 1, -4070.459716796875, 84.60311126708984375, 60.002593994140625, 4.223697185516357421, 0, 0, -0.85716724395751953, 0.515038192272186279, 120, 255, 1, "", 47720, NULL),
+(57030, 192562, 571, 0, 0, 1, 1, 6954.73388671875, -4626.74072265625, 468.348052978515625, 2.364918231964111328, 0, 0, 0.925539970397949218, 0.378649920225143432, 120, 255, 1, "", 46368, NULL),
+(57079, 192563, 571, 0, 0, 1, 1, 6933.04248046875, -4648.81396484375, 468.348052978515625, 2.364918231964111328, 0, 0, 0.925539970397949218, 0.378649920225143432, 120, 255, 1, "", 46368, NULL),
+(58173, 191836, 571, 0, 0, 1, 1, 6945.23974609375, -4371.509765625, 478.80419921875, 3.926995515823364257, 0, 0, -0.92387866973876953, 0.38268551230430603, 120, 255, 1, "", 46368, NULL),
+(58174, 191836, 571, 0, 0, 1, 1, 6726.8125, -4691.68017578125, 478.794921875, 0.767943859100341796, 0, 0, 0.374606132507324218, 0.927184045314788818, 120, 255, 1, "", 50172, NULL),
+(58190, 191837, 571, 0, 0, 1, 1, 7001.833984375, -4428.10400390625, 478.80419921875, 3.926995515823364257, 0, 0, -0.92387866973876953, 0.38268551230430603, 120, 255, 1, "", 46368, NULL),
+(58206, 191838, 571, 0, 0, 1, 1, 7036.54541015625, -4393.39306640625, 478.80419921875, 3.926995515823364257, 0, 0, -0.92387866973876953, 0.38268551230430603, 120, 255, 1, "", 46368, NULL),
+(58207, 191838, 571, 0, 0, 1, 1, 6635.90234375, -4668.20703125, 478.794921875, 0.767943859100341796, 0, 0, 0.374606132507324218, 0.927184045314788818, 120, 255, 1, "", 50172, NULL),
+(58218, 191839, 571, 0, 0, 1, 1, 6979.951171875, -4336.798828125, 478.80419921875, 3.926995515823364257, 0, 0, -0.92387866973876953, 0.38268551230430603, 120, 255, 1, "", 46368, NULL),
+(58219, 191839, 571, 0, 0, 1, 1, 6691.50048828125, -4725.7802734375, 478.794921875, 0.767943859100341796, 0, 0, 0.374606132507324218, 0.927184045314788818, 120, 255, 1, "", 50172, NULL),
+(58968, 192620, 571, 0, 0, 1, 1, 5855.06787109375, -2905.767333984375, 362.3609619140625, 2.015851974487304687, 0, 0, 0.845726966857910156, 0.533615827560424804, 120, 255, 1, "", 46158, NULL),
+(58975, 192621, 571, 0, 0, 1, 1, 5666.6611328125, -2995.633056640625, 362.3609619140625, 2.015851974487304687, 0, 0, 0.845726966857910156, 0.533615827560424804, 120, 255, 1, "", 46158, NULL),
+(7094, 192614, 571, 0, 0, 1, 1, 5850.66455078125, -3038.080322265625, 307.921875, 2.015851974487304687, 0, 0, 0.845726966857910156, 0.533615827560424804, 120, 255, 1, "", 45942, NULL),
+(7095, 192615, 571, 0, 0, 1, 1, 5770.06396484375, -3076.52490234375, 307.921875, 2.015851974487304687, 0, 0, 0.845726966857910156, 0.533615827560424804, 120, 255, 1, "", 45942, NULL);
+
+-- remaining spawns (no sniffed values available)
+-- (`guid` IN (49961, 49962))
+
+-- new spawns
+DELETE FROM `gameobject` WHERE (`id` IN (191837, 192619)) AND (`guid` IN (162, 163));
+INSERT INTO `gameobject` (`guid`, `id`, `map`, `zoneId`, `areaId`, `spawnMask`, `phaseMask`, `position_x`, `position_y`, `position_z`, `orientation`, `rotation0`, `rotation1`, `rotation2`, `rotation3`, `spawntimesecs`, `animprogress`, `state`, `ScriptName`, `VerifiedBuild`, `Comment`) VALUES
+(162, 191837, 571, 0, 0, 1, 1, 6671.21435546875, -4634.1064453125, 478.794921875, 0.767943859100341796, 0, 0, 0.374606132507324218, 0.927184045314788818, 120, 255, 1, "", 50172, NULL),
+(163, 192619, 571, 0, 0, 1, 1, 5718.88671875, -3137.856201171875, 393.134735107421875, 2.015851974487304687, 0, 0, 0.845726966857910156, 0.533615827560424804, 120, 255, 1, "", 46158, NULL);
diff --git a/data/sql/updates/db_world/2025_10_09_04.sql b/data/sql/updates/db_world/2025_10_09_04.sql
new file mode 100644
index 0000000000..2831a290f9
--- /dev/null
+++ b/data/sql/updates/db_world/2025_10_09_04.sql
@@ -0,0 +1,5 @@
+-- DB update 2025_10_09_03 -> 2025_10_09_04
+DELETE FROM `spell_script_names` WHERE `spell_id` IN (37705, 60510);
+INSERT INTO `spell_script_names` (`spell_id`, `ScriptName`) VALUES
+(37705, 'spell_item_healing_trance'),
+(60510, 'spell_item_healing_trance');
diff --git a/data/sql/updates/db_world/2025_10_10_00.sql b/data/sql/updates/db_world/2025_10_10_00.sql
new file mode 100644
index 0000000000..19c84c018a
--- /dev/null
+++ b/data/sql/updates/db_world/2025_10_10_00.sql
@@ -0,0 +1,4 @@
+-- DB update 2025_10_09_04 -> 2025_10_10_00
+DELETE FROM `smart_scripts` WHERE (`entryorguid` = 13082) AND (`source_type` = 0) AND (`id` = 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
+(13082, 0, 2, 0, 11, 0, 100, 0, 0, 0, 0, 0, 0, 0, 3, 0, 4016, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Milton Beats - On Respawn - Morph To Model 4016');
diff --git a/data/sql/updates/db_world/2025_10_10_01.sql b/data/sql/updates/db_world/2025_10_10_01.sql
new file mode 100644
index 0000000000..1bc945774b
--- /dev/null
+++ b/data/sql/updates/db_world/2025_10_10_01.sql
@@ -0,0 +1,5 @@
+-- DB update 2025_10_10_00 -> 2025_10_10_01
+UPDATE `creature_template` SET `AIName` = 'SmartAI' WHERE `entry` = 23723;
+DELETE FROM `smart_scripts` WHERE (`entryorguid` = 23723) AND (`source_type` = 0) AND (`id` = 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
+(23723, 0, 0, 0, 11, 0, 100, 0, 0, 0, 0, 0, 0, 0, 3, 0, 2981, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Sergeant Lukas - On Respawn - Morph To Model 2981');
diff --git a/data/sql/updates/db_world/2025_10_11_00.sql b/data/sql/updates/db_world/2025_10_11_00.sql
new file mode 100644
index 0000000000..939c91bd58
--- /dev/null
+++ b/data/sql/updates/db_world/2025_10_11_00.sql
@@ -0,0 +1,3 @@
+-- DB update 2025_10_10_01 -> 2025_10_11_00
+-- Removes skinloot ID from the kodo appration
+UPDATE `creature_template` SET `skinloot` = 0 WHERE `entry` = 11521;
diff --git a/data/sql/updates/db_world/2025_10_11_01.sql b/data/sql/updates/db_world/2025_10_11_01.sql
new file mode 100644
index 0000000000..11ce6f8d70
--- /dev/null
+++ b/data/sql/updates/db_world/2025_10_11_01.sql
@@ -0,0 +1,113 @@
+-- DB update 2025_10_11_00 -> 2025_10_11_01
+
+-- Add Waypoint
+DELETE FROM `waypoints` WHERE (`entry` IN (2300200));
+INSERT INTO `waypoints` (`entry`, `pointid`, `position_x`, `position_y`, `position_z`, `orientation`, `point_comment`) VALUES
+(2300200, 1, 3691.97, -3962.41, 35.9118, NULL, 'Rizzle Sprysprocket escape'),
+(2300200, 2, 3675.02, -3960.49, 35.9118, NULL, 'Rizzle Sprysprocket escape'),
+(2300200, 3, 3653.19, -3958.33, 33.9118, NULL, 'Rizzle Sprysprocket escape'),
+(2300200, 4, 3621.12, -3958.51, 29.9118, NULL, 'Rizzle Sprysprocket escape'),
+(2300200, 5, 3604.86, -3963, 29.9118, NULL, 'Rizzle Sprysprocket escape'),
+(2300200, 6, 3569.94, -3970.25, 29.9118, NULL, 'Rizzle Sprysprocket escape'),
+(2300200, 7, 3541.03, -3975.64, 29.9118, NULL, 'Rizzle Sprysprocket escape'),
+(2300200, 8, 3510.84, -3978.71, 29.9118, NULL, 'Rizzle Sprysprocket escape'),
+(2300200, 9, 3472.7, -3997.07, 29.9118, NULL, 'Rizzle Sprysprocket escape'),
+(2300200, 10, 3439.15, -4014.55, 29.9118, NULL, 'Rizzle Sprysprocket escape'),
+(2300200, 11, 3412.8, -4025.87, 29.9118, NULL, 'Rizzle Sprysprocket escape'),
+(2300200, 12, 3384.95, -4038.04, 29.9118, NULL, 'Rizzle Sprysprocket escape'),
+(2300200, 13, 3346.77, -4052.93, 29.9118, NULL, 'Rizzle Sprysprocket escape'),
+(2300200, 14, 3299.56, -4071.59, 29.9118, NULL, 'Rizzle Sprysprocket escape'),
+(2300200, 15, 3261.22, -4080.38, 30.9118, NULL, 'Rizzle Sprysprocket escape'),
+(2300200, 16, 3220.68, -4083.09, 31.9118, NULL, 'Rizzle Sprysprocket escape'),
+(2300200, 17, 3187.11, -4070.45, 33.9118, NULL, 'Rizzle Sprysprocket escape'),
+(2300200, 18, 3162.78, -4062.75, 33.9118, NULL, 'Rizzle Sprysprocket escape'),
+(2300200, 19, 3136.09, -4050.32, 33.9118, NULL, 'Rizzle Sprysprocket escape'),
+(2300200, 20, 3119.47, -4044.51, 36.0363, NULL, 'Rizzle Sprysprocket escape'),
+(2300200, 21, 3098.95, -4019.8, 33.9118, NULL, 'Rizzle Sprysprocket escape'),
+(2300200, 22, 3073.07, -4011.42, 33.9118, NULL, 'Rizzle Sprysprocket escape'),
+(2300200, 23, 3051.71, -3993.37, 33.9118, NULL, 'Rizzle Sprysprocket escape'),
+(2300200, 24, 3027.52, -3978.6, 33.9118, NULL, 'Rizzle Sprysprocket escape'),
+(2300200, 25, 3003.78, -3960.14, 33.9118, NULL, 'Rizzle Sprysprocket escape'),
+(2300200, 26, 2977.99, -3941.98, 31.9118, NULL, 'Rizzle Sprysprocket escape'),
+(2300200, 27, 2964.57, -3932.07, 30.9118, NULL, 'Rizzle Sprysprocket escape'),
+(2300200, 28, 2947.9, -3921.31, 29.9118, NULL, 'Rizzle Sprysprocket escape'),
+(2300200, 29, 2924.91, -3910.8, 29.9118, NULL, 'Rizzle Sprysprocket escape'),
+(2300200, 30, 2903.04, -3896.42, 29.9118, NULL, 'Rizzle Sprysprocket escape'),
+(2300200, 31, 2884.75, -3874.03, 29.9118, NULL, 'Rizzle Sprysprocket escape'),
+(2300200, 32, 2868.19, -3851.48, 29.9118, NULL, 'Rizzle Sprysprocket escape'),
+(2300200, 33, 2854.62, -3819.72, 29.9118, NULL, 'Rizzle Sprysprocket escape'),
+(2300200, 34, 2825.53, -3790.4, 29.9118, NULL, 'Rizzle Sprysprocket escape'),
+(2300200, 35, 2804.31, -3773.05, 29.9118, NULL, 'Rizzle Sprysprocket escape'),
+(2300200, 36, 2769.78, -3763.57, 29.9118, NULL, 'Rizzle Sprysprocket escape'),
+(2300200, 37, 2727.23, -3745.92, 30.9118, NULL, 'Rizzle Sprysprocket escape'),
+(2300200, 38, 2680.12, -3737.49, 30.9118, NULL, 'Rizzle Sprysprocket escape'),
+(2300200, 39, 2647.62, -3739.94, 30.9118, NULL, 'Rizzle Sprysprocket escape'),
+(2300200, 40, 2616.6, -3745.75, 30.9118, NULL, 'Rizzle Sprysprocket escape'),
+(2300200, 41, 2589.38, -3731.97, 30.9118, NULL, 'Rizzle Sprysprocket escape'),
+(2300200, 42, 2562.94, -3722.35, 31.9118, NULL, 'Rizzle Sprysprocket escape'),
+(2300200, 43, 2521.05, -3716.6, 31.9118, NULL, 'Rizzle Sprysprocket escape'),
+(2300200, 44, 2485.26, -3706.67, 31.9118, NULL, 'Rizzle Sprysprocket escape'),
+(2300200, 45, 2458.93, -3696.67, 31.9118, NULL, 'Rizzle Sprysprocket escape'),
+(2300200, 46, 2432, -3692.03, 31.9118, NULL, 'Rizzle Sprysprocket escape'),
+(2300200, 47, 2399.59, -3681.97, 31.9118, NULL, 'Rizzle Sprysprocket escape'),
+(2300200, 48, 2357.75, -3666.6, 31.9118, NULL, 'Rizzle Sprysprocket escape'),
+(2300200, 49, 2311.99, -3656.88, 31.9118, NULL, 'Rizzle Sprysprocket escape'),
+(2300200, 50, 2263.41, -3649.55, 31.9118, NULL, 'Rizzle Sprysprocket escape'),
+(2300200, 51, 2209.05, -3641.76, 31.9118, NULL, 'Rizzle Sprysprocket escape'),
+(2300200, 52, 2164.83, -3637.64, 31.9118, NULL, 'Rizzle Sprysprocket escape'),
+(2300200, 53, 2122.42, -3639, 31.9118, NULL, 'Rizzle Sprysprocket escape'),
+(2300200, 54, 2075.73, -3643.59, 31.9118, NULL, 'Rizzle Sprysprocket escape'),
+(2300200, 55, 2033.59, -3649.52, 31.9118, NULL, 'Rizzle Sprysprocket escape'),
+(2300200, 56, 1985.22, -3662.99, 31.9118, NULL, 'Rizzle Sprysprocket escape'),
+(2300200, 57, 1927.09, -3679.56, 33.9118, NULL, 'Rizzle Sprysprocket escape'),
+(2300200, 58, 1873.57, -3695.32, 33.9118, NULL, 'Rizzle Sprysprocket escape');
+
+-- Set General SmartAI, Add Gossip ID, ScriptName, NpcFlag.
+UPDATE `creature_template` SET `npcflag` = `npcflag` |1, `gossip_menu_id` = 21893, `ScriptName` = '', `AIName` = 'SmartAI' WHERE `entry` = 23002;
+
+-- Add SmartAI
+DELETE FROM `smart_scripts` WHERE (`source_type` = 0 AND `entryorguid` = 23002);
+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
+(23002, 0, 0, 1, 54, 0, 100, 0, 0, 0, 0, 0, 0, 0, 83, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Rizzle Sprysprocket - On Just Summoned - Remove Npc Flags Gossip'),
+(23002, 0, 1, 2, 61, 0, 100, 0, 0, 0, 0, 0, 0, 0, 64, 12, 0, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 0, 'Rizzle Sprysprocket - On Just Summoned - Store Targetlist'),
+(23002, 0, 2, 3, 61, 0, 100, 0, 0, 0, 0, 0, 0, 0, 11, 39865, 2, 0, 1, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 0, 'Rizzle Sprysprocket - On Just Summoned - Cast \'Rizzle`s Blackjack\''),
+(23002, 0, 3, 4, 61, 0, 100, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Rizzle Sprysprocket - On Just Summoned - Say Line 0'),
+(23002, 0, 4, 0, 61, 0, 100, 0, 0, 0, 0, 0, 0, 0, 80, 2300200, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Rizzle Sprysprocket - On Just Summoned - Run Script'),
+(23002, 0, 5, 6, 60, 1, 100, 0, 15000, 20000, 25000, 30000, 0, 0, 11, 40525, 2, 0, 0, 0, 0, 12, 12, 0, 0, 0, 0, 0, 0, 0, 'Rizzle Sprysprocket - On Update - Cast \'Rizzle`s Frost Grenade\' (Phase 1)'),
+(23002, 0, 6, 0, 61, 0, 100, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 12, 12, 0, 0, 0, 0, 0, 0, 0, 'Rizzle Sprysprocket - On Update - Say Line 1 (Phase 1)'),
+(23002, 0, 7, 8, 101, 1, 100, 0, 1, 10, 1000, 1000, 1000, 0, 55, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Rizzle Sprysprocket - On 1 or More Players in Range - Stop Waypoint (Phase 1)'),
+(23002, 0, 8, 9, 61, 0, 100, 0, 0, 0, 0, 0, 0, 0, 28, 39912, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Rizzle Sprysprocket - On 1 or More Players in Range - Remove Aura \'Periodic Depth Charge Release\' (Phase 1)'),
+(23002, 0, 9, 10, 61, 0, 100, 0, 0, 0, 0, 0, 0, 0, 1, 2, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Rizzle Sprysprocket - On 1 or More Players in Range - Say Line 2 (Phase 1)'),
+(23002, 0, 10, 11, 61, 0, 100, 0, 0, 0, 0, 0, 0, 0, 82, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Rizzle Sprysprocket - On 1 or More Players in Range - Add Npc Flags Gossip (Phase 1)'),
+(23002, 0, 11, 0, 61, 0, 100, 0, 0, 0, 0, 0, 0, 0, 22, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Rizzle Sprysprocket - On 1 or More Players in Range - Set Event Phase 0 (Phase 1)'),
+(23002, 0, 12, 13, 62, 0, 100, 0, 21893, 0, 0, 0, 0, 0, 11, 39886, 0, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 0, 'Rizzle Sprysprocket - On Gossip Option 0 Selected - Cast \'Give Southfury Moonstone\''),
+(23002, 0, 13, 0, 61, 0, 100, 0, 0, 0, 0, 0, 0, 0, 41, 3000, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Rizzle Sprysprocket - On Gossip Option 0 Selected - Despawn In 3000 ms'),
+(23002, 0, 14, 0, 58, 0, 100, 0, 58, 2300200, 0, 0, 0, 0, 41, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Rizzle Sprysprocket - On Path 2300200 Finished - Despawn Instant');
+
+-- Set Action List
+DELETE FROM `smart_scripts` WHERE (`source_type` = 9 AND `entryorguid` = 2300200);
+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
+(2300200, 9, 0, 0, 0, 0, 100, 0, 0, 0, 0, 0, 0, 0, 11, 23025, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Rizzle Sprysprocket - Actionlist - Cast \'Blink Cooldown Reduction\''),
+(2300200, 9, 1, 0, 0, 0, 100, 0, 2000, 2000, 0, 0, 0, 0, 1, 3, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Rizzle Sprysprocket - Actionlist - Say Line 3'),
+(2300200, 9, 2, 0, 0, 0, 100, 0, 500, 500, 0, 0, 0, 0, 11, 39871, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Rizzle Sprysprocket - Actionlist - Cast \'Rizzle`s Escape\''),
+(2300200, 9, 3, 0, 0, 0, 100, 0, 1000, 1000, 0, 0, 0, 0, 11, 39912, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Rizzle Sprysprocket - Actionlist - Cast \'Periodic Depth Charge Release\''),
+(2300200, 9, 4, 0, 0, 0, 100, 0, 0, 0, 0, 0, 0, 0, 22, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Rizzle Sprysprocket - Actionlist - Set Event Phase 1'),
+(2300200, 9, 5, 0, 0, 0, 100, 0, 0, 0, 0, 0, 0, 0, 53, 1, 2300200, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Rizzle Sprysprocket - Actionlist - Start Waypoint Path 2300200');
+
+-- Set Conditions
+DELETE FROM `conditions` WHERE (`SourceTypeOrReferenceId` IN (15, 22)) AND (`SourceGroup` IN (8, 21893)) AND (`SourceEntry` IN (0, 23002)) AND (`SourceId` = 0) AND (`ElseGroup` = 0) AND (`ConditionTypeOrReference` = 47) AND (`ConditionTarget` = 0) AND (`ConditionValue1` = 10994) AND (`ConditionValue2` = 8) AND (`ConditionValue3` = 0);
+INSERT INTO `conditions` (`SourceTypeOrReferenceId`, `SourceGroup`, `SourceEntry`, `SourceId`, `ElseGroup`, `ConditionTypeOrReference`, `ConditionTarget`, `ConditionValue1`, `ConditionValue2`, `ConditionValue3`, `NegativeCondition`, `ErrorType`, `ErrorTextId`, `ScriptName`, `Comment`) VALUES
+(15, 21893, 0, 0, 0, 47, 0, 10994, 8, 0, 0, 0, 0, '', 'Gossip displayed only if player has Chasing the Moonstone incomplete'),
+(22, 8, 23002, 0, 0, 47, 0, 10994, 8, 0, 0, 0, 0, '', 'Event occurs only if player has Chasing the Moonstone incomplete.');
+
+-- Set SmartAI (Rizzle's Depth Charge)
+UPDATE `creature_template` SET `AIName` = 'SmartAI', `ScriptName` = '' WHERE `entry` = 23025;
+
+DELETE FROM `smart_scripts` WHERE (`source_type` = 0 AND `entryorguid` = 23025);
+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
+(23025, 0, 0, 1, 54, 0, 100, 0, 0, 0, 0, 0, 0, 0, 207, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Rizzle\'s Depth Charge - On Just Summoned - Set hover 1'),
+(23025, 0, 1, 2, 61, 0, 100, 0, 0, 0, 0, 0, 0, 0, 61, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Rizzle\'s Depth Charge - On Just Summoned - Set Swim On'),
+(23025, 0, 2, 3, 61, 0, 100, 0, 0, 0, 0, 0, 0, 0, 18, 33554432, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Rizzle\'s Depth Charge - On Just Summoned - Set Flags Not Selectable'),
+(23025, 0, 3, 0, 61, 0, 100, 0, 0, 0, 0, 0, 0, 0, 8, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Rizzle\'s Depth Charge - On Just Summoned - Set Reactstate Passive'),
+(23025, 0, 4, 5, 101, 0, 100, 0, 1, 5, 1000, 1000, 1000, 0, 11, 38576, 2, 0, 0, 0, 0, 21, 5, 0, 0, 0, 0, 0, 0, 0, 'Rizzle\'s Depth Charge - On 1 or More Players in Range - Cast \'Knockback\''),
+(23025, 0, 5, 0, 61, 0, 100, 0, 0, 0, 0, 0, 0, 0, 41, 1000, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Rizzle\'s Depth Charge - On 1 or More Players in Range - Despawn In 1000 ms');
diff --git a/data/sql/updates/db_world/2025_10_11_02.sql b/data/sql/updates/db_world/2025_10_11_02.sql
new file mode 100644
index 0000000000..5e9302e703
--- /dev/null
+++ b/data/sql/updates/db_world/2025_10_11_02.sql
@@ -0,0 +1,7 @@
+-- DB update 2025_10_11_01 -> 2025_10_11_02
+--
+DELETE FROM `smart_scripts` WHERE (`source_type` = 0 AND `entryorguid` = 29920);
+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
+(29920, 0, 0, 0, 0, 0, 100, 0, 10000, 15000, 10000, 15000, 0, 0, 11, 55652, 0, 0, 0, 0, 0, 5, 0, 0, 0, 0, 0, 0, 0, 0, 'Ruins Dweller - In Combat - Cast \'Spring\''),
+(29920, 0, 1, 0, 0, 0, 100, 0, 2000, 7000, 8000, 14000, 0, 0, 11, 55643, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 'Ruins Dweller - In Combat - Cast \'Regurgitate\''),
+(29920, 0, 2, 0, 31, 0, 100, 0, 55652, 0, 0, 0, 0, 0, 14, 0, 100, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Ruins Dweller - On Target Spellhit \'Spring\' - Set All Threat 0-100');
diff --git a/data/sql/updates/db_world/2025_10_11_03.sql b/data/sql/updates/db_world/2025_10_11_03.sql
new file mode 100644
index 0000000000..efe1ac1020
--- /dev/null
+++ b/data/sql/updates/db_world/2025_10_11_03.sql
@@ -0,0 +1,13 @@
+-- DB update 2025_10_11_02 -> 2025_10_11_03
+--
+DELETE FROM `smart_scripts` WHERE (`entryorguid` = 780602) AND (`source_type` = 9) AND (`id` IN (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`, `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
+(780602, 9, 5, 0, 0, 0, 100, 0, 0, 0, 0, 0, 0, 0, 26, 836, 0, 0, 0, 0, 0, 12, 1, 0, 0, 0, 0, 0, 0, 0, 'Homing Robot OOX-09/HL - Actionlist - Quest Credit \'Rescue OOX-09/HL!\'');
+
+DELETE FROM `smart_scripts` WHERE (`entryorguid` = 780702) AND (`source_type` = 9) AND (`id` IN (6));
+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
+(780702, 9, 6, 0, 0, 0, 100, 0, 0, 0, 0, 0, 0, 0, 26, 2767, 0, 0, 0, 0, 0, 12, 1, 0, 0, 0, 0, 0, 0, 0, 'Homing Robot OOX-22/FE - Actionlist - Quest Credit \'Rescue OOX-22/FE!\'');
+
+DELETE FROM `smart_scripts` WHERE (`entryorguid` = 778402) AND (`source_type` = 9) AND (`id` IN (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`, `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
+(778402, 9, 5, 0, 0, 0, 100, 0, 0, 0, 0, 0, 0, 0, 26, 648, 0, 0, 0, 0, 0, 12, 1, 0, 0, 0, 0, 0, 0, 0, 'Homing Robot OOX-17/TN - Actionlist - Quest Credit \'Rescue OOX-17/TN!\'');
diff --git a/data/sql/updates/db_world/2025_10_11_04.sql b/data/sql/updates/db_world/2025_10_11_04.sql
new file mode 100644
index 0000000000..85a5c7dac8
--- /dev/null
+++ b/data/sql/updates/db_world/2025_10_11_04.sql
@@ -0,0 +1,27 @@
+-- DB update 2025_10_11_03 -> 2025_10_11_04
+--
+DELETE FROM `creature` WHERE (`guid` = 248652) AND (`id1` = 14693);
+DELETE FROM `game_event_creature` WHERE (`guid` = 248652) AND (`eventEntry` = 120);
+
+DELETE FROM `smart_scripts` WHERE (`entryorguid` = 4543) AND (`source_type` = 0) AND (`id` IN (7));
+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
+(4543, 0, 7, 0, 6, 0, 100, 0, 0, 0, 0, 0, 0, 0, 12, 14693, 8, 0, 0, 0, 0, 8, 0, 0, 0, 0, 1797.84, 1233.68, 18.3153, 1.58286, 'Bloodmage Thalnos - On Just Died - Summon Creature \'Scorn\'');
+
+UPDATE `creature_template` SET `AIName` = 'SmartAI' WHERE `entry` = 14693;
+DELETE FROM `smart_scripts` WHERE (`entryorguid` = 14693) AND (`source_type` = 0) AND (`id` IN (4));
+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
+(14693, 0, 4, 0, 54, 0, 100, 0, 0, 0, 0, 0, 0, 0, 53, 0, 1469300, 1, 0, 0, 2, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Scorn - On Just Summoned - Start Patrol Path 1469300');
+
+DELETE FROM `conditions` WHERE (`SourceTypeOrReferenceId` = 22) AND (`SourceGroup` = 8) AND (`SourceEntry` = 4543) AND (`SourceId` = 0) AND (`ElseGroup` = 0);
+INSERT INTO `conditions` (`SourceTypeOrReferenceId`, `SourceGroup`, `SourceEntry`, `SourceId`, `ElseGroup`, `ConditionTypeOrReference`, `ConditionTarget`, `ConditionValue1`, `ConditionValue2`, `ConditionValue3`, `NegativeCondition`, `ErrorType`, `ErrorTextId`, `ScriptName`, `Comment`) VALUES
+(22, 8, 4543, 0, 0, 12, 0, 120, 0, 0, 0, 0, 0, '', 'Scourge Invasion - Boss in instance activation event must be active');
+
+SET @ENTRY := 14693;
+DELETE FROM `waypoints` WHERE `entry` = @ENTRY * 100;
+INSERT INTO `waypoints` (`entry`, `pointid`, `position_x`, `position_y`, `position_z`, `orientation`, `delay`, `point_comment`) VALUES
+(@ENTRY*100, 1, 1798.01, 1312.39, 18.69, NULL, 0, 'Scorn'),
+(@ENTRY*100, 2, 1805.39, 1323.66, 18.91, NULL, 0, 'Scorn'),
+(@ENTRY*100, 3, 1797.70, 1383.27, 18.76, NULL, 0, 'Scorn'),
+(@ENTRY*100, 4, 1805.39, 1323.66, 18.91, NULL, 0, 'Scorn'),
+(@ENTRY*100, 5, 1798.01, 1312.39, 18.69, NULL, 0, 'Scorn'),
+(@ENTRY*100, 6, 1798.01, 1223.17, 18.274, NULL, 0, 'Scorn - spawn point');
diff --git a/data/sql/updates/db_world/2025_10_11_05.sql b/data/sql/updates/db_world/2025_10_11_05.sql
new file mode 100644
index 0000000000..ee3812cf10
--- /dev/null
+++ b/data/sql/updates/db_world/2025_10_11_05.sql
@@ -0,0 +1,3 @@
+-- DB update 2025_10_11_04 -> 2025_10_11_05
+-- Moorabi hard reset
+UPDATE `creature_template` SET `flags_extra` = `flags_extra` | 2147483648 WHERE `entry` IN (29305, 30530);
diff --git a/data/sql/updates/db_world/2025_10_11_06.sql b/data/sql/updates/db_world/2025_10_11_06.sql
new file mode 100644
index 0000000000..99c1624730
--- /dev/null
+++ b/data/sql/updates/db_world/2025_10_11_06.sql
@@ -0,0 +1,6 @@
+-- DB update 2025_10_11_05 -> 2025_10_11_06
+-- Correctly uses Option0 instead of Option1 to summon the Terokk
+UPDATE `smart_scripts` SET `event_param2` = 0 WHERE `entryorguid` = 185928 AND `source_type` = 1 AND `id` = 0;
+
+-- Removes the duplicated option.
+DELETE FROM `gossip_menu_option` WHERE `MenuID` = 8687 AND `OptionID` = 1;
diff --git a/data/sql/updates/db_world/2025_10_12_00.sql b/data/sql/updates/db_world/2025_10_12_00.sql
new file mode 100644
index 0000000000..c09409abce
--- /dev/null
+++ b/data/sql/updates/db_world/2025_10_12_00.sql
@@ -0,0 +1,11 @@
+-- DB update 2025_10_11_06 -> 2025_10_12_00
+--
+UPDATE `creature_template` SET `maxlevel` = 33 WHERE `entry` = 940;
+DELETE FROM `smart_scripts` WHERE (`source_type` = 0 AND `entryorguid` = 940);
+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
+(940, 0, 0, 0, 74, 0, 100, 0, 0, 0, 19900, 28900, 30, 0, 11, 6077, 0, 0, 0, 0, 0, 9, 0, 0, 0, 0, 0, 0, 0, 0, 'Kurzen Medicine Man - On Friendly Between 0-30% Health - Cast \'Renew\''),
+(940, 0, 1, 0, 74, 0, 100, 0, 0, 0, 34300, 39100, 30, 0, 11, 6064, 1, 0, 0, 0, 0, 9, 0, 0, 0, 0, 0, 0, 0, 0, 'Kurzen Medicine Man - On Friendly Between 0-30% Health - Cast \'Heal\''),
+(940, 0, 2, 0, 60, 0, 100, 0, 1000, 1000, 70000, 90000, 0, 0, 11, 602, 32, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Kurzen Medicine Man - On Update - Cast \'Inner Fire\''),
+(940, 0, 3, 0, 2, 0, 100, 1, 0, 15, 0, 0, 0, 0, 25, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 'Kurzen Medicine Man - Between 0-15% Health - Flee For Assist'),
+(940, 0, 4, 0, 2, 0, 100, 0, 0, 50, 3000, 16000, 0, 0, 11, 6064, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Kurzen Medicine Man - Between 0-50% Health - Cast \'Heal\''),
+(940, 0, 5, 0, 2, 0, 100, 0, 0, 90, 16000, 24000, 30, 0, 11, 6077, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Kurzen Medicine Man - Between 0-90% Health - Cast \'Renew\'');
diff --git a/data/sql/updates/db_world/2025_10_12_01.sql b/data/sql/updates/db_world/2025_10_12_01.sql
new file mode 100644
index 0000000000..777adf168b
--- /dev/null
+++ b/data/sql/updates/db_world/2025_10_12_01.sql
@@ -0,0 +1,10 @@
+-- DB update 2025_10_12_00 -> 2025_10_12_01
+--
+-- With this smart script set, the worm will seek the first player within 18 yards to attack, with no regard to the player's level. Being outside of 18 yards when killing a Rotted One will avoid this behavior.
+-- Smart Script #2 will ensure the mob dies after 30 seconds, which is how long they are supposed to live.
+UPDATE `creature_template` SET `AIName` = 'SmartAI' WHERE `entry` = 2462;
+
+DELETE FROM `smart_scripts` WHERE (`source_type` = 0 AND `entryorguid` = 2462);
+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
+(2462, 0, 0, 0, 101, 0, 100, 0, 0, 18, 0, 0, 0, 0, 49, 0, 0, 0, 0, 0, 0, 18, 18, 0, 0, 0, 0, 0, 0, 0, 'Flesh Eating Worm - On 0 or More Players in Range - Start Attacking'),
+(2462, 0, 1, 0, 0, 0, 100, 0, 30000, 30000, 0, 0, 0, 0, 37, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Flesh Eating Worm - In Combat - Kill Self');
diff --git a/data/sql/updates/db_world/2025_10_12_02.sql b/data/sql/updates/db_world/2025_10_12_02.sql
new file mode 100644
index 0000000000..6e86a96438
--- /dev/null
+++ b/data/sql/updates/db_world/2025_10_12_02.sql
@@ -0,0 +1,23 @@
+-- DB update 2025_10_12_01 -> 2025_10_12_02
+--
+-- GM Utility Spell Scripts
+DELETE FROM `spell_script_names` WHERE `spell_id` IN (456, 2765, 1509, 18139, 6147, 2763, 20115, 20114, 24676, 24675);
+INSERT INTO `spell_script_names` (`spell_id`, `ScriptName`) VALUES
+(456, 'spell_gen_showlabel_off'),
+(2765, 'spell_gen_showlabel_on'),
+(1509, 'spell_gen_gm_off'),
+(18139, 'spell_gen_gm_on'),
+(6147, 'spell_gen_invis_off'),
+(2763, 'spell_gen_invis_on'),
+(20115, 'spell_gen_bm_on'),
+(20114, 'spell_gen_bm_off'),
+(24676, 'spell_gen_bm_on'),
+(24675, 'spell_gen_bm_off');
+
+DELETE FROM `acore_string` WHERE `entry` = 1186;
+INSERT INTO `acore_string` (`entry`, `content_default`, `locale_koKR`, `locale_frFR`, `locale_deDE`, `locale_zhCN`, `locale_zhTW`, `locale_esES`, `locale_esMX`, `locale_ruRU`) VALUES
+(1186, 'Beastmaster mode is {}', NULL, NULL, 'Der Beastmaster mode ist an ({})!', '兽王模式:{}', NULL, NULL, NULL, NULL);
+
+DELETE FROM `command` WHERE `name`='bm';
+INSERT INTO `command` (`name`, `security`, `help`) VALUES
+('bm', 3, 'Syntax: .bm [on/off]\nEnable or Disable in game Beastmaster mode or show current state if on/off not provided.');
diff --git a/data/sql/updates/db_world/2025_10_12_03.sql b/data/sql/updates/db_world/2025_10_12_03.sql
new file mode 100644
index 0000000000..c6427ab5e1
--- /dev/null
+++ b/data/sql/updates/db_world/2025_10_12_03.sql
@@ -0,0 +1,128 @@
+-- DB update 2025_10_12_02 -> 2025_10_12_03
+DELETE FROM `creature_template_model` WHERE `CreatureID` IN (15928, 19325, 20794, 26620, 26627, 26628, 26630, 26631, 26632, 26637, 26638, 26641, 26712, 26824, 27483, 27490, 27597, 27598, 27600, 27709, 27753, 27909, 27975, 27977, 27978, 27981, 27982, 27983, 27984, 27985, 28070, 28165, 28546, 28547, 28578, 28579, 28580, 28581, 28582, 28583, 28584, 28585, 28586, 28587, 28684, 28695, 28729, 28730, 28731, 28732, 28733, 28734, 28823, 28826, 28835, 28836, 28837, 28838, 28859, 28860, 28920, 28921, 28922, 28923, 28947, 28961, 28965, 29048, 29062, 29063, 29064, 29240, 29335, 30090, 30118, 30449, 30451, 30452, 30616, 30641, 30643, 30882, 30890, 30897, 30898, 30899, 31218, 31219, 31311, 31317, 31520, 31521, 31534, 31535, 31539, 31540, 31541, 31543, 31734, 31749, 31750, 31751, 31752, 32187);
+INSERT INTO `creature_template_model` (`CreatureID`, `Idx`, `CreatureDisplayID`, `DisplayScale`, `Probability`, `VerifiedBuild`) VALUES
+(15928, 0, 16137, 1, 0, 51831),
+(19325, 0, 18737, 1, 1, 51831),
+(20794, 0, 20182, 1, 0, 51831), -- 19978
+(26620, 0, 27077, 1, 1, 51831),
+(26620, 1, 27078, 1, 1, 51831),
+(26627, 0, 24500, 1, 1, 51831),
+(26628, 0, 19732, 1, 1, 51831),
+(26630, 0, 26352, 1, 0, 51831),
+(26631, 0, 26292, 1, 1, 51831),
+(26632, 0, 27072, 1, 0, 51831),
+(26637, 0, 26860, 1, 100, 51831),
+(26638, 0, 27056, 1, 100, 51831),
+(26641, 0, 19734, 1, 1, 51831),
+(26712, 0, 169, 1, 0, 51831), -- 17188!
+(26712, 1, 17188, 1, 1, 51831),
+(26824, 0, 6469, 1, 1, 51831),
+(27483, 0, 5240, 1, 1, 51831),
+(27490, 0, 7897, 1, 0, 51831),
+(27597, 0, 22337, 1, 0, 51831),
+(27598, 0, 10978, 1, 1, 51831),
+(27598, 1, 10972, 1, 1, 51831),
+(27600, 0, 2606, 1, 0, 51831),
+(27709, 0, 27079, 1, 1, 51831),
+(27709, 1, 27080, 1, 1, 51831),
+(27709, 2, 27081, 1, 1, 51831),
+(27753, 0, 27079, 1, 1, 51831),
+(27753, 1, 27080, 1, 1, 51831),
+(27753, 2, 27081, 1, 1, 51831),
+(27909, 0, 24925, 1, 0, 51831),
+(27975, 0, 26657, 1, 0, 51831),
+(27977, 0, 20909, 1, 100, 51831),
+(27978, 0, 27483, 1, 100, 51831),
+(27981, 0, 25177, 1, 100, 51831),
+(27982, 0, 25754, 1, 0, 51831),
+(27983, 0, 25991, 1, 1, 51831),
+(27984, 0, 25987, 1, 1, 51831),
+(27985, 0, 26148, 1, 0, 51831),
+(28070, 0, 26353, 1, 100, 51831),
+(28165, 0, 25176, 1, 100, 51831),
+(28546, 0, 27484, 1, 0, 51831),
+(28547, 0, 8715, 1, 0, 51831),
+(28578, 0, 25984, 1, 0, 51831),
+(28579, 0, 25982, 1, 0, 51831),
+(28580, 0, 25985, 1, 0, 51831),
+(28581, 0, 25759, 1, 0, 51831),
+(28582, 0, 25754, 1, 0, 51831),
+(28583, 0, 25654, 1, 0, 51831),
+(28584, 0, 24905, 1, 0, 51831),
+(28585, 0, 2170, 1, 0, 51831),
+(28586, 0, 27301, 1, 1, 51831), -- scale 1.3!
+(28587, 0, 27071, 1, 1, 51831),
+(28684, 0, 27394, 1, 0, 51831),
+(28695, 0, 25629, 1, 0, 51831),
+(28729, 0, 23984, 1, 0, 51831),
+(28730, 0, 23568, 1, 0, 51831),
+(28731, 0, 25729, 1, 0, 51831),
+(28732, 0, 23567, 1, 0, 51831),
+(28733, 0, 25258, 1, 0, 51831),
+(28734, 0, 25237, 1, 0, 51831),
+(28823, 0, 1126, 1, 0, 51831),
+(28823, 1, 11686, 1, 1, 51831),
+(28826, 0, 26381, 1, 0, 51831),
+(28835, 0, 26143, 1, 1, 51831),
+(28836, 0, 25756, 1, 1, 51831),
+(28837, 0, 25757, 1, 1, 51831),
+(28838, 0, 26053, 1, 0, 51831),
+(28859, 0, 26752, 1, 0, 51831),
+(28860, 0, 27035, 1, 0, 51831),
+(28920, 0, 27092, 1, 0, 51831),
+(28921, 0, 26776, 1, 0, 51831),
+(28922, 0, 27395, 1, 0, 51831), -- scale 1.15!
+(28923, 0, 27485, 1, 1, 51831),
+(28947, 0, 169, 1, 0, 51831),
+(28947, 1, 11686, 1, 1, 51831),
+(28961, 0, 25984, 1, 0, 51831),
+(28965, 0, 25985, 1, 0, 51831),
+(29048, 0, 26937, 1, 0, 51831),
+(29062, 0, 25768, 1, 0, 51831),
+(29063, 0, 3004, 1, 0, 51831),
+(29064, 0, 23564, 1, 0, 51831),
+(29240, 0, 26065, 1, 0, 51831), -- scale 1.3!
+(29335, 0, 23565, 1, 0, 51831),
+(30090, 0, 169, 1, 0, 51831),
+(30090, 1, 11686, 1, 1, 51831),
+(30118, 0, 169, 1, 0, 51831),
+(30118, 1, 14501, 1, 1, 51831), -- 11686, scale 2!
+(30449, 0, 27039, 1, 0, 51831),
+(30451, 0, 27421, 1, 0, 51831),
+(30452, 0, 27082, 1, 0, 51831),
+(30616, 0, 1126, 1, 0, 51831),
+(30616, 1, 11686, 1, 1, 51831), -- 16925
+(30641, 0, 15294, 1, 0, 51831),
+(30643, 0, 2172, 1, 0, 51831),
+(30882, 0, 28014, 1, 1, 51831),
+(30890, 0, 19295, 1, 0, 51831),
+(30897, 0, 18783, 1, 0, 51831),
+(30897, 1, 27401, 1, 1, 51831), -- 11686
+(30898, 0, 18783, 1, 0, 51831),
+(30898, 1, 27401, 1, 1, 51831), -- 11686
+(30899, 0, 18783, 1, 0, 51831),
+(30899, 1, 16925, 1, 1, 51831), -- 11686
+(31218, 0, 8311, 1, 0, 51831),
+(31219, 0, 12894, 1, 0, 51831),
+(31311, 0, 27035, 1, 0, 51831),
+(31317, 0, 2172, 1, 0, 51831),
+(31520, 0, 27421, 1, 0, 51831),
+(31521, 0, 15294, 1, 0, 51831),
+(31534, 0, 27082, 1, 0, 51831),
+(31535, 0, 27039, 1, 0, 51831),
+(31539, 0, 28014, 1, 1, 51831),
+(31540, 0, 19295, 1, 0, 51831),
+(31541, 0, 8311, 1, 0, 51831),
+(31543, 0, 12894, 1, 0, 51831),
+(31734, 0, 26752, 1, 0, 51831),
+(31749, 0, 26876, 1, 0, 51831),
+(31750, 0, 24316, 1, 1, 51831),
+(31750, 1, 24317, 1, 1, 51831),
+(31750, 2, 24318, 1, 1, 51831),
+(31750, 3, 24319, 1, 1, 51831),
+(31751, 0, 24316, 1, 1, 51831),
+(31751, 1, 24317, 1, 1, 51831),
+(31751, 2, 24318, 1, 1, 51831),
+(31751, 3, 24319, 1, 1, 51831),
+(31752, 0, 25835, 1, 1, 51831),
+(32187, 0, 26753, 1, 0, 51831);
diff --git a/data/sql/updates/db_world/2025_10_12_04.sql b/data/sql/updates/db_world/2025_10_12_04.sql
new file mode 100644
index 0000000000..fa019496a9
--- /dev/null
+++ b/data/sql/updates/db_world/2025_10_12_04.sql
@@ -0,0 +1,40 @@
+-- DB update 2025_10_12_03 -> 2025_10_12_04
+DELETE FROM `creature_template_model` WHERE `CreatureID` IN (34382, 34383, 34435, 34476, 34477, 34478, 34479, 34480, 34481, 34482, 34483, 34484, 34644, 34653, 34654, 34675, 34676, 34677, 34678, 34679, 34708, 34710, 34711, 34712, 34713, 34714, 34744, 34768, 35254, 35256, 35260, 35261, 36479, 36506);
+INSERT INTO `creature_template_model` (`CreatureID`, `Idx`, `CreatureDisplayID`, `DisplayScale`, `Probability`, `VerifiedBuild`) VALUES
+(34382, 0, 29203, 1, 1, 51831),
+(34383, 0, 29204, 1, 1, 51831),
+(34435, 0, 29226, 1, 1, 51831),
+(34476, 0, 29228, 1, 1, 51831),
+(34477, 0, 29229, 1, 1, 51831),
+(34478, 0, 29230, 1, 1, 51831),
+(34479, 0, 29231, 1, 1, 51831),
+(34480, 0, 29232, 1, 1, 51831),
+(34481, 0, 29233, 1, 1, 51831),
+(34482, 0, 29234, 1, 1, 51831),
+(34483, 0, 29235, 1, 1, 51831),
+(34484, 0, 29236, 1, 1, 51831),
+(34644, 0, 29392, 1, 0, 51831),
+(34653, 0, 29341, 1, 0, 51831),
+(34654, 0, 29330, 1, 0, 51831),
+(34675, 0, 29337, 1, 0, 51831),
+(34676, 0, 29391, 1, 0, 51831),
+(34677, 0, 29338, 1, 0, 51831),
+(34678, 0, 29339, 1, 0, 51831),
+(34679, 0, 29395, 1, 0, 51831),
+(34708, 0, 29324, 1, 0, 51831),
+(34710, 0, 29400, 1, 0, 51831),
+(34711, 0, 29388, 1, 0, 51831),
+(34712, 0, 29365, 1, 0, 51831),
+(34713, 0, 29401, 1, 0, 51831),
+(34714, 0, 29399, 1, 0, 51831),
+(34744, 0, 29444, 1, 0, 51831),
+(34768, 0, 29403, 1, 0, 51831),
+(35254, 0, 29717, 1, 3, 51831),
+(35254, 1, 29718, 1, 3, 51831),
+(35254, 2, 29720, 1, 1, 51831),
+(35254, 3, 29721, 1, 1, 51831),
+(35256, 0, 29719, 1, 1, 51831),
+(35260, 0, 29732, 1, 1, 51831),
+(35261, 0, 29733, 1, 1, 51831),
+(36479, 0, 30120, 1, 1, 51831),
+(36506, 0, 30156, 1, 1, 51831);
diff --git a/data/sql/updates/db_world/2025_10_12_05.sql b/data/sql/updates/db_world/2025_10_12_05.sql
new file mode 100644
index 0000000000..2bad910a89
--- /dev/null
+++ b/data/sql/updates/db_world/2025_10_12_05.sql
@@ -0,0 +1,23 @@
+-- DB update 2025_10_12_04 -> 2025_10_12_05
+DELETE FROM `creature_template_model` WHERE `CreatureID` IN (10184, 11262, 12758, 28681, 30084, 30161, 30245, 30248, 30249, 30282, 30592, 32295, 36561);
+INSERT INTO `creature_template_model` (`CreatureID`, `Idx`, `CreatureDisplayID`, `DisplayScale`, `Probability`, `VerifiedBuild`) VALUES
+(10184, 0, 8570, 1, 0, 51831),
+(11262, 0, 397, 1, 0, 51831),
+(12758, 0, 11686, 1, 0, 51831),
+(28681, 0, 26131, 1, 0, 51831),
+(30084, 0, 26753, 1, 0, 51831),
+(30161, 0, 25835, 1, 1, 51831),
+(30245, 0, 24316, 1, 1, 51831),
+(30245, 1, 24317, 1, 1, 51831),
+(30245, 2, 24318, 1, 1, 51831),
+(30245, 3, 24319, 1, 1, 51831),
+(30248, 0, 26876, 1, 0, 51831),
+(30249, 0, 24316, 1, 1, 51831),
+(30249, 1, 24317, 1, 1, 51831),
+(30249, 2, 24318, 1, 1, 51831),
+(30249, 3, 24319, 1, 1, 51831),
+(30282, 0, 14501, 1, 0, 51831),
+(30592, 0, 169, 1, 0, 51831),
+(30592, 1, 11686, 1, 1, 51831),
+(32295, 0, 27569, 1, 1, 51831),
+(36561, 0, 12891, 1, 0, 51831);
diff --git a/data/sql/updates/db_world/2025_10_12_06.sql b/data/sql/updates/db_world/2025_10_12_06.sql
new file mode 100644
index 0000000000..2bcb515418
--- /dev/null
+++ b/data/sql/updates/db_world/2025_10_12_06.sql
@@ -0,0 +1,7 @@
+-- DB update 2025_10_12_05 -> 2025_10_12_06
+--
+DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId`=23 AND `SourceEntry`=0 AND `SourceId`=0 AND `SourceGroup` IN (3443, 12919, 15471);
+
+DELETE FROM `conditions` WHERE (`SourceTypeOrReferenceId` = 15) AND (`SourceGroup` = 9087) AND (`SourceEntry` = 0) AND (`SourceId` = 0) AND (`ElseGroup` = 0) AND (`ConditionTypeOrReference` = 12) AND (`ConditionTarget` = 0) AND (`ConditionValue1` = 109) 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
+(15, 9087, 0, 0, 0, 12, 0, 109, 0, 0, 0, 0, 0, '', 'event \'Sun\'s Reach Reclamation Phase Anvil\' must be active');
diff --git a/data/sql/updates/db_world/2025_10_14_00.sql b/data/sql/updates/db_world/2025_10_14_00.sql
new file mode 100644
index 0000000000..7d8e03c180
--- /dev/null
+++ b/data/sql/updates/db_world/2025_10_14_00.sql
@@ -0,0 +1,20 @@
+-- DB update 2025_10_12_06 -> 2025_10_14_00
+
+-- Move Waypoint from 'waypoints' to 'waypoint_data'
+DELETE FROM `waypoints` WHERE `entry` = 27482;
+DELETE FROM `waypoint_data` WHERE `id` = 2748200;
+INSERT INTO `waypoint_data` (`id`, `point`, `position_x`, `position_y`, `position_z`, `orientation`, `delay`, `move_type`, `action`, `action_chance`, `wpguid`) VALUES
+(2748200, 1, 4105.28, -2917.96, 280.32, NULL, 0, 1, 0, 100, 0),
+(2748200, 2, 4048.68, -2936.74, 275.192, NULL, 0, 1, 0, 100, 0);
+
+-- Edit SmartAI
+UPDATE `creature_template` SET `AIName` = 'SmartAI' WHERE `entry` = 27482;
+
+DELETE FROM `smart_scripts` WHERE (`entryorguid` = 27482) AND (`source_type` = 0) AND (`id` IN (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`, `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
+(27482, 0, 5, 0, 109, 0, 100, 0, 0, 2748200, 0, 0, 0, 0, 41, 2000, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Wounded Westfall Infantry - On Path 2748200 Finished - Despawn In 2000 ms');
+
+-- Edit Action List
+DELETE FROM `smart_scripts` WHERE (`entryorguid` = 2748200) AND (`source_type` = 9) AND (`id` IN (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`, `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
+(2748200, 9, 5, 0, 0, 0, 100, 0, 4000, 4000, 0, 0, 0, 0, 232, 2748200, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Wounded Westfall Infantry - Actionlist - Start Path 2748200');
diff --git a/data/sql/updates/db_world/2025_10_16_00.sql b/data/sql/updates/db_world/2025_10_16_00.sql
new file mode 100644
index 0000000000..a6b568957c
--- /dev/null
+++ b/data/sql/updates/db_world/2025_10_16_00.sql
@@ -0,0 +1,12 @@
+-- DB update 2025_10_14_00 -> 2025_10_16_00
+-- 53 WP_START
+-- update previous parameter run = 1 to forcedMovement = 2 (run)
+update `smart_scripts` set `action_param1` = 2 where `action_type` = 53 and `action_param1` = 1;
+-- update previous parameter run = 0 to forcedMovement = 1 (walk)
+update `smart_scripts` set `action_param1` = 1 where `action_type` = 53 and `action_param1` = 0;
+
+-- 113 START_CLOSEST_WAYPOINT
+-- update previous parameter run = 1 to forcedMovement = 2 (run)
+update `smart_scripts` set `action_param4` = 2 where `action_type` = 113 and `action_param4` = 1;
+-- update previous parameter run = 0 to forcedMovement = 1 (walk)
+update `smart_scripts` set `action_param4` = 1 where `action_type` = 113 and `action_param4` = 0;
diff --git a/data/sql/updates/db_world/2025_10_16_01.sql b/data/sql/updates/db_world/2025_10_16_01.sql
new file mode 100644
index 0000000000..ae87b72886
--- /dev/null
+++ b/data/sql/updates/db_world/2025_10_16_01.sql
@@ -0,0 +1,6 @@
+-- DB update 2025_10_16_00 -> 2025_10_16_01
+
+-- Set param 3 and 4 to 0.
+DELETE FROM `smart_scripts` WHERE (`entryorguid` = 2889700) AND (`source_type` = 9) AND (`id` IN (1));
+INSERT INTO `smart_scripts` (`entryorguid`, `source_type`, `id`, `link`, `event_type`, `event_phase_mask`, `event_chance`, `event_flags`, `event_param1`, `event_param2`, `event_param3`, `event_param4`, `event_param5`, `event_param6`, `action_type`, `action_param1`, `action_param2`, `action_param3`, `action_param4`, `action_param5`, `action_param6`, `target_type`, `target_param1`, `target_param2`, `target_param3`, `target_param4`, `target_x`, `target_y`, `target_z`, `target_o`, `comment`) VALUES
+(2889700, 9, 1, 0, 0, 0, 100, 0, 3000, 3000, 0, 0, 0, 0, 113, 2889700, 2889706, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Scarlet Ghoul - Actionlist - Start closest Waypoint 2889700 - 2889706');
diff --git a/data/sql/updates/db_world/2025_10_16_02.sql b/data/sql/updates/db_world/2025_10_16_02.sql
new file mode 100644
index 0000000000..2ccc699ef9
--- /dev/null
+++ b/data/sql/updates/db_world/2025_10_16_02.sql
@@ -0,0 +1,5 @@
+-- DB update 2025_10_16_01 -> 2025_10_16_02
+--
+DELETE FROM `command` WHERE `name` = "packetlog";
+INSERT INTO `command` (`name`, `security`, `help`) VALUES
+("packetlog", 2, "Syntax: .packetlog [on/off]\n Toggles to allow the character using the command to start to log their packets into the server, PacketLogFile needs to be set with a valid filename");
diff --git a/data/sql/updates/db_world/2025_10_16_03.sql b/data/sql/updates/db_world/2025_10_16_03.sql
new file mode 100644
index 0000000000..0f6f627eed
--- /dev/null
+++ b/data/sql/updates/db_world/2025_10_16_03.sql
@@ -0,0 +1,5 @@
+-- DB update 2025_10_16_02 -> 2025_10_16_03
+--
+DELETE FROM `command` WHERE `name` = 'debug zonestats';
+INSERT INTO `command` (`name`, `security`, `help`) VALUES
+('debug zonestats', 1, '.debug zonestats [$playerName]\nDisplays the amount of players in the player\'s current zone.');
diff --git a/data/sql/updates/db_world/2025_10_16_04.sql b/data/sql/updates/db_world/2025_10_16_04.sql
new file mode 100644
index 0000000000..b5db6fecab
--- /dev/null
+++ b/data/sql/updates/db_world/2025_10_16_04.sql
@@ -0,0 +1,33 @@
+-- DB update 2025_10_16_03 -> 2025_10_16_04
+--
+-- Argent Dawn Initiate
+UPDATE `creature_template` SET `gossip_menu_id` = 7230, `npcflag` = `npcflag` | 1 WHERE (`entry` = 16384);
+-- Argent Dawn Cleric
+UPDATE `creature_template` SET `gossip_menu_id` = 7231, `npcflag` = `npcflag` | 1 WHERE (`entry` = 16435);
+-- Argent Dawn Priest
+UPDATE `creature_template` SET `gossip_menu_id` = 7232, `npcflag` = `npcflag` | 1 WHERE (`entry` = 16436);
+
+DELETE FROM `gossip_menu` WHERE `MenuID` IN (7230, 7231, 7232);
+INSERT INTO `gossip_menu` (`MenuID`, `TextID`) VALUES
+(7230, 8543),
+(7231, 8544),
+(7232, 8545);
+
+DELETE FROM `npc_text` WHERE (`ID` IN (8543, 8544, 8545));
+INSERT INTO `npc_text` (`ID`, `text0_0`, `text0_1`, `BroadcastTextID0`, `lang0`, `Probability0`, `em0_0`, `em0_1`, `em0_2`, `em0_3`, `em0_4`, `em0_5`, `text1_0`, `text1_1`, `BroadcastTextID1`, `lang1`, `Probability1`, `em1_0`, `em1_1`, `em1_2`, `em1_3`, `em1_4`, `em1_5`, `text2_0`, `text2_1`, `BroadcastTextID2`, `lang2`, `Probability2`, `em2_0`, `em2_1`, `em2_2`, `em2_3`, `em2_4`, `em2_5`, `text3_0`, `text3_1`, `BroadcastTextID3`, `lang3`, `Probability3`, `em3_0`, `em3_1`, `em3_2`, `em3_3`, `em3_4`, `em3_5`, `text4_0`, `text4_1`, `BroadcastTextID4`, `lang4`, `Probability4`, `em4_0`, `em4_1`, `em4_2`, `em4_3`, `em4_4`, `em4_5`, `text5_0`, `text5_1`, `BroadcastTextID5`, `lang5`, `Probability5`, `em5_0`, `em5_1`, `em5_2`, `em5_3`, `em5_4`, `em5_5`, `text6_0`, `text6_1`, `BroadcastTextID6`, `lang6`, `Probability6`, `em6_0`, `em6_1`, `em6_2`, `em6_3`, `em6_4`, `em6_5`, `text7_0`, `text7_1`, `BroadcastTextID7`, `lang7`, `Probability7`, `em7_0`, `em7_1`, `em7_2`, `em7_3`, `em7_4`, `em7_5`, `VerifiedBuild`) VALUES
+(8543, '', '', 12301, 0, 0, 0, 0, 0, 0, 0, 0, '', '', 0, 0, 0, 0, 0, 0, 0, 0, 0, '', '', 0, 0, 0, 0, 0, 0, 0, 0, 0, '', '', 0, 0, 0, 0, 0, 0, 0, 0, 0, '', '', 0, 0, 0, 0, 0, 0, 0, 0, 0, '', '', 0, 0, 0, 0, 0, 0, 0, 0, 0, '', '', 0, 0, 0, 0, 0, 0, 0, 0, 0, '', '', 0, 0, 0, 0, 0, 0, 0, 0, 0, 0),
+(8544, '', '', 12300, 0, 0, 0, 0, 0, 0, 0, 0, '', '', 0, 0, 0, 0, 0, 0, 0, 0, 0, '', '', 0, 0, 0, 0, 0, 0, 0, 0, 0, '', '', 0, 0, 0, 0, 0, 0, 0, 0, 0, '', '', 0, 0, 0, 0, 0, 0, 0, 0, 0, '', '', 0, 0, 0, 0, 0, 0, 0, 0, 0, '', '', 0, 0, 0, 0, 0, 0, 0, 0, 0, '', '', 0, 0, 0, 0, 0, 0, 0, 0, 0, 0),
+(8545, '', '', 12299, 0, 0, 0, 0, 0, 0, 0, 0, '', '', 0, 0, 0, 0, 0, 0, 0, 0, 0, '', '', 0, 0, 0, 0, 0, 0, 0, 0, 0, '', '', 0, 0, 0, 0, 0, 0, 0, 0, 0, '', '', 0, 0, 0, 0, 0, 0, 0, 0, 0, '', '', 0, 0, 0, 0, 0, 0, 0, 0, 0, '', '', 0, 0, 0, 0, 0, 0, 0, 0, 0, '', '', 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
+
+DELETE FROM `gossip_menu_option` WHERE (`MenuID` IN (7230, 7231, 7232));
+INSERT INTO `gossip_menu_option` (`MenuID`, `OptionID`, `OptionIcon`, `OptionText`, `OptionBroadcastTextID`, `OptionType`, `OptionNpcFlag`, `ActionMenuID`, `ActionPoiID`, `BoxCoded`, `BoxMoney`, `BoxText`, `BoxBroadcastTextID`, `VerifiedBuild`) VALUES
+(7230, 0, 0, 'Give me one of your magic items.', 12302, 1, 1, 0, 0, 0, 0, '', 0, 0),
+(7231, 0, 0, 'Give me one of your magic items.', 12302, 1, 1, 0, 0, 0, 0, '', 0, 0),
+(7232, 0, 0, 'Give me one of your magic items.', 12302, 1, 1, 0, 0, 0, 0, '', 0, 0);
+
+UPDATE `creature_template` SET `AIName` = 'SmartAI' WHERE `entry` IN (16384, 16435, 16436);
+DELETE FROM `smart_scripts` WHERE `entryorguid` IN (16384, 16435, 16436) AND (`source_type` = 0);
+INSERT INTO `smart_scripts` (`entryorguid`, `source_type`, `id`, `link`, `event_type`, `event_phase_mask`, `event_chance`, `event_flags`, `event_param1`, `event_param2`, `event_param3`, `event_param4`, `event_param5`, `event_param6`, `action_type`, `action_param1`, `action_param2`, `action_param3`, `action_param4`, `action_param5`, `action_param6`, `target_type`, `target_param1`, `target_param2`, `target_param3`, `target_param4`, `target_x`, `target_y`, `target_z`, `target_o`, `comment`) VALUES
+(16384, 0, 0, 0, 62, 0, 100, 0, 7230, 0, 0, 0, 0, 0, 11, 28319, 0, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 0, 'Argent Dawn Initiate - On Gossip Option 0 Selected - Cast \'Create Lesser Mark of the Dawn\''),
+(16435, 0, 0, 0, 62, 0, 100, 0, 7231, 0, 0, 0, 0, 0, 11, 28320, 0, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 0, 'Argent Dawn Cleric - On Gossip Option 0 Selected - Cast \'Create Mark of the Dawn\''),
+(16436, 0, 0, 0, 62, 0, 100, 0, 7232, 0, 0, 0, 0, 0, 11, 28321, 0, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 0, 'Argent Dawn Priest - On Gossip Option 0 Selected - Cast \'Create Greater Mark of the Dawn\'');
diff --git a/data/sql/updates/db_world/2025_10_16_05.sql b/data/sql/updates/db_world/2025_10_16_05.sql
new file mode 100644
index 0000000000..3a38c71342
--- /dev/null
+++ b/data/sql/updates/db_world/2025_10_16_05.sql
@@ -0,0 +1,7 @@
+-- DB update 2025_10_16_04 -> 2025_10_16_05
+
+-- Fire Immunity (Unbound Firestorm N/H)
+UPDATE `creature_template` SET `spell_school_immune_mask` = `spell_school_immune_mask` |4 WHERE (`entry` IN (28584, 30983));
+
+-- Nature Immunity (Slag H, Storming Vortex N/H, Cyclone H)
+UPDATE `creature_template` SET `spell_school_immune_mask` = `spell_school_immune_mask` |8 WHERE (`entry` IN (28547, 30970, 30979, 30965));
diff --git a/data/sql/updates/db_world/2025_10_17_00.sql b/data/sql/updates/db_world/2025_10_17_00.sql
new file mode 100644
index 0000000000..30df135ec3
--- /dev/null
+++ b/data/sql/updates/db_world/2025_10_17_00.sql
@@ -0,0 +1,3 @@
+-- DB update 2025_10_16_05 -> 2025_10_17_00
+--
+UPDATE `gameobject` SET `state` = 0 WHERE `guid` IN (65573, 65585) AND `id` IN (191324, 191416);
diff --git a/data/sql/updates/db_world/2025_10_18_00.sql b/data/sql/updates/db_world/2025_10_18_00.sql
new file mode 100644
index 0000000000..12c66d7e1c
--- /dev/null
+++ b/data/sql/updates/db_world/2025_10_18_00.sql
@@ -0,0 +1,7 @@
+-- DB update 2025_10_17_00 -> 2025_10_18_00
+--
+UPDATE `spell_proc_event` SET `SpellFamilyMask2` = 0x00000040 WHERE `entry` = -33191;
+
+DELETE FROM `spell_script_names` WHERE `spell_id` = -33191;
+INSERT INTO `spell_script_names` (`spell_id`, `ScriptName`) VALUES
+(-33191, 'spell_gen_proc_on_victim');
diff --git a/data/sql/updates/db_world/2025_10_18_01.sql b/data/sql/updates/db_world/2025_10_18_01.sql
new file mode 100644
index 0000000000..283cd01aab
--- /dev/null
+++ b/data/sql/updates/db_world/2025_10_18_01.sql
@@ -0,0 +1,6 @@
+-- DB update 2025_10_18_00 -> 2025_10_18_01
+DELETE FROM `spelldifficulty_dbc` WHERE `ID` IN (52780, 52658, 52667);
+INSERT INTO `spelldifficulty_dbc` (`ID`, `DifficultySpellID_1`, `DifficultySpellID_2`, `DifficultySpellID_3`, `DifficultySpellID_4`) VALUES
+(52780, 52780, 59800, 0, 0), -- Ball Lightning
+(52658, 52658, 59795, 0, 0), -- Static Overload
+(52667, 52667, 59833, 0, 0); -- Spark Visual Trigger
diff --git a/data/sql/updates/db_world/2025_10_18_02.sql b/data/sql/updates/db_world/2025_10_18_02.sql
new file mode 100644
index 0000000000..f28a79c446
--- /dev/null
+++ b/data/sql/updates/db_world/2025_10_18_02.sql
@@ -0,0 +1,94 @@
+-- DB update 2025_10_18_01 -> 2025_10_18_02
+--
+UPDATE `creature_template` SET `unit_flags` = `unit_flags`|64|256|512|32768|33554432, `ScriptName` = '' WHERE `entry` IN (28961, 28965, 30980, 30982);
+
+DELETE FROM `areatrigger_scripts` WHERE `entry` IN (5082, 5083, 5084);
+INSERT INTO `areatrigger_scripts` (`entry`, `ScriptName`) VALUES
+(5082, 'at_hol_hall_of_watchers'),
+(5083, 'at_hol_hall_of_watchers'),
+(5084, 'at_hol_hall_of_watchers');
+
+DELETE FROM `creature_template_addon` WHERE `entry` IN (28965, 28961, 30980, 30982);
+INSERT INTO `creature_template_addon` (`entry`,`path_id`,`bytes1`,`mount`,`auras`) VALUES
+(28965, 0, 0, 0, '52881'), -- 28965 - 16245, 52881
+(28961, 0, 0, 0, '52898'), -- 28961 - 16245, 52898
+(30980, 0, 0, 0, '52898'),
+(30982, 0, 0, 0, '52881');
+
+UPDATE `creature_template` SET `AIName` = 'SmartAI' WHERE `entry` = 28961;
+
+DELETE FROM `smart_scripts` WHERE (`source_type` = 0 AND `entryorguid` = 28961);
+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
+(28961, 0, 0, 0, 0, 0, 100, 0, 10000, 25000, 10000, 25000, 0, 0, 11, 23600, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 'Titanium Siegebreaker - In Combat - Cast \'Piercing Howl\''),
+(28961, 0, 1, 0, 0, 0, 100, 0, 5000, 10000, 5000, 10000, 0, 0, 11, 52890, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 'Titanium Siegebreaker - In Combat - Cast \'Penetrating Strike\''),
+(28961, 0, 2, 0, 0, 0, 100, 0, 12000, 12000, 12000, 12000, 0, 0, 11, 52891, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 'Titanium Siegebreaker - In Combat - Cast \'Blade Turning\''),
+(28961, 0, 3, 9, 2, 0, 100, 1, 0, 2, 1000, 1000, 0, 0, 11, 19134, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 'Titanium Siegebreaker - Between 0-2% Health - Cast \'Frightening Shout\' (No Repeat)'),
+(28961, 0, 4, 0, 37, 0, 100, 0, 0, 0, 0, 0, 0, 0, 11, 16245, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Titanium Siegebreaker - On Initialize - Cast \'Freeze Anim\''),
+(28961, 0, 5, 6, 72, 0, 100, 0, 0, 0, 0, 0, 0, 0, 19, 768, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Titanium Siegebreaker - On Action 0 Done - Remove Flags Immune To Players & Immune To NPC\'s'),
+(28961, 0, 6, 0, 61, 0, 100, 0, 0, 0, 0, 0, 0, 0, 28, 16245, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Titanium Siegebreaker - On Action 0 Done - Remove Aura \'Freeze Anim\''),
+(28961, 0, 7, 0, 7, 0, 100, 0, 0, 0, 0, 0, 0, 0, 19, 256, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Titanium Siegebreaker - On Evade - Remove Flags Immune To Players'),
+(28961, 0, 8, 0, 25, 0, 100, 0, 0, 0, 0, 0, 0, 0, 42, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Titanium Siegebreaker - On Reset - Set Invincibility Hp 1%'),
+(28961, 0, 9, 0, 61, 0, 100, 0, 0, 0, 0, 0, 0, 0, 37, 500, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Titanium Siegebreaker - Between 0-2% Health - Kill Self (No Repeat)');
+
+UPDATE `creature_template` SET `AIName` = 'SmartAI' WHERE `entry` = 28965;
+
+DELETE FROM `smart_scripts` WHERE (`source_type` = 0 AND `entryorguid` = 28965);
+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
+(28965, 0, 0, 0, 0, 0, 100, 0, 10000, 25000, 10000, 25000, 0, 0, 11, 52904, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 'Titanium Thunderer - In Combat - Cast \'Throw\''),
+(28965, 0, 1, 0, 0, 0, 100, 0, 15000, 30000, 15000, 30000, 0, 0, 11, 52885, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 'Titanium Thunderer - In Combat - Cast \'Deadly Throw\''),
+(28965, 0, 2, 0, 0, 0, 100, 0, 15000, 15000, 15000, 15000, 0, 0, 11, 52879, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Titanium Thunderer - In Combat - Cast \'Deflection\''),
+(28965, 0, 3, 0, 37, 0, 100, 0, 0, 0, 0, 0, 0, 0, 11, 16245, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Titanium Thunderer - On Initialize - Cast \'Freeze Anim\''),
+(28965, 0, 4, 5, 72, 0, 100, 0, 0, 0, 0, 0, 0, 0, 19, 768, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Titanium Thunderer - On Action 0 Done - Remove Flags Immune To Players & Immune To NPC\'s'),
+(28965, 0, 5, 0, 61, 0, 100, 0, 0, 0, 0, 0, 0, 0, 28, 16245, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Titanium Thunderer - On Action 0 Done - Remove Aura \'Freeze Anim\''),
+(28965, 0, 6, 0, 7, 0, 100, 0, 0, 0, 0, 0, 0, 0, 19, 256, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Titanium Thunderer - On Evade - Remove Flags Immune To Players');
+
+SET @CGUID := 52885;
+DELETE FROM `creature` WHERE `id1` IN (28961, 28965);
+DELETE FROM `creature` WHERE `guid` BETWEEN @CGUID+0 AND @CGUID+30;
+INSERT INTO `creature` (`guid`, `id1`, `map`, `zoneId`, `areaId`, `spawnMask`, `phaseMask`, `equipment_id`, `position_x`, `position_y`, `position_z`, `orientation`, `spawntimesecs`, `wander_distance`, `currentwaypoint`, `curhealth`, `curmana`, `MovementType`, `npcflag`, `unit_flags`, `dynamicflags`, `VerifiedBuild`) VALUES
+(@CGUID+0, 28961, 602, 4272, 4272, 3, 1, 1, 1259.378173828125, -145.273757934570312, 52.29970932006835937, 4.834561824798583984, 7200, 0, 0, 6285, 0, 0, 0, 0, 0, 63834),
+(@CGUID+1, 28961, 602, 4272, 4272, 3, 1, 1, 1264.5328369140625, -145.5595703125, 52.26771926879882812, 4.764749050140380859, 7200, 0, 0, 5802, 0, 0, 0, 0, 0, 63834),
+(@CGUID+2, 28965, 602, 4272, 4272, 3, 1, 1, 1224.5123291015625, -145.291229248046875, 52.67881393432617187, 4.694935798645019531, 7200, 0, 0, 6285, 0, 0, 0, 0, 0, 63834),
+(@CGUID+3, 28961, 602, 4272, 4272, 3, 1, 1, 1215.1031494140625, -145.157012939453125, 52.66891098022460937, 4.764749050140380859, 7200, 0, 0, 6285, 0, 0, 0, 0, 0, 63834),
+(@CGUID+4, 28965, 602, 4272, 4272, 3, 1, 1, 1263.8841552734375, -183.708663940429687, 52.27320098876953125, 1.605702877044677734, 7200, 0, 0, 5802, 0, 0, 0, 0, 0, 63834),
+(@CGUID+5, 28965, 602, 4272, 4272, 3, 1, 1, 1259.0084228515625, -183.691726684570312, 52.26767730712890625, 1.605702877044677734, 7200, 0, 0, 5802, 0, 0, 0, 0, 0, 63834),
+(@CGUID+6, 28961, 602, 4272, 4272, 3, 1, 1, 1225.5767822265625, -184.354385375976562, 52.68161392211914062, 1.65806281566619873, 7200, 0, 0, 6285, 0, 0, 0, 0, 0, 63834),
+(@CGUID+7, 28961, 602, 4272, 4272, 3, 1, 1, 1248.0032958984375, -145.068801879882812, 52.37061309814453125, 4.694935798645019531, 7200, 0, 0, 5802, 0, 0, 0, 0, 0, 63834),
+(@CGUID+8, 28965, 602, 4272, 4272, 3, 1, 1, 1253.1517333984375, -183.504989624023437, 52.34642791748046875, 1.623156189918518066, 7200, 0, 0, 6285, 0, 0, 0, 0, 0, 63834),
+(@CGUID+9, 28965, 602, 4272, 4272, 3, 1, 1, 1253.5120849609375, -145.027999877929687, 52.33613204956054687, 4.694935798645019531, 7200, 0, 0, 6285, 0, 0, 0, 0, 0, 63834),
+(@CGUID+10, 28961, 602, 4272, 4272, 3, 1, 1, 1248.0181884765625, -183.460174560546875, 52.38129043579101562, 1.570796370506286621, 7200, 0, 0, 5802, 0, 0, 0, 0, 0, 63834),
+(@CGUID+11, 28965, 602, 4272, 4272, 3, 1, 1, 1220.2291259765625, -145.243927001953125, 52.66761016845703125, 4.764749050140380859, 7200, 0, 0, 6285, 0, 0, 0, 0, 0, 63834),
+(@CGUID+12, 28965, 602, 4272, 4272, 3, 1, 1, 1181.0302734375, -146.033523559570312, 52.79578399658203125, 4.729842185974121093, 7200, 0, 0, 6285, 0, 0, 0, 0, 0, 63834),
+(@CGUID+13, 28961, 602, 4272, 4272, 3, 1, 1, 1209.4744873046875, -144.967559814453125, 52.67555618286132812, 4.677482128143310546, 7200, 0, 0, 5802, 0, 0, 0, 0, 0, 63834),
+(@CGUID+14, 28965, 602, 4272, 4272, 3, 1, 1, 1162.207763671875, -154.09527587890625, 52.79578399658203125, 0, 7200, 0, 0, 5802, 0, 0, 0, 0, 0, 63834),
+(@CGUID+15, 28961, 602, 4272, 4272, 3, 1, 1, 1157.05712890625, -199.659942626953125, 52.46372222900390625, 0.03490658476948738, 7200, 0, 0, 6285, 0, 0, 0, 0, 0, 63834),
+(@CGUID+16, 28965, 602, 4272, 4272, 3, 1, 1, 1156.6702880859375, -205.869796752929687, 52.49854278564453125, 6.2657318115234375, 7200, 0, 0, 6285, 0, 0, 0, 0, 0, 63834),
+(@CGUID+17, 28961, 602, 4272, 4272, 3, 1, 1, 1219.8778076171875, -184.285049438476562, 52.66225814819335937, 1.692969322204589843, 7200, 0, 0, 6285, 0, 0, 0, 0, 0, 63834),
+(@CGUID+18, 28961, 602, 4272, 4272, 3, 1, 1, 1175.3406982421875, -146.038192749023437, 52.79578781127929687, 4.660028934478759765, 7200, 0, 0, 5802, 0, 0, 0, 0, 0, 63834),
+(@CGUID+19, 28961, 602, 4272, 4272, 3, 1, 1, 1191.956298828125, -212.037765502929687, 52.10306549072265625, 3.228859186172485351, 7200, 0, 0, 5802, 0, 0, 0, 0, 0, 63834),
+(@CGUID+20, 28965, 602, 4272, 4272, 3, 1, 1, 1170.35205078125, -145.817596435546875, 52.79578781127929687, 4.764749050140380859, 7200, 0, 0, 5802, 0, 0, 0, 0, 0, 63834),
+(@CGUID+21, 28961, 602, 4272, 4272, 3, 1, 1, 1192.097412109375, -206.172744750976562, 52.09882354736328125, 3.246312379837036132, 7200, 0, 0, 5802, 0, 0, 0, 0, 0, 63834),
+(@CGUID+22, 28961, 602, 4272, 4272, 3, 1, 1, 1191.9901123046875, -218.161788940429687, 52.5872344970703125, 3.176499128341674804, 7200, 0, 0, 6285, 0, 0, 0, 0, 0, 63834),
+(@CGUID+23, 28965, 602, 4272, 4272, 3, 1, 1, 1213.839599609375, -184.1123046875, 52.65846633911132812, 1.675516128540039062, 7200, 0, 0, 6285, 0, 0, 0, 0, 0, 63834),
+(@CGUID+24, 28961, 602, 4272, 4272, 3, 1, 1, 1162.1590576171875, -159.638992309570312, 52.79578781127929687, 0, 7200, 0, 0, 6285, 0, 0, 0, 0, 0, 63834),
+(@CGUID+25, 28965, 602, 4272, 4272, 3, 1, 1, 1156.6553955078125, -212.220382690429687, 52.53575897216796875, 6.2657318115234375, 7200, 0, 0, 6285, 0, 0, 0, 0, 0, 63834),
+(@CGUID+26, 28961, 602, 4272, 4272, 3, 1, 1, 1162.192138671875, -165.84429931640625, 52.79578781127929687, 0.05235987901687622, 7200, 0, 0, 5802, 0, 0, 0, 0, 0, 63834),
+(@CGUID+27, 28965, 602, 4272, 4272, 3, 1, 1, 1156.8057861328125, -218.583663940429687, 52.55777740478515625, 0.03490658476948738, 7200, 0, 0, 6285, 0, 0, 0, 0, 0, 63834),
+(@CGUID+28, 28961, 602, 4272, 4272, 3, 1, 1, 1209.2860107421875, -184.312179565429687, 52.66295242309570312, 1.640609502792358398, 7200, 0, 0, 5802, 0, 0, 0, 0, 0, 63834),
+(@CGUID+29, 28965, 602, 4272, 4272, 3, 1, 1, 1186.61962890625, -146.100265502929687, 52.79578781127929687, 4.764749050140380859, 7200, 0, 0, 6285, 0, 0, 0, 0, 0, 63834),
+(@CGUID+30, 28965, 602, 4272, 4272, 3, 1, 1, 1162.243896484375, -171.8046875, 52.79578399658203125, 0, 7200, 0, 0, 6285, 0, 0, 0, 0, 0, 63834);
+
+DELETE FROM `spell_proc_event` WHERE `entry` = 52881;
+INSERT INTO `spell_proc_event` (`entry`, `procEx`, `Cooldown`) VALUES
+(52881, 0x00000020, 12000);
+
+UPDATE `spell_proc_event` SET `Cooldown` = 6000 WHERE `entry` = 52898;
+
+DELETE FROM `spelldifficulty_dbc` WHERE `ID` IN (52891, 52885, 52879, 52904);
+INSERT INTO `spelldifficulty_dbc` (`ID`, `DifficultySpellID_1`, `DifficultySpellID_2`, `DifficultySpellID_3`, `DifficultySpellID_4`) VALUES
+(52891, 52891, 59173, 0, 0), -- Blade Turning
+(52885, 52885, 59180, 0, 0), -- Deadly Throw
+(52879, 52879, 59181, 0, 0), -- Deflection
+(52904, 52904, 59179, 0, 0); -- Throw
+
+DELETE FROM `linked_respawn` WHERE `guid` IN (126835, 126837, 126838, 126839, 126840, 126841, 126843, 126844, 126846, 126847, 126849, 126850, 126851, 126852, 126853, 126854, 126855, 126856, 126857, 126860, 126862) AND `linkType` = 0;
diff --git a/data/sql/updates/db_world/2025_10_19_00.sql b/data/sql/updates/db_world/2025_10_19_00.sql
new file mode 100644
index 0000000000..e0749064c1
--- /dev/null
+++ b/data/sql/updates/db_world/2025_10_19_00.sql
@@ -0,0 +1,3 @@
+-- DB update 2025_10_18_02 -> 2025_10_19_00
+--
+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/data/sql/updates/db_world/2025_10_21_00.sql b/data/sql/updates/db_world/2025_10_21_00.sql
new file mode 100644
index 0000000000..c144823029
--- /dev/null
+++ b/data/sql/updates/db_world/2025_10_21_00.sql
@@ -0,0 +1,4 @@
+-- DB update 2025_10_19_00 -> 2025_10_21_00
+
+-- Set Unit Flags (Persistence)
+UPDATE `creature_template` SET `unit_flags` = `unit_flags` |256|512|33554432 WHERE (`entry` = 29863);
diff --git a/data/sql/updates/db_world/2025_10_24_00.sql b/data/sql/updates/db_world/2025_10_24_00.sql
new file mode 100644
index 0000000000..e8f4660dc3
--- /dev/null
+++ b/data/sql/updates/db_world/2025_10_24_00.sql
@@ -0,0 +1,7 @@
+-- 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
+(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)');
diff --git a/data/sql/updates/db_world/2025_10_24_01.sql b/data/sql/updates/db_world/2025_10_24_01.sql
new file mode 100644
index 0000000000..6ded6e9ca6
--- /dev/null
+++ b/data/sql/updates/db_world/2025_10_24_01.sql
@@ -0,0 +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/db_world/2025_10_24_02.sql b/data/sql/updates/db_world/2025_10_24_02.sql
new file mode 100644
index 0000000000..70d1bc695b
--- /dev/null
+++ b/data/sql/updates/db_world/2025_10_24_02.sql
@@ -0,0 +1,34 @@
+-- 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
+(-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');
diff --git a/data/sql/updates/db_world/2025_10_24_03.sql b/data/sql/updates/db_world/2025_10_24_03.sql
new file mode 100644
index 0000000000..f692bb6d6d
--- /dev/null
+++ b/data/sql/updates/db_world/2025_10_24_03.sql
@@ -0,0 +1,30 @@
+-- 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
+(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');
diff --git a/data/sql/updates/db_world/2025_10_24_04.sql b/data/sql/updates/db_world/2025_10_24_04.sql
new file mode 100644
index 0000000000..33ce8b9211
--- /dev/null
+++ b/data/sql/updates/db_world/2025_10_24_04.sql
@@ -0,0 +1,14 @@
+-- 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'),
+(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');
diff --git a/data/sql/updates/db_world/2025_10_24_05.sql b/data/sql/updates/db_world/2025_10_24_05.sql
new file mode 100644
index 0000000000..135d657fd9
--- /dev/null
+++ b/data/sql/updates/db_world/2025_10_24_05.sql
@@ -0,0 +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);
diff --git a/data/sql/updates/db_world/2025_10_25_00.sql b/data/sql/updates/db_world/2025_10_25_00.sql
new file mode 100644
index 0000000000..bef1087a9b
--- /dev/null
+++ b/data/sql/updates/db_world/2025_10_25_00.sql
@@ -0,0 +1,87 @@
+-- DB update 2025_10_24_05 -> 2025_10_25_00
+
+-- Delete old Waypoint and add new ones
+DELETE FROM `waypoints` WHERE (`entry` IN (28948));
+
+DELETE FROM `waypoint_data` WHERE (`id` IN (2894800, 2894801, 2894802, 2894803, 2894804, 2894805));
+INSERT INTO `waypoint_data` (`id`, `point`, `position_x`, `position_y`, `position_z`, `orientation`, `delay`, `move_type`, `action`, `action_chance`, `wpguid`) VALUES
+(2894800, 1, 6232.341, -1965.3967, 484.76993, NULL, 0, 0, 0, 100, 0),
+(2894800, 2, 6218.6577, -1962.0309, 484.85934, NULL, 0, 0, 0, 100, 0),
+(2894801, 1, 6191.6187, -1930.0017, 485.06897, NULL, 0, 0, 0, 100, 0),
+(2894801, 2, 6175.131, -1934.6721, 484.8741, NULL, 0, 0, 0, 100, 0),
+(2894801, 3, 6156.749, -1953.0284, 484.90906, NULL, 0, 0, 0, 100, 0),
+(2894802, 1, 6119.237, -1976.635, 484.8796, NULL, 0, 0, 0, 100, 0),
+(2894802, 2, 6093.954, -1990.4447, 484.8646, NULL, 0, 0, 0, 100, 0),
+(2894802, 3, 6089.3467, -2014.2975, 484.85828, NULL, 0, 0, 0, 100, 0),
+(2894802, 4, 6113.093, -2041.1102, 484.8815, NULL, 0, 0, 0, 100, 0),
+(2894802, 5, 6108.405, -2060.9314, 484.76993, NULL, 0, 0, 0, 100, 0),
+(2894803, 1, 6136.712, -2078.5974, 484.86215, NULL, 0, 0, 0, 100, 0),
+(2894803, 2, 6157.7085, -2107.486, 485.07727, NULL, 0, 0, 0, 100, 0),
+(2894803, 3, 6156.6816, -2122.8438, 485.18344, NULL, 0, 0, 0, 100, 0),
+(2894803, 4, 6141.0166, -2128.8904, 485.348, NULL, 0, 0, 0, 100, 0),
+(2894803, 5, 6143.3594, -2127.986, 485.39215, NULL, 0, 0, 0, 100, 0),
+(2894803, 6, 6118.48, -2123.0764, 473.51685, NULL, 0, 0, 0, 100, 0),
+(2894803, 7, 6121.2275, -2108.0781, 473.54965, NULL, 0, 0, 0, 100, 0),
+(2894803, 8, 6146.223, -2111.0583, 461.30115, NULL, 0, 0, 0, 100, 0),
+(2894803, 9, 6156.9985, -2110.611, 461.30157, NULL, 0, 0, 0, 100, 0),
+(2894803, 10, 6160.259, -2087.5088, 461.30212, NULL, 0, 0, 0, 100, 0),
+(2894803, 11, 6148.678, -2072.7812, 461.303, NULL, 0, 0, 0, 100, 0),
+(2894804, 1, 6144.377, -2044.998, 460.9487, NULL, 0, 0, 0, 100, 0),
+(2894804, 2, 6139.7783, -2046.457, 461.30005, NULL, 0, 0, 0, 100, 0),
+(2894805, 1, 6161.379, -2028.9777, 458.94113, NULL, 0, 0, 0, 100, 0),
+(2894805, 2, 6172.3604, -2019.7084, 455.11356, NULL, 0, 0, 0, 100, 0);
+
+-- Change Emotes
+UPDATE `creature_text` SET `Emote` = 4 WHERE (`CreatureID` = 28948) AND (`GroupID` IN (0));
+UPDATE `creature_text` SET `Emote` = 396 WHERE (`CreatureID` = 28948) AND (`GroupID` IN (1));
+UPDATE `creature_text` SET `Emote` = 5 WHERE (`CreatureID` = 28948) AND (`GroupID` IN (3, 12));
+UPDATE `creature_text` SET `Emote` = 2 WHERE (`CreatureID` = 28948) AND (`GroupID` IN (14));
+
+-- Set SmartAI
+UPDATE `creature_template` SET `AIName` = 'SmartAI' WHERE `entry` = 28948;
+
+DELETE FROM `smart_scripts` WHERE (`source_type` = 0 AND `entryorguid` = 28948);
+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
+(28948, 0, 0, 1, 54, 0, 100, 0, 0, 0, 0, 0, 0, 0, 64, 25, 0, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 0, 'Malmortis - On Just Summoned - Store Targetlist'),
+(28948, 0, 1, 0, 61, 0, 100, 0, 0, 0, 0, 0, 0, 0, 80, 2894800, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Malmortis - On Just Summoned - Run Script'),
+(28948, 0, 2, 0, 109, 0, 100, 0, 0, 2894800, 0, 0, 0, 0, 80, 2894801, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Malmortis - On Path 2894800 Finished - Run Script'),
+(28948, 0, 3, 0, 109, 0, 100, 0, 0, 2894801, 0, 0, 0, 0, 80, 2894802, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Malmortis - On Path 2894801 Finished - Run Script'),
+(28948, 0, 4, 0, 109, 0, 100, 0, 0, 2894802, 0, 0, 0, 0, 80, 2894803, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Malmortis - On Path 2894802 Finished - Run Script'),
+(28948, 0, 5, 0, 109, 0, 100, 0, 0, 2894803, 0, 0, 0, 0, 80, 2894804, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Malmortis - On Path 2894803 Finished - Run Script'),
+(28948, 0, 6, 0, 109, 0, 100, 0, 0, 2894804, 0, 0, 0, 0, 80, 2894805, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Malmortis - On Path 2894804 Finished - Run Script'),
+(28948, 0, 7, 0, 109, 0, 100, 0, 0, 2894805, 0, 0, 0, 0, 80, 2894806, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Malmortis - On Path 2894805 Finished - Run Script');
+
+-- Set Action Lists
+DELETE FROM `smart_scripts` WHERE (`source_type` = 9) AND (`entryorguid` IN (2894800, 2894801, 2894802, 2894803, 2894804, 2894805, 2894806));
+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
+(2894800, 9, 0, 0, 0, 0, 100, 0, 2000, 2000, 0, 0, 0, 0, 66, 0, 0, 0, 0, 0, 0, 12, 25, 0, 0, 0, 0, 0, 0, 0, 'Malmortis - Actionlist - Set Orientation Stored'),
+(2894800, 9, 1, 0, 0, 0, 100, 0, 500, 500, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 12, 25, 0, 0, 0, 0, 0, 0, 0, 'Malmortis - Actionlist - Say Line 0'),
+(2894800, 9, 2, 0, 0, 0, 100, 0, 7000, 7000, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 12, 25, 0, 0, 0, 0, 0, 0, 0, 'Malmortis - Actionlist - Say Line 1'),
+(2894800, 9, 3, 0, 0, 0, 100, 0, 2000, 2000, 0, 0, 0, 0, 232, 2894800, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Malmortis - Actionlist - Start Path 2894800'),
+(2894801, 9, 0, 0, 0, 0, 100, 0, 0, 0, 0, 0, 0, 0, 66, 0, 0, 0, 0, 0, 0, 12, 25, 0, 0, 0, 0, 0, 0, 0, 'Malmortis - Actionlist - Set Orientation Stored'),
+(2894801, 9, 1, 0, 0, 0, 100, 0, 500, 500, 0, 0, 0, 0, 1, 2, 0, 0, 0, 0, 0, 12, 25, 0, 0, 0, 0, 0, 0, 0, 'Malmortis - Actionlist - Say Line 2'),
+(2894801, 9, 2, 0, 0, 0, 100, 0, 5000, 5000, 0, 0, 0, 0, 232, 2894801, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Malmortis - Actionlist - Start Path 2894801'),
+(2894802, 9, 0, 0, 0, 0, 100, 0, 0, 0, 0, 0, 0, 0, 66, 0, 0, 0, 0, 0, 0, 12, 25, 0, 0, 0, 0, 0, 0, 0, 'Malmortis - Actionlist - Set Orientation Stored'),
+(2894802, 9, 1, 0, 0, 0, 100, 0, 500, 500, 0, 0, 0, 0, 1, 3, 0, 0, 0, 0, 0, 12, 25, 0, 0, 0, 0, 0, 0, 0, 'Malmortis - Actionlist - Say Line 3'),
+(2894802, 9, 2, 0, 0, 0, 100, 0, 2000, 2000, 0, 0, 0, 0, 232, 2894802, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Malmortis - Actionlist - Start Path 2894802'),
+(2894803, 9, 0, 0, 0, 0, 100, 0, 0, 0, 0, 0, 0, 0, 1, 4, 0, 0, 0, 0, 0, 12, 25, 0, 0, 0, 0, 0, 0, 0, 'Malmortis - Actionlist - Say Line 4'),
+(2894803, 9, 1, 0, 0, 0, 100, 0, 8000, 8000, 0, 0, 0, 0, 66, 0, 0, 0, 0, 0, 0, 12, 25, 0, 0, 0, 0, 0, 0, 0, 'Malmortis - Actionlist - Set Orientation Stored'),
+(2894803, 9, 2, 0, 0, 0, 100, 0, 500, 500, 0, 0, 0, 0, 1, 5, 0, 0, 0, 0, 0, 12, 25, 0, 0, 0, 0, 0, 0, 0, 'Malmortis - Actionlist - Say Line 5'),
+(2894803, 9, 3, 0, 0, 0, 100, 0, 3000, 3000, 0, 0, 0, 0, 232, 2894803, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Malmortis - Actionlist - Start Path 2894803'),
+(2894804, 9, 0, 0, 0, 0, 100, 0, 0, 0, 0, 0, 0, 0, 1, 6, 0, 0, 0, 0, 0, 12, 25, 0, 0, 0, 0, 0, 0, 0, 'Malmortis - Actionlist - Say Line 6'),
+(2894804, 9, 1, 0, 0, 0, 100, 0, 8000, 8000, 0, 0, 0, 0, 66, 0, 0, 0, 0, 0, 0, 12, 25, 0, 0, 0, 0, 0, 0, 0, 'Malmortis - Actionlist - Set Orientation Stored'),
+(2894804, 9, 2, 0, 0, 0, 100, 0, 500, 500, 0, 0, 0, 0, 1, 7, 0, 0, 0, 0, 0, 12, 25, 0, 0, 0, 0, 0, 0, 0, 'Malmortis - Actionlist - Say Line 7'),
+(2894804, 9, 3, 0, 0, 0, 100, 0, 4000, 4000, 0, 0, 0, 0, 232, 2894804, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Malmortis - Actionlist - Start Path 2894804'),
+(2894805, 9, 0, 0, 0, 0, 100, 0, 0, 0, 0, 0, 0, 0, 1, 8, 0, 0, 0, 0, 0, 12, 0, 0, 0, 0, 0, 0, 0, 0, 'Malmortis - Actionlist - Say Line 8'),
+(2894805, 9, 1, 0, 0, 0, 100, 0, 6000, 6000, 0, 0, 0, 0, 66, 0, 0, 0, 0, 0, 0, 12, 25, 0, 0, 0, 0, 0, 0, 0, 'Malmortis - Actionlist - Set Orientation Stored'),
+(2894805, 9, 2, 0, 0, 0, 100, 0, 500, 500, 0, 0, 0, 0, 1, 9, 0, 0, 0, 0, 0, 12, 25, 0, 0, 0, 0, 0, 0, 0, 'Malmortis - Actionlist - Say Line 9'),
+(2894805, 9, 3, 0, 0, 0, 100, 0, 9000, 9000, 0, 0, 0, 0, 66, 0, 0, 0, 0, 0, 0, 19, 28931, 30, 0, 0, 0, 0, 0, 0, 'Malmortis - Actionlist - Set Orientation Closest Creature \'Blightblood Troll\''),
+(2894805, 9, 4, 0, 0, 0, 100, 0, 500, 500, 0, 0, 0, 0, 1, 10, 0, 0, 0, 0, 0, 12, 25, 0, 0, 0, 0, 0, 0, 0, 'Malmortis - Actionlist - Say Line 10'),
+(2894805, 9, 5, 0, 0, 0, 100, 0, 7000, 7000, 0, 0, 0, 0, 1, 11, 0, 0, 0, 0, 0, 12, 25, 0, 0, 0, 0, 0, 0, 0, 'Malmortis - Actionlist - Say Line 11'),
+(2894805, 9, 6, 0, 0, 0, 100, 0, 8000, 8000, 0, 0, 0, 0, 232, 2894805, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Malmortis - Actionlist - Start Path 2894805'),
+(2894806, 9, 0, 0, 0, 0, 100, 0, 0, 0, 0, 0, 0, 0, 66, 0, 0, 0, 0, 0, 0, 12, 25, 0, 0, 0, 0, 0, 0, 0, 'Malmortis - Actionlist - Set Orientation Stored'),
+(2894806, 9, 1, 0, 0, 0, 100, 0, 500, 500, 0, 0, 0, 0, 1, 12, 0, 0, 0, 0, 0, 12, 25, 0, 0, 0, 0, 0, 0, 0, 'Malmortis - Actionlist - Say Line 12'),
+(2894806, 9, 2, 0, 0, 0, 100, 0, 5000, 5000, 0, 0, 0, 0, 1, 13, 0, 0, 0, 0, 0, 12, 25, 0, 0, 0, 0, 0, 0, 0, 'Malmortis - Actionlist - Say Line 13'),
+(2894806, 9, 3, 0, 0, 0, 100, 0, 5000, 5000, 0, 0, 0, 0, 1, 14, 0, 0, 0, 0, 0, 12, 25, 0, 0, 0, 0, 0, 0, 0, 'Malmortis - Actionlist - Say Line 14'),
+(2894806, 9, 4, 0, 0, 0, 100, 0, 2000, 2000, 0, 0, 0, 0, 11, 53101, 2, 0, 0, 0, 0, 12, 25, 0, 0, 0, 0, 0, 0, 0, 'Malmortis - Actionlist - Cast \'Kill Credit\''),
+(2894806, 9, 5, 0, 0, 0, 100, 0, 0, 0, 0, 0, 0, 0, 41, 2000, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Malmortis - Actionlist - Despawn In 2000 ms');
diff --git a/data/sql/updates/db_world/2025_10_25_01.sql b/data/sql/updates/db_world/2025_10_25_01.sql
new file mode 100644
index 0000000000..d60b3659d2
--- /dev/null
+++ b/data/sql/updates/db_world/2025_10_25_01.sql
@@ -0,0 +1,8 @@
+-- DB update 2025_10_25_00 -> 2025_10_25_01
+--
+UPDATE `creature_template` SET `AIName` = 'SmartAI' WHERE `entry` = 27970;
+DELETE FROM `smart_scripts` WHERE (`source_type` = 0 AND `entryorguid` = 27970);
+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
+(27970, 0, 0, 0, 0, 0, 100, 2, 3000, 9000, 16000, 16000, 0, 0, 11, 51819, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Raging Construct - In Combat - Cast \'Potent Jolt\' (Normal Dungeon)'),
+(27970, 0, 1, 0, 0, 0, 100, 4, 3000, 9000, 16000, 16000, 0, 0, 11, 61514, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Raging Construct - In Combat - Cast \'Potent Jolt\' (Heroic Dungeon)'),
+(27970, 0, 2, 0, 0, 0, 100, 6, 4000, 7000, 9000, 12000, 0, 0, 11, 28168, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 'Raging Construct - In Combat - Cast \'Arcing Smash\' (Dungeon)');
diff --git a/data/sql/updates/db_world/2025_10_26_00.sql b/data/sql/updates/db_world/2025_10_26_00.sql
new file mode 100644
index 0000000000..d5f94ffe2f
--- /dev/null
+++ b/data/sql/updates/db_world/2025_10_26_00.sql
@@ -0,0 +1,6 @@
+-- DB update 2025_10_25_01 -> 2025_10_26_00
+--
+DELETE FROM `creature_formations` WHERE `leaderGUID` = 126740 OR `memberGUID` = 126740;
+INSERT INTO `creature_formations` (`leaderGUID`, `memberGUID`, `dist`, `angle`, `groupAI`, `point_1`, `point_2`) VALUES
+(126740, 126740, 0, 0, 3, 0, 0),
+(126740, 126741, 0, 0, 3, 0, 0);
diff --git a/data/sql/updates/db_world/2025_10_26_01.sql b/data/sql/updates/db_world/2025_10_26_01.sql
new file mode 100644
index 0000000000..73d43651c0
--- /dev/null
+++ b/data/sql/updates/db_world/2025_10_26_01.sql
@@ -0,0 +1,16 @@
+-- DB update 2025_10_26_00 -> 2025_10_26_01
+-- Dark Rune Elementalist
+UPDATE `creature_template` SET `AIName` = 'SmartAI' WHERE `entry` = 27962;
+DELETE FROM `smart_scripts` WHERE (`source_type` = 0 AND `entryorguid` = 27962);
+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
+(27962, 0, 1, 0, 0, 0, 100, 6, 5000, 9000, 16000, 20000, 0, 0, 11, 51475, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Dark Rune Elementalist - In Combat - Cast \'Summon Air Elemental\' (Dungeon)'),
+(27962, 0, 2, 0, 1, 0, 100, 2, 1000, 1000, 600000, 600000, 0, 0, 11, 51776, 32, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Dark Rune Elementalist - Out of Combat - Cast \'Lightning Shield\' (Normal Dungeon)'),
+(27962, 0, 3, 0, 0, 0, 100, 2, 0, 0, 20000, 30000, 0, 0, 11, 51776, 32, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Dark Rune Elementalist - In Combat - Cast \'Lightning Shield\' (Normal Dungeon)'),
+(27962, 0, 4, 0, 0, 0, 100, 6, 1000, 10000, 31000, 42000, 0, 0, 11, 32693, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Dark Rune Elementalist - In Combat - Cast \'Arcane Haste\' (Dungeon)'),
+(27962, 0, 5, 0, 1, 0, 100, 4, 1000, 1000, 600000, 600000, 0, 0, 11, 59025, 32, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Dark Rune Elementalist - Out of Combat - Cast \'Lightning Shield\' (Heroic Dungeon)'),
+(27962, 0, 6, 0, 0, 0, 100, 4, 0, 0, 20000, 30000, 0, 0, 11, 59025, 32, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Dark Rune Elementalist - In Combat - Cast \'Lightning Shield\' (Heroic Dungeon)');
+-- lesser air elemental
+UPDATE `creature_template` SET `AIName` = 'SmartAI' WHERE `entry` = 28384;
+DELETE FROM `smart_scripts` WHERE (`entryorguid` = 28384) 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
+(28384, 0, 0, 0, 0, 0, 100, 6, 3000, 10000, 5000, 9000, 0, 0, 11, 15801, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 'Lesser Air Elemental - In Combat - Cast \'Lightning Bolt\'');
diff --git a/data/sql/updates/db_world/2025_10_26_02.sql b/data/sql/updates/db_world/2025_10_26_02.sql
new file mode 100644
index 0000000000..4a86fcbdcd
--- /dev/null
+++ b/data/sql/updates/db_world/2025_10_26_02.sql
@@ -0,0 +1,15 @@
+-- DB update 2025_10_26_01 -> 2025_10_26_02
+-- `point`s had gaps causing core code needing to be extra complicated
+UPDATE `waypoint_data` SET `point`=1 WHERE `id`=1336190 AND `point`=2 AND `action`=1336191;
+UPDATE `waypoint_data` SET `point`=2 WHERE `id`=1336190 AND `point`=4 AND `action`=1336192;
+UPDATE `waypoint_data` SET `point`=3 WHERE `id`=1336190 AND `point`=6 AND `action`=1336192;
+
+UPDATE `waypoint_data` SET `point`=`point`-1 WHERE `id`=795240 AND `point`>4;
+
+UPDATE `waypoint_data` SET `point`=`point`-1 WHERE `id`=497520 AND `point`>21;
+UPDATE `waypoint_data` SET `point`=`point`-1 WHERE `id`=497520 AND `point`>33;
+
+UPDATE `waypoint_data` SET `point`=`point`-15 WHERE `id`=1873101 AND `point`>0;
+UPDATE `waypoint_data` SET `point`=`point`-1 WHERE `id`=1873101 AND `point`>5;
+
+UPDATE `waypoint_data` SET `point`=`point`-1 WHERE `id`=1110490 AND `point`>187;
diff --git a/data/sql/updates/db_world/2025_10_26_03.sql b/data/sql/updates/db_world/2025_10_26_03.sql
new file mode 100644
index 0000000000..7c761b7f87
--- /dev/null
+++ b/data/sql/updates/db_world/2025_10_26_03.sql
@@ -0,0 +1,6 @@
+-- DB update 2025_10_26_02 -> 2025_10_26_03
+--
+DELETE FROM `creature_formations` WHERE (`leaderGUID` = 126747) AND (`memberGUID` IN (126747, 126748));
+INSERT INTO `creature_formations` (`leaderGUID`, `memberGUID`, `dist`, `angle`, `groupAI`, `point_1`, `point_2`) VALUES
+(126747, 126747, 0, 0, 3, 0, 0),
+(126747, 126748, 0, 0, 3, 0, 0);
diff --git a/data/sql/updates/db_world/2025_10_28_00.sql b/data/sql/updates/db_world/2025_10_28_00.sql
new file mode 100644
index 0000000000..729cda8744
--- /dev/null
+++ b/data/sql/updates/db_world/2025_10_28_00.sql
@@ -0,0 +1,5 @@
+-- DB update 2025_10_26_03 -> 2025_10_28_00
+--
+DELETE FROM `creature_template_addon` WHERE (`entry` = 30966);
+INSERT INTO `creature_template_addon` (`entry`, `path_id`, `mount`, `bytes1`, `bytes2`, `emote`, `visibilityDistanceType`, `auras`) VALUES
+(30966, 0, 0, 0, 0, 0, 0, '61367');
diff --git a/data/sql/updates/db_world/2025_10_28_01.sql b/data/sql/updates/db_world/2025_10_28_01.sql
new file mode 100644
index 0000000000..701516fe7d
--- /dev/null
+++ b/data/sql/updates/db_world/2025_10_28_01.sql
@@ -0,0 +1,9 @@
+-- DB update 2025_10_28_00 -> 2025_10_28_01
+--
+UPDATE `creature_template` SET `AIName` = 'SmartAI' WHERE `entry` = 27972;
+DELETE FROM `smart_scripts` WHERE (`source_type` = 0 AND `entryorguid` = 27972);
+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
+(27972, 0, 0, 0, 0, 0, 100, 2, 3000, 6000, 9000, 15000, 0, 0, 11, 52383, 0, 0, 0, 0, 0, 5, 0, 0, 0, 0, 0, 0, 0, 0, 'Lightning Construct - In Combat - Cast \'Chain Lightning\' (No Repeat) (Dungeon/Normal)'),
+(27972, 0, 1, 0, 0, 0, 100, 4, 3000, 6000, 9000, 15000, 0, 0, 11, 61528, 0, 0, 0, 0, 0, 5, 0, 0, 0, 0, 0, 0, 0, 0, 'Lightning Construct - In Combat - Cast \'Chain Lightning\' (No Repeat) (Dungeon/Heroic)'),
+(27972, 0, 2, 0, 0, 0, 100, 515, 7000, 28000, 14000, 27000, 0, 0, 11, 52341, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Lightning Construct - On Just Died - Cast \'Electrical Overload\' (Dungeon/Normal)'),
+(27972, 0, 3, 0, 0, 0, 100, 517, 7000, 28000, 14000, 27000, 0, 0, 11, 59038, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Lightning Construct - On Just Died - Cast \'Electrical Overload\' (Dungeon/Heroic)');
diff --git a/data/sql/updates/db_world/2025_10_28_02.sql b/data/sql/updates/db_world/2025_10_28_02.sql
new file mode 100644
index 0000000000..0874f8cc55
--- /dev/null
+++ b/data/sql/updates/db_world/2025_10_28_02.sql
@@ -0,0 +1,5 @@
+-- DB update 2025_10_28_01 -> 2025_10_28_02
+--
+DELETE FROM `creature_template_addon` WHERE (`entry` = 30967);
+INSERT INTO `creature_template_addon` (`entry`, `path_id`, `mount`, `bytes1`, `bytes2`, `emote`, `visibilityDistanceType`, `auras`) VALUES
+(30967, 0, 0, 0, 0, 0, 0, '59143');
diff --git a/data/sql/updates/db_world/2025_10_28_03.sql b/data/sql/updates/db_world/2025_10_28_03.sql
new file mode 100644
index 0000000000..747748e7e3
--- /dev/null
+++ b/data/sql/updates/db_world/2025_10_28_03.sql
@@ -0,0 +1,5 @@
+-- DB update 2025_10_28_02 -> 2025_10_28_03
+--
+DELETE FROM `creature_template_addon` WHERE (`entry` = 30964);
+INSERT INTO `creature_template_addon` (`entry`, `path_id`, `mount`, `bytes1`, `bytes2`, `emote`, `visibilityDistanceType`, `auras`) VALUES
+(30964, 0, 0, 0, 0, 0, 0, '59140');
diff --git a/data/sql/updates/db_world/2025_10_28_04.sql b/data/sql/updates/db_world/2025_10_28_04.sql
new file mode 100644
index 0000000000..82fd9d0253
--- /dev/null
+++ b/data/sql/updates/db_world/2025_10_28_04.sql
@@ -0,0 +1,578 @@
+-- DB update 2025_10_28_03 -> 2025_10_28_04
+
+-- Set Waypoint (Goblin Racer)
+DELETE FROM `waypoints` WHERE (`entry` IN (425100, 425101, 425102));
+
+DELETE FROM `waypoint_data` WHERE (`id` IN (425100, 425101, 425102));
+INSERT INTO `waypoint_data` (`id`, `point`, `position_x`, `position_y`, `position_z`, `orientation`, `delay`, `move_type`, `action`, `action_chance`, `wpguid`) VALUES
+(425100, 1, -6225.51, -3941.11, -58.7498, NULL, 0, 0, 0, 100, 0),
+(425100, 2, -6236.21, -3935.4, -58.7498, NULL, 0, 0, 0, 100, 0),
+(425100, 3, -6247.18, -3931.45, -58.7498, NULL, 0, 0, 0, 100, 0),
+(425100, 4, -6258.18, -3927.22, -58.7498, NULL, 0, 0, 0, 100, 0),
+(425100, 5, -6269.23, -3923.11, -58.7547, NULL, 0, 0, 0, 100, 0),
+(425100, 6, -6279.39, -3918.62, -59.3734, NULL, 0, 0, 0, 100, 0),
+(425100, 7, -6282.4, -3913.51, -60.9864, NULL, 0, 0, 0, 100, 0),
+(425100, 8, -6281.27, -3907.82, -62.2515, NULL, 0, 0, 0, 100, 0),
+(425100, 9, -6275.9, -3905.8, -62.1365, NULL, 0, 0, 0, 100, 0),
+(425100, 10, -6263.77, -3905.9, -61.6845, NULL, 0, 0, 0, 100, 0),
+(425100, 11, -6253.39, -3906.03, -61.3059, NULL, 0, 0, 0, 100, 0),
+(425100, 12, -6239.63, -3906.45, -60.7614, NULL, 0, 0, 0, 100, 0),
+(425100, 13, -6225.17, -3906.85, -60.5172, NULL, 0, 0, 0, 100, 0),
+(425100, 14, -6210.59, -3906.98, -60.3689, NULL, 0, 0, 0, 100, 0),
+(425100, 15, -6199.5, -3906.93, -60.2643, NULL, 0, 0, 0, 100, 0),
+(425101, 1, -6191.34, -3907.16, -60.1596, NULL, 0, 1, 0, 100, 0),
+(425101, 2, -6182.71, -3907.32, -60.0754, NULL, 0, 1, 0, 100, 0),
+(425101, 3, -6173.72, -3907.54, -59.989, NULL, 0, 1, 0, 100, 0),
+(425101, 4, -6165.55, -3907.61, -59.9135, NULL, 0, 1, 0, 100, 0),
+(425101, 5, -6157.03, -3907.58, -59.8541, NULL, 0, 1, 0, 100, 0),
+(425101, 6, -6149.33, -3907.56, -59.869, NULL, 0, 1, 0, 100, 0),
+(425101, 7, -6141.87, -3907.27, -59.8809, NULL, 0, 1, 0, 100, 0),
+(425101, 8, -6134.19, -3906.66, -59.8966, NULL, 0, 1, 0, 100, 0),
+(425101, 9, -6126.41, -3906, -59.9151, NULL, 0, 1, 0, 100, 0),
+(425101, 10, -6118.21, -3904.83, -59.9276, NULL, 0, 1, 0, 100, 0),
+(425101, 11, -6109.64, -3903.1, -59.9142, NULL, 0, 1, 0, 100, 0),
+(425101, 12, -6101.99, -3900.99, -59.8983, NULL, 0, 1, 0, 100, 0),
+(425101, 13, -6094.14, -3898.34, -59.9102, NULL, 0, 1, 0, 100, 0),
+(425101, 14, -6086.04, -3895.35, -59.9533, NULL, 0, 1, 0, 100, 0),
+(425101, 15, -6078.54, -3892.43, -60.0029, NULL, 0, 1, 0, 100, 0),
+(425101, 16, -6071.29, -3889.5, -60.0037, NULL, 0, 1, 0, 100, 0),
+(425101, 17, -6064.36, -3886.7, -60.0814, NULL, 0, 1, 0, 100, 0),
+(425101, 18, -6056.71, -3883.55, -60.0903, NULL, 0, 1, 0, 100, 0),
+(425101, 19, -6048.43, -3880.06, -60.0819, NULL, 0, 1, 0, 100, 0),
+(425101, 20, -6041.12, -3876.97, -60.2107, NULL, 0, 1, 0, 100, 0),
+(425101, 21, -6033.99, -3873.77, -60.2425, NULL, 0, 1, 0, 100, 0),
+(425101, 22, -6026.41, -3870.14, -60.3019, NULL, 0, 1, 0, 100, 0),
+(425101, 23, -6018.84, -3866.51, -60.3987, NULL, 0, 1, 0, 100, 0),
+(425101, 24, -6010.52, -3862.53, -60.463, NULL, 0, 1, 0, 100, 0),
+(425101, 25, -6001.92, -3858.92, -60.4977, NULL, 0, 1, 0, 100, 0),
+(425101, 26, -5994, -3855.5, -60.537, NULL, 0, 1, 0, 100, 0),
+(425101, 27, -5986.28, -3852.17, -60.5544, NULL, 0, 1, 0, 100, 0),
+(425101, 28, -5977.79, -3848.58, -60.6569, NULL, 0, 1, 0, 100, 0),
+(425101, 29, -5969.48, -3845.51, -60.6788, NULL, 0, 1, 0, 100, 0),
+(425101, 30, -5961.47, -3842.31, -60.6862, NULL, 0, 1, 0, 100, 0),
+(425101, 31, -5953.81, -3838.1, -60.7637, NULL, 0, 1, 0, 100, 0),
+(425101, 32, -5946.88, -3833.78, -60.7016, NULL, 0, 1, 0, 100, 0),
+(425101, 33, -5939.37, -3828.83, -60.5285, NULL, 0, 1, 0, 100, 0),
+(425101, 34, -5932.05, -3824.73, -60.3301, NULL, 0, 1, 0, 100, 0),
+(425101, 35, -5924.41, -3820.69, -60.1505, NULL, 0, 1, 0, 100, 0),
+(425101, 36, -5916.7, -3816.31, -59.9721, NULL, 0, 1, 0, 100, 0),
+(425101, 37, -5908.94, -3811.77, -59.7802, NULL, 0, 1, 0, 100, 0),
+(425101, 38, -5901.17, -3807.78, -59.599, NULL, 0, 1, 0, 100, 0),
+(425101, 39, -5892.77, -3803.96, -59.7475, NULL, 0, 1, 0, 100, 0),
+(425101, 40, -5884.03, -3800.4, -59.9015, NULL, 0, 1, 0, 100, 0),
+(425101, 41, -5875.09, -3797.35, -59.7717, NULL, 0, 1, 0, 100, 0),
+(425101, 42, -5866.7, -3794.49, -59.9663, NULL, 0, 1, 0, 100, 0),
+(425101, 43, -5857.66, -3791.74, -60.0965, NULL, 0, 1, 0, 100, 0),
+(425101, 44, -5848.34, -3789.6, -60.2175, NULL, 0, 1, 0, 100, 0),
+(425101, 45, -5838.75, -3788.36, -60.7136, NULL, 0, 1, 0, 100, 0),
+(425101, 46, -5829.42, -3788.33, -61.4276, NULL, 0, 1, 0, 100, 0),
+(425101, 47, -5819.15, -3788.47, -61.2672, NULL, 0, 1, 0, 100, 0),
+(425101, 48, -5808.65, -3788.6, -61.2449, NULL, 0, 1, 0, 100, 0),
+(425101, 49, -5799.44, -3788.72, -61.4032, NULL, 0, 1, 0, 100, 0),
+(425101, 50, -5790.11, -3788.86, -61.5079, NULL, 0, 1, 0, 100, 0),
+(425101, 51, -5780.1, -3789.52, -61.7291, NULL, 0, 1, 0, 100, 0),
+(425101, 52, -5770.1, -3790.31, -61.6892, NULL, 0, 1, 0, 100, 0),
+(425101, 53, -5760.91, -3791.05, -61.4138, NULL, 0, 1, 0, 100, 0),
+(425101, 54, -5751.14, -3791.82, -61.2425, NULL, 0, 1, 0, 100, 0),
+(425101, 55, -5741.44, -3793.19, -60.7875, NULL, 0, 1, 0, 100, 0),
+(425101, 56, -5731.58, -3795.02, -60.5013, NULL, 0, 1, 0, 100, 0),
+(425101, 57, -5722.71, -3797.45, -60.7248, NULL, 0, 1, 0, 100, 0),
+(425101, 58, -5714.12, -3801.59, -60.7033, NULL, 0, 1, 0, 100, 0),
+(425101, 59, -5705.75, -3807.33, -61.276, NULL, 0, 1, 0, 100, 0),
+(425101, 60, -5698.13, -3813.49, -61.5311, NULL, 0, 1, 0, 100, 0),
+(425101, 61, -5690.2, -3821.38, -61.8514, NULL, 0, 1, 0, 100, 0),
+(425101, 62, -5683.57, -3828.12, -62.058, NULL, 0, 1, 0, 100, 0),
+(425101, 63, -5676.96, -3836.11, -62.4184, NULL, 0, 1, 0, 100, 0),
+(425101, 64, -5672.08, -3844.19, -62.5536, NULL, 0, 1, 0, 100, 0),
+(425101, 65, -5667.64, -3852.92, -62.3648, NULL, 0, 1, 0, 100, 0),
+(425101, 66, -5663.64, -3861.98, -62.1911, NULL, 0, 1, 0, 100, 0),
+(425101, 67, -5660.23, -3870.42, -62.0313, NULL, 0, 1, 0, 100, 0),
+(425101, 68, -5656.72, -3879.57, -61.9076, NULL, 0, 1, 0, 100, 0),
+(425101, 69, -5653.92, -3888.84, -61.8135, NULL, 0, 1, 0, 100, 0),
+(425101, 70, -5652.15, -3898.59, -61.7162, NULL, 0, 1, 0, 100, 0),
+(425101, 71, -5651.03, -3908.67, -61.5772, NULL, 0, 1, 0, 100, 0),
+(425101, 72, -5650.91, -3918.93, -61.4799, NULL, 0, 1, 0, 100, 0),
+(425101, 73, -5651.61, -3929.06, -61.3575, NULL, 0, 1, 0, 100, 0),
+(425101, 74, -5652.3, -3939.18, -61.2442, NULL, 0, 1, 0, 100, 0),
+(425101, 75, -5652.61, -3949.91, -61.1983, NULL, 0, 1, 0, 100, 0),
+(425101, 76, -5652.73, -3960.29, -61.1905, NULL, 0, 1, 0, 100, 0),
+(425101, 77, -5652.62, -3969.86, -61.1821, NULL, 0, 1, 0, 100, 0),
+(425101, 78, -5652.49, -3980, -61.1733, NULL, 0, 1, 0, 100, 0),
+(425101, 79, -5652.18, -3989.45, -61.1665, NULL, 0, 1, 0, 100, 0),
+(425101, 80, -5651.97, -3999, -61.1476, NULL, 0, 1, 0, 100, 0),
+(425101, 81, -5652.08, -4007.87, -61.1334, NULL, 0, 1, 0, 100, 0),
+(425101, 82, -5652.02, -4017.67, -61.138, NULL, 0, 1, 0, 100, 0),
+(425101, 83, -5651.95, -4027.7, -61.1301, NULL, 0, 1, 0, 100, 0),
+(425101, 84, -5651.95, -4037.85, -61.1205, NULL, 0, 1, 0, 100, 0),
+(425101, 85, -5652.04, -4048.35, -61.1178, NULL, 0, 1, 0, 100, 0),
+(425101, 86, -5652.13, -4058.26, -61.198, NULL, 0, 1, 0, 100, 0),
+(425101, 87, -5652.52, -4068.28, -61.2569, NULL, 0, 1, 0, 100, 0),
+(425101, 88, -5652.11, -4077.77, -61.325, NULL, 0, 1, 0, 100, 0),
+(425101, 89, -5651.96, -4088.15, -61.4121, NULL, 0, 1, 0, 100, 0),
+(425101, 90, -5652.17, -4098.18, -61.4581, NULL, 0, 1, 0, 100, 0),
+(425101, 91, -5654.03, -4107.79, -61.4934, NULL, 0, 1, 0, 100, 0),
+(425101, 92, -5657.23, -4117.03, -61.52, NULL, 0, 1, 0, 100, 0),
+(425101, 93, -5661.96, -4126.92, -61.5754, NULL, 0, 1, 0, 100, 0),
+(425101, 94, -5667.81, -4136.45, -61.6158, NULL, 0, 1, 0, 100, 0),
+(425101, 95, -5674.38, -4145.07, -61.4887, NULL, 0, 1, 0, 100, 0),
+(425101, 96, -5681.9, -4152.55, -61.1095, NULL, 0, 1, 0, 100, 0),
+(425101, 97, -5689.64, -4159.46, -60.7022, NULL, 0, 1, 0, 100, 0),
+(425101, 98, -5697.77, -4165.15, -60.3832, NULL, 0, 1, 0, 100, 0),
+(425101, 99, -5707.17, -4170.99, -60.7134, NULL, 0, 1, 0, 100, 0),
+(425101, 100, -5717.18, -4175.44, -60.9908, NULL, 0, 1, 0, 100, 0),
+(425101, 101, -5727.36, -4179.17, -61.2624, NULL, 0, 1, 0, 100, 0),
+(425101, 102, -5738.05, -4182.49, -61.3718, NULL, 0, 1, 0, 100, 0),
+(425101, 103, -5749.12, -4185.79, -61.4358, NULL, 0, 1, 0, 100, 0),
+(425101, 104, -5760.01, -4188.84, -61.4949, NULL, 0, 1, 0, 100, 0),
+(425101, 105, -5771, -4191.55, -61.5739, NULL, 0, 1, 0, 100, 0),
+(425101, 106, -5782.2, -4193.87, -61.4574, NULL, 0, 1, 0, 100, 0),
+(425101, 107, -5793.75, -4195.5, -61.2659, NULL, 0, 1, 0, 100, 0),
+(425101, 108, -5804.87, -4196.79, -61.4307, NULL, 0, 1, 0, 100, 0),
+(425101, 109, -5816.49, -4197.87, -61.7136, NULL, 0, 1, 0, 100, 0),
+(425101, 110, -5827.89, -4198.71, -61.9537, NULL, 0, 1, 0, 100, 0),
+(425101, 111, -5838.83, -4199.43, -62.2257, NULL, 0, 1, 0, 100, 0),
+(425101, 112, -5860.84, -4200.84, -62.6325, NULL, 0, 1, 0, 100, 0),
+(425101, 113, -5871.57, -4201.42, -62.6989, NULL, 0, 1, 0, 100, 0),
+(425101, 114, -5882.64, -4202.02, -62.7864, NULL, 0, 1, 0, 100, 0),
+(425101, 115, -5892.89, -4202.57, -62.8554, NULL, 0, 1, 0, 100, 0),
+(425101, 116, -5904.42, -4203.16, -62.9321, NULL, 0, 1, 0, 100, 0),
+(425101, 117, -5915.38, -4203.5, -62.8121, NULL, 0, 1, 0, 100, 0),
+(425101, 118, -5925.06, -4203.69, -62.6909, NULL, 0, 1, 0, 100, 0),
+(425101, 119, -5935.91, -4203.8, -62.5702, NULL, 0, 1, 0, 100, 0),
+(425101, 120, -5946.41, -4203.92, -62.4459, NULL, 0, 1, 0, 100, 0),
+(425101, 121, -5956.56, -4203.88, -62.3288, NULL, 0, 1, 0, 100, 0),
+(425101, 122, -5967.76, -4203.6, -62.2098, NULL, 0, 1, 0, 100, 0),
+(425101, 123, -5978.13, -4203.21, -62.2635, NULL, 0, 1, 0, 100, 0),
+(425101, 124, -5988.37, -4202.45, -62.3194, NULL, 0, 1, 0, 100, 0),
+(425101, 125, -5999.3, -4201.53, -62.3791, NULL, 0, 1, 0, 100, 0),
+(425101, 126, -6009.4, -4200.55, -62.4333, NULL, 0, 1, 0, 100, 0),
+(425101, 127, -6019.49, -4199.46, -62.5019, NULL, 0, 1, 0, 100, 0),
+(425101, 128, -6030.61, -4198.15, -62.561, NULL, 0, 1, 0, 100, 0),
+(425101, 129, -6041.04, -4196.91, -62.6382, NULL, 0, 1, 0, 100, 0),
+(425101, 130, -6051.82, -4195.7, -62.6637, NULL, 0, 1, 0, 100, 0),
+(425101, 131, -6061.92, -4194.74, -62.4942, NULL, 0, 1, 0, 100, 0),
+(425101, 132, -6072.04, -4193.86, -62.2556, NULL, 0, 1, 0, 100, 0),
+(425101, 133, -6082.05, -4193.19, -62.0819, NULL, 0, 1, 0, 100, 0),
+(425101, 134, -6090.91, -4192.73, -62.0193, NULL, 0, 1, 0, 100, 0),
+(425101, 135, -6101.39, -4192.19, -62.2437, NULL, 0, 1, 0, 100, 0),
+(425101, 136, -6111.76, -4191.65, -62.4711, NULL, 0, 1, 0, 100, 0),
+(425101, 137, -6121.08, -4191.3, -62.6608, NULL, 0, 1, 0, 100, 0),
+(425101, 138, -6132.16, -4191.27, -62.4196, NULL, 0, 1, 0, 100, 0),
+(425101, 139, -6142.66, -4191.63, -62.1792, NULL, 0, 1, 0, 100, 0),
+(425101, 140, -6152.66, -4192.38, -61.9736, NULL, 0, 1, 0, 100, 0),
+(425101, 141, -6163.01, -4193.25, -61.7382, NULL, 0, 1, 0, 100, 0),
+(425101, 142, -6173, -4194.25, -61.7186, NULL, 0, 1, 0, 100, 0),
+(425101, 143, -6183.19, -4195.51, -61.6798, NULL, 0, 1, 0, 100, 0),
+(425101, 144, -6194.04, -4197.1, -61.656, NULL, 0, 1, 0, 100, 0),
+(425101, 145, -6204.15, -4198.82, -61.6283, NULL, 0, 1, 0, 100, 0),
+(425101, 146, -6214.13, -4200.68, -61.5886, NULL, 0, 1, 0, 100, 0),
+(425101, 147, -6224.52, -4203.34, -61.6324, NULL, 0, 1, 0, 100, 0),
+(425101, 148, -6234.1, -4205.92, -61.6652, NULL, 0, 1, 0, 100, 0),
+(425101, 149, -6244.13, -4208.61, -61.7164, NULL, 0, 1, 0, 100, 0),
+(425101, 150, -6254.01, -4210.92, -61.7196, NULL, 0, 1, 0, 100, 0),
+(425101, 151, -6263.09, -4212.42, -61.6526, NULL, 0, 1, 0, 100, 0),
+(425101, 152, -6272.89, -4213.83, -61.57, NULL, 0, 1, 0, 100, 0),
+(425101, 153, -6283.78, -4215.15, -61.4885, NULL, 0, 1, 0, 100, 0),
+(425101, 154, -6293.67, -4215.9, -61.4038, NULL, 0, 1, 0, 100, 0),
+(425101, 155, -6302.76, -4215.79, -61.3312, NULL, 0, 1, 0, 100, 0),
+(425101, 156, -6312.99, -4214.93, -61.7428, NULL, 0, 1, 0, 100, 0),
+(425101, 157, -6323.21, -4213.14, -62.2589, NULL, 0, 1, 0, 100, 0),
+(425101, 158, -6332.36, -4211.33, -62.8202, NULL, 0, 1, 0, 100, 0),
+(425101, 159, -6340.83, -4209.17, -62.4751, NULL, 0, 1, 0, 100, 0),
+(425101, 160, -6348.46, -4205.71, -61.8554, NULL, 0, 1, 0, 100, 0),
+(425101, 161, -6356.22, -4200.75, -61.2628, NULL, 0, 1, 0, 100, 0),
+(425101, 162, -6363.98, -4194.96, -61.3468, NULL, 0, 1, 0, 100, 0),
+(425101, 163, -6371.92, -4188.64, -61.855, NULL, 0, 1, 0, 100, 0),
+(425101, 164, -6379.53, -4182.48, -62.2341, NULL, 0, 1, 0, 100, 0),
+(425101, 165, -6387.53, -4175.85, -62.655, NULL, 0, 1, 0, 100, 0),
+(425101, 166, -6394.59, -4168.89, -62.8009, NULL, 0, 1, 0, 100, 0),
+(425101, 167, -6400.52, -4161.42, -63.097, NULL, 0, 1, 0, 100, 0),
+(425101, 168, -6404.69, -4152.82, -63.3336, NULL, 0, 1, 0, 100, 0),
+(425101, 169, -6408.46, -4143.78, -63.5631, NULL, 0, 1, 0, 100, 0),
+(425101, 170, -6412.27, -4134.38, -63.8068, NULL, 0, 1, 0, 100, 0),
+(425101, 171, -6415.74, -4124.6, -63.6947, NULL, 0, 1, 0, 100, 0),
+(425101, 172, -6418.75, -4114.66, -63.841, NULL, 0, 1, 0, 100, 0),
+(425101, 173, -6421.09, -4104.91, -63.7418, NULL, 0, 1, 0, 100, 0),
+(425101, 174, -6423.35, -4094.54, -63.688, NULL, 0, 1, 0, 100, 0),
+(425101, 175, -6425.45, -4084.97, -63.5708, NULL, 0, 1, 0, 100, 0),
+(425101, 176, -6426.82, -4075.04, -63.2059, NULL, 0, 1, 0, 100, 0),
+(425101, 177, -6427.49, -4064.33, -63.4149, NULL, 0, 1, 0, 100, 0),
+(425101, 178, -6427.68, -4054.65, -63.3226, NULL, 0, 1, 0, 100, 0),
+(425101, 179, -6427.67, -4044.38, -63.2196, NULL, 0, 1, 0, 100, 0),
+(425101, 180, -6427.39, -4034.11, -63.1251, NULL, 0, 1, 0, 100, 0),
+(425101, 181, -6427.07, -4024.21, -63.0233, NULL, 0, 1, 0, 100, 0),
+(425101, 182, -6426.55, -4015.01, -62.9283, NULL, 0, 1, 0, 100, 0),
+(425101, 183, -6425.56, -4004.91, -62.8437, NULL, 0, 1, 0, 100, 0),
+(425101, 184, -6424.53, -3995.99, -62.8444, NULL, 0, 1, 0, 100, 0),
+(425101, 185, -6423.09, -3986.18, -62.8394, NULL, 0, 1, 0, 100, 0),
+(425101, 186, -6421.28, -3975.36, -62.8359, NULL, 0, 1, 0, 100, 0),
+(425101, 187, -6418.93, -3966.08, -62.8326, NULL, 0, 1, 0, 100, 0),
+(425101, 188, -6416.2, -3956.43, -62.8061, NULL, 0, 1, 0, 100, 0),
+(425101, 189, -6412.62, -3946.94, -62.6365, NULL, 0, 1, 0, 100, 0),
+(425101, 190, -6407.84, -3937.73, -62.266, NULL, 0, 1, 0, 100, 0),
+(425101, 191, -6401.56, -3927.91, -61.9102, NULL, 0, 1, 0, 100, 0),
+(425101, 192, -6395.28, -3919.51, -61.6526, NULL, 0, 1, 0, 100, 0),
+(425101, 193, -6387.85, -3911.94, -61.6891, NULL, 0, 1, 0, 100, 0),
+(425101, 194, -6379.98, -3906.36, -61.8822, NULL, 0, 1, 0, 100, 0),
+(425101, 195, -6371.86, -3902.53, -62.0803, NULL, 0, 1, 0, 100, 0),
+(425101, 196, -6362.79, -3900.35, -62.2368, NULL, 0, 1, 0, 100, 0),
+(425101, 197, -6352.99, -3898.99, -62.3269, NULL, 0, 1, 0, 100, 0),
+(425101, 198, -6343.68, -3899.36, -62.4514, NULL, 0, 1, 0, 100, 0),
+(425101, 199, -6333.33, -3900.22, -62.5877, NULL, 0, 1, 0, 100, 0),
+(425101, 200, -6322.52, -3901.13, -62.8141, NULL, 0, 1, 0, 100, 0),
+(425101, 201, -6311.36, -3902.06, -62.9706, NULL, 0, 1, 0, 100, 0),
+(425101, 202, -6300.37, -3902.95, -63.1136, NULL, 0, 1, 0, 100, 0),
+(425101, 203, -6289.89, -3903.6, -62.7118, NULL, 0, 1, 0, 100, 0),
+(425101, 204, -6280.23, -3904.21, -62.3654, NULL, 0, 1, 0, 100, 0),
+(425101, 205, -6270.45, -3904.84, -61.9714, NULL, 0, 1, 0, 100, 0),
+(425101, 206, -6261.94, -3905.18, -61.6432, NULL, 0, 1, 0, 100, 0),
+(425101, 207, -6253.55, -3905.48, -61.3237, NULL, 0, 1, 0, 100, 0),
+(425101, 208, -6244.92, -3905.8, -60.9986, NULL, 0, 1, 0, 100, 0),
+(425101, 209, -6236.54, -3906.1, -60.6798, NULL, 0, 1, 0, 100, 0),
+(425101, 210, -6227.33, -3906.44, -60.5224, NULL, 0, 1, 0, 100, 0),
+(425101, 211, -6218.47, -3906.77, -60.4412, NULL, 0, 1, 0, 100, 0),
+(425101, 212, -6210.65, -3907.06, -60.3711, NULL, 0, 1, 0, 100, 0),
+(425101, 213, -6199.5, -3906.93, -60.2643, NULL, 0, 1, 0, 100, 0),
+(425102, 1, -6188.01, -3907.96, -60.1272, NULL, 0, 1, 0, 100, 0),
+(425102, 2, -6177.6, -3906.84, -60.0201, NULL, 0, 1, 0, 100, 0),
+(425102, 3, -6168.58, -3905.66, -59.9351, NULL, 0, 1, 0, 100, 0),
+(425102, 4, -6157.99, -3907.73, -59.853, NULL, 0, 1, 0, 100, 0),
+(425102, 5, -6148.83, -3908.73, -59.8512, NULL, 0, 1, 0, 100, 0),
+(425102, 6, -6138.93, -3906.71, -59.8883, NULL, 0, 1, 0, 100, 0),
+(425102, 7, -6129.07, -3906.8, -59.9096, NULL, 0, 1, 0, 100, 0),
+(425102, 8, -6119.94, -3905.93, -59.9228, NULL, 0, 1, 0, 100, 0);
+
+-- Edit SmartAI (Goblin Racer)
+UPDATE `creature_template` SET `AIName` = 'SmartAI' WHERE `entry` = 4251;
+
+DELETE FROM `smart_scripts` WHERE (`source_type` = 0 AND `entryorguid` = 4251);
+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
+(4251, 0, 0, 0, 108, 1, 10, 512, 0, 0, 0, 0, 0, 0, 87, 425103, 425104, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Goblin Racer - On Point Any of Path Any Reached - Run Random Script (Phase 1)'),
+(4251, 0, 1, 0, 109, 1, 100, 512, 0, 425101, 0, 0, 0, 0, 80, 425102, 2, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Goblin Racer - On Path 425101 Finished - Run Script (Phase 1)');
+
+-- Edit Action List (Goblin Racer)
+DELETE FROM `smart_scripts` WHERE (`source_type` = 9) AND (`entryorguid` IN (425100, 425101, 425102, 425103, 425104));
+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
+(425100, 9, 0, 0, 0, 0, 100, 0, 0, 0, 0, 0, 0, 0, 48, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Goblin Racer - Actionlist - Set Active On'),
+(425100, 9, 1, 0, 0, 0, 100, 0, 0, 0, 0, 0, 0, 0, 232, 425100, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Goblin Racer - Actionlist - Start Path 425100'),
+(425101, 9, 0, 0, 0, 0, 100, 0, 0, 0, 0, 0, 0, 0, 22, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Goblin Racer - Actionlist - Set Event Phase 1'),
+(425101, 9, 1, 0, 0, 0, 100, 0, 0, 0, 0, 0, 0, 0, 232, 425101, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Goblin Racer - Actionlist - Start Path 425101'),
+(425102, 9, 0, 0, 0, 0, 100, 0, 0, 0, 0, 0, 0, 0, 45, 1, 1, 0, 0, 0, 0, 10, 21681, 4507, 0, 0, 0, 0, 0, 0, 'Goblin Racer - Actionlist - Set Data 1 1'),
+(425102, 9, 1, 0, 0, 0, 100, 0, 0, 0, 0, 0, 0, 0, 22, 2, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Goblin Racer - Actionlist - Set Event Phase 2'),
+(425102, 9, 2, 0, 0, 0, 100, 0, 0, 0, 0, 0, 0, 0, 86, 7035, 0, 10, 21681, 4507, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Goblin Racer - Actionlist - Cross Cast \'Goblin Racer Cheer\''),
+(425102, 9, 3, 0, 0, 0, 100, 0, 0, 0, 0, 0, 0, 0, 232, 425102, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Goblin Racer - Actionlist - Start Path 425102'),
+(425102, 9, 4, 0, 0, 0, 100, 0, 4000, 4000, 0, 0, 0, 0, 11, 60081, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Goblin Racer - Actionlist - Cast \'Cosmetic - Explosion\''),
+(425102, 9, 5, 0, 0, 0, 100, 0, 1000, 1000, 0, 0, 0, 0, 41, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Goblin Racer - Actionlist - Despawn Instant'),
+(425103, 9, 0, 0, 0, 0, 100, 0, 0, 0, 0, 0, 0, 0, 11, 6600, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Goblin Racer - Actionlist - Cast \'Salt Flats Racer Speed\''),
+(425104, 9, 0, 0, 0, 0, 100, 0, 0, 0, 0, 0, 0, 0, 11, 6601, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Goblin Racer - Actionlist - Cast \'Salt Flats Racer Slow\'');
+
+-- Set Waypoint (Gnome Racer)
+DELETE FROM `waypoints` WHERE (`entry` IN (425200, 425201, 425202));
+
+DELETE FROM `waypoint_data` WHERE (`id` IN (425200, 425201, 425202));
+INSERT INTO `waypoint_data` (`id`, `point`, `position_x`, `position_y`, `position_z`, `orientation`, `delay`, `move_type`, `action`, `action_chance`, `wpguid`) VALUES
+(425200, 1, -6213.07, -3849.85, -58.7497, NULL, 0, 0, 0, 100, 0),
+(425200, 2, -6213.32, -3859.06, -58.7497, NULL, 0, 0, 0, 100, 0),
+(425200, 3, -6215.83, -3866.94, -58.7497, NULL, 0, 0, 0, 100, 0),
+(425200, 4, -6221.18, -3875.85, -58.7497, NULL, 0, 0, 0, 100, 0),
+(425200, 5, -6230.55, -3880.74, -58.8272, NULL, 0, 0, 0, 100, 0),
+(425200, 6, -6240.48, -3881.41, -59.0274, NULL, 0, 0, 0, 100, 0),
+(425200, 7, -6253.07, -3881.06, -59.0491, NULL, 0, 0, 0, 100, 0),
+(425200, 8, -6261.79, -3882.39, -59.2914, NULL, 0, 0, 0, 100, 0),
+(425200, 9, -6268.24, -3885.55, -60.3912, NULL, 0, 0, 0, 100, 0),
+(425200, 10, -6271.64, -3890.09, -61.6989, NULL, 0, 0, 0, 100, 0),
+(425200, 11, -6271.71, -3895.41, -62.0288, NULL, 0, 0, 0, 100, 0),
+(425200, 12, -6266.81, -3897.27, -61.8543, NULL, 0, 0, 0, 100, 0),
+(425200, 13, -6256.8, -3897.43, -61.4237, NULL, 0, 0, 0, 100, 0),
+(425200, 14, -6245.13, -3897.58, -61.0156, NULL, 0, 0, 0, 100, 0),
+(425200, 15, -6231.72, -3897.77, -60.5649, NULL, 0, 0, 0, 100, 0),
+(425200, 16, -6217.37, -3897.85, -60.4397, NULL, 0, 0, 0, 100, 0),
+(425200, 17, -6207.68, -3897.86, -60.3485, NULL, 0, 0, 0, 100, 0),
+(425200, 18, -6200.45, -3897.66, -60.2832, NULL, 0, 0, 0, 100, 0),
+(425201, 1, -6191.13, -3897.99, -60.1547, NULL, 0, 1, 0, 100, 0),
+(425201, 2, -6183.44, -3898.16, -60.0868, NULL, 0, 1, 0, 100, 0),
+(425201, 3, -6174.8, -3898.45, -60.0056, NULL, 0, 1, 0, 100, 0),
+(425201, 4, -6165.49, -3898.95, -59.9097, NULL, 0, 1, 0, 100, 0),
+(425201, 5, -6156.97, -3899.07, -59.8555, NULL, 0, 1, 0, 100, 0),
+(425201, 6, -6148.45, -3898.89, -59.8717, NULL, 0, 1, 0, 100, 0),
+(425201, 7, -6140.53, -3898.68, -59.8844, NULL, 0, 1, 0, 100, 0),
+(425201, 8, -6132.61, -3898.29, -59.9057, NULL, 0, 1, 0, 100, 0),
+(425201, 9, -6124.03, -3897.38, -59.9139, NULL, 0, 1, 0, 100, 0),
+(425201, 10, -6115.28, -3895.98, -59.949, NULL, 0, 1, 0, 100, 0),
+(425201, 11, -6106.84, -3893.7, -59.9951, NULL, 0, 1, 0, 100, 0),
+(425201, 12, -6098.68, -3891.24, -60.0377, NULL, 0, 1, 0, 100, 0),
+(425201, 13, -6090.25, -3888.54, -60.0788, NULL, 0, 1, 0, 100, 0),
+(425201, 14, -6081.56, -3885.46, -60.1355, NULL, 0, 1, 0, 100, 0),
+(425201, 15, -6072.5, -3882.04, -60.1736, NULL, 0, 1, 0, 100, 0),
+(425201, 16, -6064.86, -3879.16, -60.2146, NULL, 0, 1, 0, 100, 0),
+(425201, 17, -6056.94, -3876.05, -60.2663, NULL, 0, 1, 0, 100, 0),
+(425201, 18, -6049.15, -3872.9, -60.2967, NULL, 0, 1, 0, 100, 0),
+(425201, 19, -6041.14, -3869.67, -60.3445, NULL, 0, 1, 0, 100, 0),
+(425201, 20, -6032.96, -3866.25, -60.3929, NULL, 0, 1, 0, 100, 0),
+(425201, 21, -6024.91, -3862.81, -60.4201, NULL, 0, 1, 0, 100, 0),
+(425201, 22, -6017.94, -3859.83, -60.4674, NULL, 0, 1, 0, 100, 0),
+(425201, 23, -6010.55, -3856.64, -60.5121, NULL, 0, 1, 0, 100, 0),
+(425201, 24, -6002.64, -3853.19, -60.5419, NULL, 0, 1, 0, 100, 0),
+(425201, 25, -5994.61, -3849.69, -60.5862, NULL, 0, 1, 0, 100, 0),
+(425201, 26, -5986.62, -3846.13, -60.6333, NULL, 0, 1, 0, 100, 0),
+(425201, 27, -5978.73, -3842.61, -60.6723, NULL, 0, 1, 0, 100, 0),
+(425201, 28, -5970.21, -3838.81, -60.7158, NULL, 0, 1, 0, 100, 0),
+(425201, 29, -5961.54, -3834.75, -60.7743, NULL, 0, 1, 0, 100, 0),
+(425201, 30, -5953.2, -3828.76, -60.6922, NULL, 0, 1, 0, 100, 0),
+(425201, 31, -5944.69, -3822.82, -60.4692, NULL, 0, 1, 0, 100, 0),
+(425201, 32, -5936.07, -3817.66, -60.2527, NULL, 0, 1, 0, 100, 0),
+(425201, 33, -5926.36, -3812.3, -60.0549, NULL, 0, 1, 0, 100, 0),
+(425201, 34, -5917.03, -3807.91, -59.7889, NULL, 0, 1, 0, 100, 0),
+(425201, 35, -5906.75, -3802.67, -59.591, NULL, 0, 1, 0, 100, 0),
+(425201, 36, -5895.76, -3797.51, -59.7463, NULL, 0, 1, 0, 100, 0),
+(425201, 37, -5886.58, -3793.77, -60.0257, NULL, 0, 1, 0, 100, 0),
+(425201, 38, -5876.67, -3790.31, -60.1595, NULL, 0, 1, 0, 100, 0),
+(425201, 39, -5866.79, -3786.6, -60.2363, NULL, 0, 1, 0, 100, 0),
+(425201, 40, -5856.81, -3782.17, -60.7624, NULL, 0, 1, 0, 100, 0),
+(425201, 41, -5847.81, -3780.26, -60.9771, NULL, 0, 1, 0, 100, 0),
+(425201, 42, -5838.69, -3777.91, -61.0963, NULL, 0, 1, 0, 100, 0),
+(425201, 43, -5828.99, -3776.57, -61.1453, NULL, 0, 1, 0, 100, 0),
+(425201, 44, -5817.79, -3776.7, -61.2493, NULL, 0, 1, 0, 100, 0),
+(425201, 45, -5808.22, -3776.95, -61.3142, NULL, 0, 1, 0, 100, 0),
+(425201, 46, -5799.27, -3777.61, -61.4031, NULL, 0, 1, 0, 100, 0),
+(425201, 47, -5788.73, -3778.89, -61.4787, NULL, 0, 1, 0, 100, 0),
+(425201, 48, -5779.45, -3779.9, -61.5685, NULL, 0, 1, 0, 100, 0),
+(425201, 49, -5770.86, -3781.42, -61.6462, NULL, 0, 1, 0, 100, 0),
+(425201, 50, -5761.83, -3783.77, -61.7109, NULL, 0, 1, 0, 100, 0),
+(425201, 51, -5752.74, -3785.92, -61.4701, NULL, 0, 1, 0, 100, 0),
+(425201, 52, -5744.52, -3787.46, -61.3502, NULL, 0, 1, 0, 100, 0),
+(425201, 53, -5735.69, -3789.1, -61.0581, NULL, 0, 1, 0, 100, 0),
+(425201, 54, -5727.33, -3792.11, -60.9136, NULL, 0, 1, 0, 100, 0),
+(425201, 55, -5718.91, -3797.02, -60.6031, NULL, 0, 1, 0, 100, 0),
+(425201, 56, -5711.88, -3802.96, -60.9495, NULL, 0, 1, 0, 100, 0),
+(425201, 57, -5704.67, -3810.75, -61.4076, NULL, 0, 1, 0, 100, 0),
+(425201, 58, -5698.32, -3818.22, -61.6877, NULL, 0, 1, 0, 100, 0),
+(425201, 59, -5692.7, -3825.67, -62.0049, NULL, 0, 1, 0, 100, 0),
+(425201, 60, -5687.31, -3833.29, -62.2746, NULL, 0, 1, 0, 100, 0),
+(425201, 61, -5683.05, -3839.84, -62.4105, NULL, 0, 1, 0, 100, 0),
+(425201, 62, -5679.18, -3846.37, -62.5762, NULL, 0, 1, 0, 100, 0),
+(425201, 63, -5675.19, -3854.28, -62.3824, NULL, 0, 1, 0, 100, 0),
+(425201, 64, -5671.32, -3862.26, -62.2226, NULL, 0, 1, 0, 100, 0),
+(425201, 65, -5667.59, -3870.17, -62.0706, NULL, 0, 1, 0, 100, 0),
+(425201, 66, -5664.63, -3877.78, -61.9482, NULL, 0, 1, 0, 100, 0),
+(425201, 67, -5662.53, -3886.03, -61.839, NULL, 0, 1, 0, 100, 0),
+(425201, 68, -5660.7, -3894.46, -61.7547, NULL, 0, 1, 0, 100, 0),
+(425201, 69, -5659.71, -3903.38, -61.622, NULL, 0, 1, 0, 100, 0),
+(425201, 70, -5659, -3912.57, -61.528, NULL, 0, 1, 0, 100, 0),
+(425201, 71, -5657.93, -3921.85, -61.4457, NULL, 0, 1, 0, 100, 0),
+(425201, 72, -5656.73, -3930.87, -61.3267, NULL, 0, 1, 0, 100, 0),
+(425201, 73, -5655.31, -3940.45, -61.2273, NULL, 0, 1, 0, 100, 0),
+(425201, 74, -5653.95, -3949.8, -61.1983, NULL, 0, 1, 0, 100, 0),
+(425201, 75, -5652.19, -3959.55, -61.191, NULL, 0, 1, 0, 100, 0),
+(425201, 76, -5650.45, -3968.72, -61.1827, NULL, 0, 1, 0, 100, 0),
+(425201, 77, -5648.88, -3977.56, -61.1758, NULL, 0, 1, 0, 100, 0),
+(425201, 78, -5645.48, -3987.04, -61.1671, NULL, 0, 1, 0, 100, 0),
+(425201, 79, -5643.65, -3995.95, -61.1594, NULL, 0, 1, 0, 100, 0),
+(425201, 80, -5642.07, -4005.56, -61.1477, NULL, 0, 1, 0, 100, 0),
+(425201, 81, -5640.9, -4015.18, -61.1393, NULL, 0, 1, 0, 100, 0),
+(425201, 82, -5640.18, -4024.48, -61.1313, NULL, 0, 1, 0, 100, 0),
+(425201, 83, -5639.49, -4033.56, -61.1239, NULL, 0, 1, 0, 100, 0),
+(425201, 84, -5638.75, -4043.8, -61.1163, NULL, 0, 1, 0, 100, 0),
+(425201, 85, -5638.62, -4052.55, -61.1497, NULL, 0, 1, 0, 100, 0),
+(425201, 86, -5638.78, -4061.89, -61.2196, NULL, 0, 1, 0, 100, 0),
+(425201, 87, -5640.51, -4072.33, -61.2885, NULL, 0, 1, 0, 100, 0),
+(425201, 88, -5643.95, -4082.94, -61.3682, NULL, 0, 1, 0, 100, 0),
+(425201, 89, -5647.96, -4091.97, -61.4318, NULL, 0, 1, 0, 100, 0),
+(425201, 90, -5652.74, -4099.73, -61.4644, NULL, 0, 1, 0, 100, 0),
+(425201, 91, -5658.15, -4108.15, -61.5069, NULL, 0, 1, 0, 100, 0),
+(425201, 92, -5663.05, -4116.77, -61.547, NULL, 0, 1, 0, 100, 0),
+(425201, 93, -5668.11, -4125.02, -61.5868, NULL, 0, 1, 0, 100, 0),
+(425201, 94, -5673.62, -4133.69, -61.6279, NULL, 0, 1, 0, 100, 0),
+(425201, 95, -5679.39, -4141.17, -61.5546, NULL, 0, 1, 0, 100, 0),
+(425201, 96, -5685.81, -4147.76, -61.2686, NULL, 0, 1, 0, 100, 0),
+(425201, 97, -5693.73, -4153.52, -60.805, NULL, 0, 1, 0, 100, 0),
+(425201, 98, -5702.2, -4158.68, -60.38, NULL, 0, 1, 0, 100, 0),
+(425201, 99, -5711.17, -4163.68, -60.5767, NULL, 0, 1, 0, 100, 0),
+(425201, 100, -5719.97, -4167.7, -60.7495, NULL, 0, 1, 0, 100, 0),
+(425201, 101, -5728.91, -4171.09, -60.9849, NULL, 0, 1, 0, 100, 0),
+(425201, 102, -5738.42, -4174.28, -61.3725, NULL, 0, 1, 0, 100, 0),
+(425201, 103, -5747.66, -4176.74, -61.4211, NULL, 0, 1, 0, 100, 0),
+(425201, 104, -5757.03, -4179.17, -61.4857, NULL, 0, 1, 0, 100, 0),
+(425201, 105, -5766.08, -4181.43, -61.5319, NULL, 0, 1, 0, 100, 0),
+(425201, 106, -5775.63, -4183.64, -61.523, NULL, 0, 1, 0, 100, 0),
+(425201, 107, -5785.16, -4185.34, -61.3824, NULL, 0, 1, 0, 100, 0),
+(425201, 108, -5794.63, -4186.67, -61.2606, NULL, 0, 1, 0, 100, 0),
+(425201, 109, -5804.93, -4187.97, -61.3876, NULL, 0, 1, 0, 100, 0),
+(425201, 110, -5814.68, -4188.93, -61.6206, NULL, 0, 1, 0, 100, 0),
+(425201, 111, -5824.68, -4189.75, -61.8774, NULL, 0, 1, 0, 100, 0),
+(425201, 112, -5833.86, -4190.43, -62.1073, NULL, 0, 1, 0, 100, 0),
+(425201, 113, -5842.48, -4191, -62.3082, NULL, 0, 1, 0, 100, 0),
+(425201, 114, -5851.21, -4191.57, -62.5253, NULL, 0, 1, 0, 100, 0),
+(425201, 115, -5861.32, -4192.4, -62.6363, NULL, 0, 1, 0, 100, 0),
+(425201, 116, -5871.21, -4193.24, -62.6999, NULL, 0, 1, 0, 100, 0),
+(425201, 117, -5880.64, -4193.85, -62.7766, NULL, 0, 1, 0, 100, 0),
+(425201, 118, -5889.84, -4194.21, -62.8327, NULL, 0, 1, 0, 100, 0),
+(425201, 119, -5898.47, -4194.51, -62.8894, NULL, 0, 1, 0, 100, 0),
+(425201, 120, -5907.67, -4194.83, -62.8819, NULL, 0, 1, 0, 100, 0),
+(425201, 121, -5916.77, -4195.14, -62.7659, NULL, 0, 1, 0, 100, 0),
+(425201, 122, -5926.44, -4195.48, -62.6792, NULL, 0, 1, 0, 100, 0),
+(425201, 123, -5936.36, -4195.62, -62.5624, NULL, 0, 1, 0, 100, 0),
+(425201, 124, -5945.7, -4195.7, -62.4532, NULL, 0, 1, 0, 100, 0),
+(425201, 125, -5955.38, -4195.71, -62.3407, NULL, 0, 1, 0, 100, 0),
+(425201, 126, -5965.41, -4195.57, -62.2259, NULL, 0, 1, 0, 100, 0),
+(425201, 127, -5975.91, -4195.54, -62.2551, NULL, 0, 1, 0, 100, 0),
+(425201, 128, -5986.3, -4195.46, -62.3111, NULL, 0, 1, 0, 100, 0),
+(425201, 129, -5996.9, -4195.03, -62.3646, NULL, 0, 1, 0, 100, 0),
+(425201, 130, -6006.44, -4194.28, -62.4284, NULL, 0, 1, 0, 100, 0),
+(425201, 131, -6015.97, -4193.45, -62.4367, NULL, 0, 1, 0, 100, 0),
+(425201, 132, -6025.38, -4192.59, -62.5398, NULL, 0, 1, 0, 100, 0),
+(425201, 133, -6034.45, -4191.69, -62.5892, NULL, 0, 1, 0, 100, 0),
+(425201, 134, -6043.49, -4190.67, -62.6533, NULL, 0, 1, 0, 100, 0),
+(425201, 135, -6053.09, -4189.39, -62.6578, NULL, 0, 1, 0, 100, 0),
+(425201, 136, -6063.16, -4188.11, -62.4733, NULL, 0, 1, 0, 100, 0),
+(425201, 137, -6072.55, -4187.03, -62.2856, NULL, 0, 1, 0, 100, 0),
+(425201, 138, -6082.19, -4186.11, -62.0776, NULL, 0, 1, 0, 100, 0),
+(425201, 139, -6092.67, -4185.46, -62.051, NULL, 0, 1, 0, 100, 0),
+(425201, 140, -6103.04, -4184.89, -62.2653, NULL, 0, 1, 0, 100, 0),
+(425201, 141, -6113.42, -4184.63, -62.4858, NULL, 0, 1, 0, 100, 0),
+(425201, 142, -6124.15, -4184.92, -62.6071, NULL, 0, 1, 0, 100, 0),
+(425201, 143, -6134.52, -4185.2, -62.3842, NULL, 0, 1, 0, 100, 0),
+(425201, 144, -6145.36, -4185.69, -62.1294, NULL, 0, 1, 0, 100, 0),
+(425201, 145, -6155.71, -4186.58, -61.9095, NULL, 0, 1, 0, 100, 0),
+(425201, 146, -6166.17, -4187.48, -61.7304, NULL, 0, 1, 0, 100, 0),
+(425201, 147, -6177.33, -4188.44, -61.696, NULL, 0, 1, 0, 100, 0),
+(425201, 148, -6185.81, -4189.2, -61.6767, NULL, 0, 1, 0, 100, 0),
+(425201, 149, -6195.39, -4190.63, -61.6506, NULL, 0, 1, 0, 100, 0),
+(425201, 150, -6205.03, -4192.38, -61.6175, NULL, 0, 1, 0, 100, 0),
+(425201, 151, -6214.78, -4194.21, -61.5961, NULL, 0, 1, 0, 100, 0),
+(425201, 152, -6224.48, -4196.3, -61.6135, NULL, 0, 1, 0, 100, 0),
+(425201, 153, -6233.62, -4198.14, -61.6568, NULL, 0, 1, 0, 100, 0),
+(425201, 154, -6242.89, -4199.97, -61.6911, NULL, 0, 1, 0, 100, 0),
+(425201, 155, -6252.97, -4201.97, -61.7273, NULL, 0, 1, 0, 100, 0),
+(425201, 156, -6262.82, -4203.9, -61.6297, NULL, 0, 1, 0, 100, 0),
+(425201, 157, -6273.05, -4205.66, -61.5693, NULL, 0, 1, 0, 100, 0),
+(425201, 158, -6282.99, -4206.99, -61.4881, NULL, 0, 1, 0, 100, 0),
+(425201, 159, -6294.46, -4208.37, -61.3831, NULL, 0, 1, 0, 100, 0),
+(425201, 160, -6304.92, -4209.25, -61.3155, NULL, 0, 1, 0, 100, 0),
+(425201, 161, -6316.44, -4210.08, -61.9332, NULL, 0, 1, 0, 100, 0),
+(425201, 162, -6328.2, -4210.85, -62.4794, NULL, 0, 1, 0, 100, 0),
+(425201, 163, -6338.91, -4211.56, -62.6251, NULL, 0, 1, 0, 100, 0),
+(425201, 164, -6348.49, -4210.64, -62.0232, NULL, 0, 1, 0, 100, 0),
+(425201, 165, -6356.92, -4207.3, -61.6654, NULL, 0, 1, 0, 100, 0),
+(425201, 166, -6364.13, -4202.14, -61.1157, NULL, 0, 1, 0, 100, 0),
+(425201, 167, -6371.33, -4196.2, -61.4884, NULL, 0, 1, 0, 100, 0),
+(425201, 168, -6378.78, -4189.83, -61.7792, NULL, 0, 1, 0, 100, 0),
+(425201, 169, -6385.96, -4183.68, -62.2433, NULL, 0, 1, 0, 100, 0),
+(425201, 170, -6393.2, -4176.92, -62.6041, NULL, 0, 1, 0, 100, 0),
+(425201, 171, -6399.35, -4170.36, -62.9947, NULL, 0, 1, 0, 100, 0),
+(425201, 172, -6404.76, -4162.21, -63.22, NULL, 0, 1, 0, 100, 0),
+(425201, 173, -6409.01, -4154.56, -63.3792, NULL, 0, 1, 0, 100, 0),
+(425201, 174, -6412.76, -4146.4, -63.5873, NULL, 0, 1, 0, 100, 0),
+(425201, 175, -6416.19, -4138.1, -63.8013, NULL, 0, 1, 0, 100, 0),
+(425201, 176, -6419.27, -4129.67, -64.0044, NULL, 0, 1, 0, 100, 0),
+(425201, 177, -6421.97, -4120.87, -64.0823, NULL, 0, 1, 0, 100, 0),
+(425201, 178, -6424.7, -4111.7, -63.9544, NULL, 0, 1, 0, 100, 0),
+(425201, 179, -6427.14, -4102.09, -63.8454, NULL, 0, 1, 0, 100, 0),
+(425201, 180, -6429.14, -4092.39, -63.739, NULL, 0, 1, 0, 100, 0),
+(425201, 181, -6430.8, -4082.72, -63.6193, NULL, 0, 1, 0, 100, 0),
+(425201, 182, -6431.55, -4072.96, -63.5013, NULL, 0, 1, 0, 100, 0),
+(425201, 183, -6431.81, -4063.41, -63.4091, NULL, 0, 1, 0, 100, 0),
+(425201, 184, -6432.07, -4053.72, -63.3199, NULL, 0, 1, 0, 100, 0),
+(425201, 185, -6432.12, -4044.15, -63.2197, NULL, 0, 1, 0, 100, 0),
+(425201, 186, -6432.02, -4034.24, -63.1279, NULL, 0, 1, 0, 100, 0),
+(425201, 187, -6431.8, -4023.63, -63.0207, NULL, 0, 1, 0, 100, 0),
+(425201, 188, -6431.49, -4013.71, -62.927, NULL, 0, 1, 0, 100, 0),
+(425201, 189, -6431.01, -4004.51, -62.8465, NULL, 0, 1, 0, 100, 0),
+(425201, 190, -6429.68, -3994.92, -62.8435, NULL, 0, 1, 0, 100, 0),
+(425201, 191, -6428, -3984.32, -62.8388, NULL, 0, 1, 0, 100, 0),
+(425201, 192, -6425.7, -3974.44, -62.8355, NULL, 0, 1, 0, 100, 0),
+(425201, 193, -6423.12, -3964.14, -62.8313, NULL, 0, 1, 0, 100, 0),
+(425201, 194, -6420.24, -3954.9, -62.8263, NULL, 0, 1, 0, 100, 0),
+(425201, 195, -6416.66, -3945.65, -62.6458, NULL, 0, 1, 0, 100, 0),
+(425201, 196, -6412.34, -3937.4, -62.5412, NULL, 0, 1, 0, 100, 0),
+(425201, 197, -6406.42, -3928.75, -62.1537, NULL, 0, 1, 0, 100, 0),
+(425201, 198, -6398.58, -3922.15, -61.7519, NULL, 0, 1, 0, 100, 0),
+(425201, 199, -6389.51, -3916.89, -61.5696, NULL, 0, 1, 0, 100, 0),
+(425201, 200, -6380.43, -3912.63, -61.7523, NULL, 0, 1, 0, 100, 0),
+(425201, 201, -6370.58, -3909.01, -61.9721, NULL, 0, 1, 0, 100, 0),
+(425201, 202, -6360.86, -3906.08, -62.2233, NULL, 0, 1, 0, 100, 0),
+(425201, 203, -6351.73, -3903.65, -62.3375, NULL, 0, 1, 0, 100, 0),
+(425201, 204, -6342.71, -3901.26, -62.4708, NULL, 0, 1, 0, 100, 0),
+(425201, 205, -6333.07, -3898.94, -62.5955, NULL, 0, 1, 0, 100, 0),
+(425201, 206, -6322.43, -3897.58, -62.822, NULL, 0, 1, 0, 100, 0),
+(425201, 207, -6312.65, -3897.02, -62.939, NULL, 0, 1, 0, 100, 0),
+(425201, 208, -6302.74, -3896.83, -63.0881, NULL, 0, 1, 0, 100, 0),
+(425201, 209, -6293.4, -3896.73, -62.8319, NULL, 0, 1, 0, 100, 0),
+(425201, 210, -6283.84, -3896.64, -62.4841, NULL, 0, 1, 0, 100, 0),
+(425201, 211, -6274.15, -3896.57, -62.109, NULL, 0, 1, 0, 100, 0),
+(425201, 212, -6263.76, -3896.5, -61.7205, NULL, 0, 1, 0, 100, 0),
+(425201, 213, -6253.84, -3896.48, -61.3577, NULL, 0, 1, 0, 100, 0),
+(425201, 214, -6243.23, -3896.49, -60.9442, NULL, 0, 1, 0, 100, 0),
+(425201, 215, -6233.32, -3896.47, -60.5944, NULL, 0, 1, 0, 100, 0),
+(425201, 216, -6222.59, -3896.66, -60.4868, NULL, 0, 1, 0, 100, 0),
+(425201, 217, -6213.38, -3896.88, -60.3687, NULL, 0, 1, 0, 100, 0),
+(425201, 218, -6200.45, -3897.66, -60.2832, NULL, 0, 1, 0, 100, 0),
+(425202, 1, -6190.65, -3896.22, -60.1529, NULL, 0, 1, 0, 100, 0),
+(425202, 2, -6180.66, -3896.07, -60.0595, NULL, 0, 1, 0, 100, 0),
+(425202, 3, -6171.55, -3897.96, -59.9696, NULL, 0, 1, 0, 100, 0),
+(425202, 4, -6161.52, -3896.79, -59.8741, NULL, 0, 1, 0, 100, 0),
+(425202, 5, -6151.06, -3897.01, -59.8661, NULL, 0, 1, 0, 100, 0),
+(425202, 6, -6141.54, -3898.68, -59.8809, NULL, 0, 1, 0, 100, 0),
+(425202, 7, -6132.44, -3897.03, -59.9045, NULL, 0, 1, 0, 100, 0),
+(425202, 8, -6117.72, -3893.62, -59.9211, NULL, 0, 1, 0, 100, 0);
+
+-- Edit SmartAI (Gnome Racer)
+UPDATE `creature_template` SET `AIName` = 'SmartAI' WHERE `entry` = 4252;
+
+DELETE FROM `smart_scripts` WHERE (`source_type` = 0 AND `entryorguid` = 4252);
+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
+(4252, 0, 0, 0, 40, 1, 10, 512, 0, 0, 0, 0, 0, 0, 87, 425203, 425204, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Gnome Racer - On Point Any of Path Any Reached - Run Random Script (Phase 1)'),
+(4252, 0, 1, 0, 109, 1, 100, 512, 0, 425201, 0, 0, 0, 0, 80, 425202, 2, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Gnome Racer - On Path 425201 Finished - Run Script (Phase 1)');
+
+-- Edit Action Lists (Gnome Racer)
+DELETE FROM `smart_scripts` WHERE (`source_type` = 9) AND (`entryorguid` IN (425200, 425201, 425202, 425203, 425204));
+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
+(425200, 9, 0, 0, 0, 0, 100, 0, 0, 0, 0, 0, 0, 0, 48, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Gnome Racer - Actionlist - Set Active On'),
+(425200, 9, 1, 0, 0, 0, 100, 0, 0, 0, 0, 0, 0, 0, 232, 425200, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Gnome Racer - Actionlist - Start Path 425200'),
+(425201, 9, 0, 0, 0, 0, 100, 0, 0, 0, 0, 0, 0, 0, 22, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Gnome Racer - Actionlist - Set Event Phase 1'),
+(425201, 9, 1, 0, 0, 0, 100, 0, 0, 0, 0, 0, 0, 0, 232, 425201, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Gnome Racer - Actionlist - Start Path 425201'),
+(425202, 9, 0, 0, 0, 0, 100, 0, 0, 0, 0, 0, 0, 0, 45, 1, 2, 0, 0, 0, 0, 10, 21681, 4507, 0, 0, 0, 0, 0, 0, 'Gnome Racer - Actionlist - Set Data 1 2'),
+(425202, 9, 1, 0, 0, 0, 100, 0, 0, 0, 0, 0, 0, 0, 22, 2, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Gnome Racer - Actionlist - Set Event Phase 2'),
+(425202, 9, 2, 0, 0, 0, 100, 0, 0, 0, 0, 0, 0, 0, 86, 7036, 0, 10, 21681, 4507, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Gnome Racer - Actionlist - Cross Cast \'Gnome Racer Cheer\''),
+(425202, 9, 3, 0, 0, 0, 100, 0, 0, 0, 0, 0, 0, 0, 232, 425202, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Gnome Racer - Actionlist - Start Path 425202'),
+(425202, 9, 4, 0, 0, 0, 100, 0, 4000, 4000, 0, 0, 0, 0, 11, 60081, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Gnome Racer - Actionlist - Cast \'Cosmetic - Explosion\''),
+(425202, 9, 5, 0, 0, 0, 100, 0, 1000, 1000, 0, 0, 0, 0, 41, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Gnome Racer - Actionlist - Despawn Instant'),
+(425203, 9, 0, 0, 0, 0, 100, 0, 0, 0, 0, 0, 0, 0, 11, 6600, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Gnome Racer - Actionlist - Cast \'Salt Flats Racer Speed\''),
+(425204, 9, 0, 0, 0, 0, 100, 0, 0, 0, 0, 0, 0, 0, 11, 6601, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Gnome Racer - Actionlist - Cast \'Salt Flats Racer Slow\'');
+
+-- Set Waypoint (Daisy)
+DELETE FROM `waypoints` WHERE (`entry` IN (450700));
+
+DELETE FROM `waypoint_data` WHERE (`id` IN (450700));
+INSERT INTO `waypoint_data` (`id`, `point`, `position_x`, `position_y`, `position_z`, `orientation`, `delay`, `move_type`, `action`, `action_chance`, `wpguid`) VALUES
+(450700, 1, -6181.54, -3901.89, -60.0522, NULL, 0, 0, 0, 100, 0),
+(450700, 2, -6181.91, -3906.66, -60.0592, NULL, 0, 0, 0, 100, 0),
+(450700, 3, -6182.58, -3912.22, -59.9758, NULL, 0, 0, 0, 100, 0),
+(450700, 4, -6182.4, -3917.94, -58.8287, NULL, 0, 0, 0, 100, 0);
+
+-- Edit SmartAI (Daisy)
+UPDATE `creature_template` SET `AIName` = 'SmartAI' WHERE `entry` = 4507;
+
+DELETE FROM `smart_scripts` WHERE (`source_type` = 0 AND `entryorguid` = 4507);
+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
+(4507, 0, 0, 0, 11, 0, 100, 512, 0, 0, 0, 0, 0, 0, 80, 450700, 2, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Daisy - On Respawn - Run Script'),
+(4507, 0, 1, 0, 38, 1, 100, 513, 1, 1, 0, 0, 0, 0, 22, 2, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Daisy - On Data Set 1 1 - Set Event Phase 2 (Phase 1) (No Repeat)'),
+(4507, 0, 2, 0, 38, 1, 100, 513, 1, 2, 0, 0, 0, 0, 22, 2, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Daisy - On Data Set 1 2 - Set Event Phase 2 (Phase 1) (No Repeat)'),
+(4507, 0, 3, 0, 66, 0, 100, 512, 2, 0, 0, 0, 0, 0, 80, 450701, 2, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Daisy - On Event Phase 2 Set - Run Script');
+
+-- Esit Action List (Daisy)
+DELETE FROM `smart_scripts` WHERE (`source_type` = 9) AND (`entryorguid` IN (450700, 450701));
+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
+(450700, 9, 0, 0, 0, 0, 100, 0, 30000, 90000, 0, 0, 0, 0, 48, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Daisy - Actionlist - Set Active On'),
+(450700, 9, 1, 0, 0, 0, 100, 0, 0, 0, 0, 0, 0, 0, 80, 425100, 2, 0, 0, 0, 0, 10, 21680, 4251, 0, 0, 0, 0, 0, 0, 'Daisy - Actionlist - Run Script'),
+(450700, 9, 2, 0, 0, 0, 100, 0, 0, 0, 0, 0, 0, 0, 80, 425200, 2, 0, 0, 0, 0, 10, 21682, 4252, 0, 0, 0, 0, 0, 0, 'Daisy - Actionlist - Run Script'),
+(450700, 9, 3, 0, 0, 0, 100, 0, 10000, 10000, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 10, 21549, 4419, 0, 0, 0, 0, 0, 0, 'Daisy - Actionlist - Say Line 0'),
+(450700, 9, 4, 0, 0, 0, 100, 0, 30000, 30000, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 10, 21145, 4620, 0, 0, 0, 0, 0, 0, 'Daisy - Actionlist - Say Line 0'),
+(450700, 9, 5, 0, 0, 0, 100, 0, 30000, 30000, 0, 0, 0, 0, 5, 36, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Daisy - Actionlist - Play Emote 36'),
+(450700, 9, 6, 0, 0, 0, 100, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 10, 21145, 4620, 0, 0, 0, 0, 0, 0, 'Daisy - Actionlist - Say Line 1'),
+(450700, 9, 7, 0, 0, 0, 100, 0, 0, 0, 0, 0, 0, 0, 80, 425101, 2, 0, 0, 0, 0, 10, 21680, 4251, 0, 0, 0, 0, 0, 0, 'Daisy - Actionlist - Run Script'),
+(450700, 9, 8, 0, 0, 0, 100, 0, 0, 0, 0, 0, 0, 0, 80, 425201, 2, 0, 0, 0, 0, 10, 21682, 4252, 0, 0, 0, 0, 0, 0, 'Daisy - Actionlist - Run Script'),
+(450700, 9, 9, 0, 0, 0, 100, 0, 0, 0, 0, 0, 0, 0, 22, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Daisy - Actionlist - Set Event Phase 1'),
+(450701, 9, 0, 0, 0, 0, 100, 0, 30000, 30000, 0, 0, 0, 0, 232, 450700, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Daisy - Actionlist - Start Path 450700'),
+(450701, 9, 1, 0, 0, 0, 100, 0, 8000, 8000, 0, 0, 0, 0, 66, 0, 0, 0, 0, 0, 0, 8, 0, 0, 0, 0, 0, 0, 0, 1.60989, 'Daisy - Actionlist - Set Orientation 1.60989'),
+(450701, 9, 2, 0, 0, 0, 100, 0, 600000, 600000, 0, 0, 0, 0, 41, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Daisy - Actionlist - Despawn Instant');
diff --git a/data/sql/updates/db_world/2025_10_28_05.sql b/data/sql/updates/db_world/2025_10_28_05.sql
new file mode 100644
index 0000000000..a843dd7058
--- /dev/null
+++ b/data/sql/updates/db_world/2025_10_28_05.sql
@@ -0,0 +1,13 @@
+-- DB update 2025_10_28_04 -> 2025_10_28_05
+--
+UPDATE `creature_template` SET `AIName` = 'SmartAI' WHERE `entry` = 27971;
+DELETE FROM `smart_scripts` WHERE (`source_type` = 0 AND `entryorguid` = 27971);
+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
+(27971, 0, 0, 0, 0, 0, 100, 2, 12000, 18000, 12000, 18000, 0, 0, 11, 51842, 0, 0, 0, 0, 0, 6, 0, 0, 0, 0, 0, 0, 0, 0, 'Unrelenting Construct - In Combat - Cast \'Charge\' (No Repeat) (Dungeon/Normal)'),
+(27971, 0, 1, 0, 0, 0, 100, 4, 12000, 18000, 12000, 18000, 0, 0, 11, 59040, 0, 0, 0, 0, 0, 6, 0, 0, 0, 0, 0, 0, 0, 0, 'Unrelenting Construct - In Combat - Cast \'Charge\' (No Repeat) (Dungeon/Heroic)'),
+(27971, 0, 2, 0, 0, 0, 100, 2, 4000, 7000, 9000, 16000, 0, 0, 11, 51491, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 'Unrelenting Construct - In Combat - Cast \'Unrelenting Strike\' (No Repeat) (Dungeon/Normal)'),
+(27971, 0, 3, 0, 0, 0, 100, 4, 4000, 7000, 9000, 16000, 0, 0, 11, 59039, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 'Unrelenting Construct - In Combat - Cast \'Unrelenting Strike\' (No Repeat) (Dungeon/Heroic)'),
+(27971, 0, 4, 6, 2, 0, 100, 515, 0, 25, 0, 0, 0, 0, 11, 51832, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Unrelenting Construct - Between 0-25% Health - Cast \'Short Circuit\' (No Repeat) (Dungeon)'),
+(27971, 0, 5, 6, 2, 0, 100, 517, 0, 25, 0, 0, 0, 0, 11, 61513, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Unrelenting Construct - Between 0-25% Health - Cast \'Short Circuit\' (No Repeat) (Dungeon)'),
+(27971, 0, 6, 7, 61, 0, 100, 0, 0, 0, 0, 0, 0, 0, 37, 3500, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Unrelenting Construct - Die from \'Short Circuit\' (Dungeon)'),
+(27971, 0, 7, 0, 61, 0, 100, 0, 0, 0, 0, 0, 0, 0, 8, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Unrelenting Construct - Set State Passive while waiting death (Dungeon)');
diff --git a/data/sql/updates/db_world/2025_10_29_00.sql b/data/sql/updates/db_world/2025_10_29_00.sql
new file mode 100644
index 0000000000..68a2ff5dd1
--- /dev/null
+++ b/data/sql/updates/db_world/2025_10_29_00.sql
@@ -0,0 +1,8 @@
+-- DB update 2025_10_28_05 -> 2025_10_29_00
+--
+UPDATE `creature_template` SET `AIName` = 'SmartAI' WHERE `entry` = 27969;
+DELETE FROM `smart_scripts` WHERE (`source_type` = 0 AND `entryorguid` = 27969);
+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
+(27969, 0, 0, 0, 0, 0, 100, 2, 3000, 6000, 16000, 21000, 0, 0, 11, 51493, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 'Dark Rune Giant - In Combat - Cast \'Stomp\' (No Repeat) (Dungeon)'),
+(27969, 0, 1, 0, 0, 0, 100, 4, 3000, 6000, 16000, 21000, 0, 0, 11, 59026, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 'Dark Rune Giant - In Combat - Cast \'Stomp\' (No Repeat) (Dungeon)'),
+(27969, 0, 2, 0, 0, 0, 100, 6, 14000, 24000, 28000, 35000, 0, 0, 11, 51494, 32, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Dark Rune Giant - In Combat - Cast \'Iron Fist\' (Dungeon)');
diff --git a/data/sql/updates/db_world/2025_10_29_01.sql b/data/sql/updates/db_world/2025_10_29_01.sql
new file mode 100644
index 0000000000..aad6d0124e
--- /dev/null
+++ b/data/sql/updates/db_world/2025_10_29_01.sql
@@ -0,0 +1,12 @@
+-- DB update 2025_10_29_00 -> 2025_10_29_01
+DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId`=15 AND `SourceGroup`=7866 AND `SourceEntry`=2;
+INSERT INTO `conditions` (`SourceTypeOrReferenceId`, `SourceGroup`, `SourceEntry`, `SourceId`, `ElseGroup`, `ConditionTypeOrReference`, `ConditionTarget`, `ConditionValue1`, `ConditionValue2`, `ConditionValue3`, `NegativeCondition`, `ErrorType`, `ErrorTextId`, `ScriptName`, `Comment`) VALUES
+(15, 7866, 2, 0, 0, 9, 0, 10098, 0, 0, 0, 0, 0, '', 'Show gossip option 2 if player has quest 10098'),
+(15, 7866, 2, 0, 0, 2, 0, 32888, 1, 0, 1, 0, 0, '', 'Show gossip option 2 if player does NOT have item 32888');
+
+UPDATE `creature_template` SET `AIName`='SmartAI', `ScriptName`='' WHERE `entry`=18933;
+
+DELETE FROM `smart_scripts` WHERE `entryorguid`=18933 AND `source_type`=0;
+INSERT INTO `smart_scripts` (`entryorguid`, `source_type`, `id`, `link`, `event_type`, `event_phase_mask`, `event_chance`, `event_flags`, `event_param1`, `event_param2`, `event_param3`, `event_param4`, `action_type`, `action_param1`, `action_param2`, `action_param3`, `action_param4`, `action_param5`, `action_param6`, `target_type`, `target_param1`, `target_param2`, `target_param3`, `target_x`, `target_y`, `target_z`, `target_o`, `comment`) VALUES
+(18933, 0, 0, 1, 62, 0, 100, 0, 7866, 2, 0, 0, 56, 32888, 1, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 'Isfar - On Gossip Option 2 Selected - Add Item The Relics of Terokk'),
+(18933, 0, 1, 0, 61, 0, 100, 0, 0, 0, 0, 0, 72, 0, 0, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 'Isfar - Link - Close Gossip');
diff --git a/data/sql/updates/db_world/2025_10_29_02.sql b/data/sql/updates/db_world/2025_10_29_02.sql
new file mode 100644
index 0000000000..df4773dfbb
--- /dev/null
+++ b/data/sql/updates/db_world/2025_10_29_02.sql
@@ -0,0 +1,14 @@
+-- DB update 2025_10_29_01 -> 2025_10_29_02
+--
+UPDATE `creature_template` SET `AIName` = 'SmartAI' WHERE `entry` = 28580;
+DELETE FROM `smart_scripts` WHERE (`source_type` = 0 AND `entryorguid` = 28580);
+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
+(28580, 0, 0, 0, 0, 0, 100, 2, 0, 0, 2300, 5000, 0, 0, 11, 16100, 64, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 'Hardened Steel Skycaller - In Combat - Cast \'Shoot\' (Normal Dungeon)'),
+(28580, 0, 1, 0, 0, 0, 100, 4, 0, 0, 2300, 5000, 0, 0, 11, 61515, 64, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 'Hardened Steel Skycaller - In Combat - Cast \'Shoot\' (Heroic Dungeon)'),
+(28580, 0, 2, 0, 0, 0, 100, 2, 9000, 12000, 15000, 20000, 0, 0, 11, 52754, 0, 0, 0, 0, 0, 5, 0, 0, 0, 0, 0, 0, 0, 0, 'Hardened Steel Skycaller - In Combat - Cast \'Impact Shot\' (Normal Dungeon)'),
+(28580, 0, 3, 0, 0, 0, 100, 2, 7000, 12000, 12000, 18000, 0, 0, 11, 52755, 0, 0, 0, 0, 0, 5, 0, 0, 0, 0, 0, 0, 0, 0, 'Hardened Steel Skycaller - In Combat - Cast \'Impact Multi-Shot\' (Normal Dungeon)'),
+(28580, 0, 4, 0, 0, 0, 100, 4, 9000, 12000, 15000, 20000, 0, 0, 11, 59148, 0, 0, 0, 0, 0, 5, 0, 0, 0, 0, 0, 0, 0, 0, 'Hardened Steel Skycaller - In Combat - Cast \'Impact Shot\' (Heroic Dungeon)'),
+(28580, 0, 5, 0, 0, 0, 100, 4, 7000, 12000, 12000, 18000, 0, 0, 11, 59147, 0, 0, 0, 0, 0, 5, 0, 0, 0, 0, 0, 0, 0, 0, 'Hardened Steel Skycaller - In Combat - Cast \'Impact Multi-Shot\' (Heroic Dungeon)'),
+(28580, 0, 6, 0, 9, 0, 100, 4, 0, 0, 6000, 9000, 0, 5, 11, 61507, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 'Hardened Steel Skycaller - Within 0-5 Range - Cast \'Disengage\' (Heroic Dungeon)'),
+(28580, 0, 7, 8, 9, 0, 100, 2, 5000, 8000, 5000, 8000, 0, 5, 122, 1000, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Hardened Steel Skycaller - Within 0-5 Range - Flee (Normal Dungeon)'),
+(28580, 0, 8, 0, 61, 0, 100, 0, 0, 0, 0, 0, 0, 0, 21, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Hardened Steel Skycaller - Within 0-0 Range - Disable Combat Movement (Normal Dungeon)');
diff --git a/data/sql/updates/db_world/2025_10_30_00.sql b/data/sql/updates/db_world/2025_10_30_00.sql
new file mode 100644
index 0000000000..8e05e424be
--- /dev/null
+++ b/data/sql/updates/db_world/2025_10_30_00.sql
@@ -0,0 +1,4 @@
+-- DB update 2025_10_29_02 -> 2025_10_30_00
+
+-- Adjusts events previously ordered from 0 wrongly
+UPDATE `smart_scripts` SET `event_param2` = `event_param2` +1 WHERE `event_type` =34 AND `event_param1` = 2 AND `entryorguid` IN (-158029, -158021, -158000, -148360, -148268, -139547 ,-139546, -139539, -139538, -139533, -139532);
diff --git a/data/sql/updates/db_world/2025_10_30_01.sql b/data/sql/updates/db_world/2025_10_30_01.sql
new file mode 100644
index 0000000000..7d821c9610
--- /dev/null
+++ b/data/sql/updates/db_world/2025_10_30_01.sql
@@ -0,0 +1,152 @@
+-- DB update 2025_10_30_00 -> 2025_10_30_01
+DELETE FROM `spelldifficulty_dbc` WHERE `ID` IN (50044,50774,50804,51153,51121,51110,51054,50785,61407,52774,52960,52961,52387,52237,52433,52429,51012,50988,51136,12167,15654,12734,50843,50810,50868,50761,50760,50752,50830,50831,50834,50840,50838,50895,50900,48261,48256,48136,48133,48130,48105,48140,48137,50234,50255,47579,15667,48294,48291,48529,48423,48380,42708,42669,42705,42729,42730,43667,43649,52445,52737,52771,52720,52722,52721,52696,52666,57725,52480,56855,56891,56926,55959,36176,34941,67774,68783,57058,56272,61693,57407,58459,58462,58463,58456,58455,58458,58457,60181,60182,31956,72395,72396,72397);
+INSERT INTO `spelldifficulty_dbc` (`ID`,`DifficultySpellID_1`,`DifficultySpellID_2`,`DifficultySpellID_3`,`DifficultySpellID_4`) VALUES
+-- Oculus
+(50044,50044,59213,0,0),
+-- Drakos
+(50774,50774,59370,0,0),
+-- Eregos
+(50804,50804,59381,0,0),
+(51153,51153,59382,0,0),
+-- Urom
+(51121,51121,59376,0,0),
+(51110,51110,59377,0,0),
+-- Varos
+(51054,51054,59371,0,0),
+(50785,50785,59372,0,0),
+(61407,61407,62136,0,0),
+
+-- Halls of Lightning
+-- Bjarngrimm
+(52774,52774,59160,0,0),
+-- Loken
+(52960,52960,59835,0,0),
+(52961,52961,59836,0,0),
+-- Volkhan
+(52387,52387,59528,0,0),
+(52237,52237,59529,0,0),
+(52433,52433,59530,0,0),
+(52429,52429,59527,0,0),
+
+-- Halls of Stone
+-- Brann
+(51012,51012,59868,0,0),
+(50988,50988,59870,0,0),
+(51136,51136,59867,0,0),
+(12167,12167,59863,0,0),
+(15654,15654,59864,0,0),
+(12734,12734,59865,0,0),
+-- Krystallus
+(50843,50843,59742,0,0),
+(50810,50810,61546,0,0),
+(50868,50868,58744,0,0),
+-- Maiden of Grief
+(50761,50761,59727,0,0),
+(50760,50760,59726,0,0),
+(50752,50752,59772,0,0),
+-- Sjonnir
+(50830,50830,59844,0,0),
+(50831,50831,59845,0,0),
+(50834,50834,59846,0,0),
+(50840,50840,59848,0,0),
+(50838,50838,59853,0,0),
+(50895,50895,59851,0,0),
+(50900,50900,59852,0,0),
+
+-- Utgarde Keep
+-- Palehoof
+(48261,48261,59268,0,0),
+(48256,48256,59267,0,0),
+(48136,48136,59272,0,0),
+(48133,48133,59271,0,0),
+(48130,48130,59264,0,0),
+(48105,48105,59263,0,0),
+(48140,48140,59273,0,0),
+(48137,48137,59265,0,0),
+-- Skadi
+(50234,50234,59330,0,0),
+(50255,50255,59331,0,0),
+(47579,47579,60020,0,0),
+-- Svala
+(15667,15667,59409,0,0),
+-- Ymiron
+(48294,48294,59301,0,0),
+(48291,48291,59300,0,0),
+(48529,48529,59305,0,0),
+(48423,48423,59304,0,0),
+(48380,48380,59320,0,0),
+-- Ingvar
+(42708,42708,59708,0,0),
+(42669,42669,59706,0,0),
+(42705,42705,59707,0,0),
+(42729,42729,59734,0,0),
+(42730,42730,59735,0,0),
+-- Keleseth
+(43667,43667,59389,0,0),
+-- Skarvald
+(43649,43649,59575,0,0),
+
+-- Culling of Stratholm
+(52445,52445,58822,0,0),
+-- Epoch Hunter
+(52737,52737,58829,0,0),
+(52771,52771,58830,0,0),
+-- Malganis
+(52720,52720,58852,0,0),
+(52722,52722,58850,0,0),
+(52721,52721,58849,0,0),
+-- Meathook
+(52696,52696,58823,0,0),
+(52666,52666,58824,0,0),
+-- Salramm
+(57725,57725,58827,0,0),
+(52480,52480,58825,0,0),
+
+-- Ahnkahet
+-- Jedoga
+(56855,56855,60030,0,0),
+(56891,56891,60032,0,0),
+(56926,56926,60029,0,0),
+-- Taldaram
+(55959,55959,59513,0,0),
+
+-- Trial of the Champio
+-- Argent Challenge
+(36176,36176,67289,0,0),
+(34941,34941,34942,0,0),
+-- Grand Champions
+(68783,68783,68784,0,0),
+
+-- Eye of Eternity
+(57058,57058,60073,0,0),
+-- Malygos
+(56272,56272,60072,0,0),
+(61693,61693,61694,0,0),
+(57407,57407,60936,0,0),
+
+-- Violet Hold
+(58459,58459,59256,0,0),
+(58462,58462,59257,0,0),
+(58463,58463,59258,0,0),
+(58456,58456,59248,0,0),
+(58455,58455,59245,0,0),
+(58458,58458,59253,0,0),
+(58457,58457,59251,0,0),
+(60181,60181,60204,0,0),
+(60182,60182,60205,0,0),
+
+-- Halls Of Reflection
+-- Falric
+(72395,72395,72390,0,0),
+(72396,72396,72391,0,0),
+(72397,72397,72393,0,0),
+
+-- Slave Pens
+-- Rokmar
+(31956,31956,38801,0,0);
+
+DELETE FROM `spell_script_names` WHERE `spell_id` IN (67774,67879,67886);
+INSERT INTO `spell_script_names` (`spell_id`,`ScriptName`) VALUES
+(67774, "spell_black_knight_ghoul_claw"),
+(67879, "spell_black_knight_ghoul_claw"),
+(67886, "spell_black_knight_ghoul_explode");
diff --git a/data/sql/updates/db_world/2025_10_31_00.sql b/data/sql/updates/db_world/2025_10_31_00.sql
new file mode 100644
index 0000000000..059af8383c
--- /dev/null
+++ b/data/sql/updates/db_world/2025_10_31_00.sql
@@ -0,0 +1,8 @@
+-- DB update 2025_10_30_01 -> 2025_10_31_00
+--
+UPDATE `creature_template` SET `AIName` = 'SmartAI' WHERE `entry` = 27966;
+DELETE FROM `smart_scripts` WHERE (`entryorguid` = 27966) 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
+(27966, 0, 0, 0, 0, 0, 100, 7, 6000, 14000, 20000, 23000, 0, 0, 11, 51507, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Dark Rune Controller - In Combat - Cast \'Summon Shardling\' (No Repeat) (Dungeon)'),
+(27966, 0, 1, 0, 0, 0, 100, 6, 5000, 10000, 17000, 25000, 0, 0, 11, 51503, 128, 0, 0, 0, 0, 6, 0, 0, 0, 0, 0, 0, 0, 0, 'Dark Rune Controller - In Combat - Cast \'Domination\' (Dungeon)'),
+(27966, 0, 2, 0, 16, 0, 100, 6, 51805, 15, 14000, 17000, 0, 0, 11, 51805, 0, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 0, 'Dark Rune Controller - On Friendly Unit Missing Buff \'Crystalline Growth\' - Cast \'Crystalline Growth\' (Dungeon)');
diff --git a/data/sql/updates/db_world/2025_10_31_01.sql b/data/sql/updates/db_world/2025_10_31_01.sql
new file mode 100644
index 0000000000..653911439a
--- /dev/null
+++ b/data/sql/updates/db_world/2025_10_31_01.sql
@@ -0,0 +1,4 @@
+-- DB update 2025_10_31_00 -> 2025_10_31_01
+
+-- Set Rooted
+UPDATE `creature_template_movement` SET `Rooted` = 1 WHERE (`CreatureId` = 16129);
diff --git a/data/sql/updates/db_world/2025_10_31_02.sql b/data/sql/updates/db_world/2025_10_31_02.sql
new file mode 100644
index 0000000000..bf10c217c2
--- /dev/null
+++ b/data/sql/updates/db_world/2025_10_31_02.sql
@@ -0,0 +1,208 @@
+-- DB update 2025_10_31_01 -> 2025_10_31_02
+-- | present in spelldifficulty.dbc | new ->
+DELETE FROM `spelldifficulty_dbc` WHERE `ID` IN (66809,70867,70877,70879,70994,71623,68186,69037,72224,70873,28783,28785,28732,28884,57374,28863,28883,57376,28882,28371,28374,29317,28157,28158,29998,28478,28479,29865,29204,29484,28741,54121,54123,29213,29212,41926,55543,28531,55697,28542,54529,28135,28167,64717,64776,61916,61890,61903,61911,64637,62274,62269,62054,61879,61869,61915,61887,64389,64422,64666,64375,64478,64496,64458,62584,62528,62623,64587,62437,62862,62861,62451,62240,62217,62310,62275,62283,62285,62325,62337,62664,62653,62654,62648,62649,62589,62598,62478,65123,63711,62680,62546,62717,62548,65722,62836,63356,63573,62030,63716,63347,63629,63821,63766,62166,62056,63818,63666,62997,66351,63387,64019,63689,64352,64348,64626,64016,63317,46763,63809,64758,62131,62577,62334,62335,62333,62315,62316,62331,62332,62327,62328,62321,62613,62411,63024,63018,65737,64203,64227,63795,64125,64159,58695,58960,58663,58666,64213,64216);
+INSERT INTO `spelldifficulty_dbc` (`ID`,`DifficultySpellID_1`,`DifficultySpellID_2`,`DifficultySpellID_3`,`DifficultySpellID_4`) VALUES
+-- Trial of the Crusader
+-- Anubarak
+(68186,68186,68515,68186,68515),
+
+-- ICC
+-- Lich King
+(69037,69037,74361,69037,74361),
+-- Valithria
+(72224,72224,72224,72480,72480),
+(70873,70873,70873,71941,71941),
+
+-- Naxxramas
+-- Anubrekhan
+(28783,28783,56090,0,0),
+(28785,28785,54021,0,0),
+-- Faerlina
+(28732,28732,54097,0,0),
+-- Horsemen
+(28884,28884,57467,0,0),
+(57374,57374,57464,0,0),
+(28863,28863,57463,0,0),
+(28883,28883,57466,0,0),
+(57376,57376,57465,0,0),
+(28882,28882,57369,0,0),
+-- Gluth
+(28371,28371,54427,0,0),
+(28374,28374,54426,0,0),
+-- Gothik
+(29317,29317,56405,0,0),
+-- Grobbulus
+(28157,28157,54364,0,0),
+(28158,28158,54362,0,0),
+-- Heigan
+(29998,29998,55011,0,0),
+-- Kelthuzad
+(28478,28478,55802,0,0),
+(28479,28479,55807,0,0),
+-- Loatheb
+(29865,29865,55053,0,0),
+(29204,29204,55052,0,0),
+-- Maexxna
+(29484,29484,54125,0,0),
+(28741,28741,54122,0,0),
+(54121,54121,28776,0,0),
+(54123,54123,54124,0,0),
+-- Noth
+(29213,29213,54835,0,0),
+(29212,29212,54814,0,0),
+-- Patchwerk
+(41926,41926,59192,0,0),
+-- Razuvious
+(55543,55543,29107,0,0),
+-- Sapphiron
+(28531,28531,55799,0,0),
+(55697,55697,55696,0,0),
+(28542,28542,55665,0,0),
+-- Thaddius
+(54529,54529,28134,0,0),
+(28135,28135,54528,0,0),
+(28167,28167,54531,0,0),
+
+-- Ulduar
+(64717,64717,65241,0,0),
+(64776,64776,65240,0,0),
+-- Assembly of Iron
+(61916,61916,63482,0,0),
+(61890,61890,63498,0,0),
+(61903,61903,63493,0,0),
+(61911,61911,63495,0,0),
+(64637,64637,61888,0,0),
+(62274,62274,63489,0,0),
+(62269,62269,63490,0,0),
+(62054,62054,63491,0,0),
+(61879,61879,63479,0,0),
+(61869,61869,63481,0,0),
+(61915,61915,63483,0,0),
+(61887,61887,63486,0,0),
+-- Auriaya
+(64389,64389,64678,0,0),
+(64422,64422,64688,0,0),
+(64666,64666,64374,0,0),
+(64375,64375,64667,0,0),
+(64478,64478,64669,0,0),
+(64496,64496,64674,0,0),
+(64458,64458,64676,0,0),
+-- Freya
+(62584,62584,64185,0,0),
+(62528,62528,62892,0,0),
+(62623,62623,62872,0,0),
+(64587,64587,64650,0,0),
+(62437,62437,62859,0,0),
+(62862,62862,62439,0,0),
+(62861,62861,62438,0,0),
+(62451,62451,62865,0,0),
+(62240,62240,64087,0,0),
+(62217,62217,62922,0,0),
+(62310,62310,62928,0,0),
+(62275,62275,62929,0,0),
+(62283,62283,62930,0,0),
+(62285,62285,62931,0,0),
+(62325,62325,62932,0,0),
+(62337,62337,62933,0,0),
+(62664,62664,64191,0,0),
+(62653,62653,62935,0,0),
+(62654,62654,62936,0,0),
+(62648,62648,62939,0,0),
+(62649,62649,62938,0,0),
+(62589,62589,63571,0,0),
+(62598,62598,62937,0,0),
+-- Hodir
+(62478,62478,63512,0,0),
+(65123,65123,65133,0,0),
+(63711,63711,65134,0,0),
+-- Ignis
+(62680,62680,63472,0,0),
+(62546,62546,63474,0,0),
+(62717,62717,63477,0,0),
+(62548,62548,63476,0,0),
+(65722,65722,65723,0,0),
+(62836,62836,63536,0,0),
+-- Kologarn
+(63356,63356,64003,0,0),
+(63573,63573,64006,0,0),
+(62030,62030,63980,0,0),
+(63716,63716,64005,0,0),
+(63347,63347,63977,0,0),
+(63629,63629,63979,0,0),
+(63821,63821,64001,0,0),
+(63766,63766,63983,0,0),
+(62166,62166,63981,0,0),
+(62056,62056,63985,0,0),
+(63818,63818,63978,0,0),
+-- Mimiron
+(63666,63666,65026,0,0),
+(62997,62997,64529,0,0),
+(66351,66351,63009,0,0),
+(63387,63387,64531,0,0),
+(64019,64019,64532,0,0),
+(63689,63689,64535,0,0),
+(64352,64352,64537,0,0),
+(64348,64348,64536,0,0),
+(64626,64626,65333,0,0),
+-- Razorscale
+(64016,64016,64023,0,0),
+(63317,63317,64021,0,0),
+(46763,46763,64062,0,0),
+(63809,63809,64696,0,0),
+(64758,64758,64759,0,0),
+-- Thorim
+(62131,62131,64390,0,0),
+(62577,62577,62603,0,0),
+(62334,62334,62442,0,0),
+(62335,62335,62443,0,0),
+(62333,62333,62441,0,0),
+(62315,62315,62415,0,0),
+(62316,62316,62417,0,0),
+(62331,62331,62418,0,0),
+(62332,62332,62420,0,0),
+(62327,62327,62445,0,0),
+(62328,62328,62446,0,0),
+(62321,62321,62529,0,0),
+(62613,62613,62614,0,0),
+(62411,62411,62413,0,0),
+-- XT
+(63024,63024,64234,0,0),
+(63018,63018,65121,0,0),
+(65737,65737,64193,0,0),
+(64203,64203,64235,0,0),
+(64227,64227,64236,0,0),
+-- Yoggsaron
+(63795,63795,65301,0,0),
+(64125,64125,64126,0,0),
+(64159,64159,64160,0,0),
+
+-- Vault of Archavon
+-- Archavon
+(58695,58695,60883,0,0),
+(58960,58960,60894,0,0),
+(58663,58663,60880,0,0),
+(58666,58666,60882,0,0),
+-- Emalon
+(64213,64213,64215,0,0),
+(64216,64216,65279,0,0);
+
+DELETE FROM `spell_script_names` WHERE `spell_id` IN (63716,64005,69159,70136,69161,70139,69163,70469,70135,70138,70468,70137,70140,70470,28157,54364,66351,63009);
+INSERT INTO `spell_script_names` (`spell_id`, `ScriptName`) VALUES
+(63716,"spell_kologarn_stone_shout_aura"),
+(64005,"spell_kologarn_stone_shout_aura"),
+(69159,"spell_festergut_gaseous_blight"),
+(70136,"spell_festergut_gaseous_blight"),
+(69161,"spell_festergut_gaseous_blight"),
+(70139,"spell_festergut_gaseous_blight"),
+(69163,"spell_festergut_gaseous_blight"),
+(70469,"spell_festergut_gaseous_blight"),
+(70135,"spell_festergut_gaseous_blight"),
+(70138,"spell_festergut_gaseous_blight"),
+(70468,"spell_festergut_gaseous_blight"),
+(70137,"spell_festergut_gaseous_blight"),
+(70140,"spell_festergut_gaseous_blight"),
+(70470,"spell_festergut_gaseous_blight"),
+(28157,"spell_grobbulus_slime_spray"),
+(54364,"spell_grobbulus_slime_spray"),
+(66351,"spell_ulduar_mimiron_mine_explosion"),
+(63009,"spell_ulduar_mimiron_mine_explosion");
diff --git a/data/sql/updates/db_world/2025_11_01_00.sql b/data/sql/updates/db_world/2025_11_01_00.sql
new file mode 100644
index 0000000000..127e69a405
--- /dev/null
+++ b/data/sql/updates/db_world/2025_11_01_00.sql
@@ -0,0 +1,3 @@
+-- DB update 2025_10_31_02 -> 2025_11_01_00
+--
+UPDATE `creature` SET `position_x` = 1262.0, `position_y` = -26.9, `position_z` = 33.5 WHERE `guid` = 126981;
diff --git a/data/sql/updates/db_world/2025_11_01_01.sql b/data/sql/updates/db_world/2025_11_01_01.sql
new file mode 100644
index 0000000000..3387103587
--- /dev/null
+++ b/data/sql/updates/db_world/2025_11_01_01.sql
@@ -0,0 +1,3 @@
+-- DB update 2025_11_01_00 -> 2025_11_01_01
+-- GO_TRIBUNAL_ACCESS_DOOR
+UPDATE `gameobject` SET `state` = 0 WHERE `id` = 191295 AND `map` = 599;
diff --git a/data/sql/updates/db_world/2025_11_01_02.sql b/data/sql/updates/db_world/2025_11_01_02.sql
new file mode 100644
index 0000000000..957fd75197
--- /dev/null
+++ b/data/sql/updates/db_world/2025_11_01_02.sql
@@ -0,0 +1,15 @@
+-- DB update 2025_11_01_01 -> 2025_11_01_02
+
+-- Spelldifficulty
+DELETE FROM `spelldifficulty_dbc` WHERE `ID` IN (50378);
+INSERT INTO `spelldifficulty_dbc` (`ID`,`DifficultySpellID_1`,`DifficultySpellID_2`,`DifficultySpellID_3`,`DifficultySpellID_4`) VALUES
+(50378, 50378, 59017, 0, 0);
+
+-- Scourge Reanimator (unholy frenzy on self / update client)
+UPDATE `creature_template` SET `AIName` = 'SmartAI' WHERE `entry` = 26626;
+
+DELETE FROM `smart_scripts` WHERE (`source_type` = 0 AND `entryorguid` = 26626);
+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
+(26626, 0, 0, 0, 0, 0, 100, 0, 2000, 5000, 6000, 8000, 0, 0, 11, 50378, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 'Scourge Reanimator - In Combat - Cast \'Frostbolt\''),
+(26626, 0, 1, 0, 0, 0, 100, 0, 7000, 10000, 15000, 15000, 0, 0, 11, 50379, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 'Scourge Reanimator - In Combat - Cast \'Cripple\''),
+(26626, 0, 2, 0, 0, 0, 100, 0, 2000, 10000, 18000, 24000, 0, 0, 11, 49805, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Scourge Reanimator - In Combat - Cast \'Unholy Frenzy\'');
diff --git a/data/sql/updates/db_world/2025_11_01_03.sql b/data/sql/updates/db_world/2025_11_01_03.sql
new file mode 100644
index 0000000000..3925544c9e
--- /dev/null
+++ b/data/sql/updates/db_world/2025_11_01_03.sql
@@ -0,0 +1,7 @@
+-- DB update 2025_11_01_02 -> 2025_11_01_03
+-- Stomp
+DELETE FROM `spelldifficulty_dbc` WHERE `ID` = 50868;
+INSERT INTO `spelldifficulty_dbc` (`ID`, `DifficultySpellID_1`, `DifficultySpellID_2`, `DifficultySpellID_3`, `DifficultySpellID_4`) VALUES (50868, 50868, 59744, 0, 0);
+-- Ground Spike : Heroic only
+DELETE FROM `spelldifficulty_dbc` WHERE `ID` = 59750;
+INSERT INTO `spelldifficulty_dbc` (`ID`, `DifficultySpellID_1`, `DifficultySpellID_2`, `DifficultySpellID_3`, `DifficultySpellID_4`) VALUES (59750, 59750, 59750, 0, 0);
diff --git a/data/sql/updates/db_world/2025_11_03_00.sql b/data/sql/updates/db_world/2025_11_03_00.sql
new file mode 100644
index 0000000000..76ea5c36ab
--- /dev/null
+++ b/data/sql/updates/db_world/2025_11_03_00.sql
@@ -0,0 +1,54 @@
+-- DB update 2025_11_01_03 -> 2025_11_03_00
+--
+DELETE FROM `spelldifficulty_dbc` WHERE `ID` IN (53618, 53616, 53617, 53602);
+INSERT INTO `spelldifficulty_dbc` (`ID`, `DifficultySpellID_1`, `DifficultySpellID_2`, `DifficultySpellID_3`, `DifficultySpellID_4`) VALUES
+(53618, 53618, 59350, 0, 0),
+(53616, 53616, 59360, 0, 0),
+(53617, 53617, 59359, 0, 0),
+(53602, 53602, 59349, 0, 0);
+
+DELETE FROM `creature_summon_groups` WHERE `summonerId` = 29120 AND `entry` = 22515;
+INSERT INTO `creature_summon_groups` (`summonerId`, `summonerType`, `groupId`, `entry`, `position_x`, `position_y`, `position_z`, `orientation`, `summonType`, `summonTime`, `Comment`) VALUES
+(29120, 0, 1, 22515, 549.622, 352.047, 240.8899, 3.45575, 8, 0, 'Anub''arak - Group 1 - World Trigger'),
+(29120, 0, 2, 22515, 478.739, 252.85, 250.544, 0.0523599, 8, 0, 'Anub''arak - Group 2 - World Trigger'),
+(29120, 0, 2, 22515, 621.319, 268.482, 250.544, 3.33358, 8, 0, 'Anub''arak - Group 2 - World Trigger'),
+(29120, 0, 2, 22515, 622.904, 252.945, 250.544, 3.12414, 8, 0, 'Anub''arak - Group 2 - World Trigger'),
+(29120, 0, 2, 22515, 478.149, 269.009, 250.544, 6.12611, 8, 0, 'Anub''arak - Group 2 - World Trigger'),
+(29120, 0, 2, 22515, 478.547, 297.045, 250.544, 5.79449, 8, 0, 'Anub''arak - Group 2 - World Trigger'),
+(29120, 0, 2, 22515, 478.291, 224.827, 250.235, 0.401426, 8, 0, 'Anub''arak - Group 2 - World Trigger'),
+(29120, 0, 2, 22515, 620.622, 298.263, 250.544, 3.7001, 8, 0, 'Anub''arak - Group 2 - World Trigger'),
+(29120, 0, 2, 22515, 620.704, 224.562, 250.232, 2.53073, 8, 0, 'Anub''arak - Group 2 - World Trigger');
+
+-- Position where Anub'ar Guardian and Anub'ar Venomancer run to after spawning
+SET @POS_X := 551.0095;
+SET @POS_Y := 274.026;
+SET @POS_Z := 223.89513;
+
+-- Update comments, spelldifficulty_dbc
+DELETE FROM `smart_scripts` WHERE (`source_type` = 0 AND `entryorguid` = 29216);
+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
+(29216, 0, 0, 0, 0, 0, 100, 0, 5000, 8000, 6000, 6000, 0, 0, 11, 53618, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 'Anub\'ar Guardian - In Combat - Cast \'Sunder Armor\''),
+(29216, 0, 1, 0, 0, 0, 100, 0, 2000, 3000, 8000, 8000, 0, 0, 11, 52532, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 'Anub\'ar Guardian - In Combat - Cast \'Strike\''),
+(29216, 0, 2, 0, 54, 0, 100, 0, 0, 0, 0, 0, 0, 0, 69, 0, 0, 1, 0, 0, 0, 8, 0, 0, 0, 0, @POS_X, @POS_Y, @POS_Z, 0, 'Anub\'ar Guardian - On Just Summoned - Move To Position');
+
+-- Update comments, spelldifficulty_dbc
+DELETE FROM `smart_scripts` WHERE (`source_type` = 0 AND `entryorguid` = 29217);
+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
+(29217, 0, 0, 0, 0, 0, 100, 0, 5000, 8000, 18000, 22000, 0, 0, 11, 53616, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 'Anub\'ar Venomancer - In Combat - Cast \'Poison Bolt Volley\''),
+(29217, 0, 1, 0, 0, 0, 100, 0, 2000, 3000, 7000, 7000, 0, 0, 11, 53617, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 'Anub\'ar Venomancer - In Combat - Cast \'Poison Bolt\''),
+(29217, 0, 2, 0, 54, 0, 100, 0, 0, 0, 0, 0, 0, 0, 69, 0, 0, 1, 0, 0, 0, 8, 0, 0, 0, 0, @POS_X, @POS_Y, @POS_Z, 0, 'Anub\'ar Venomancer - On Just Summoned - Move To Position');
+
+-- Update comments, bump jump range from 50 to 100 yards, spelldifficulty_dbc
+DELETE FROM `smart_scripts` WHERE (`source_type` = 0 AND `entryorguid` = 29213);
+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
+(29213, 0, 0, 0, 11, 0, 100, 0, 0, 0, 0, 0, 0, 0, 97, 20, 10, 1, 0, 0, 0, 21, 100, 0, 0, 0, 0, 0, 0, 0, 'Anub\'ar Darter - On Respawn - Jump To Pos'),
+(29213, 0, 1, 0, 0, 0, 100, 0, 4000, 5000, 7000, 7000, 0, 0, 11, 53602, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Anub\'ar Darter - In Combat - Cast \'Dart\'');
+
+-- Update comments, remove visual, bump jump range from 50 to 100 yards, spelldifficulty_dbc
+DELETE FROM `smart_scripts` WHERE (`entryorguid` = 29214) AND (`source_type` = 0);
+INSERT INTO `smart_scripts` (`entryorguid`, `source_type`, `id`, `link`, `event_type`, `event_phase_mask`, `event_chance`, `event_flags`, `event_param1`, `event_param2`, `event_param3`, `event_param4`, `event_param5`, `event_param6`, `action_type`, `action_param1`, `action_param2`, `action_param3`, `action_param4`, `action_param5`, `action_param6`, `target_type`, `target_param1`, `target_param2`, `target_param3`, `target_param4`, `target_x`, `target_y`, `target_z`, `target_o`, `comment`) VALUES
+(29214, 0, 0, 0, 11, 0, 100, 0, 0, 0, 0, 0, 0, 0, 97, 20, 10, 1, 0, 0, 0, 21, 100, 0, 0, 0, 0, 0, 0, 0, 'Anub\'ar Assassin - On Respawn - Jump To Pos'),
+(29214, 0, 1, 0, 67, 0, 100, 0, 5000, 5000, 5000, 5000, 0, 5, 11, 52540, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 'Anub\'ar Assassin - On Behind Target - Cast \'Backstab\''),
+(29214, 0, 2, 0, 0, 0, 100, 1, 3000, 3000, 0, 0, 0, 0, 28, 53611, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Anub\'ar Assassin - In Combat - Remove Aura \'Anub`ar Assasssin Visual Passive\' (No Repeat)');
+
+UPDATE `spell_script_names` SET `ScriptName`='spell_azjol_nerub_carrion_beetles' WHERE `spell_id`=53520 AND `ScriptName`='spell_azjol_nerub_carrion_beetels';
diff --git a/data/sql/updates/db_world/2025_11_03_01.sql b/data/sql/updates/db_world/2025_11_03_01.sql
new file mode 100644
index 0000000000..4b83f2b5f9
--- /dev/null
+++ b/data/sql/updates/db_world/2025_11_03_01.sql
@@ -0,0 +1,7 @@
+-- DB update 2025_11_03_00 -> 2025_11_03_01
+
+DELETE FROM `areatrigger_scripts` WHERE `entry` = 5338;
+
+DELETE FROM `areatrigger_teleport` WHERE `ID` = 5338;
+INSERT INTO `areatrigger_teleport` (`ID`, `Name`, `target_map`, `target_position_x`, `target_position_y`, `target_position_z`, `target_orientation`) VALUES
+(5338, 'Naxxanar Top -> Down', 571, 3733.68, 3563.25, 290.812, 3.66519);
diff --git a/data/sql/updates/db_world/2025_11_04_00.sql b/data/sql/updates/db_world/2025_11_04_00.sql
new file mode 100644
index 0000000000..1d10d9d6d9
--- /dev/null
+++ b/data/sql/updates/db_world/2025_11_04_00.sql
@@ -0,0 +1,106 @@
+-- DB update 2025_11_03_01 -> 2025_11_04_00
+-- fix appearances of newly added 'Winter Reveler's
+-- assign correct model to creature 15792 `Troll Male Winter Reveler` used by spell 26252 `Winter Reveler - Troll Male`
+UPDATE `creature_template_model` SET `CreatureDisplayID` = 18809, `VerifiedBuild` = 0 WHERE (`CreatureID` = 15792) AND (`Idx` = 0);
+
+-- assign costume auras
+DELETE FROM `creature_addon` WHERE (`guid` BETWEEN 66801 AND 66898);
+INSERT INTO `creature_addon` (`guid`, `path_id`, `mount`, `bytes1`, `bytes2`, `emote`, `visibilityDistanceType`, `auras`) VALUES
+(66801, 0, 0, 0, 1, 0, 0, '26247'), -- Orc Female
+(66802, 0, 0, 0, 1, 0, 0, '26248'), -- Orc Male
+(66803, 0, 0, 0, 1, 0, 0, '26247'), -- Orc Female
+(66804, 0, 0, 0, 1, 0, 0, '26248'), -- Orc Male
+(66805, 0, 0, 0, 1, 0, 0, '26239'), -- Human Male
+(66806, 0, 0, 0, 1, 0, 0, '26240'), -- Human Female
+(66807, 0, 0, 0, 1, 0, 0, '26239'), -- Human Male
+(66808, 0, 0, 0, 1, 0, 0, '26240'), -- Human Female
+(66809, 0, 0, 0, 1, 0, 0, '26251'), -- Troll Female
+(66810, 0, 0, 0, 1, 0, 0, '26252'), -- Troll Male
+(66811, 0, 0, 0, 1, 0, 0, '26249'), -- Tauren Female
+(66812, 0, 0, 0, 1, 0, 0, '26250'), -- Tauren Male
+(66813, 0, 0, 0, 1, 0, 0, '26241'), -- Dwarf Male
+(66814, 0, 0, 0, 1, 0, 0, '26242'), -- Dwarf Female
+(66815, 0, 0, 0, 1, 0, 0, '26253'), -- Undead Female
+(66816, 0, 0, 0, 1, 0, 0, '26254'), -- Undead Male
+(66817, 0, 0, 0, 1, 0, 0, '26243'), -- Goblin Female
+(66818, 0, 0, 0, 1, 0, 0, '26244'), -- Goblin Male
+(66819, 0, 0, 0, 1, 0, 0, '26249'), -- Tauren Female
+(66820, 0, 0, 0, 1, 0, 0, '26250'), -- Tauren Male
+(66821, 0, 0, 0, 1, 0, 0, '26249'), -- Tauren Female
+(66822, 0, 0, 0, 1, 0, 0, '26250'), -- Tauren Male
+(66823, 0, 0, 0, 1, 0, 0, '26239'), -- Human Male
+(66824, 0, 0, 0, 1, 0, 0, '26240'), -- Human Female
+(66825, 0, 0, 0, 1, 0, 0, '26245'), -- Night Elf Female
+(66826, 0, 0, 0, 1, 0, 0, '26246'), -- Night Elf Male
+(66827, 0, 0, 0, 1, 0, 0, '26249'), -- Tauren Female
+(66828, 0, 0, 0, 1, 0, 0, '26250'), -- Tauren Male
+(66829, 0, 0, 0, 1, 0, 0, '26249'), -- Tauren Female
+(66830, 0, 0, 0, 1, 0, 0, '26250'), -- Tauren Male
+(66831, 0, 0, 0, 1, 0, 0, '39860'), -- Blood Elf Female
+(66832, 0, 0, 0, 1, 0, 0, '39861'), -- Blood Elf Male
+(66833, 0, 0, 0, 1, 0, 0, '26243'), -- Goblin Female
+(66834, 0, 0, 0, 1, 0, 0, '26244'), -- Goblin Male
+(66835, 0, 0, 0, 1, 0, 0, '26245'), -- Night Elf Female
+(66836, 0, 0, 0, 1, 0, 0, '26246'), -- Night Elf Male
+(66837, 0, 0, 0, 1, 0, 0, '26247'), -- Orc Female
+(66838, 0, 0, 0, 1, 0, 0, '26248'), -- Orc Male
+(66839, 0, 0, 0, 1, 0, 0, '26245'), -- Night Elf Female
+(66840, 0, 0, 0, 1, 0, 0, '26246'), -- Night Elf Male
+(66841, 0, 0, 0, 1, 0, 0, '26245'), -- Night Elf Female
+(66842, 0, 0, 0, 1, 0, 0, '26246'), -- Night Elf Male
+(66843, 0, 0, 0, 1, 0, 0, '26245'), -- Night Elf Female
+(66844, 0, 0, 0, 1, 0, 0, '26246'), -- Night Elf Male
+(66845, 0, 0, 0, 1, 0, 0, '26243'), -- Goblin Female
+(66846, 0, 0, 0, 1, 0, 0, '26244'), -- Goblin Male
+(66847, 0, 0, 0, 1, 0, 0, '26247'), -- Orc Female
+(66848, 0, 0, 0, 1, 0, 0, '26248'), -- Orc Male
+(66849, 0, 0, 0, 1, 0, 0, '39858'), -- Draenei Female
+(66850, 0, 0, 0, 1, 0, 0, '39859'), -- Draenei Male
+(66851, 0, 0, 0, 1, 0, 0, '39860'), -- Blood Elf Female
+(66852, 0, 0, 0, 1, 0, 0, '39861'), -- Blood Elf Male
+(66853, 0, 0, 0, 1, 0, 0, '26247'), -- Orc Female
+(66854, 0, 0, 0, 1, 0, 0, '26248'), -- Orc Male
+(66855, 0, 0, 0, 1, 0, 0, '39860'), -- Blood Elf Female
+(66856, 0, 0, 0, 1, 0, 0, '39861'), -- Blood Elf Male
+(66857, 0, 0, 0, 1, 0, 0, '26247'), -- Orc Female
+(66858, 0, 0, 0, 1, 0, 0, '26248'), -- Orc Male
+(66859, 0, 0, 0, 1, 0, 0, '39858'), -- Draenei Female
+(66860, 0, 0, 0, 1, 0, 0, '39859'), -- Draenei Male
+(66861, 0, 0, 0, 1, 0, 0, '39858'), -- Draenei Female
+(66862, 0, 0, 0, 1, 0, 0, '39859'), -- Draenei Male
+(66863, 0, 0, 0, 1, 0, 0, '26241'), -- Dwarf Male
+(66864, 0, 0, 0, 1, 0, 0, '26242'), -- Dwarf Female
+(66865, 0, 0, 0, 1, 0, 0, '39860'), -- Blood Elf Female
+(66866, 0, 0, 0, 1, 0, 0, '39861'), -- Blood Elf Male
+(66867, 0, 0, 0, 1, 0, 0, '39860'), -- Blood Elf Female
+(66868, 0, 0, 0, 1, 0, 0, '39861'), -- Blood Elf Male
+(66869, 0, 0, 0, 1, 0, 0, '26239'), -- Human Male
+(66870, 0, 0, 0, 1, 0, 0, '26240'), -- Human Female
+(66871, 0, 0, 0, 1, 0, 0, '39858'), -- Draenei Female
+(66872, 0, 0, 0, 1, 0, 0, '39859'), -- Draenei Male
+(66873, 0, 0, 0, 1, 0, 0, '26253'), -- Undead Female
+(66874, 0, 0, 0, 1, 0, 0, '26254'), -- Undead Male
+(66875, 0, 0, 0, 1, 0, 0, '39876'), -- Gnome Female
+(66876, 0, 0, 0, 1, 0, 0, '39877'), -- Gnome Male
+(66877, 0, 0, 0, 1, 0, 0, '26245'), -- Night Elf Female
+(66878, 0, 0, 0, 1, 0, 0, '26246'), -- Night Elf Male
+(66879, 0, 0, 0, 1, 0, 0, '26251'), -- Troll Female
+(66880, 0, 0, 0, 1, 0, 0, '26252'), -- Troll Male
+(66881, 0, 0, 0, 1, 0, 0, '39858'), -- Draenei Female
+(66882, 0, 0, 0, 1, 0, 0, '39859'), -- Draenei Male
+(66883, 0, 0, 0, 1, 0, 0, '26247'), -- Orc Female
+(66884, 0, 0, 0, 1, 0, 0, '26248'), -- Orc Male
+(66885, 0, 0, 0, 1, 0, 0, '39858'), -- Draenei Female
+(66886, 0, 0, 0, 1, 0, 0, '39859'), -- Draenei Male
+(66887, 0, 0, 0, 1, 0, 0, '39860'), -- Blood Elf Female
+(66888, 0, 0, 0, 1, 0, 0, '39861'), -- Blood Elf Male
+(66889, 0, 0, 0, 1, 0, 0, '26243'), -- Goblin Female
+(66890, 0, 0, 0, 1, 0, 0, '26244'), -- Goblin Male
+(66891, 0, 0, 0, 1, 0, 0, '39860'), -- Blood Elf Female
+(66892, 0, 0, 0, 1, 0, 0, '39861'), -- Blood Elf Male
+(66893, 0, 0, 0, 1, 0, 0, '39860'), -- Blood Elf Female
+(66894, 0, 0, 0, 1, 0, 0, '39861'), -- Blood Elf Male
+(66895, 0, 0, 0, 1, 0, 0, '26239'), -- Human Male
+(66896, 0, 0, 0, 1, 0, 0, '26240'), -- Human Female
+(66897, 0, 0, 0, 1, 0, 0, '39860'), -- Blood Elf Female
+(66898, 0, 0, 0, 1, 0, 0, '39861'); -- Blood Elf Male
diff --git a/data/sql/updates/db_world/2025_11_04_01.sql b/data/sql/updates/db_world/2025_11_04_01.sql
new file mode 100644
index 0000000000..8780751f3e
--- /dev/null
+++ b/data/sql/updates/db_world/2025_11_04_01.sql
@@ -0,0 +1,3 @@
+-- DB update 2025_11_04_00 -> 2025_11_04_01
+-- fix z position of some 195164 'Pumpkin' spawns
+UPDATE `gameobject` SET `position_z` = (`position_z` + 0.7), `VerifiedBuild` = 0 WHERE (`id` = 195164) AND (`guid` IN (18978, 18979, 18980, 18981, 18982, 18983, 18984, 18985, 18986, 18987, 19018, 19019, 19020, 19021, 19022, 19023, 19024, 19025, 19026, 19027, 19115, 19116, 19117, 19118, 19119, 19120, 19121, 19122, 19123, 19124, 19151, 19152, 19153, 19154, 19155, 19156, 19157, 19158, 19159, 19160, 19304, 19305, 19306, 19307, 19308, 19309, 19310, 19311, 19312, 19313));
diff --git a/data/sql/updates/db_world/2025_11_05_00.sql b/data/sql/updates/db_world/2025_11_05_00.sql
new file mode 100644
index 0000000000..4d72a4a4c7
--- /dev/null
+++ b/data/sql/updates/db_world/2025_11_05_00.sql
@@ -0,0 +1,183 @@
+-- DB update 2025_11_04_01 -> 2025_11_05_00
+
+-- Change Spawn Point
+UPDATE `creature` SET `position_x` = 532.0706, `position_y` = 1473.9459, `position_z` = 109.76107, `orientation` = 5.4972 WHERE (`id1` = 6497) AND (`guid` IN (44738));
+
+-- Delete old waypoint and create a new one in waypoint_data (sniffed wp)
+DELETE FROM `waypoints` WHERE (`entry` IN (6497));
+DELETE FROM `waypoint_data` WHERE `id` = 649700;
+INSERT INTO `waypoint_data` (`id`, `point`, `position_x`, `position_y`, `position_z`, `orientation`, `delay`, `move_type`, `action`, `action_chance`, `wpguid`) VALUES
+(649700, 1, 550.32355, 1453.3601, 102.83995, NULL, 0, 0, 0, 100, 0),
+(649700, 2, 560.8089, 1444.4222, 100.17067, NULL, 0, 0, 0, 100, 0),
+(649700, 3, 579.13367, 1414.7158, 95.58017, NULL, 0, 0, 0, 100, 0),
+(649700, 4, 593.57294, 1391.2076, 90.5457, NULL, 0, 0, 0, 100, 0),
+(649700, 5, 605.4873, 1365.1119, 86.89633, NULL, 0, 0, 0, 100, 0),
+(649700, 6, 615.50714, 1349.1395, 85.748085, NULL, 0, 0, 0, 100, 0),
+(649700, 7, 633.94946, 1310.1539, 84.25693, NULL, 0, 0, 0, 100, 0),
+(649700, 8, 643.6682, 1301.1842, 85.17119, NULL, 0, 0, 0, 100, 0),
+(649700, 9, 661.93774, 1305.103, 83.19177, NULL, 0, 0, 0, 100, 0),
+(649700, 10, 679.4544, 1316.6484, 81.121284, NULL, 0, 0, 0, 100, 0),
+(649700, 11, 701.6529, 1333.9889, 77.97731, NULL, 0, 0, 0, 100, 0),
+(649700, 12, 716.3771, 1350.1677, 76.052864, NULL, 0, 0, 0, 100, 0),
+(649700, 13, 735.5919, 1359.9868, 74.7311, NULL, 0, 0, 0, 100, 0),
+(649700, 14, 759.6556, 1362.045, 71.884674, NULL, 0, 0, 0, 100, 0),
+(649700, 15, 788.24805, 1362.3418, 67.00611, NULL, 0, 0, 0, 100, 0),
+(649700, 16, 817.2476, 1361.4927, 60.508972, NULL, 0, 0, 0, 100, 0),
+(649700, 17, 838.4114, 1360.8605, 56.570217, NULL, 0, 0, 0, 100, 0),
+(649700, 18, 866.9464, 1361.3516, 51.768867, NULL, 0, 0, 0, 100, 0),
+(649700, 19, 888.2806, 1355.868, 48.78437, NULL, 0, 0, 0, 100, 0),
+(649700, 20, 917.56415, 1347.1743, 45.49018, NULL, 0, 0, 0, 100, 0),
+(649700, 21, 942.1607, 1334.9868, 45.564545, NULL, 0, 0, 0, 100, 0),
+(649700, 22, 976.56726, 1310.7413, 46.00013, NULL, 0, 0, 0, 100, 0),
+(649700, 23, 1005.0521, 1289.1754, 45.481735, NULL, 0, 0, 0, 100, 0),
+(649700, 24, 1033.7482, 1272.1211, 46.23719, NULL, 0, 0, 0, 100, 0),
+(649700, 25, 1055.1008, 1253.4108, 45.855003, NULL, 0, 0, 0, 100, 0),
+(649700, 26, 1080.6647, 1228.3652, 45.75068, NULL, 0, 0, 0, 100, 0),
+(649700, 27, 1106.6715, 1205.8969, 46.48162, NULL, 0, 0, 0, 100, 0),
+(649700, 28, 1126.8285, 1195.9891, 47.394684, NULL, 0, 0, 0, 100, 0),
+(649700, 29, 1154.6526, 1177.5419, 48.430305, NULL, 0, 0, 0, 100, 0),
+(649700, 30, 1187.787, 1155.515, 46.71021, NULL, 0, 0, 0, 100, 0),
+(649700, 31, 1214.3774, 1137.9454, 47.540554, NULL, 0, 0, 0, 100, 0),
+(649700, 32, 1245.4918, 1111.4078, 50.944595, NULL, 0, 0, 0, 100, 0),
+(649700, 33, 1259.9783, 1096.3925, 52.763363, NULL, 0, 0, 0, 100, 0),
+(649700, 34, 1281.7661, 1077.2633, 54.107376, NULL, 0, 0, 0, 100, 0),
+(649700, 35, 1305.2642, 1048.9967, 54.54281, NULL, 0, 0, 0, 100, 0),
+(649700, 36, 1318.6704, 1023.2604, 54.663284, NULL, 0, 0, 0, 100, 0),
+(649700, 37, 1332.5304, 990.83575, 54.651577, NULL, 0, 0, 0, 100, 0),
+(649700, 38, 1339.3923, 960.9286, 54.73848, NULL, 0, 0, 0, 100, 0),
+(649700, 39, 1345.629, 924.2967, 53.814915, NULL, 0, 0, 0, 100, 0),
+(649700, 40, 1357.6875, 883.0408, 52.67861, NULL, 0, 0, 0, 100, 0),
+(649700, 41, 1374.4548, 840.12335, 50.35277, NULL, 0, 0, 0, 100, 0),
+(649700, 42, 1390.0712, 800.3881, 48.731716, NULL, 0, 0, 0, 100, 0),
+(649700, 43, 1407.2906, 766.57434, 46.998886, NULL, 0, 0, 0, 100, 0),
+(649700, 44, 1421.0477, 732.81036, 45.700684, NULL, 0, 0, 0, 100, 0),
+(649700, 45, 1438.3928, 700.6654, 44.742863, NULL, 0, 0, 0, 100, 0),
+(649700, 46, 1462.6694, 666.44934, 46.350983, NULL, 0, 0, 0, 100, 0),
+(649700, 47, 1493.479, 632.8775, 46.6881, NULL, 0, 0, 0, 100, 0),
+(649700, 48, 1527.412, 601.90704, 46.683678, NULL, 0, 0, 0, 100, 0),
+(649700, 49, 1569.2615, 578.867, 41.605648, NULL, 0, 0, 0, 100, 0),
+(649700, 50, 1599.7749, 566.5255, 37.452827, NULL, 0, 0, 0, 100, 0),
+(649700, 51, 1633.1173, 557.6922, 33.72048, NULL, 0, 0, 0, 100, 0),
+(649700, 52, 1666.5055, 548.7752, 33.39571, NULL, 0, 0, 0, 100, 0),
+(649700, 53, 1699.4762, 543.5129, 33.418396, NULL, 0, 0, 0, 100, 0),
+(649700, 54, 1733.0693, 534.8109, 33.39686, NULL, 0, 0, 0, 100, 0),
+(649700, 55, 1766.3834, 526.622, 33.396313, NULL, 0, 0, 0, 100, 0),
+(649700, 56, 1799.5571, 518.5047, 33.451973, NULL, 0, 0, 0, 100, 0),
+(649700, 57, 1833.5399, 506.51108, 34.09343, NULL, 0, 0, 0, 100, 0),
+(649700, 58, 1846.7709, 500.30872, 34.65273, NULL, 0, 0, 0, 100, 0),
+(649700, 59, 1866.7739, 482.8489, 34.661674, NULL, 0, 0, 0, 100, 0),
+(649700, 60, 1876.65, 467.884, 34.267147, NULL, 0, 0, 0, 100, 0),
+(649700, 61, 1890.4196, 433.71887, 33.8925, NULL, 0, 0, 0, 100, 0),
+(649700, 62, 1899.9106, 400.08536, 34.257324, NULL, 0, 0, 0, 100, 0),
+(649700, 63, 1911.1168, 366.9929, 33.98939, NULL, 0, 0, 0, 100, 0),
+(649700, 64, 1929.4626, 333.79535, 35.294994, NULL, 0, 0, 0, 100, 0),
+(649700, 65, 1946.6372, 299.84537, 38.30006, NULL, 0, 0, 0, 100, 0),
+(649700, 66, 1967.2408, 265.27518, 37.96951, NULL, 0, 0, 0, 100, 0),
+(649700, 67, 1984.9171, 233.64508, 36.106697, NULL, 0, 0, 0, 100, 0),
+(649700, 68, 2000.3663, 214.46593, 34.19722, NULL, 0, 0, 0, 100, 0),
+(649700, 69, 2008.7366, 199.68561, 33.87147, NULL, 0, 0, 0, 100, 0),
+(649700, 70, 2033.007, 168.96138, 33.986916, NULL, 0, 0, 0, 100, 0),
+(649700, 71, 2066.642, 154.05067, 33.89913, NULL, 0, 0, 0, 100, 0),
+(649700, 72, 2100.0747, 154.13618, 35.464554, NULL, 0, 0, 0, 100, 0),
+(649700, 73, 2133.1018, 165.71138, 37.972244, NULL, 0, 0, 0, 100, 0),
+(649700, 74, 2159.929, 180.03609, 41.871323, NULL, 0, 0, 0, 100, 0),
+(649700, 75, 2162.2976, 200.29182, 42.721146, NULL, 0, 0, 0, 100, 0),
+(649700, 76, 2164.7114, 218.72179, 40.85692, NULL, 0, 0, 0, 100, 0),
+(649700, 77, 2181.5547, 232.85938, 36.67536, NULL, 0, 0, 0, 100, 0),
+(649700, 78, 2200.375, 243.88374, 34.444607, NULL, 0, 0, 0, 100, 0),
+(649700, 79, 2218.8154, 249.37343, 33.94611, NULL, 0, 0, 0, 100, 0),
+(649700, 80, 2229.708, 247.84766, 33.11627, NULL, 0, 0, 0, 100, 0),
+(649700, 81, 2235.1897, 251.33485, 33.6035, NULL, 2000, 0, 0, 100, 0),
+(649700, 82, 2229.708, 247.84766, 33.11627, NULL, 0, 0, 0, 100, 0),
+(649700, 83, 2218.8154, 249.37343, 33.94611, NULL, 0, 0, 0, 100, 0),
+(649700, 84, 2200.375, 243.88374, 34.444607, NULL, 0, 0, 0, 100, 0),
+(649700, 85, 2181.5547, 232.85938, 36.67536, NULL, 0, 0, 0, 100, 0),
+(649700, 86, 2164.7114, 218.72179, 40.85692, NULL, 0, 0, 0, 100, 0),
+(649700, 87, 2162.2976, 200.29182, 42.721146, NULL, 0, 0, 0, 100, 0),
+(649700, 88, 2159.929, 180.03609, 41.871323, NULL, 0, 0, 0, 100, 0),
+(649700, 89, 2133.1018, 165.71138, 37.972244, NULL, 0, 0, 0, 100, 0),
+(649700, 90, 2100.0747, 154.13618, 35.464554, NULL, 0, 0, 0, 100, 0),
+(649700, 91, 2066.642, 154.05067, 33.89913, NULL, 0, 0, 0, 100, 0),
+(649700, 92, 2033.007, 168.96138, 33.986916, NULL, 0, 0, 0, 100, 0),
+(649700, 93, 2008.7366, 199.68561, 33.87147, NULL, 0, 0, 0, 100, 0),
+(649700, 94, 2000.3663, 214.46593, 34.19722, NULL, 0, 0, 0, 100, 0),
+(649700, 95, 1984.9171, 233.64508, 36.106697, NULL, 0, 0, 0, 100, 0),
+(649700, 96, 1967.2408, 265.27518, 37.96951, NULL, 0, 0, 0, 100, 0),
+(649700, 97, 1946.6372, 299.84537, 38.30006, NULL, 0, 0, 0, 100, 0),
+(649700, 98, 1929.4626, 333.79535, 35.294994, NULL, 0, 0, 0, 100, 0),
+(649700, 99, 1911.1168, 366.9929, 33.98939, NULL, 0, 0, 0, 100, 0),
+(649700, 100, 1899.9106, 400.08536, 34.257324, NULL, 0, 0, 0, 100, 0),
+(649700, 101, 1890.4196, 433.71887, 33.8925, NULL, 0, 0, 0, 100, 0),
+(649700, 102, 1876.65, 467.884, 34.267147, NULL, 0, 0, 0, 100, 0),
+(649700, 103, 1866.7739, 482.8489, 34.661674, NULL, 0, 0, 0, 100, 0),
+(649700, 104, 1846.7709, 500.30872, 34.65273, NULL, 0, 0, 0, 100, 0),
+(649700, 105, 1833.5399, 506.51108, 34.09343, NULL, 0, 0, 0, 100, 0),
+(649700, 106, 1799.5571, 518.5047, 33.451973, NULL, 0, 0, 0, 100, 0),
+(649700, 107, 1766.3834, 526.622, 33.396313, NULL, 0, 0, 0, 100, 0),
+(649700, 108, 1733.0693, 534.8109, 33.39686, NULL, 0, 0, 0, 100, 0),
+(649700, 109, 1699.4762, 543.5129, 33.418396, NULL, 0, 0, 0, 100, 0),
+(649700, 110, 1666.5055, 548.7752, 33.39571, NULL, 0, 0, 0, 100, 0),
+(649700, 111, 1633.1173, 557.6922, 33.72048, NULL, 0, 0, 0, 100, 0),
+(649700, 112, 1599.7749, 566.5255, 37.452827, NULL, 0, 0, 0, 100, 0),
+(649700, 113, 1569.2615, 578.867, 41.605648, NULL, 0, 0, 0, 100, 0),
+(649700, 114, 1527.412, 601.90704, 46.683678, NULL, 0, 0, 0, 100, 0),
+(649700, 115, 1493.479, 632.8775, 46.6881, NULL, 0, 0, 0, 100, 0),
+(649700, 116, 1462.6694, 666.44934, 46.350983, NULL, 0, 0, 0, 100, 0),
+(649700, 117, 1438.3928, 700.6654, 44.742863, NULL, 0, 0, 0, 100, 0),
+(649700, 118, 1421.0477, 732.81036, 45.700684, NULL, 0, 0, 0, 100, 0),
+(649700, 119, 1407.2906, 766.57434, 46.998886, NULL, 0, 0, 0, 100, 0),
+(649700, 120, 1390.0712, 800.3881, 48.731716, NULL, 0, 0, 0, 100, 0),
+(649700, 121, 1374.4548, 840.12335, 50.35277, NULL, 0, 0, 0, 100, 0),
+(649700, 122, 1357.6875, 883.0408, 52.67861, NULL, 0, 0, 0, 100, 0),
+(649700, 123, 1345.629, 924.2967, 53.814915, NULL, 0, 0, 0, 100, 0),
+(649700, 124, 1339.3923, 960.9286, 54.73848, NULL, 0, 0, 0, 100, 0),
+(649700, 125, 1332.5304, 990.83575, 54.651577, NULL, 0, 0, 0, 100, 0),
+(649700, 126, 1318.6704, 1023.2604, 54.663284, NULL, 0, 0, 0, 100, 0),
+(649700, 127, 1305.2642, 1048.9967, 54.54281, NULL, 0, 0, 0, 100, 0),
+(649700, 128, 1281.7661, 1077.2633, 54.107376, NULL, 0, 0, 0, 100, 0),
+(649700, 129, 1259.9783, 1096.3925, 52.763363, NULL, 0, 0, 0, 100, 0),
+(649700, 130, 1245.4918, 1111.4078, 50.944595, NULL, 0, 0, 0, 100, 0),
+(649700, 131, 1214.3774, 1137.9454, 47.540554, NULL, 0, 0, 0, 100, 0),
+(649700, 132, 1187.787, 1155.515, 46.71021, NULL, 0, 0, 0, 100, 0),
+(649700, 133, 1154.6526, 1177.5419, 48.430305, NULL, 0, 0, 0, 100, 0),
+(649700, 134, 1126.8285, 1195.9891, 47.394684, NULL, 0, 0, 0, 100, 0),
+(649700, 135, 1106.6715, 1205.8969, 46.48162, NULL, 0, 0, 0, 100, 0),
+(649700, 136, 1080.6647, 1228.3652, 45.75068, NULL, 0, 0, 0, 100, 0),
+(649700, 137, 1055.1008, 1253.4108, 45.855003, NULL, 0, 0, 0, 100, 0),
+(649700, 138, 1033.7482, 1272.1211, 46.23719, NULL, 0, 0, 0, 100, 0),
+(649700, 139, 1005.0521, 1289.1754, 45.481735, NULL, 0, 0, 0, 100, 0),
+(649700, 140, 976.56726, 1310.7413, 46.00013, NULL, 0, 0, 0, 100, 0),
+(649700, 141, 942.1607, 1334.9868, 45.564545, NULL, 0, 0, 0, 100, 0),
+(649700, 142, 917.56415, 1347.1743, 45.49018, NULL, 0, 0, 0, 100, 0),
+(649700, 143, 888.2806, 1355.868, 48.78437, NULL, 0, 0, 0, 100, 0),
+(649700, 144, 866.9464, 1361.3516, 51.768867, NULL, 0, 0, 0, 100, 0),
+(649700, 145, 838.4114, 1360.8605, 56.570217, NULL, 0, 0, 0, 100, 0),
+(649700, 146, 817.2476, 1361.4927, 60.508972, NULL, 0, 0, 0, 100, 0),
+(649700, 147, 788.24805, 1362.3418, 67.00611, NULL, 0, 0, 0, 100, 0),
+(649700, 148, 759.6556, 1362.045, 71.884674, NULL, 0, 0, 0, 100, 0),
+(649700, 149, 735.5919, 1359.9868, 74.7311, NULL, 0, 0, 0, 100, 0),
+(649700, 150, 716.3771, 1350.1677, 76.052864, NULL, 0, 0, 0, 100, 0),
+(649700, 151, 701.6529, 1333.9889, 77.97731, NULL, 0, 0, 0, 100, 0),
+(649700, 152, 679.4544, 1316.6484, 81.121284, NULL, 0, 0, 0, 100, 0),
+(649700, 153, 661.93774, 1305.103, 83.19177, NULL, 0, 0, 0, 100, 0),
+(649700, 154, 643.6682, 1301.1842, 85.17119, NULL, 0, 0, 0, 100, 0),
+(649700, 155, 633.94946, 1310.1539, 84.25693, NULL, 0, 0, 0, 100, 0),
+(649700, 156, 615.50714, 1349.1395, 85.748085, NULL, 0, 0, 0, 100, 0),
+(649700, 157, 605.4873, 1365.1119, 86.89633, NULL, 0, 0, 0, 100, 0),
+(649700, 158, 593.57294, 1391.2076, 90.5457, NULL, 0, 0, 0, 100, 0),
+(649700, 159, 579.13367, 1414.7158, 95.58017, NULL, 0, 0, 0, 100, 0),
+(649700, 160, 560.8089, 1444.4222, 100.17067, NULL, 0, 0, 0, 100, 0),
+(649700, 161, 550.32355, 1453.3601, 102.83995, NULL, 0, 0, 0, 100, 0),
+(649700, 162, 532.0706, 1473.9459, 109.76107, NULL, 2000, 0, 0, 100, 0);
+
+-- Edit SmartAI
+UPDATE `creature_template` SET `AIName` = 'SmartAI' WHERE `entry` = 6497;
+
+DELETE FROM `smart_scripts` WHERE (`source_type` = 0 AND `entryorguid` = 6497);
+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
+(6497, 0, 0, 0, 25, 0, 100, 0, 0, 0, 0, 0, 0, 0, 8, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Astor Hadren - On Reset - Set Reactstate Defensive'),
+(6497, 0, 1, 0, 11, 0, 100, 512, 0, 0, 0, 0, 0, 0, 232, 649700, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Astor Hadren - On Respawn - Start Path 649700'),
+(6497, 0, 2, 3, 62, 0, 100, 512, 125, 0, 0, 0, 0, 0, 72, 0, 0, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 0, 'Astor Hadren - On Gossip Option 0 Selected - Close Gossip'),
+(6497, 0, 3, 4, 61, 0, 100, 512, 0, 0, 0, 0, 0, 0, 2, 14, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Astor Hadren - On Gossip Option 0 Selected - Set Faction 14'),
+(6497, 0, 4, 0, 61, 0, 100, 512, 0, 0, 0, 0, 0, 0, 49, 0, 0, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 0, 'Astor Hadren - On Gossip Option 0 Selected - Start Attacking'),
+(6497, 0, 5, 0, 7, 0, 100, 512, 0, 0, 0, 0, 0, 0, 2, 68, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Astor Hadren - On Evade - Set Faction 68');
diff --git a/data/sql/updates/db_world/2025_11_06_00.sql b/data/sql/updates/db_world/2025_11_06_00.sql
new file mode 100644
index 0000000000..420a55b9d8
--- /dev/null
+++ b/data/sql/updates/db_world/2025_11_06_00.sql
@@ -0,0 +1,33 @@
+-- DB update 2025_11_05_00 -> 2025_11_06_00
+
+-- Remove NPC Flag, Unit Flag and set RegenHealth
+UPDATE `creature_template` SET `npcflag` = `npcflag` &~ 16777216, `unit_flags` = `unit_flags` &~ 2, `RegenHealth` = 1 WHERE (`entry` = 28782);
+
+-- Update SmartAI (Acherus Deathcharger and Dark Rider of Acherus)
+UPDATE `creature_template` SET `AIName` = 'SmartAI' WHERE (`entry` IN (28768, 28782));
+
+DELETE FROM `smart_scripts` WHERE (`source_type` = 0) AND (`entryorguid` IN (28768, 28782));
+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
+(28782, 0, 0, 1, 28, 0, 100, 0, 0, 0, 0, 0, 0, 0, 101, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Acherus Deathcharger - On Passenger Removed - Set Home Position'),
+(28782, 0, 1, 2, 61, 0, 100, 0, 0, 0, 0, 0, 0, 0, 2, 2082, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Acherus Deathcharger - On Passenger Removed - Set Faction 2082'),
+(28782, 0, 2, 3, 61, 0, 100, 0, 0, 0, 0, 0, 0, 0, 82, 16777216, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Acherus Deathcharger - On Passenger Removed - Add Npc Flags Spellclick'),
+(28782, 0, 3, 4, 61, 0, 100, 0, 0, 0, 0, 0, 0, 0, 19, 33554432, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Acherus Deathcharger - On Passenger Removed - Remove Flags Not Selectable'),
+(28782, 0, 4, 5, 61, 0, 100, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Acherus Deathcharger - On Passenger Removed - Say Line 0'),
+(28782, 0, 5, 6, 61, 0, 100, 0, 0, 0, 0, 0, 0, 0, 24, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Acherus Deathcharger - On Passenger Removed - Evade'),
+(28782, 0, 6, 0, 61, 0, 100, 0, 0, 0, 0, 0, 0, 0, 103, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Acherus Deathcharger - On Passenger Removed - Set Rooted On'),
+(28782, 0, 7, 8, 28, 0, 100, 0, 0, 0, 0, 0, 0, 0, 5, 377, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Acherus Deathcharger - On Passenger Removed - Play Emote 377'),
+(28782, 0, 8, 0, 61, 0, 100, 0, 0, 0, 0, 0, 0, 0, 41, 3000, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Acherus Deathcharger - On Passenger Removed - Despawn In 3000 ms'),
+(28782, 0, 9, 10, 11, 0, 100, 0, 0, 0, 0, 0, 0, 0, 18, 33554432, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Acherus Deathcharger - On Respawn - Set Flags Not Selectable'),
+(28782, 0, 10, 11, 61, 0, 100, 0, 0, 0, 0, 0, 0, 0, 83, 16777216, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Acherus Deathcharger - On Respawn - Remove Npc Flags Spellclick'),
+(28782, 0, 11, 0, 61, 0, 100, 0, 0, 0, 0, 0, 0, 0, 2, 16, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Acherus Deathcharger - On Respawn - Set Faction 16'),
+(28782, 0, 12, 0, 27, 0, 100, 512, 0, 0, 0, 0, 0, 0, 103, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Acherus Deathcharger - On Passenger Boarded - Set Rooted Off'),
+(28768, 0, 0, 0, 0, 0, 100, 0, 1000, 1000, 6000, 6000, 0, 0, 11, 52372, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 'Dark Rider of Acherus - In Combat - Cast \'Icy Touch\''),
+(28768, 0, 1, 0, 0, 0, 100, 0, 3000, 3000, 6000, 6000, 0, 0, 11, 52374, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 'Dark Rider of Acherus - In Combat - Cast \'Blood Strike\''),
+(28768, 0, 2, 0, 0, 0, 100, 0, 5000, 5000, 6000, 6000, 0, 0, 11, 50688, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 'Dark Rider of Acherus - In Combat - Cast \'Plague Strike\''),
+(28768, 0, 3, 0, 6, 0, 100, 0, 0, 0, 0, 0, 0, 0, 203, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Dark Rider of Acherus - On Just Died - Exit vehicle');
+
+-- Set Conditions
+DELETE FROM `conditions` WHERE (`SourceTypeOrReferenceId` = 22) AND (`SourceGroup` IN (1, 3, 8)) AND (`SourceEntry` = 28782) AND (`SourceId` = 0) AND (`ElseGroup` = 0) AND (`ConditionTypeOrReference` = 32) AND (`ConditionTarget` = 0) AND (`ConditionValue1` IN (8, 16)) 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
+(22, 8, 28782, 0, 0, 32, 0, 16, 0, 0, 0, 0, 0, '', 'Only despawn Archerus Deathcharger if dismounting unit is player'),
+(22, 1, 28782, 0, 0, 32, 0, 8, 0, 0, 0, 0, 0, '', 'Event only occurs when Passenger is an NPC');
diff --git a/data/sql/updates/db_world/2025_11_06_01.sql b/data/sql/updates/db_world/2025_11_06_01.sql
new file mode 100644
index 0000000000..3c3e76c335
--- /dev/null
+++ b/data/sql/updates/db_world/2025_11_06_01.sql
@@ -0,0 +1,2 @@
+-- DB update 2025_11_06_00 -> 2025_11_06_01
+DELETE FROM `vehicle_template_accessory` WHERE `entry` = 24083;
diff --git a/data/sql/updates/db_world/2025_11_07_00.sql b/data/sql/updates/db_world/2025_11_07_00.sql
new file mode 100644
index 0000000000..1e41d2b835
--- /dev/null
+++ b/data/sql/updates/db_world/2025_11_07_00.sql
@@ -0,0 +1,3 @@
+-- DB update 2025_11_06_01 -> 2025_11_07_00
+--
+DELETE FROM `creature` WHERE `guid` = 3564 AND `id1` = 1135;
diff --git a/data/sql/updates/db_world/2025_11_07_01.sql b/data/sql/updates/db_world/2025_11_07_01.sql
new file mode 100644
index 0000000000..cc4ffb7588
--- /dev/null
+++ b/data/sql/updates/db_world/2025_11_07_01.sql
@@ -0,0 +1,43 @@
+-- DB update 2025_11_07_00 -> 2025_11_07_01
+--
+-- v11_2_5_63906
+SET @VBUILD := 63906;
+
+UPDATE `creature_template` SET `AIName` = 'SmartAI' WHERE `entry` = 28932;
+UPDATE `creature_template_addon` SET `bytes2` = 1 WHERE (`entry` = 28932);
+
+DELETE FROM `creature` WHERE (`id1` = 28932) AND `guid` IN (96663, 96664, 96671, 96798, 96800, 96865, 96870, 96871);
+INSERT INTO `creature` (`guid`, `id1`, `id2`, `id3`, `map`, `zoneId`, `areaId`, `spawnMask`, `phaseMask`, `equipment_id`, `position_x`, `position_y`, `position_z`, `orientation`, `spawntimesecs`, `wander_distance`, `currentwaypoint`, `curhealth`, `curmana`, `MovementType`, `npcflag`, `unit_flags`, `dynamicflags`, `ScriptName`, `VerifiedBuild`, `CreateObject`, `Comment`) VALUES
+(96663, 28932, 0, 0, 571, 0, 0, 1, 1, 0, 6146.6094, -1971.1476, 481.92764, 5.305801, 300, 5, 0, 4979, 0, 1, 0, 0, 0, '', @VBUILD, 0, NULL),
+(96664, 28932, 0, 0, 571, 0, 0, 1, 1, 0, 6143.005, -1973.7048, 482.06653, 4.520403, 300, 5, 0, 4979, 0, 1, 0, 0, 0, '', @VBUILD, 0, NULL),
+(96671, 28932, 0, 0, 571, 0, 0, 1, 1, 0, 6218.721, -1985.6326, 482.0804, 4.3982296, 300, 5, 0, 4979, 0, 1, 0, 0, 0, '', @VBUILD, 0, NULL),
+(96798, 28932, 0, 0, 571, 0, 0, 1, 1, 0, 6221.371, -1989.2194, 482.06653, 1.5009831, 300, 5, 0, 4979, 0, 1, 0, 0, 0, '', @VBUILD, 0, NULL),
+(96800, 28932, 0, 0, 571, 0, 0, 1, 1, 0, 6128.758, -2046.2726, 482.0735, 2.7052603, 300, 5, 0, 4979, 0, 1, 0, 0, 0, '', @VBUILD, 0, NULL),
+(96865, 28932, 0, 0, 571, 0, 0, 1, 1, 0, 6131.65, -2049.7249, 482.03876, 0.6806784, 300, 5, 0, 4979, 0, 1, 0, 0, 0, '', @VBUILD, 0, NULL),
+(96870, 28932, 0, 0, 571, 0, 0, 1, 1, 0, 6203.877, -2064.1401, 482.06653, 0.06981317, 300, 5, 0, 4979, 0, 1, 0, 0, 0, '', @VBUILD, 0, NULL),
+(96871, 28932, 0, 0, 571, 0, 0, 1, 1, 0, 6207.528, -2061.5386, 482.02487, 4.08407, 300, 5, 0, 4979, 0, 1, 0, 0, 0, '', @VBUILD, 0, NULL);
+
+DELETE FROM `smart_scripts` WHERE (`entryorguid` IN (-96663, -96798, -96800, -96870, -96664, -96671, -96865, -96871)) 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
+(-96663, 0, 0, 0, 60, 0, 100, 0, 0, 0, 0, 0, 0, 0, 11, 52686, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Blight Effect Bunny - On Update - Cast \'Voltarus Blight Beam LH\''),
+(-96798, 0, 0, 0, 60, 0, 100, 0, 0, 0, 0, 0, 0, 0, 11, 52686, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Blight Effect Bunny - On Update - Cast \'Voltarus Blight Beam LH\''),
+(-96800, 0, 0, 0, 60, 0, 100, 0, 0, 0, 0, 0, 0, 0, 11, 52686, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Blight Effect Bunny - On Update - Cast \'Voltarus Blight Beam LH\''),
+(-96870, 0, 0, 0, 60, 0, 100, 0, 0, 0, 0, 0, 0, 0, 11, 52686, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Blight Effect Bunny - On Update - Cast \'Voltarus Blight Beam LH\''),
+(-96664, 0, 0, 0, 60, 0, 100, 0, 0, 0, 0, 0, 0, 0, 11, 52681, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Blight Effect Bunny - On Update - Cast \'Voltarus Blight Beam RH\''),
+(-96671, 0, 0, 0, 60, 0, 100, 0, 0, 0, 0, 0, 0, 0, 11, 52681, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Blight Effect Bunny - On Update - Cast \'Voltarus Blight Beam RH\''),
+(-96865, 0, 0, 0, 60, 0, 100, 0, 0, 0, 0, 0, 0, 0, 11, 52681, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Blight Effect Bunny - On Update - Cast \'Voltarus Blight Beam RH\''),
+(-96871, 0, 0, 0, 60, 0, 100, 0, 0, 0, 0, 0, 0, 0, 11, 52681, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Blight Effect Bunny - On Update - Cast \'Voltarus Blight Beam RH\'');
+
+-- Set `unitflag` to IMMUNE_TO_PC, verify spawns, add missing spawn
+DELETE FROM `creature` WHERE (`id1` = 28931) and `guid` IN (96497, 96498, 96499, 96545);
+INSERT INTO `creature` (`guid`, `id1`, `id2`, `id3`, `map`, `zoneId`, `areaId`, `spawnMask`, `phaseMask`, `equipment_id`, `position_x`, `position_y`, `position_z`, `orientation`, `spawntimesecs`, `wander_distance`, `currentwaypoint`, `curhealth`, `curmana`, `MovementType`, `npcflag`, `unit_flags`, `dynamicflags`, `ScriptName`, `Comment`, `VerifiedBuild`) VALUES
+(96497, 28931, 0, 0, 571, 0, 0, 1, 1, 0, 6144.44, -1971.41, 461.385, 5.16617, 300, 0, 0, 200000, 0, 0, 0, 256, 0, '', NULL, @VBUILD),
+(96498, 28931, 0, 0, 571, 0, 0, 1, 1, 0, 6206.33, -2063.48, 461.385, 2.14675, 300, 0, 0, 200000, 0, 0, 0, 256, 0, '', NULL, @VBUILD),
+(96499, 28931, 0, 0, 571, 0, 0, 1, 1, 0, 6129.33, -2047.82, 461.385, 0.506145, 300, 0, 0, 200000, 0, 0, 0, 256, 0, '', NULL, @VBUILD),
+(96545, 28931, 0, 0, 571, 0, 0, 1, 1, 0, 6221.2, -1986.5, 461.385, 3.78736, 300, 0, 0, 200000, 0, 0, 0, 256, 0, '', NULL, @VBUILD);
+
+-- Voltarus Blight Beam LH, RH
+DELETE FROM `conditions` WHERE (`SourceTypeOrReferenceId` = 13) AND (`SourceGroup` = 1) AND (`SourceEntry` IN (52686, 52681)) AND (`SourceId` = 0) AND (`ElseGroup` = 0) AND (`ConditionTypeOrReference` = 31) AND (`ConditionTarget` = 0) AND (`ConditionValue1` = 3) AND (`ConditionValue2` = 28931) AND (`ConditionValue3` = 0);
+INSERT INTO `conditions` (`SourceTypeOrReferenceId`, `SourceGroup`, `SourceEntry`, `SourceId`, `ElseGroup`, `ConditionTypeOrReference`, `ConditionTarget`, `ConditionValue1`, `ConditionValue2`, `ConditionValue3`, `NegativeCondition`, `ErrorType`, `ErrorTextId`, `ScriptName`, `Comment`) VALUES
+(13, 1, 52686, 0, 0, 31, 0, 3, 28931, 0, 0, 0, 0, '', 'target Blightblood Troll'),
+(13, 1, 52681, 0, 0, 31, 0, 3, 28931, 0, 0, 0, 0, '', 'target Blightblood Troll');
diff --git a/data/sql/updates/db_world/2025_11_07_02.sql b/data/sql/updates/db_world/2025_11_07_02.sql
new file mode 100644
index 0000000000..89f0f8191b
--- /dev/null
+++ b/data/sql/updates/db_world/2025_11_07_02.sql
@@ -0,0 +1,108 @@
+-- DB update 2025_11_07_01 -> 2025_11_07_02
+
+-- Add Waypoints (Scarlet Miner)
+DELETE FROM `waypoint_data` WHERE (`id` IN (2884100, 2884101));
+INSERT INTO `waypoint_data` (`id`, `point`, `position_x`, `position_y`, `position_z`, `orientation`, `delay`, `move_type`, `action`, `action_chance`, `wpguid`) VALUES
+(2884100, 1, 2376.9087, -5906.2495, 108.593, NULL, 0, 1, 0, 100, 0),
+(2884100, 2, 2340.1587, -5903.4995, 102.593, NULL, 0, 1, 0, 100, 0),
+(2884100, 3, 2306.4087, -5904.7495, 90.593, NULL, 0, 1, 0, 100, 0),
+(2884100, 4, 2292.6587, -5917.4995, 82.343, NULL, 0, 1, 0, 100, 0),
+(2884100, 5, 2285.6587, -5943.4995, 64.093, NULL, 0, 1, 0, 100, 0),
+(2884100, 6, 2271.9087, -5968.4995, 49.843, NULL, 0, 1, 0, 100, 0),
+(2884100, 7, 2248.1587, -5978.4995, 36.843, NULL, 0, 1, 0, 100, 0),
+(2884100, 8, 2234.6587, -5996.9995, 25.842999, NULL, 0, 1, 0, 100, 0),
+(2884100, 9, 2223.4087, -6014.9995, 11.5929985, NULL, 0, 1, 0, 100, 0),
+(2884100, 10, 2216.1587, -6035.9995, 7.3429985, NULL, 0, 1, 0, 100, 0),
+(2884100, 11, 2195.4087, -6061.2495, 6.3429985, NULL, 0, 1, 0, 100, 0),
+(2884100, 12, 2184.4087, -6091.9995, 2.0929985, NULL, 0, 1, 0, 100, 0),
+(2884100, 13, 2179.6587, -6120.2495, 1.5929985, NULL, 0, 1, 0, 100, 0),
+(2884100, 14, 2175.4087, -6142.9995, 1.5929985, NULL, 0, 1, 0, 100, 0),
+(2884100, 15, 2167.9087, -6159.4995, 1.8429985, NULL, 0, 1, 0, 100, 0),
+(2884100, 16, 2149.4087, -6161.4995, 1.5929985, NULL, 0, 1, 0, 100, 0),
+(2884100, 17, 2134.9087, -6166.2495, 0.8429985, NULL, 0, 1, 0, 100, 0),
+(2884100, 18, 2130.9087, -6173.2495, 4.3429985, NULL, 0, 1, 0, 100, 0),
+(2884100, 19, 2125.9087, -6180.7495, 10.0929985, NULL, 0, 1, 0, 100, 0),
+(2884100, 20, 2123.4087, -6184.7495, 14.0929985, NULL, 0, 1, 0, 100, 0),
+(2884100, 21, 2115.9087, -6196.2495, 13.8429985, NULL, 0, 1, 0, 100, 0),
+(2884100, 22, 2119.1106, -6191.905, 13.275559, NULL, 0, 1, 0, 100, 0),
+(2884101, 1, 2376.855, -5906.1553, 108.57493, NULL, 0, 1, 0, 100, 0),
+(2884101, 2, 2340.105, -5903.4053, 102.57493, NULL, 0, 1, 0, 100, 0),
+(2884101, 3, 2306.855, -5904.9053, 90.57493, NULL, 0, 1, 0, 100, 0),
+(2884101, 4, 2292.855, -5917.6553, 82.32493, NULL, 0, 1, 0, 100, 0),
+(2884101, 5, 2285.855, -5943.4053, 64.07493, NULL, 0, 1, 0, 100, 0),
+(2884101, 6, 2272.105, -5968.4053, 49.82493, NULL, 0, 1, 0, 100, 0),
+(2884101, 7, 2248.355, -5978.4053, 36.82493, NULL, 0, 1, 0, 100, 0),
+(2884101, 8, 2234.605, -5996.9053, 25.824928, NULL, 0, 1, 0, 100, 0),
+(2884101, 9, 2223.605, -6015.1553, 11.574928, NULL, 0, 1, 0, 100, 0),
+(2884101, 10, 2216.105, -6035.9053, 7.3249283, NULL, 0, 1, 0, 100, 0),
+(2884101, 11, 2195.105, -6059.4053, 6.3249283, NULL, 0, 1, 0, 100, 0),
+(2884101, 12, 2184.855, -6087.1553, 3.0749283, NULL, 0, 1, 0, 100, 0),
+(2884101, 13, 2180.605, -6119.4053, 1.5749283, NULL, 0, 1, 0, 100, 0),
+(2884101, 14, 2177.605, -6149.4053, 1.8249283, NULL, 0, 1, 0, 100, 0),
+(2884101, 15, 2188.855, -6170.4053, 1.3249283, NULL, 0, 1, 0, 100, 0),
+(2884101, 16, 2213.105, -6165.4053, 1.0749283, NULL, 0, 1, 0, 100, 0),
+(2884101, 17, 2241.855, -6160.4053, 2.0749283, NULL, 0, 1, 0, 100, 0),
+(2884101, 18, 2269.105, -6163.4053, 2.3249283, NULL, 0, 1, 0, 100, 0),
+(2884101, 19, 2269.605, -6168.9053, 2.3249283, NULL, 0, 1, 0, 100, 0),
+(2884101, 20, 2270.105, -6174.6553, 5.8249283, NULL, 0, 1, 0, 100, 0),
+(2884101, 21, 2270.605, -6180.9053, 9.824928, NULL, 0, 1, 0, 100, 0),
+(2884101, 22, 2271.105, -6186.1553, 14.074928, NULL, 0, 1, 0, 100, 0),
+(2884101, 23, 2273.855, -6196.4053, 13.824928, NULL, 0, 1, 0, 100, 0),
+(2884101, 24, 2273.0032, -6191.717, 13.239414, NULL, 0, 1, 0, 100, 0);
+
+-- Remove Script Names.
+UPDATE `creature_template` SET `ScriptName` = '' WHERE (`entry` IN (28817, 28833, 28841));
+UPDATE `gameobject_template` SET `ScriptName` = '' WHERE (`entry` = 190767);
+
+-- Set spell target position for Mine Car spawn.
+UPDATE `spell_target_position` SET `PositionX` = 2389.58, `PositionY` = -5901.18, `PositionZ` = 109.02134, `Orientation` = 0 WHERE `ID` = 52462;
+
+-- Set Unit Flag for Mine Car (immune_to_npc)
+UPDATE `creature_template` SET `unit_flags` = `unit_flags` |512 WHERE (`entry` = 28817);
+
+-- Set SmartAI (Mine Car)
+UPDATE `creature_template` SET `AIName` = 'SmartAI' WHERE `entry` = 28817;
+
+DELETE FROM `smart_scripts` WHERE (`source_type` = 0 AND `entryorguid` = 28817);
+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
+(28817, 0, 0, 1, 54, 0, 100, 0, 0, 0, 0, 0, 0, 0, 3, 0, 25703, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Mine Car - On Just Summoned - Morph To Model 25703'),
+(28817, 0, 1, 0, 61, 0, 100, 0, 0, 0, 0, 0, 0, 0, 12, 28841, 8, 0, 0, 0, 0, 8, 0, 0, 0, 0, 2382.171, -5899.672, 107.74545, 0, 'Mine Car - On Just Summoned - Summon Creature \'Scarlet Miner\''),
+(28817, 0, 2, 0, 8, 0, 100, 0, 52465, 0, 0, 0, 0, 0, 29, 3, 0, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 0, 'Mine Car - On Spellhit \'Drag Mine Cart\' - Start Follow Invoker');
+
+-- Set SmartAI (Scarlet Miner)
+UPDATE `creature_template` SET `AIName` = 'SmartAI' WHERE `entry` = 28841;
+
+DELETE FROM `smart_scripts` WHERE (`source_type` = 0 AND `entryorguid` = 28841);
+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
+(28841, 0, 0, 0, 54, 0, 100, 0, 0, 0, 0, 0, 0, 0, 80, 2884100, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Scarlet Miner - On Just Summoned - Run Script'),
+(28841, 0, 1, 0, 109, 0, 100, 0, 0, 0, 0, 0, 0, 0, 80, 2884101, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Scarlet Miner - On Path 0 Finished - Run Script');
+
+-- Set Scarlet Miner Action List
+DELETE FROM `smart_scripts` WHERE (`source_type` = 9) AND (`entryorguid` IN (2884100, 2884101));
+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
+(2884100, 9, 0, 0, 0, 0, 100, 0, 0, 0, 0, 0, 0, 0, 59, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Scarlet Miner - Actionlist - Set Run Off'),
+(2884100, 9, 1, 0, 0, 0, 100, 0, 0, 0, 0, 0, 0, 0, 69, 0, 0, 0, 1, 0, 0, 23, 0, 0, 0, 0, 0, 0, 0, 0, 'Scarlet Miner - Actionlist - Move To Owner Or Summoner'),
+(2884100, 9, 2, 0, 0, 0, 100, 0, 3000, 3000, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Scarlet Miner - Actionlist - Say Line 0'),
+(2884100, 9, 3, 0, 0, 0, 100, 0, 3000, 3000, 0, 0, 0, 0, 11, 52465, 0, 0, 0, 0, 0, 23, 0, 0, 0, 0, 0, 0, 0, 0, 'Scarlet Miner - Actionlist - Cast \'Drag Mine Cart\''),
+(2884100, 9, 4, 0, 0, 0, 100, 0, 0, 0, 0, 0, 0, 0, 59, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Scarlet Miner - Actionlist - Set Run On'),
+(2884100, 9, 5, 0, 0, 0, 100, 0, 0, 0, 0, 0, 0, 0, 233, 2884100, 2884101, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Scarlet Miner - Actionlist - Start Random Path 2884100-2884101'),
+(2884101, 9, 0, 0, 0, 0, 100, 0, 1000, 1000, 0, 0, 0, 0, 66, 0, 0, 0, 0, 0, 0, 23, 0, 0, 0, 0, 0, 0, 0, 0, 'Scarlet Miner - Actionlist - Set Orientation Owner Or Summoner'),
+(2884101, 9, 1, 0, 0, 0, 100, 0, 1000, 1000, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Scarlet Miner - Actionlist - Say Line 1'),
+(2884101, 9, 2, 0, 0, 0, 100, 0, 3000, 3000, 0, 0, 0, 0, 28, 52465, 0, 0, 0, 0, 0, 23, 0, 0, 0, 0, 0, 0, 0, 0, 'Scarlet Miner - Actionlist - Remove Aura \'Drag Mine Cart\''),
+(2884101, 9, 3, 0, 0, 0, 100, 0, 0, 0, 0, 0, 0, 0, 41, 0, 0, 0, 0, 0, 0, 23, 0, 0, 0, 0, 0, 0, 0, 0, 'Scarlet Miner - Actionlist - Despawn Instant'),
+(2884101, 9, 4, 0, 0, 0, 100, 0, 0, 0, 0, 0, 0, 0, 41, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Scarlet Miner - Actionlist - Despawn Instant');
+
+-- Set SmartAI (Scarlet Fleet Defender)
+UPDATE `creature_template` SET `AIName` = 'SmartAI' WHERE `entry` = 28834;
+
+DELETE FROM `smart_scripts` WHERE (`source_type` = 0 AND `entryorguid` = 28834);
+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
+(28834, 0, 0, 0, 6, 0, 100, 0, 0, 0, 0, 0, 0, 0, 41, 3000, 2, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Scarlet Fleet Defender - On Just Died - Despawn In 3000 ms'),
+(28834, 0, 1, 0, 0, 0, 100, 0, 1000, 5000, 5000, 8000, 0, 0, 11, 52566, 64, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 'Scarlet Fleet Defender - In Combat - Cast \'Shoot\'');
+
+-- Update SmartAI (Scarlet Cannon)
+UPDATE `creature_template` SET `AIName` = 'SmartAI' WHERE `entry` = 28850;
+
+DELETE FROM `smart_scripts` WHERE (`entryorguid` = 28850) AND (`source_type` = 0) AND (`id` IN (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
+(28850, 0, 2, 0, 6, 0, 100, 0, 0, 0, 0, 0, 0, 0, 41, 3000, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Scarlet Land Cannon - On Just Died - Despawn In 3000 ms');
diff --git a/data/sql/updates/db_world/2025_11_08_00.sql b/data/sql/updates/db_world/2025_11_08_00.sql
new file mode 100644
index 0000000000..4ee7702d3c
--- /dev/null
+++ b/data/sql/updates/db_world/2025_11_08_00.sql
@@ -0,0 +1,2481 @@
+-- DB update 2025_11_07_02 -> 2025_11_08_00
+/* We are updating XP modifiers across the board.
+These lists are creature entries that are rank higher than 0 and in instances.
+They are separated by their expansion value, sorted by entry ID.
+AC's current formula would have these set to 1.35, but that is almost certainly wrong.
+There are absolutely exceptions to the values shown in these updates, but they will need to be assessed pretty individually.
+Do note that the double XP modifier from elites is still in place.
+*/
+
+-- Expansion 0 (Vanilla) creatures
+UPDATE `creature_template` SET `ExperienceModifier` = 1.25 WHERE `entry` IN (
+622,
+634,
+636,
+641,
+657,
+1706,
+1707,
+1708,
+1711,
+1715,
+1729,
+1731,
+1732,
+3636,
+3637,
+3640,
+3678,
+3840,
+3849,
+3850,
+3851,
+3853,
+3854,
+3855,
+3857,
+3859,
+3861,
+3862,
+3863,
+3864,
+3866,
+3868,
+3873,
+3875,
+3877,
+3947,
+4286,
+4287,
+4288,
+4289,
+4290,
+4291,
+4292,
+4294,
+4295,
+4296,
+4297,
+4298,
+4299,
+4300,
+4301,
+4302,
+4303,
+4304,
+4306,
+4417,
+4418,
+4425,
+4427,
+4435,
+4436,
+4437,
+4438,
+4440,
+4442,
+4508,
+4511,
+4512,
+4514,
+4515,
+4516,
+4517,
+4518,
+4519,
+4520,
+4522,
+4523,
+4525,
+4530,
+4531,
+4532,
+4538,
+4539,
+4540,
+4541,
+4623,
+4798,
+4799,
+4805,
+4807,
+4809,
+4810,
+4811,
+4812,
+4813,
+4814,
+4815,
+4818,
+4819,
+4820,
+4821,
+4822,
+4823,
+4824,
+4825,
+4827,
+4842,
+4847,
+4848,
+4849,
+4850,
+4852,
+4853,
+4855,
+4857,
+4860,
+4861,
+4863,
+5048,
+5056,
+5226,
+5228,
+5256,
+5259,
+5267,
+5270,
+5271,
+5273,
+5277,
+5280,
+5283,
+5291,
+5648,
+5649,
+5650,
+5708,
+5755,
+5756,
+5761,
+5912,
+6035,
+6206,
+6211,
+6212,
+6218,
+6219,
+6220,
+6223,
+6225,
+6226,
+6227,
+6228,
+6230,
+6232,
+6233,
+6234,
+6329,
+6392,
+6407,
+6426,
+6427,
+6488,
+6489,
+6490,
+6907,
+6908,
+7022,
+7030,
+7246,
+7247,
+7268,
+7274,
+7290,
+7320,
+7321,
+7327,
+7328,
+7329,
+7332,
+7335,
+7337,
+7341,
+7342,
+7345,
+7347,
+7348,
+7352,
+7353,
+7604,
+7605,
+7606,
+7607,
+7608,
+7998,
+8095,
+8120,
+8130,
+8384,
+8889,
+8890,
+8891,
+8892,
+8893,
+8894,
+8895,
+8898,
+8899,
+8903,
+8905,
+8906,
+8907,
+8908,
+8909,
+8910,
+8911,
+8912,
+8913,
+8914,
+8923,
+8982,
+9020,
+9021,
+9022,
+9023,
+9034,
+9035,
+9036,
+9037,
+9038,
+9039,
+9040,
+9045,
+9096,
+9097,
+9098,
+9197,
+9198,
+9199,
+9200,
+9201,
+9216,
+9217,
+9218,
+9219,
+9239,
+9240,
+9241,
+9257,
+9258,
+9259,
+9260,
+9261,
+9262,
+9263,
+9264,
+9265,
+9266,
+9267,
+9268,
+9269,
+9500,
+9541,
+9554,
+9583,
+9596,
+9677,
+9678,
+9679,
+9680,
+9681,
+9692,
+9693,
+9716,
+9717,
+9718,
+9817,
+9818,
+9819,
+10000,
+10043,
+10080,
+10081,
+10082,
+10083,
+10120,
+10162,
+10257,
+10263,
+10299,
+10317,
+10318,
+10319,
+10366,
+10371,
+10372,
+10374,
+10376,
+10381,
+10382,
+10384,
+10385,
+10398,
+10400,
+10405,
+10406,
+10407,
+10408,
+10409,
+10412,
+10413,
+10414,
+10416,
+10417,
+10418,
+10419,
+10420,
+10421,
+10422,
+10423,
+10424,
+10425,
+10426,
+10447,
+10463,
+10464,
+10469,
+10470,
+10471,
+10472,
+10475,
+10476,
+10477,
+10478,
+10486,
+10487,
+10488,
+10489,
+10491,
+10495,
+10498,
+10499,
+10500,
+10509,
+10740,
+10762,
+10809,
+10812,
+10814,
+10899,
+10917,
+11043,
+11082,
+11257,
+11318,
+11319,
+11320,
+11321,
+11322,
+11323,
+11324,
+11338,
+11339,
+11340,
+11347,
+11348,
+11350,
+11351,
+11352,
+11353,
+11356,
+11357,
+11359,
+11361,
+11365,
+11370,
+11371,
+11372,
+11373,
+11374,
+11380,
+11382,
+11441,
+11444,
+11445,
+11446,
+11448,
+11450,
+11451,
+11452,
+11453,
+11454,
+11455,
+11456,
+11457,
+11458,
+11459,
+11461,
+11462,
+11464,
+11465,
+11467,
+11469,
+11470,
+11471,
+11472,
+11473,
+11475,
+11480,
+11483,
+11484,
+11491,
+11551,
+11582,
+11658,
+11659,
+11661,
+11662,
+11665,
+11666,
+11667,
+11668,
+11669,
+11671,
+11672,
+11673,
+11784,
+11790,
+11791,
+11792,
+11793,
+11794,
+11830,
+11831,
+11981,
+11982,
+11983,
+11988,
+12017,
+12056,
+12057,
+12076,
+12098,
+12099,
+12100,
+12101,
+12118,
+12119,
+12206,
+12207,
+12219,
+12220,
+12221,
+12222,
+12223,
+12224,
+12237,
+12242,
+12243,
+12259,
+12264,
+12435,
+12457,
+12458,
+12459,
+12460,
+12461,
+12463,
+12464,
+12465,
+12467,
+12468,
+12557,
+13020,
+13021,
+13141,
+13142,
+13196,
+13197,
+13285,
+13323,
+13533,
+13996,
+14020,
+14241,
+14303,
+14308,
+14349,
+14354,
+14358,
+14368,
+14369,
+14371,
+14381,
+14382,
+14383,
+14398,
+14399,
+14401,
+14456,
+14507,
+14509,
+14510,
+14517,
+14532,
+14601,
+14682,
+14684,
+14686,
+14690,
+14695,
+14750,
+14821,
+14825,
+14834,
+14861,
+14880,
+14882,
+14883,
+15042,
+15043,
+15067,
+15111,
+15229,
+15230,
+15233,
+15235,
+15236,
+15240,
+15247,
+15249,
+15250,
+15252,
+15262,
+15263,
+15264,
+15275,
+15276,
+15277,
+15299,
+15311,
+15312,
+15318,
+15319,
+15320,
+15323,
+15324,
+15325,
+15327,
+15335,
+15336,
+15338,
+15339,
+15340,
+15341,
+15343,
+15344,
+15348,
+15355,
+15369,
+15370,
+15378,
+15379,
+15380,
+15385,
+15386,
+15387,
+15388,
+15389,
+15390,
+15391,
+15392,
+15461,
+15462,
+15502,
+15503,
+15504,
+15505,
+15509,
+15510,
+15511,
+15516,
+15543,
+15544,
+15589,
+15727,
+15963,
+15984,
+17653,
+19523,
+19524,
+20201,
+20465,
+21689,
+24137,
+28070,
+29637,
+33350,
+33432,
+33628,
+36913,
+37586,
+38491,
+-- Difficulty entries
+18620,
+20572,
+20573,
+21943,
+31366,
+32778,
+34106,
+38495);
+
+-- Expansion 1 (TBC) creatures
+UPDATE `creature_template` SET `ExperienceModifier` = 2.25 WHERE `entry` IN (
+15547,
+15548,
+15551,
+15608,
+15687,
+15688,
+15689,
+15690,
+15691,
+16151,
+16153,
+16159,
+16169,
+16170,
+16171,
+16173,
+16174,
+16175,
+16176,
+16177,
+16178,
+16388,
+16389,
+16406,
+16407,
+16408,
+16410,
+16411,
+16412,
+16414,
+16415,
+16424,
+16425,
+16426,
+16457,
+16459,
+16460,
+16461,
+16470,
+16471,
+16472,
+16473,
+16481,
+16482,
+16485,
+16488,
+16489,
+16491,
+16492,
+16504,
+16507,
+16523,
+16524,
+16525,
+16526,
+16529,
+16530,
+16539,
+16540,
+16544,
+16545,
+16593,
+16594,
+16595,
+16596,
+16699,
+16700,
+16704,
+16806,
+16807,
+16808,
+16809,
+16811,
+16812,
+16813,
+16814,
+16815,
+16816,
+17161,
+17211,
+17225,
+17256,
+17257,
+17259,
+17264,
+17269,
+17270,
+17271,
+17281,
+17301,
+17306,
+17307,
+17308,
+17309,
+17356,
+17370,
+17371,
+17377,
+17380,
+17381,
+17395,
+17397,
+17398,
+17400,
+17414,
+17420,
+17427,
+17455,
+17461,
+17464,
+17465,
+17469,
+17478,
+17491,
+17518,
+17611,
+17624,
+17626,
+17670,
+17671,
+17694,
+17695,
+17721,
+17722,
+17723,
+17724,
+17725,
+17726,
+17727,
+17728,
+17729,
+17730,
+17731,
+17732,
+17734,
+17735,
+17770,
+17771,
+17772,
+17796,
+17797,
+17798,
+17799,
+17800,
+17801,
+17802,
+17803,
+17805,
+17814,
+17815,
+17816,
+17817,
+17819,
+17820,
+17826,
+17827,
+17833,
+17840,
+17846,
+17852,
+17860,
+17871,
+17876,
+17882,
+17895,
+17898,
+17899,
+17917,
+17919,
+17920,
+17921,
+17922,
+17928,
+17931,
+17932,
+17933,
+17934,
+17935,
+17936,
+17937,
+17938,
+17940,
+17941,
+17942,
+17943,
+17944,
+17945,
+17948,
+17957,
+17958,
+17959,
+17960,
+17961,
+17962,
+17968,
+17975,
+17976,
+17977,
+17978,
+17980,
+17991,
+17993,
+17994,
+18092,
+18093,
+18094,
+18105,
+18155,
+18206,
+18309,
+18311,
+18312,
+18313,
+18314,
+18315,
+18317,
+18318,
+18319,
+18320,
+18321,
+18322,
+18323,
+18325,
+18326,
+18327,
+18328,
+18331,
+18341,
+18343,
+18344,
+18371,
+18373,
+18404,
+18405,
+18419,
+18420,
+18421,
+18422,
+18472,
+18473,
+18493,
+18495,
+18497,
+18502,
+18521,
+18524,
+18631,
+18632,
+18633,
+18634,
+18635,
+18636,
+18637,
+18638,
+18639,
+18640,
+18666,
+18667,
+18673,
+18702,
+18708,
+18723,
+18725,
+18731,
+18732,
+18794,
+18796,
+18805,
+18829,
+18830,
+18831,
+18832,
+18834,
+18835,
+18836,
+18848,
+18894,
+18956,
+19044,
+19166,
+19167,
+19168,
+19218,
+19219,
+19220,
+19221,
+19231,
+19307,
+19389,
+19428,
+19429,
+19486,
+19505,
+19507,
+19508,
+19509,
+19510,
+19511,
+19512,
+19513,
+19514,
+19516,
+19622,
+19632,
+19633,
+19710,
+19712,
+19713,
+19735,
+19843,
+19865,
+20031,
+20032,
+20033,
+20034,
+20035,
+20036,
+20037,
+20038,
+20039,
+20040,
+20041,
+20042,
+20043,
+20044,
+20045,
+20046,
+20047,
+20048,
+20049,
+20050,
+20052,
+20059,
+20060,
+20062,
+20063,
+20064,
+20709,
+20857,
+20859,
+20864,
+20866,
+20867,
+20868,
+20869,
+20870,
+20873,
+20875,
+20879,
+20881,
+20882,
+20883,
+20885,
+20886,
+20896,
+20897,
+20898,
+20900,
+20901,
+20902,
+20904,
+20923,
+20988,
+20990,
+21126,
+21127,
+21128,
+21160,
+21174,
+21212,
+21213,
+21214,
+21215,
+21216,
+21218,
+21220,
+21221,
+21224,
+21225,
+21226,
+21227,
+21228,
+21229,
+21230,
+21231,
+21232,
+21246,
+21251,
+21263,
+21298,
+21299,
+21301,
+21303,
+21304,
+21339,
+21350,
+21664,
+21682,
+21683,
+21684,
+21694,
+21695,
+21702,
+21726,
+21747,
+21748,
+21750,
+21752,
+21806,
+21863,
+21904,
+21964,
+21965,
+21966,
+22421,
+22841,
+22844,
+22845,
+22846,
+22847,
+22848,
+22849,
+22853,
+22855,
+22856,
+22869,
+22871,
+22873,
+22874,
+22875,
+22876,
+22877,
+22878,
+22879,
+22880,
+22881,
+22882,
+22883,
+22884,
+22885,
+22887,
+22898,
+22917,
+22939,
+22945,
+22947,
+22948,
+22949,
+22950,
+22951,
+22952,
+22953,
+22954,
+22955,
+22956,
+22957,
+22959,
+22960,
+22962,
+22963,
+22964,
+22965,
+23018,
+23028,
+23030,
+23047,
+23049,
+23089,
+23147,
+23158,
+23159,
+23172,
+23191,
+23196,
+23222,
+23223,
+23232,
+23235,
+23236,
+23237,
+23239,
+23330,
+23337,
+23339,
+23374,
+23394,
+23397,
+23399,
+23400,
+23401,
+23402,
+23403,
+23421,
+23426,
+23499,
+23542,
+23574,
+23576,
+23577,
+23578,
+23580,
+23581,
+23582,
+23584,
+23596,
+23597,
+23774,
+23834,
+23863,
+24043,
+24059,
+24065,
+24138,
+24175,
+24179,
+24180,
+24239,
+24374,
+24530,
+24549,
+24560,
+24664,
+24683,
+24684,
+24685,
+24686,
+24687,
+24688,
+24689,
+24690,
+24696,
+24697,
+24698,
+24723,
+24744,
+24777,
+24850,
+24882,
+24895,
+25165,
+25166,
+25363,
+25367,
+25368,
+25369,
+25370,
+25371,
+25372,
+25373,
+25483,
+25484,
+25486,
+25506,
+25507,
+25508,
+25509,
+25591,
+25592,
+25593,
+25595,
+25597,
+25599,
+25741,
+25837,
+25851,
+25867,
+25954,
+25955,
+25956,
+25957,
+25958,
+25959,
+25960,
+26579,
+28132,
+28194,
+30883,
+37126,
+37763,
+-- Difficulty entries
+18048,
+18049,
+18050,
+18051,
+18052,
+18053,
+18054,
+18055,
+18058,
+18433,
+18435,
+18436,
+18601,
+18604,
+18607,
+18608,
+18609,
+18610,
+18611,
+18612,
+18615,
+18617,
+18618,
+18619,
+18621,
+19884,
+19885,
+19886,
+19887,
+19888,
+19889,
+19890,
+19891,
+19892,
+19893,
+19894,
+19895,
+19901,
+19903,
+20164,
+20165,
+20168,
+20169,
+20173,
+20174,
+20175,
+20177,
+20179,
+20180,
+20181,
+20183,
+20184,
+20185,
+20187,
+20188,
+20190,
+20191,
+20192,
+20193,
+20255,
+20256,
+20257,
+20258,
+20259,
+20260,
+20261,
+20264,
+20265,
+20266,
+20267,
+20268,
+20298,
+20299,
+20300,
+20301,
+20302,
+20306,
+20315,
+20318,
+20526,
+20527,
+20528,
+20529,
+20530,
+20537,
+20538,
+20542,
+20543,
+20545,
+20546,
+20547,
+20548,
+20565,
+20568,
+20576,
+20577,
+20579,
+20580,
+20581,
+20582,
+20583,
+20584,
+20585,
+20586,
+20587,
+20588,
+20589,
+20590,
+20591,
+20593,
+20594,
+20596,
+20597,
+20620,
+20621,
+20622,
+20623,
+20624,
+20625,
+20626,
+20627,
+20628,
+20629,
+20630,
+20633,
+20636,
+20637,
+20638,
+20639,
+20640,
+20641,
+20642,
+20644,
+20645,
+20646,
+20647,
+20648,
+20649,
+20650,
+20652,
+20653,
+20656,
+20657,
+20686,
+20688,
+20690,
+20691,
+20692,
+20693,
+20694,
+20695,
+20696,
+20697,
+20698,
+20699,
+20701,
+20706,
+20993,
+21522,
+21523,
+21524,
+21525,
+21526,
+21527,
+21528,
+21532,
+21533,
+21536,
+21537,
+21539,
+21540,
+21541,
+21542,
+21543,
+21544,
+21545,
+21546,
+21547,
+21548,
+21549,
+21551,
+21558,
+21559,
+21560,
+21562,
+21563,
+21564,
+21565,
+21570,
+21571,
+21572,
+21573,
+21574,
+21575,
+21576,
+21577,
+21578,
+21581,
+21582,
+21585,
+21586,
+21587,
+21590,
+21591,
+21592,
+21593,
+21595,
+21596,
+21597,
+21598,
+21604,
+21605,
+21608,
+21610,
+21611,
+21613,
+21614,
+21615,
+21619,
+21621,
+21622,
+21623,
+21624,
+21626,
+21645,
+21841,
+21842,
+21843,
+21914,
+21917,
+21990,
+22346,
+24857,
+25547,
+25551,
+25560,
+25562,
+25563,
+25565,
+25568,
+25569,
+25570,
+25571,
+25572,
+25573,
+25575,
+25576,
+25577,
+28171,
+38258);
+
+-- Expansion 2 (WotLK) creatures
+UPDATE `creature_template` SET `ExperienceModifier` = 2.5 WHERE `entry` IN (
+10184,
+10404,
+12129,
+15928,
+15931,
+15932,
+15936,
+15952,
+15953,
+15954,
+15956,
+15974,
+15975,
+15976,
+15977,
+15978,
+15979,
+15980,
+15981,
+15989,
+15990,
+16011,
+16017,
+16018,
+16020,
+16021,
+16022,
+16024,
+16025,
+16028,
+16029,
+16034,
+16036,
+16037,
+16056,
+16057,
+16060,
+16061,
+16063,
+16064,
+16065,
+16067,
+16145,
+16146,
+16154,
+16156,
+16163,
+16164,
+16165,
+16167,
+16168,
+16193,
+16194,
+16215,
+16216,
+16236,
+16243,
+16244,
+16297,
+16447,
+23872,
+23953,
+23954,
+23956,
+23960,
+23961,
+24069,
+24071,
+24078,
+24079,
+24080,
+24082,
+24083,
+24085,
+24200,
+24201,
+24808,
+24849,
+24864,
+26499,
+26550,
+26553,
+26554,
+26555,
+26620,
+26621,
+26623,
+26624,
+26625,
+26626,
+26628,
+26630,
+26631,
+26632,
+26635,
+26636,
+26637,
+26638,
+26639,
+26641,
+26669,
+26670,
+26672,
+26683,
+26684,
+26685,
+26686,
+26687,
+26693,
+26694,
+26696,
+26716,
+26722,
+26723,
+26727,
+26728,
+26729,
+26730,
+26731,
+26734,
+26735,
+26736,
+26737,
+26761,
+26763,
+26782,
+26792,
+26794,
+26796,
+26800,
+26802,
+26805,
+26830,
+26861,
+26918,
+27048,
+27303,
+27307,
+27308,
+27309,
+27431,
+27447,
+27483,
+27633,
+27635,
+27638,
+27639,
+27640,
+27641,
+27654,
+27655,
+27656,
+27657,
+27658,
+27659,
+27729,
+27734,
+27736,
+27745,
+27746,
+27747,
+27752,
+27871,
+27949,
+27960,
+27961,
+27962,
+27963,
+27964,
+27965,
+27966,
+27969,
+27970,
+27971,
+27972,
+27975,
+27977,
+27978,
+28055,
+28130,
+28149,
+28201,
+28231,
+28249,
+28368,
+28410,
+28546,
+28547,
+28578,
+28579,
+28580,
+28581,
+28582,
+28583,
+28584,
+28586,
+28587,
+28684,
+28732,
+28734,
+28823,
+28826,
+28835,
+28836,
+28837,
+28838,
+28859,
+28860,
+28920,
+28921,
+28923,
+28961,
+28965,
+29120,
+29128,
+29266,
+29276,
+29304,
+29305,
+29306,
+29307,
+29308,
+29309,
+29310,
+29311,
+29312,
+29313,
+29314,
+29315,
+29316,
+29335,
+29340,
+29395,
+29425,
+29682,
+29768,
+29774,
+29819,
+29820,
+29822,
+29826,
+29829,
+29830,
+29832,
+29838,
+29920,
+29931,
+30071,
+30083,
+30085,
+30111,
+30179,
+30258,
+30276,
+30277,
+30278,
+30279,
+30283,
+30284,
+30285,
+30286,
+30288,
+30319,
+30329,
+30413,
+30414,
+30416,
+30418,
+30419,
+30449,
+30451,
+30452,
+30453,
+30549,
+30658,
+30680,
+30681,
+30682,
+31104,
+31118,
+31125,
+32204,
+32315,
+32353,
+32593,
+32845,
+32857,
+32865,
+32867,
+32892,
+32906,
+32913,
+32914,
+32915,
+32922,
+32924,
+32925,
+32927,
+32930,
+33054,
+33089,
+33113,
+33118,
+33121,
+33134,
+33186,
+33210,
+33235,
+33237,
+33259,
+33264,
+33271,
+33282,
+33287,
+33293,
+33354,
+33355,
+33378,
+33430,
+33431,
+33515,
+33525,
+33526,
+33527,
+33528,
+33579,
+33620,
+33622,
+33624,
+33629,
+33696,
+33699,
+33722,
+33725,
+33754,
+33755,
+33772,
+33774,
+33775,
+33816,
+33818,
+33819,
+33820,
+33822,
+33823,
+33824,
+33956,
+33957,
+33993,
+34015,
+34054,
+34069,
+34085,
+34086,
+34133,
+34134,
+34135,
+34164,
+34183,
+34190,
+34191,
+34192,
+34193,
+34196,
+34197,
+34198,
+34199,
+34234,
+34267,
+34269,
+34271,
+34273,
+34816,
+34990,
+34992,
+34994,
+34995,
+34996,
+35013,
+35143,
+36296,
+36476,
+36478,
+36494,
+36497,
+36499,
+36502,
+36516,
+36522,
+36564,
+36597,
+36612,
+36620,
+36626,
+36627,
+36661,
+36666,
+36678,
+36723,
+36724,
+36725,
+36764,
+36765,
+36766,
+36767,
+36770,
+36771,
+36772,
+36773,
+36788,
+36789,
+36794,
+36805,
+36807,
+36808,
+36811,
+36829,
+36830,
+36841,
+36855,
+36874,
+36877,
+36879,
+36880,
+36886,
+36891,
+36896,
+36954,
+36990,
+36998,
+37003,
+37004,
+37007,
+37011,
+37012,
+37016,
+37017,
+37021,
+37022,
+37023,
+37025,
+37026,
+37027,
+37028,
+37030,
+37031,
+37032,
+37033,
+37035,
+37038,
+37068,
+37098,
+37119,
+37120,
+37122,
+37123,
+37124,
+37125,
+37127,
+37129,
+37132,
+37133,
+37134,
+37144,
+37148,
+37183,
+37187,
+37189,
+37217,
+37223,
+37225,
+37226,
+37528,
+37531,
+37532,
+37533,
+37534,
+37544,
+37545,
+37546,
+37554,
+37571,
+37583,
+37595,
+37596,
+37662,
+37663,
+37664,
+37665,
+37666,
+37711,
+37712,
+37713,
+37728,
+37764,
+37779,
+37781,
+37813,
+37868,
+37920,
+37928,
+37950,
+37955,
+37970,
+37972,
+37973,
+37996,
+38004,
+38112,
+38113,
+38125,
+38172,
+38173,
+38175,
+38176,
+38177,
+38194,
+38433,
+38471,
+38482,
+38490,
+38494,
+38551,
+38558,
+38589,
+39190,
+39372,
+39746,
+39747,
+39751,
+39863,
+40417,
+40419,
+40421,
+40423,
+40446,
+-- Difficulty entries
+25546,
+29229,
+29241,
+29242,
+29243,
+29247,
+29248,
+29249,
+29268,
+29278,
+29286,
+29324,
+29347,
+29353,
+29355,
+29356,
+29359,
+29362,
+29363,
+29371,
+29373,
+29417,
+29448,
+29574,
+29575,
+29576,
+29601,
+29603,
+29608,
+29609,
+29612,
+29613,
+29615,
+29701,
+29718,
+29823,
+29824,
+29825,
+29828,
+29831,
+29833,
+29835,
+29837,
+29842,
+29852,
+29898,
+29899,
+29900,
+29940,
+29955,
+29991,
+30061,
+30075,
+30087,
+30097,
+30389,
+30398,
+30424,
+30457,
+30459,
+30460,
+30473,
+30478,
+30485,
+30496,
+30498,
+30509,
+30510,
+30516,
+30517,
+30518,
+30519,
+30521,
+30522,
+30524,
+30525,
+30526,
+30529,
+30530,
+30532,
+30540,
+30600,
+30601,
+30602,
+30603,
+30747,
+30748,
+30762,
+30764,
+30765,
+30766,
+30770,
+30772,
+30774,
+30780,
+30782,
+30784,
+30786,
+30788,
+30790,
+30803,
+30806,
+30807,
+30816,
+30817,
+30818,
+30820,
+30821,
+30901,
+30903,
+30904,
+30905,
+30915,
+30916,
+30926,
+30927,
+30929,
+30930,
+30932,
+30933,
+30935,
+30936,
+30938,
+30939,
+30941,
+30942,
+30964,
+30966,
+30967,
+30968,
+30971,
+30972,
+30974,
+30975,
+30976,
+30977,
+30978,
+30979,
+30980,
+30981,
+30982,
+30983,
+30998,
+30999,
+31000,
+31001,
+31178,
+31179,
+31187,
+31199,
+31200,
+31210,
+31311,
+31336,
+31338,
+31339,
+31340,
+31342,
+31343,
+31345,
+31346,
+31347,
+31349,
+31350,
+31351,
+31352,
+31354,
+31355,
+31357,
+31359,
+31360,
+31362,
+31363,
+31365,
+31368,
+31370,
+31371,
+31372,
+31373,
+31374,
+31375,
+31376,
+31377,
+31378,
+31381,
+31383,
+31384,
+31385,
+31386,
+31387,
+31392,
+31442,
+31443,
+31449,
+31450,
+31451,
+31452,
+31453,
+31454,
+31455,
+31456,
+31457,
+31459,
+31460,
+31463,
+31464,
+31465,
+31466,
+31469,
+31470,
+31471,
+31472,
+31475,
+31491,
+31507,
+31508,
+31509,
+31510,
+31511,
+31512,
+31513,
+31520,
+31533,
+31534,
+31535,
+31536,
+31537,
+31538,
+31542,
+31558,
+31559,
+31560,
+31561,
+31587,
+31604,
+31606,
+31608,
+31609,
+31610,
+31611,
+31612,
+31656,
+31658,
+31659,
+31660,
+31661,
+31662,
+31663,
+31665,
+31666,
+31667,
+31668,
+31669,
+31673,
+31675,
+31676,
+31679,
+31722,
+31734,
+32209,
+32368,
+32846,
+33147,
+33190,
+33191,
+33360,
+33391,
+33392,
+33393,
+33449,
+33692,
+33693,
+33694,
+33700,
+33723,
+33724,
+33729,
+33731,
+33732,
+33733,
+33734,
+33735,
+33737,
+33741,
+33757,
+33758,
+33773,
+33827,
+33828,
+33829,
+33830,
+33831,
+33832,
+33885,
+33909,
+33994,
+34003,
+34016,
+34105,
+34139,
+34141,
+34142,
+34165,
+34175,
+34185,
+34186,
+34201,
+34214,
+34216,
+34217,
+34220,
+34221,
+34226,
+34229,
+34235,
+34236,
+34237,
+34245,
+34254,
+34255,
+34256,
+34257,
+34268,
+34270,
+34272,
+34274,
+34332,
+35359,
+35360,
+36498,
+36538,
+36572,
+37504,
+37563,
+37565,
+37566,
+37567,
+37568,
+37569,
+37608,
+37609,
+37612,
+37613,
+37622,
+37626,
+37627,
+37635,
+37636,
+37638,
+37640,
+37645,
+37646,
+37647,
+37648,
+37649,
+37650,
+37651,
+37652,
+37655,
+37677,
+37720,
+37721,
+37731,
+37797,
+37957,
+38000,
+38025,
+38026,
+38031,
+38057,
+38058,
+38059,
+38061,
+38062,
+38063,
+38064,
+38072,
+38073,
+38074,
+38075,
+38076,
+38078,
+38079,
+38080,
+38081,
+38082,
+38083,
+38084,
+38085,
+38086,
+38087,
+38088,
+38090,
+38091,
+38094,
+38096,
+38097,
+38098,
+38099,
+38100,
+38101,
+38102,
+38103,
+38106,
+38108,
+38110,
+38126,
+38130,
+38131,
+38132,
+38133,
+38139,
+38151,
+38167,
+38174,
+38193,
+38219,
+38220,
+38249,
+38298,
+38299,
+38303,
+38304,
+38390,
+38399,
+38400,
+38401,
+38402,
+38418,
+38431,
+38434,
+38445,
+38446,
+38462,
+38479,
+38480,
+38481,
+38483,
+38486,
+38524,
+38525,
+38544,
+38552,
+38563,
+38564,
+38590,
+38599,
+38603,
+39166,
+39287,
+39805,
+39823,
+39864,
+39920,
+40418,
+40420,
+40422,
+40424,
+37505,
+37958,
+38296,
+38435,
+38549,
+38582,
+38585,
+38725,
+38769,
+38771,
+38784,
+39167,
+39288,
+39944,
+37506,
+37959,
+38297,
+38436,
+38550,
+38583,
+38586,
+38735,
+38770,
+38772,
+38785,
+39168,
+39289,
+39945);
diff --git a/data/sql/updates/db_world/2025_11_08_01.sql b/data/sql/updates/db_world/2025_11_08_01.sql
new file mode 100644
index 0000000000..be643114a2
--- /dev/null
+++ b/data/sql/updates/db_world/2025_11_08_01.sql
@@ -0,0 +1,5 @@
+-- DB update 2025_11_08_00 -> 2025_11_08_01
+--
+DELETE FROM `conditions` WHERE (`SourceTypeOrReferenceId` = 17) AND (`SourceGroup` = 0) AND (`SourceEntry` = 40969) AND (`SourceId` = 0) AND (`ElseGroup` = 0) AND (`ConditionTypeOrReference` = 31) AND (`ConditionTarget` = 1) AND (`ConditionValue1` = 3) AND (`ConditionValue2` = 23689) AND (`ConditionValue3` = 0);
+INSERT INTO `conditions` (`SourceTypeOrReferenceId`, `SourceGroup`, `SourceEntry`, `SourceId`, `ElseGroup`, `ConditionTypeOrReference`, `ConditionTarget`, `ConditionValue1`, `ConditionValue2`, `ConditionValue3`, `NegativeCondition`, `ErrorType`, `ErrorTextId`, `ScriptName`, `Comment`) VALUES
+(17, 0, 40969, 0, 0, 31, 1, 3, 23689, 0, 0, 0, 0, '', 'Malister Frost Wand require Proto-Drake');
diff --git a/data/sql/updates/db_world/2025_11_08_02.sql b/data/sql/updates/db_world/2025_11_08_02.sql
new file mode 100644
index 0000000000..c751745a29
--- /dev/null
+++ b/data/sql/updates/db_world/2025_11_08_02.sql
@@ -0,0 +1,172 @@
+-- DB update 2025_11_08_01 -> 2025_11_08_02
+SET @BossXPMod = 7.5,
+ @FinalBossXPMod = 10;
+
+UPDATE `creature_template` SET `ExperienceModifier` = @BossXPMod WHERE `entry` IN (
+-- Utgarde Keep
+23953, -- Prince Keleseth
+30748,
+24200, -- Skarvald the Constructor
+31679,
+24201, -- Dalronn the Controller
+31656,
+-- Azjol-Nerub
+28684, -- Krik'thir the Gatewatcher
+31612,
+28921, -- Hadronox
+31611,
+-- Ahn'kahet: The Old Kingdom
+29309, -- Elder Nadox
+31456,
+29308, -- Prince Taldaram
+31469,
+29310, -- Jedoga Shadowseeker
+31465,
+30258, -- Amanitar
+31463,
+-- The Nexus
+26731, -- Grand Magus Telestra
+30510,
+26763, -- Anomalus
+30529,
+26794, -- Ormorok the Tree-Shaper
+30532,
+26796, -- Commander Stoutbeard
+30398,
+26798, -- Commander Kolurg
+30397,
+-- Drak'Tharon Keep
+26630, -- Trollgore
+31362,
+26631, -- Novos the Summoner
+31350,
+-- 27483, -- King Dred, observed to not give as much experience as this
+-- 31349,
+-- The Violet Hold
+29315, -- Erekem
+31507,
+29316, -- Moragg
+31510,
+29313, -- Ichoron
+31508,
+29266, -- Xevozz
+31511,
+29312, -- Lavanthor
+31509,
+29314, -- Zuramat the Obliterator
+31512,
+-- Gundrak
+29304, -- Slad'ran
+31370,
+-- 29573, -- Drakkari Elemental, observed to not give as much experience as this
+-- 31367,
+29305, -- Moorabi
+30530,
+29932, -- Eck the Ferocious
+-- Halls of Stone
+27975, -- Maiden of Grief
+31384,
+27977, -- Krystallus
+31381,
+-- Halls of Lightning
+28586, -- General Bjarngrim
+31533,
+28587, -- Volkhan
+31536,
+28546, -- Ionar
+31537,
+-- The Oculus
+27654, -- Drakos the Interrogator
+31558,
+27447, -- Varos Cloudstrider
+31559,
+27655, -- Mage-Lord Urom
+31560,
+-- Utgarde Pinnacle
+26668, -- Svala Sorrowgrave
+30810,
+26687, -- Gortok Palehoof
+30774,
+26693, -- Skadi the Ruthless
+30807,
+-- The Culling of Stratholme
+26529, -- Meathook
+31211,
+26530, -- Salramm the Fleshcrafter
+31212,
+26532, -- Chrono-Lord Epoch
+31215,
+32273, -- Infinite Corruptor
+32313,
+-- Trial of the Champion
+34705, -- Marshal Jacob Alerius
+36088,
+34702, -- Ambrose Boltspark
+36082,
+34701, -- Colosos
+36083,
+34657, -- Jaelyne Evensong
+36086,
+34703, -- Lana Stouthammer
+36087,
+35572, -- Mokra the Skullcrusher
+36089,
+35569, -- Eressea Dawnsinger
+36085,
+35571, -- Runok Wildmane
+36090,
+35570, -- Zul'tore
+36091,
+35617, -- Deathstalker Visceri
+36084,
+35119, -- Eadric the Pure
+35518,
+34928, -- Argent Confessor Paletress
+35517,
+-- The Forge of Souls
+36497, -- Bronjahm
+36498,
+-- Pit of Saron
+36494, -- Forgemaster Garfrost
+37613,
+36476, -- Ick
+37627,
+-- Halls of Reflection
+38112, -- Falric
+38599,
+38113, -- Marwyn
+38603
+);
+
+UPDATE `creature_template` SET `ExperienceModifier` = @FinalBossXPMod WHERE `entry` IN (
+23954, -- Ingvar the Plunderer, Utgarde Keep
+31673,
+29120, -- Anub'arak, Azjol-Nerub
+31610,
+29311, -- Herald Volazj,
+31464,
+26723, -- Keristrasza
+30540,
+26632, -- The Prophet Tharon'ja
+31360,
+31134, -- Cyanigosa
+31506,
+29306, -- Gal'darah
+31368,
+27978, -- Sjonnir The Ironshaper
+31386,
+28923, -- Loken
+31538,
+27656, -- Ley-Guardian Eregos
+31561,
+26861, -- King Ymiron
+30788,
+26533, -- Mal'Ganis
+31217,
+35451, -- The Black Knight, Trial of the Champion
+35490,
+36502, -- Devourer of Souls, Forge of Souls
+37677,
+36658, -- Scourgelord Tyrannus, Pit of Saron
+36938
+);
diff --git a/data/sql/updates/db_world/2025_11_09_00.sql b/data/sql/updates/db_world/2025_11_09_00.sql
new file mode 100644
index 0000000000..5620c01f4d
--- /dev/null
+++ b/data/sql/updates/db_world/2025_11_09_00.sql
@@ -0,0 +1,3 @@
+-- DB update 2025_11_08_02 -> 2025_11_09_00
+--
+UPDATE `creature_addon` SET `visibilityDistanceType` = 3 WHERE `guid` = 103278;
diff --git a/data/sql/updates/db_world/2025_11_09_01.sql b/data/sql/updates/db_world/2025_11_09_01.sql
new file mode 100644
index 0000000000..384d632d0b
--- /dev/null
+++ b/data/sql/updates/db_world/2025_11_09_01.sql
@@ -0,0 +1,3 @@
+-- DB update 2025_11_09_00 -> 2025_11_09_01
+--
+UPDATE `creature_template` SET `flags_extra` = `flags_extra`|64 WHERE `entry` IN (28220, 28218, 28242, 28103, 28212, 28207, 28170);
diff --git a/data/sql/updates/db_world/2025_11_09_02.sql b/data/sql/updates/db_world/2025_11_09_02.sql
new file mode 100644
index 0000000000..727a44f5c8
--- /dev/null
+++ b/data/sql/updates/db_world/2025_11_09_02.sql
@@ -0,0 +1,3 @@
+-- DB update 2025_11_09_01 -> 2025_11_09_02
+--
+DELETE FROM `creature` WHERE `id1` = 10218;
diff --git a/data/sql/updates/db_world/2025_11_09_03.sql b/data/sql/updates/db_world/2025_11_09_03.sql
new file mode 100644
index 0000000000..e03c2acf6d
--- /dev/null
+++ b/data/sql/updates/db_world/2025_11_09_03.sql
@@ -0,0 +1,67 @@
+-- DB update 2025_11_09_02 -> 2025_11_09_03
+--
+-- Fixes "Bluff", Set `allowOverride` of action list
+UPDATE `smart_scripts` SET `action_param3` = 1 WHERE (`entryorguid` IN (23672, 23673, 23675, 24271)) AND (`source_type` = 0) AND (`event_type` = 8) AND (`event_param1` = 44609);
+
+-- Removes double spawns
+DELETE FROM `gameobject` WHERE `id` = 186959 AND `guid` IN (264459, 264460, 264461, 264462, 264463, 264464, 264465);
+
+-- Add missing aura. Usage is unknown
+DELETE FROM `creature_template_addon` WHERE (`entry` = 24825);
+INSERT INTO `creature_template_addon` (`entry`, `path_id`, `mount`, `bytes1`, `bytes2`, `emote`, `visibilityDistanceType`, `auras`) VALUES
+(24825, 0, 0, 0, 0, 0, 0, '44652');
+
+-- Disable flying vehicle, but causes camera stuttering on rocket jump
+UPDATE `creature_template_movement` SET `Flight` = 0 WHERE (`CreatureId` = 24825);
+
+DELETE FROM `creature_text` WHERE (`CreatureID` = 24825) AND (`GroupID` = 1);
+INSERT INTO `creature_text` (`CreatureID`, `GroupID`, `ID`, `Text`, `Type`, `Language`, `Probability`, `Emote`, `Duration`, `Sound`, `BroadcastTextId`, `TextRange`, `comment`) VALUES
+(24825, 1, 0, 'Launching.', 12, 0, 100, 0, 0, 0, 23860, 0, 'Iron Rune Construct');
+
+DELETE FROM `smart_scripts` WHERE (`entryorguid` = 24825) AND (`source_type` = 0) AND (`id` IN (15, 16));
+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
+(24825, 0, 15, 0, 31, 0, 100, 512, 44609, 0, 3000, 3000, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Iron Rune Construct - On Spellhit \'Bluff\' - Say Line 0'),
+(24825, 0, 16, 0, 8, 0, 100, 512, 44626, 0, 5000, 5000, 0, 0, 1, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Iron Rune Construct - On Spellhit \'Rocket Jump\' - Say Line 1');
+-- Remove unused 'Say Line 0' in actionscripts
+DELETE FROM `smart_scripts` WHERE (`entryorguid` IN (2367201, 2367301, 2367501, 2427101)) AND `source_type` = 9 AND `id` = 1 AND `target_type` = 19 AND `target_param1` = 24825 AND `action_type` = 1 AND `target_param2` = 20;
+
+DELETE FROM `conditions` WHERE (`SourceTypeOrReferenceId` = 13) AND (`SourceGroup` IN (2, 4)) AND (`SourceEntry` = 44608) AND (`SourceId` = 0) AND (`ConditionTypeOrReference` = 31);
+INSERT INTO `conditions` (`SourceTypeOrReferenceId`, `SourceGroup`, `SourceEntry`, `SourceId`, `ElseGroup`, `ConditionTypeOrReference`, `ConditionTarget`, `ConditionValue1`, `ConditionValue2`, `ConditionValue3`, `NegativeCondition`, `ErrorType`, `ErrorTextId`, `ScriptName`, `Comment`) VALUES
+(13, 4, 44608, 0, 0, 31, 0, 3, 24826, 0, 0, 0, 0, '', 'Rocket Jump'),
+(13, 4, 44608, 0, 1, 31, 0, 3, 24827, 0, 0, 0, 0, '', 'Rocket Jump'),
+(13, 4, 44608, 0, 2, 31, 0, 3, 24828, 0, 0, 0, 0, '', 'Rocket Jump'),
+(13, 4, 44608, 0, 3, 31, 0, 3, 24829, 0, 0, 0, 0, '', 'Rocket Jump'),
+(13, 4, 44608, 0, 4, 31, 0, 3, 24831, 0, 0, 0, 0, '', 'Rocket Jump'),
+(13, 4, 44608, 0, 5, 31, 0, 3, 24832, 0, 0, 0, 0, '', 'Rocket Jump'),
+(13, 2, 44608, 0, 0, 31, 0, 5, 186953, 0, 0, 0, 0, '', 'Rocket Jump'),
+(13, 2, 44608, 0, 1, 31, 0, 5, 186960, 0, 0, 0, 0, '', 'Rocket Jump'),
+(13, 2, 44608, 0, 2, 31, 0, 5, 186961, 0, 0, 0, 0, '', 'Rocket Jump'),
+(13, 2, 44608, 0, 3, 31, 0, 5, 186963, 0, 0, 0, 0, '', 'Rocket Jump'),
+(13, 2, 44608, 0, 4, 31, 0, 5, 186962, 0, 0, 0, 0, '', 'Rocket Jump'),
+(13, 2, 44608, 0, 5, 31, 0, 5, 186964, 0, 0, 0, 0, '', 'Rocket Jump');
+
+DELETE FROM `smart_scripts` WHERE (`source_type` = 0 AND `entryorguid` = 24825);
+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
+(24825, 0, 0, 0, 54, 0, 100, 512, 0, 0, 0, 0, 0, 0, 75, 44643, 0, 0, 0, 0, 0, 23, 0, 0, 0, 0, 0, 0, 0, 0, 'Iron Rune Construct - On Just Summoned - Add Aura \'Reputation and Language\''),
+(24825, 0, 1, 0, 28, 0, 100, 512, 0, 0, 0, 0, 0, 0, 28, 44643, 0, 0, 0, 0, 0, 23, 0, 0, 0, 0, 0, 0, 0, 0, 'Iron Rune Construct - On Passenger Removed - Remove Aura \'Reputation and Language\''),
+(24825, 0, 2, 0, 38, 0, 100, 512, 0, 1, 0, 0, 0, 0, 53, 2, 24826, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Iron Rune Construct - On Data Set 0 1 - Start Waypoint Path 24826'),
+(24825, 0, 3, 0, 38, 0, 100, 512, 0, 2, 0, 0, 0, 0, 53, 2, 24827, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Iron Rune Construct - On Data Set 0 2 - Start Waypoint Path 24827'),
+(24825, 0, 4, 0, 38, 0, 100, 512, 0, 3, 0, 0, 0, 0, 53, 2, 24828, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Iron Rune Construct - On Data Set 0 3 - Start Waypoint Path 24828'),
+(24825, 0, 5, 0, 38, 0, 100, 512, 0, 4, 0, 0, 0, 0, 53, 2, 24831, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Iron Rune Construct - On Data Set 0 4 - Start Waypoint Path 24831'),
+(24825, 0, 6, 0, 38, 0, 100, 512, 0, 5, 0, 0, 0, 0, 53, 2, 24829, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Iron Rune Construct - On Data Set 0 5 - Start Waypoint Path 24829'),
+(24825, 0, 7, 0, 38, 0, 100, 512, 0, 6, 0, 0, 0, 0, 53, 2, 24832, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Iron Rune Construct - On Data Set 0 6 - Start Waypoint Path 24832'),
+(24825, 0, 8, 0, 58, 0, 100, 512, 0, 0, 0, 0, 0, 0, 28, 44626, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Iron Rune Construct - On Path 0 Finished - Remove Aura \'Rocket Jump\''),
+(24825, 0, 9, 0, 31, 0, 100, 512, 44609, 0, 3000, 3000, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Iron Rune Construct - On Target Spellhit \'Bluff\' - Say Line 0'),
+(24825, 0, 10, 0, 8, 0, 100, 512, 44626, 0, 5000, 5000, 0, 0, 1, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Iron Rune Construct - On Spellhit \'Rocket Jump\' - Say Line 1');
+--
+UPDATE `creature_template` SET `AIName` = 'SmartAI' WHERE (`entry` IN (24826, 24827, 24828, 24829, 24831, 24832));
+DELETE FROM `smart_scripts` WHERE (`source_type` = 0 AND `entryorguid` IN (24826, 24827, 24828, 24829, 24831, 24832));
+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
+(24826, 0, 0, 0, 8, 0, 100, 0, 44608, 0, 0, 0, 0, 0, 45, 0, 1, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 0, 'On Spellhit \'Rocket Jump\' - Set Data 0 1'),
+(24827, 0, 0, 0, 8, 0, 100, 0, 44608, 0, 0, 0, 0, 0, 45, 0, 2, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 0, 'On Spellhit \'Rocket Jump\' - Set Data 0 2'),
+(24828, 0, 0, 0, 8, 0, 100, 0, 44608, 0, 0, 0, 0, 0, 45, 0, 3, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 0, 'On Spellhit \'Rocket Jump\' - Set Data 0 3'),
+(24831, 0, 0, 0, 8, 0, 100, 0, 44608, 0, 0, 0, 0, 0, 45, 0, 4, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 0, 'On Spellhit \'Rocket Jump\' - Set Data 0 4'),
+(24829, 0, 0, 0, 8, 0, 100, 0, 44608, 0, 0, 0, 0, 0, 45, 0, 5, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 0, 'On Spellhit \'Rocket Jump\' - Set Data 0 5'),
+(24832, 0, 0, 0, 8, 0, 100, 0, 44608, 0, 0, 0, 0, 0, 45, 0, 6, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 0, 'On Spellhit \'Rocket Jump\' - Set Data 0 6');
+
+DELETE FROM `smart_scripts` WHERE `source_type` = 9 AND `entryorguid` IN (2482600, 2482700, 2482800, 2482900, 2483100, 2483200);
diff --git a/data/sql/updates/db_world/2025_11_09_04.sql b/data/sql/updates/db_world/2025_11_09_04.sql
new file mode 100644
index 0000000000..3589354000
--- /dev/null
+++ b/data/sql/updates/db_world/2025_11_09_04.sql
@@ -0,0 +1,6 @@
+-- DB update 2025_11_09_03 -> 2025_11_09_04
+--
+DELETE FROM `spell_custom_attr` WHERE `spell_id` IN (52671, 59834);
+INSERT INTO `spell_custom_attr` (`spell_id`, `attributes`) VALUES
+(52671, 0x00400000),
+(59834, 0x00400000);
diff --git a/data/sql/updates/db_world/2025_11_09_05.sql b/data/sql/updates/db_world/2025_11_09_05.sql
new file mode 100644
index 0000000000..c94e12a75d
--- /dev/null
+++ b/data/sql/updates/db_world/2025_11_09_05.sql
@@ -0,0 +1,79 @@
+-- DB update 2025_11_09_04 -> 2025_11_09_05
+--
+-- v11_2_5_63906
+SET @VBUILD := 63906;
+
+DELETE FROM `creature_template_addon` WHERE (`entry` = 28503);
+INSERT INTO `creature_template_addon` (`entry`, `path_id`, `mount`, `bytes1`, `bytes2`, `emote`, `visibilityDistanceType`, `auras`) VALUES
+(28503, 0, 0, 0, 0, 0, 0, '58837');
+
+DELETE FROM `creature_template_addon` WHERE (`entry` = 28998);
+INSERT INTO `creature_template_addon` (`entry`, `path_id`, `mount`, `bytes1`, `bytes2`, `emote`, `visibilityDistanceType`, `auras`) VALUES
+(28998, 0, 0, 0, 0, 0, 0, '58837');
+
+DELETE FROM `creature` WHERE (`id1` = 28998) AND (`guid` IN (1974609));
+INSERT INTO `creature` (`guid`, `id1`, `id2`, `id3`, `map`, `zoneId`, `areaId`, `spawnMask`, `phaseMask`, `equipment_id`, `position_x`, `position_y`, `position_z`, `orientation`, `spawntimesecs`, `wander_distance`, `currentwaypoint`, `curhealth`, `curmana`, `MovementType`, `npcflag`, `unit_flags`, `dynamicflags`, `ScriptName`, `Comment`, `VerifiedBuild`) VALUES
+(1974609, 28998, 0, 0, 571, 0, 0, 1, 1, 0, 6175.2456, -2017.6545, 590.9613, 3.0019662, 300, 0, 0, 550001, 0, 0, 0, 0, 0, '', NULL, @VBUILD);
+
+DELETE FROM `creature_template_addon` WHERE (`entry` = 28998);
+INSERT INTO `creature_template_addon` (`entry`, `path_id`, `mount`, `bytes1`, `bytes2`, `emote`, `visibilityDistanceType`, `auras`) VALUES
+(28998, 0, 0, 0, 1, 0, 0, '');
+
+UPDATE `spell_target_position` SET `PositionX`=6161.15, `PositionY`=-2015.36, `PositionZ`=590.878, `Orientation`=6.283189773559570312, `VerifiedBuild`=@VBUILD WHERE `ID`=52863 AND `EffectIndex`=0;
+
+UPDATE `creature_template_addon` SET `bytes2` = 1 WHERE (`entry` = 28717);
+
+-- Update comments
+DELETE FROM `smart_scripts` WHERE (`entryorguid` = 28498) AND (`source_type` = 0) AND (`id` IN (0, 1, 2, 3, 4));
+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
+(28498, 0, 0, 0, 54, 0, 100, 512, 0, 0, 0, 0, 0, 0, 53, 1, 28498, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'The Lich King - On Just Summoned - Start Waypoint Path 28498'),
+(28498, 0, 1, 2, 40, 0, 100, 512, 2, 0, 0, 0, 0, 0, 54, 83000, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'The Lich King - On Point 2 of Path Any Reached - Pause Waypoint'),
+(28498, 0, 2, 0, 61, 0, 100, 512, 0, 0, 0, 0, 0, 0, 80, 2849800, 2, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'The Lich King - On Point 2 of Path Any Reached - Run Script'),
+(28498, 0, 3, 4, 40, 0, 100, 512, 3, 0, 0, 0, 0, 0, 45, 0, 2, 0, 0, 0, 0, 10, 127495, 0, 0, 0, 0, 0, 0, 0, 'The Lich King - On Point 3 of Path Any Reached - Set Data 0 2'),
+(28498, 0, 4, 0, 61, 0, 100, 512, 0, 0, 0, 0, 0, 0, 41, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'The Lich King - On Point 3 of Path Any Reached - Despawn Instant');
+
+-- Disable gravity
+DELETE FROM `creature_template_movement` WHERE (`CreatureId` = 29100);
+INSERT INTO `creature_template_movement` (`CreatureId`, `Ground`, `Swim`, `Flight`, `Rooted`, `Chase`, `Random`, `InteractionPauseTimer`) VALUES
+(29100, 0, 0, 1, 0, 0, 0, 0);
+
+-- Idle
+UPDATE `creature` SET `MovementType` = 0, `wander_distance` = 0 WHERE `id1` = 29100 AND `guid` IN (112307, 112308, 112309, 112310);
+
+UPDATE `gameobject_template` SET `AIName` = 'SmartGameObjectAI' WHERE `entry` = 202357;
+DELETE FROM `smart_scripts` WHERE (`entryorguid` = 202357) AND (`source_type` = 1) 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
+(202357, 1, 0, 0, 62, 0, 100, 0, 11091, 0, 0, 0, 0, 0, 11, 57553, 0, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 0, 'Drakuru\'s Last Wish - On Gossip Option 0 Selected - Cast \'Escape Voltarus\'');
+
+-- Drakuru's Last Wish
+UPDATE `gameobject_template_addon` SET `flags` = 32 WHERE (`entry` = 202357);
+
+-- Skull and Portal spells target 'Totally Generic Bunny (JSB)'
+DELETE FROM `creature` WHERE (`id1` = 28960) and `guid` IN (98914, 98920);
+INSERT INTO `creature` (`guid`, `id1`, `id2`, `id3`, `map`, `zoneId`, `areaId`, `spawnMask`, `phaseMask`, `equipment_id`, `position_x`, `position_y`, `position_z`, `orientation`, `spawntimesecs`, `wander_distance`, `currentwaypoint`, `curhealth`, `curmana`, `MovementType`, `npcflag`, `unit_flags`, `dynamicflags`, `ScriptName`, `Comment`, `VerifiedBuild`) VALUES
+(98914, 28960, 0, 0, 571, 0, 0, 1, 1, 0, 6144.01, -2011.8, 590.963, 6.16101, 300, 0, 0, 4979, 0, 0, 0, 0, 0, '', '\'Throw Portal Crystal\' guid target', @VBUILD),
+(98920, 28960, 0, 0, 571, 0, 0, 1, 1, 0, 6181.5137, -2032.4258, 590.96124, 1.01229, 300, 0, 0, 4979, 0, 0, 0, 0, 0, '', '\'Drakuru\'s Skull Missile\' guid target', @VBUILD);
+
+UPDATE `conditions` SET `ConditionValue3` = 98914, `Comment` = 'target Totally Generic Bunny (JSB)' WHERE (`SourceTypeOrReferenceId` = 13) AND (`SourceGroup` = 1) AND (`SourceEntry` = 54209) AND (`SourceId` = 0) AND (`ElseGroup` = 0) AND (`ConditionTypeOrReference` = 31) AND (`ConditionTarget` = 0) AND (`ConditionValue1` = 3) AND (`ConditionValue2` = 28960) AND (`ConditionValue3` = 0);
+DELETE FROM `conditions` WHERE (`SourceTypeOrReferenceId` = 13) AND (`SourceGroup` = 1) AND (`SourceEntry` = 54250) AND (`SourceId` = 0) AND (`ElseGroup` = 0) AND (`ConditionTypeOrReference` = 31) AND (`ConditionTarget` = 0) AND (`ConditionValue1` = 3) AND (`ConditionValue2` = 28960);
+INSERT INTO `conditions` (`SourceTypeOrReferenceId`, `SourceGroup`, `SourceEntry`, `SourceId`, `ElseGroup`, `ConditionTypeOrReference`, `ConditionTarget`, `ConditionValue1`, `ConditionValue2`, `ConditionValue3`, `NegativeCondition`, `ErrorType`, `ErrorTextId`, `ScriptName`, `Comment`) VALUES
+(13, 1, 54250, 0, 0, 31, 0, 3, 28960, 98920, 0, 0, 0, '', 'target Totally Generic Bunny (JSB)');
+
+DELETE FROM `conditions` WHERE (`SourceTypeOrReferenceId` = 13) AND (`SourceGroup` = 1) AND (`SourceEntry` = 54089) AND (`SourceId` = 0) AND (`ElseGroup` = 0) AND (`ConditionTypeOrReference` = 1) AND (`ConditionTarget` = 0) AND (`ConditionValue1` = 51966) 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, 54089, 0, 0, 1, 0, 51966, 0, 0, 0, 0, 0, '', 'Has Aura \'Scourge Disguise\'');
+
+-- 54104 Blight Fog
+UPDATE `creature_template_addon` SET `auras` = '54104' WHERE (`entry` = 28998);
+
+DELETE FROM `creature_summon_groups` WHERE `summonerId` = 28998 and `summonerType` = 0 AND `groupId` = 1;
+INSERT INTO `creature_summon_groups` (`summonerId`, `summonerType`, `groupId`, `entry`, `position_x`, `position_y`, `position_z`, `orientation`, `summonType`, `summonTime`, `Comment`) VALUES
+(28998, 0, 1, 28931, 6184.1455, -1970.1699, 586.84186, 4.5902, 8, 0, 'Overlord Drakuru - Group 1 - Blightblood Troll'),
+(28998, 0, 1, 28931, 6222.855, -2026.6315, 586.84186, 3.00197, 8, 0, 'Overlord Drakuru - Group 1 - Blightblood Troll'),
+(28998, 0, 1, 28931, 6166.278, -2065.3123, 586.84186, 1.44862, 8, 0, 'Overlord Drakuru - Group 1 - Blightblood Troll'),
+(28998, 0, 1, 28931, 6127.5117, -2008.6506, 586.84186, 6.16101, 8, 0, 'Overlord Drakuru - Group 1 - Blightblood Troll');
+
+-- 54105 Blight Fog
+DELETE FROM `spell_script_names` WHERE (`spell_id` = 54105);
+INSERT INTO `spell_script_names` (`spell_id`, `ScriptName`) VALUES
+(54105, 'spell_blight_fog');
diff --git a/data/sql/updates/db_world/2025_11_10_00.sql b/data/sql/updates/db_world/2025_11_10_00.sql
new file mode 100644
index 0000000000..a3f3213d6b
--- /dev/null
+++ b/data/sql/updates/db_world/2025_11_10_00.sql
@@ -0,0 +1,5 @@
+-- DB update 2025_11_09_05 -> 2025_11_10_00
+--
+DELETE FROM `smart_scripts` WHERE (`entryorguid` = 24539) AND (`source_type` = 0) AND (`id` IN (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`, `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
+(24539, 0, 5, 0, 2, 1, 100, 513, 0, 50, 0, 0, 0, 0, 80, 2453900, 2, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, '"Silvermoon" Harry - Between 0-50% Health - Run Script (Phase 1) (No Repeat)');
diff --git a/data/sql/updates/db_world/2025_11_10_01.sql b/data/sql/updates/db_world/2025_11_10_01.sql
new file mode 100644
index 0000000000..caa15f098a
--- /dev/null
+++ b/data/sql/updates/db_world/2025_11_10_01.sql
@@ -0,0 +1,4 @@
+-- DB update 2025_11_10_00 -> 2025_11_10_01
+--
+UPDATE `quest_template` SET `RewardFactionValue1` = 5 WHERE (`ID` = 11472);
+UPDATE `quest_template` SET `RewardFactionValue1` = 5, `RewardFactionOverride1` = 0 WHERE (`ID` = 11945);
diff --git a/data/sql/updates/db_world/2025_11_10_02.sql b/data/sql/updates/db_world/2025_11_10_02.sql
new file mode 100644
index 0000000000..cb1d4aad5a
--- /dev/null
+++ b/data/sql/updates/db_world/2025_11_10_02.sql
@@ -0,0 +1,4 @@
+-- DB update 2025_11_10_01 -> 2025_11_10_02
+--
+DELETE FROM `game_event_gameobject` WHERE `eventEntry`=1 AND `guid`=5;
+INSERT INTO `game_event_gameobject` (`eventEntry`, `guid`) VALUES(1, 5);
diff --git a/data/sql/updates/db_world/2025_11_10_03.sql b/data/sql/updates/db_world/2025_11_10_03.sql
new file mode 100644
index 0000000000..ff79a0774f
--- /dev/null
+++ b/data/sql/updates/db_world/2025_11_10_03.sql
@@ -0,0 +1,15 @@
+-- DB update 2025_11_10_02 -> 2025_11_10_03
+--
+-- Increase grid searches to 60 from 40
+DELETE FROM `smart_scripts` WHERE (`entryorguid` = 2572900) AND (`source_type` = 9) AND (`id` IN (2, 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`, `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
+(2572900, 9, 2, 0, 0, 0, 100, 0, 8000, 8000, 0, 0, 0, 0, 1, 7, 0, 0, 0, 0, 0, 19, 25749, 60, 0, 0, 0, 0, 0, 0, 'Shadowstalker Getry - Actionlist - Say Line 7'),
+(2572900, 9, 5, 0, 0, 0, 100, 0, 3000, 3000, 0, 0, 0, 0, 41, 0, 0, 0, 0, 0, 0, 19, 25749, 60, 0, 0, 0, 0, 0, 0, 'Shadowstalker Getry - Actionlist - Despawn Instant');
+DELETE FROM `smart_scripts` WHERE (`entryorguid` = 25618) AND (`source_type` = 0) AND (`id` IN (3, 4));
+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
+(25618, 0, 3, 4, 6, 0, 100, 512, 0, 0, 0, 0, 0, 0, 15, 11705, 0, 0, 0, 0, 0, 18, 60, 0, 0, 0, 0, 0, 0, 0, 'Varidus the Flenser - On Just Died - Quest Credit \'Foolish Endeavors\''),
+(25618, 0, 4, 0, 61, 0, 100, 512, 0, 0, 0, 0, 0, 0, 45, 1, 1, 0, 0, 0, 0, 19, 25729, 60, 0, 0, 0, 0, 0, 0, 'Varidus the Flenser - On Just Died - Set Data 1 1');
+-- Increase despawn time from 3 to 4 minutes
+DELETE FROM `smart_scripts` WHERE (`entryorguid` = 2561800) AND (`source_type` = 9) AND (`id` IN (25));
+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
+(2561800, 9, 25, 0, 0, 0, 100, 0, 240000, 240000, 0, 0, 0, 0, 41, 0, 0, 0, 0, 0, 0, 19, 25729, 100, 0, 0, 0, 0, 0, 0, 'Varidus the Flenser - Actionlist - Despawn Instant');
diff --git a/data/sql/updates/db_world/2025_11_11_00.sql b/data/sql/updates/db_world/2025_11_11_00.sql
new file mode 100644
index 0000000000..5b3a208d6f
--- /dev/null
+++ b/data/sql/updates/db_world/2025_11_11_00.sql
@@ -0,0 +1,4 @@
+-- DB update 2025_11_10_03 -> 2025_11_11_00
+--
+DELETE FROM `areatrigger_scripts` WHERE `entry`=5338;
+INSERT INTO `areatrigger_scripts` (`entry`, `ScriptName`) VALUES(5338, 'at_last_rites');
diff --git a/data/sql/updates/db_world/2025_11_11_01.sql b/data/sql/updates/db_world/2025_11_11_01.sql
new file mode 100644
index 0000000000..58d10ecc18
--- /dev/null
+++ b/data/sql/updates/db_world/2025_11_11_01.sql
@@ -0,0 +1,10 @@
+-- DB update 2025_11_11_00 -> 2025_11_11_01
+--
+-- Update comments, remove action On Init AI set combat distance to 100
+DELETE FROM `smart_scripts` WHERE (`entryorguid` = 32767) AND (`source_type` = 0) AND (`id` IN (0, 1, 2, 3, 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`, `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
+(32767, 0, 0, 0, 1, 0, 100, 0, 5000, 10000, 3000, 6000, 0, 0, 49, 0, 0, 0, 0, 0, 0, 19, 31406, 80, 0, 0, 0, 0, 0, 0, 'Frostbrood Sentry - Out of Combat - Start Attacking'),
+(32767, 0, 1, 0, 1, 0, 100, 0, 5000, 10000, 3000, 6000, 0, 0, 49, 0, 0, 0, 0, 0, 0, 19, 32512, 80, 0, 0, 0, 0, 0, 0, 'Frostbrood Sentry - Out of Combat - Start Attacking'),
+(32767, 0, 2, 0, 1, 0, 100, 0, 5000, 10000, 3000, 6000, 0, 0, 49, 0, 0, 0, 0, 0, 0, 19, 31838, 80, 0, 0, 0, 0, 0, 0, 'Frostbrood Sentry - Out of Combat - Start Attacking'),
+(32767, 0, 3, 0, 1, 0, 100, 0, 5000, 10000, 3000, 6000, 0, 0, 49, 0, 0, 0, 0, 0, 0, 19, 32513, 80, 0, 0, 0, 0, 0, 0, 'Frostbrood Sentry - Out of Combat - Start Attacking'),
+(32767, 0, 4, 0, 9, 0, 100, 0, 0, 0, 2000, 3000, 0, 40, 11, 60542, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 'Frostbrood Sentry - Within 0-40 Range - Cast \'Bitter Blast\'');
diff --git a/data/sql/updates/db_world/2025_11_11_02.sql b/data/sql/updates/db_world/2025_11_11_02.sql
new file mode 100644
index 0000000000..ad2bcbebf4
--- /dev/null
+++ b/data/sql/updates/db_world/2025_11_11_02.sql
@@ -0,0 +1,45 @@
+-- DB update 2025_11_11_01 -> 2025_11_11_02
+-- Update gameobject 'Wild Mustard' with sniffed values
+-- updated spawns
+DELETE FROM `gameobject` WHERE (`id` IN (192827)) AND (`guid` IN (100121, 100244, 100245, 100246, 100247, 100248, 100249, 100411, 100412, 57471, 57472, 57473, 57475, 57476, 57477, 57478, 57479, 57480, 57481, 57482, 57483));
+INSERT INTO `gameobject` (`guid`, `id`, `map`, `zoneId`, `areaId`, `spawnMask`, `phaseMask`, `position_x`, `position_y`, `position_z`, `orientation`, `rotation0`, `rotation1`, `rotation2`, `rotation3`, `spawntimesecs`, `animprogress`, `state`, `ScriptName`, `VerifiedBuild`, `Comment`) VALUES
+(100121, 192827, 571, 0, 0, 1, 1, 5985.08349609375, 664.72296142578125, 642.370849609375, 4.799657344818115234, 0, 0, -0.67558956146240234, 0.737277925014495849, 120, 255, 1, "", 45942, NULL),
+(100244, 192827, 571, 0, 0, 1, 1, 5934.06103515625, 660.3663330078125, 642.92462158203125, 5.6897735595703125, 0, 0, -0.29237174987792968, 0.956304728984832763, 120, 255, 1, "", 46158, NULL),
+(100245, 192827, 571, 0, 0, 1, 1, 5846.48681640625, 490.76507568359375, 657.25555419921875, 5.515241622924804687, 0, 0, -0.37460613250732421, 0.927184045314788818, 120, 255, 1, "", 46158, NULL),
+(100246, 192827, 571, 0, 0, 1, 1, 5831.59619140625, 763.8204345703125, 640.30194091796875, 1.762782454490661621, 0, 0, 0.771624565124511718, 0.636078238487243652, 120, 255, 1, "", 46248, NULL),
+(100247, 192827, 571, 0, 0, 1, 1, 5767.6494140625, 770.37530517578125, 640.4595947265625, 4.537858963012695312, 0, 0, -0.76604366302490234, 0.642788589000701904, 120, 255, 1, "", 46248, NULL),
+(100248, 192827, 571, 0, 0, 1, 1, 5675.63232421875, 737.062744140625, 641.646484375, 6.265733242034912109, 0, 0, -0.00872611999511718, 0.999961912631988525, 120, 255, 1, "", 46158, NULL),
+(100249, 192827, 571, 0, 0, 1, 1, 5666.18994140625, 708.8232421875, 641.72613525390625, 4.136432647705078125, 0, 0, -0.87881660461425781, 0.477159708738327026, 120, 255, 1, "", 46248, NULL),
+(100411, 192827, 571, 0, 0, 1, 1, 5781.63525390625, 755.59454345703125, 640.60955810546875, 2.478367090225219726, 0, 0, 0.94551849365234375, 0.325568377971649169, 120, 255, 1, "", 45327, NULL),
+(100412, 192827, 571, 0, 0, 1, 1, 5852.45068359375, 453.083984375, 657.54180908203125, 4.956737518310546875, 0, 0, -0.61566066741943359, 0.788011372089385986, 120, 255, 1, "", 46158, NULL),
+(57471, 192827, 571, 0, 0, 1, 1, 5647.09130859375, 735.65777587890625, 641.70587158203125, 0.349065244197845458, 0, 0, 0.173647880554199218, 0.984807789325714111, 120, 255, 1, "", 46368, NULL),
+(57472, 192827, 571, 0, 0, 1, 1, 5638.42333984375, 752.54632568359375, 641.62371826171875, 4.188792228698730468, 0, 0, -0.86602497100830078, 0.50000077486038208, 120, 255, 1, "", 46158, NULL),
+(57473, 192827, 571, 0, 0, 1, 1, 5752.2802734375, 780.19390869140625, 640.46044921875, 4.852017402648925781, 0, 0, -0.65605831146240234, 0.754710197448730468, 120, 255, 1, "", 46248, NULL),
+(57475, 192827, 571, 0, 0, 1, 1, 5989.67138671875, 648.40582275390625, 642.70916748046875, 5.235987663269042968, 0, 0, -0.5, 0.866025388240814208, 120, 255, 1, "", 46158, NULL),
+(57476, 192827, 571, 0, 0, 1, 1, 5756.24072265625, 758.174072265625, 642.0474853515625, 1.884953022003173828, 0, 0, 0.809016227722167968, 0.587786316871643066, 120, 255, 1, "", 46248, NULL),
+(57477, 192827, 571, 0, 0, 1, 1, 5865.57666015625, 774.6185302734375, 640.53057861328125, 3.194002151489257812, 0, 0, -0.99965667724609375, 0.026201646775007247, 120, 255, 1, "", 45327, NULL),
+(57478, 192827, 571, 0, 0, 1, 1, 5824.08251953125, 493.727813720703125, 656.93402099609375, 4.729844093322753906, 0, 0, -0.70090866088867187, 0.713251054286956787, 120, 255, 1, "", 46158, NULL),
+(57479, 192827, 571, 0, 0, 1, 1, 5797.42138671875, 480.68121337890625, 657.57318115234375, 0.453785061836242675, 0, 0, 0.224950790405273437, 0.974370121955871582, 120, 255, 1, "", 46158, NULL),
+(57480, 192827, 571, 0, 0, 1, 1, 5826.56494140625, 738.85418701171875, 640.9478759765625, 4.363324165344238281, 0, 0, -0.81915187835693359, 0.573576688766479492, 120, 255, 1, "", 46158, NULL),
+(57481, 192827, 571, 0, 0, 1, 1, 5950.203125, 696.5841064453125, 641.10589599609375, 5.166176319122314453, 0, 0, -0.52991867065429687, 0.84804844856262207, 120, 255, 1, "", 45327, NULL),
+(57482, 192827, 571, 0, 0, 1, 1, 5810.0791015625, 620.439208984375, 647.71026611328125, 0.034906249493360519, 0, 0, 0.017452239990234375, 0.999847710132598876, 120, 255, 1, "", 45327, NULL),
+(57483, 192827, 571, 0, 0, 1, 1, 5804.63623046875, 661.78125, 647.7073974609375, 4.014260292053222656, 0, 0, -0.90630722045898437, 0.422619491815567016, 120, 255, 1, "", 45327, NULL);
+
+-- new spawns
+DELETE FROM `gameobject` WHERE (`id` IN (192827)) AND (`guid` BETWEEN 1747 AND 1761);
+INSERT INTO `gameobject` (`guid`, `id`, `map`, `zoneId`, `areaId`, `spawnMask`, `phaseMask`, `position_x`, `position_y`, `position_z`, `orientation`, `rotation0`, `rotation1`, `rotation2`, `rotation3`, `spawntimesecs`, `animprogress`, `state`, `ScriptName`, `VerifiedBuild`, `Comment`) VALUES
+(1747, 192827, 571, 0, 0, 1, 1, 5629.560546875, 725.41082763671875, 641.70721435546875, 2.356194972991943359, 0, 0, 0.923879623413085937, 0.382683247327804565, 120, 255, 1, "", 46158, NULL),
+(1748, 192827, 571, 0, 0, 1, 1, 5657.634765625, 742.97552490234375, 641.5999755859375, 4.9218292236328125, 0, 0, -0.62932014465332031, 0.77714616060256958, 120, 255, 1, "", 46158, NULL),
+(1749, 192827, 571, 0, 0, 1, 1, 5731.98681640625, 780.482666015625, 641.66925048828125, 3.926995515823364257, 0, 0, -0.92387866973876953, 0.38268551230430603, 120, 255, 1, "", 46158, NULL),
+(1750, 192827, 571, 0, 0, 1, 1, 5742.24658203125, 770.8905029296875, 641.83380126953125, 5.567600727081298828, 0, 0, -0.35020732879638671, 0.936672210693359375, 120, 255, 1, "", 46158, NULL),
+(1751, 192827, 571, 0, 0, 1, 1, 5778.017578125, 463.560821533203125, 657.8570556640625, 4.677483558654785156, 0, 0, -0.71933937072753906, 0.694658815860748291, 120, 255, 1, "", 46158, NULL),
+(1752, 192827, 571, 0, 0, 1, 1, 5784.9462890625, 631.62530517578125, 647.66748046875, 5.131268978118896484, 0, 0, -0.54463863372802734, 0.838670849800109863, 120, 255, 1, "", 46158, NULL),
+(1753, 192827, 571, 0, 0, 1, 1, 5787.90966796875, 646.6329345703125, 647.23504638671875, 4.59021615982055664, 0, 0, -0.74895572662353515, 0.662620067596435546, 120, 255, 1, "", 46158, NULL),
+(1754, 192827, 571, 0, 0, 1, 1, 5803.4375, 745.01226806640625, 640.465087890625, 6.248279094696044921, 0, 0, -0.01745223999023437, 0.999847710132598876, 120, 255, 1, "", 45327, NULL),
+(1755, 192827, 571, 0, 0, 1, 1, 5822.33203125, 652.23858642578125, 647.3056640625, 4.537858963012695312, 0, 0, -0.76604366302490234, 0.642788589000701904, 120, 255, 1, "", 45327, NULL),
+(1756, 192827, 571, 0, 0, 1, 1, 5823.8359375, 637.7987060546875, 647.76348876953125, 3.001946926116943359, 0, 0, 0.997563362121582031, 0.069766148924827575, 120, 255, 1, "", 45327, NULL),
+(1757, 192827, 571, 0, 0, 1, 1, 5842.37451171875, 750.66656494140625, 640.692626953125, 1.727874636650085449, 0, 0, 0.760405540466308593, 0.649448513984680175, 120, 255, 1, "", 46158, NULL),
+(1758, 192827, 571, 0, 0, 1, 1, 5845.6962890625, 463.094573974609375, 657.62591552734375, 1.623155713081359863, 0, 0, 0.725374221801757812, 0.688354730606079101, 120, 255, 1, "", 46158, NULL),
+(1759, 192827, 571, 0, 0, 1, 1, 5847.68603515625, 772.54559326171875, 640.36090087890625, 1.256635904312133789, 0, 0, 0.587784767150878906, 0.809017360210418701, 120, 255, 1, "", 46158, NULL),
+(1760, 192827, 571, 0, 0, 1, 1, 5934.53369140625, 682.52099609375, 642.21148681640625, 3.682650327682495117, 0, 0, -0.96362972259521484, 0.26724100112915039, 120, 255, 1, "", 45327, NULL),
+(1761, 192827, 571, 0, 0, 1, 1, 5972.26416015625, 648.7425537109375, 642.43182373046875, 1.919861555099487304, 0, 0, 0.819151878356933593, 0.573576688766479492, 120, 255, 1, "", 46158, NULL);
diff --git a/data/sql/updates/db_world/2025_11_11_03.sql b/data/sql/updates/db_world/2025_11_11_03.sql
new file mode 100644
index 0000000000..b91c8b6217
--- /dev/null
+++ b/data/sql/updates/db_world/2025_11_11_03.sql
@@ -0,0 +1,21 @@
+-- DB update 2025_11_11_02 -> 2025_11_11_03
+--
+SET @ARGENT_CRUSADE := 1106;
+SET @KIRIN_TOR := 1090;
+SET @KNIGHTS_OF_THE_EBON_BLADE := 1098;
+SET @WYRMREST_ACCORD := 1091;
+SET @ALLIANCE_VANGUARD := 1037;
+SET @HORDE_EXPEDITION := 1052;
+SET @SONS_OF_HODIR := 1119;
+
+UPDATE `quest_template` SET `RewardFactionOverride1`=2200000 WHERE `ID` IN (12915, 12956);
+UPDATE `quest_template` SET `RewardFactionOverride1`=0 WHERE `ID` IN (12924, 12975, 12976, 12977, 12981, 12985, 12987, 12994, 13001, 13003, 13010, 13011, 13046, 13108, 13420, 13421, 13559);
+UPDATE `quest_template` SET `RewardFactionID1` = 0, `RewardFactionValue1` = 0, `RewardFactionOverride1` = 0 WHERE `ID` IN (12966, 12967);
+
+UPDATE `reputation_reward_rate` SET `quest_rate`=1.3,`quest_daily_rate`=1.3,`quest_weekly_rate`=1.3,`quest_monthly_rate`=1.3,`quest_repeatable_rate`=1.3 WHERE `faction` IN (@ARGENT_CRUSADE, @KNIGHTS_OF_THE_EBON_BLADE, @KIRIN_TOR, @WYRMREST_ACCORD);
+
+DELETE FROM `reputation_reward_rate` WHERE `faction` IN (@SONS_OF_HODIR, @ALLIANCE_VANGUARD, @HORDE_EXPEDITION);
+INSERT INTO `reputation_reward_rate` (`faction`, `quest_rate`, `quest_daily_rate`, `quest_weekly_rate`, `quest_monthly_rate`, `quest_repeatable_rate`, `creature_rate`, `spell_rate`) VALUES
+(@SONS_OF_HODIR, 1.3, 1.3, 1.3, 1.3, 1.3, 1.3, 1.3),
+(@ALLIANCE_VANGUARD, 1.0, 1.0, 1.0, 1.0, 1.0, 1.3, 1.3),
+(@HORDE_EXPEDITION, 1.0, 1.0, 1.0, 1.0, 1.0, 1.3, 1.3);
diff --git a/data/sql/updates/db_world/2025_11_12_00.sql b/data/sql/updates/db_world/2025_11_12_00.sql
new file mode 100644
index 0000000000..42608948ab
--- /dev/null
+++ b/data/sql/updates/db_world/2025_11_12_00.sql
@@ -0,0 +1,4 @@
+-- DB update 2025_11_11_03 -> 2025_11_12_00
+--
+-- remove `DISABLE_MOVE`
+UPDATE `creature_template` SET `unit_flags` = `unit_flags` & ~4 WHERE (`entry` = 28998);
diff --git a/data/sql/updates/db_world/2025_11_12_01.sql b/data/sql/updates/db_world/2025_11_12_01.sql
new file mode 100644
index 0000000000..0846cc5d14
--- /dev/null
+++ b/data/sql/updates/db_world/2025_11_12_01.sql
@@ -0,0 +1,10 @@
+-- DB update 2025_11_12_00 -> 2025_11_12_01
+--
+-- Unliving Chocker
+UPDATE `conditions` SET `ConditionTypeOrReference` = 8, `NegativeCondition` = 1, `Comment` = 'must not have completed quest \'Cleansing Drak\'Tharon\'' WHERE (`SourceTypeOrReferenceId` = 1) AND (`SourceGroup` = 28519) AND (`SourceEntry` = 38660) AND (`SourceId` = 0) AND (`ElseGroup` = 0) AND (`ConditionTypeOrReference` = 14) AND (`ConditionTarget` = 0) AND (`ConditionValue1` = 12238) AND (`ConditionValue2` = 0) AND (`ConditionValue3` = 0);
+-- Writhing Choker
+DELETE FROM `conditions` WHERE (`SourceTypeOrReferenceId` = 1) AND (`SourceGroup` = 28519) AND (`SourceEntry` = 38673) AND (`SourceId` = 0) AND (`ElseGroup` = 0);
+INSERT INTO `conditions` (`SourceTypeOrReferenceId`, `SourceGroup`, `SourceEntry`, `SourceId`, `ElseGroup`, `ConditionTypeOrReference`, `ConditionTarget`, `ConditionValue1`, `ConditionValue2`, `ConditionValue3`, `NegativeCondition`, `ErrorType`, `ErrorTextId`, `ScriptName`, `Comment`) VALUES
+(1, 28519, 38673, 0, 0, 8, 0, 12238, 0, 0, 0, 0, 0, '', 'must have completed quest \'Cleansing Drak\'Tharon\''),
+(1, 28519, 38673, 0, 0, 2, 0, 38660, 1, 1, 1, 0, 0, '', 'must not have item \'Unliving Chocker\''),
+(1, 28519, 38673, 0, 0, 8, 0, 12631, 0, 0, 1, 0, 0, '', 'must not have completed quest \'An Invitation, of Sorts...\'');
diff --git a/data/sql/updates/db_world/2025_11_12_02.sql b/data/sql/updates/db_world/2025_11_12_02.sql
new file mode 100644
index 0000000000..7daec40ee2
--- /dev/null
+++ b/data/sql/updates/db_world/2025_11_12_02.sql
@@ -0,0 +1,64 @@
+-- DB update 2025_11_12_01 -> 2025_11_12_02
+--
+SET @PLANE := 28710;
+SET @PILOT := 28646;
+UPDATE `creature_template` SET `AIName`='SmartAI',`ScriptName`='', `speed_walk`=10, `speed_run`=1 WHERE `entry`=@PLANE;
+DELETE FROM `smart_scripts` WHERE (`source_type` = 0 AND `entryorguid` = 28710);
+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
+(28710, 0, 1, 0, 60, 0, 100, 513, 1000, 1000, 0, 0, 0, 0, 53, 1, 28710, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Vic\'s Flying Machine - On Update - Start Waypoint Path 28710 (No Repeat)'),
+(28710, 0, 2, 0, 40, 0, 100, 512, 5, 28710, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 19, 28646, 0, 0, 0, 0, 0, 0, 0, 'Vic\'s Flying Machine - On Point 5 of Path 28710 Reached - Say Line 0'),
+(28710, 0, 3, 0, 40, 0, 100, 512, 11, 28710, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 19, 28646, 0, 0, 0, 0, 0, 0, 0, 'Vic\'s Flying Machine - On Point 11 of Path 28710 Reached - Say Line 1'),
+(28710, 0, 4, 0, 40, 0, 100, 512, 12, 28710, 0, 0, 0, 0, 1, 2, 0, 0, 0, 0, 0, 19, 28646, 0, 0, 0, 0, 0, 0, 0, 'Vic\'s Flying Machine - On Point 12 of Path 28710 Reached - Say Line 2'),
+(28710, 0, 5, 0, 40, 0, 100, 512, 14, 28710, 0, 0, 0, 0, 1, 3, 0, 0, 0, 0, 0, 19, 28646, 0, 0, 0, 0, 0, 0, 0, 'Vic\'s Flying Machine - On Point 14 of Path 28710 Reached - Say Line 3'),
+(28710, 0, 6, 0, 40, 0, 100, 512, 15, 28710, 0, 0, 0, 0, 1, 4, 0, 0, 0, 0, 0, 19, 28646, 0, 0, 0, 0, 0, 0, 0, 'Vic\'s Flying Machine - On Point 15 of Path 28710 Reached - Say Line 4'),
+(28710, 0, 7, 0, 40, 0, 100, 512, 17, 28710, 0, 0, 0, 0, 1, 5, 0, 0, 0, 0, 0, 19, 28646, 0, 0, 0, 0, 0, 0, 0, 'Vic\'s Flying Machine - On Point 17 of Path 28710 Reached - Say Line 5'),
+(28710, 0, 8, 0, 40, 0, 100, 512, 21, 28710, 0, 0, 0, 0, 1, 6, 0, 0, 0, 0, 0, 19, 28646, 0, 0, 0, 0, 0, 0, 0, 'Vic\'s Flying Machine - On Point 21 of Path 28710 Reached - Say Line 6'),
+(28710, 0, 9, 10, 40, 0, 100, 512, 25, 28710, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Vic\'s Flying Machine - On Point 25 of Path 28710 Reached - Say Line 0'),
+(28710, 0, 10, 0, 61, 0, 100, 512, 0, 0, 0, 0, 0, 0, 11, 52255, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Vic\'s Flying Machine - On Point 25 of Path 28710 Reached - Cast \'Engine on Fire\''),
+(28710, 0, 11, 0, 28, 0, 100, 512, 0, 0, 0, 0, 0, 0, 134, 44795, 2, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 0, 'Vic\'s Flying Machine - On Passenger Removed - Invoker Cast \'Parachute\''),
+(28710, 0, 12, 13, 8, 0, 100, 512, 52226, 0, 0, 0, 0, 0, 22, 2, 0, 0, 0, 0, 0, 23, 0, 0, 0, 0, 0, 0, 0, 0, 'Vic\'s Flying Machine - On Spellhit \'Land Flying Machine\' - Set Event Phase 2'),
+(28710, 0, 13, 0, 61, 0, 100, 512, 0, 0, 0, 0, 0, 0, 11, 50630, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Vic\'s Flying Machine - On Spellhit \'Land Flying Machine\' - Cast \'Eject All Passengers\''),
+(28710, 0, 14, 0, 40, 0, 100, 512, 26, 28710, 0, 0, 0, 0, 59, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Vic\'s Flying Machine - On Point 26 of Path 28710 Reached - Set Run On'),
+(28710, 0, 15, 0, 28, 2, 100, 512, 0, 0, 0, 0, 0, 0, 134, 53328, 2, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 0, 'Vic\'s Flying Machine - On Passenger Removed - Invoker Cast \'Land Flying Machine Credit\' (Phase 2)'),
+(28710, 0, 16, 0, 11, 0, 100, 512, 0, 0, 0, 0, 0, 0, 22, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Vic\'s Flying Machine - On Respawn - Set Event Phase 1'),
+(28710, 0, 17, 0, 28, 1, 100, 512, 0, 0, 0, 0, 0, 0, 6, 12671, 0, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 0, 'Vic\'s Flying Machine - On Passenger Removed - Fail Quest \'Reconnaissance Flight\' (Phase 1)');
+
+DELETE FROM `waypoint_data` WHERE `id`=@PLANE;
+DELETE FROM `waypoints` WHERE `entry`=@PLANE;
+INSERT INTO `waypoints` (`entry`,`pointid`,`position_x`,`position_y`,`position_z`,`point_comment`) VALUES
+(@PLANE,1,5494.87,4747.031,-187.8783, 'Vic''s Flying Machine'),
+(@PLANE,2,5485.906,4740.681,-184.5172, 'Vic''s Flying Machine'),
+(@PLANE,3,5472.882,4732.441,-172.1562, 'Vic''s Flying Machine'),
+(@PLANE,4,5460.913,4712.542,-157.8784, 'Vic''s Flying Machine'),
+(@PLANE,5,5452.147,4673.518,-137.8906, 'Vic''s Flying Machine'),
+(@PLANE,6,5449.777,4630.711,-126.6684, 'Vic''s Flying Machine'),
+(@PLANE,7,5507.432,4506.089,-126.6684, 'Vic''s Flying Machine'),
+(@PLANE,8,5586.811,4465.319,-126.6684, 'Vic''s Flying Machine'),
+(@PLANE,9,5676.111,4437.874,-126.6684, 'Vic''s Flying Machine'),
+(@PLANE,10,5756.449,4391.051,-91.25155, 'Vic''s Flying Machine'),
+(@PLANE,11,5817.163,4269.269,-91.25155, 'Vic''s Flying Machine'),
+(@PLANE,12,5856.145,4202.824,-68.29334, 'Vic''s Flying Machine'),
+(@PLANE,13,5921.523,4105.534,-68.29334, 'Vic''s Flying Machine'),
+(@PLANE,14,5995.021,4029.883,-13.97897, 'Vic''s Flying Machine'),
+(@PLANE,15,6118.298,3883.733,94.11866, 'Vic''s Flying Machine'),
+(@PLANE,16,6132.932,3750.75,176.5123, 'Vic''s Flying Machine'),
+(@PLANE,17,6165.863,3748.196,198.9567, 'Vic''s Flying Machine'),
+(@PLANE,18,6208.277,3782.189,196.8455, 'Vic''s Flying Machine'),
+(@PLANE,19,6227.615,3836.871,191.6234, 'Vic''s Flying Machine'),
+(@PLANE,20,6218.483,3885.17,191.6234, 'Vic''s Flying Machine'),
+(@PLANE,21,6197.045,3890.053,191.6234, 'Vic''s Flying Machine'),
+(@PLANE,22,6168.752,3864.161,191.6234, 'Vic''s Flying Machine'),
+(@PLANE,23,6204.037,3807.239,191.6234, 'Vic''s Flying Machine'),
+(@PLANE,24,6232.975,3820.852,191.6234, 'Vic''s Flying Machine'),
+(@PLANE,25,6219.879,3854.341,166.6234, 'Vic''s Flying Machine'),
+(@PLANE,26,6210.428,3855.185,154.4848, 'Vic''s Flying Machine');
+
+UPDATE `creature_template_movement` SET `Swim`=1,`Ground`=1,`Flight`=2 WHERE `CreatureId`=@PLANE;
+DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId` =14 AND `SourceGroup`=9750;
+INSERT INTO `conditions` (`SourceTypeOrReferenceId`, `SourceGroup`, `SourceEntry`, `SourceId`, `ElseGroup`, `ConditionTypeOrReference`, `ConditionTarget`, `ConditionValue1`, `ConditionValue2`, `ConditionValue3`, `NegativeCondition`, `ErrorType`, `ErrorTextId`, `ScriptName`, `Comment`) VALUES
+(14, 9750, 13376, 0, 0, 8, 0, 12671, 0, 0, 0, 0, 0, '', 'Pilot Vic Show different gossip if player has rewarded quest 12671 '),
+(14, 9750, 13375, 0, 0, 8, 0, 12671, 0, 0, 1, 0, 0, '', 'Pilot Vic Show different gossip if player is not rewarded quest 12671');
+
+DELETE FROM `vehicle_template_accessory` WHERE `entry` IN (@PLANE);
+INSERT INTO `vehicle_template_accessory` (`entry`,`accessory_entry`, `seat_id`, `minion`, `description`) VALUES
+(@PLANE, @PILOT, 0, 1, 'Vics Flying Machine');
diff --git a/data/sql/updates/db_world/2025_11_12_03.sql b/data/sql/updates/db_world/2025_11_12_03.sql
new file mode 100644
index 0000000000..b99ae0a587
--- /dev/null
+++ b/data/sql/updates/db_world/2025_11_12_03.sql
@@ -0,0 +1,3 @@
+-- DB update 2025_11_12_02 -> 2025_11_12_03
+--
+UPDATE `quest_offer_reward` SET `RewardText` = 'Aw yes, these will do nicely.$b$bJust plop them down anywhere. You can have some of my leftover stew from last night.' WHERE (`ID` = 11564);
diff --git a/data/sql/updates/db_world/2025_11_12_04.sql b/data/sql/updates/db_world/2025_11_12_04.sql
new file mode 100644
index 0000000000..d1e6b2da47
--- /dev/null
+++ b/data/sql/updates/db_world/2025_11_12_04.sql
@@ -0,0 +1,36 @@
+-- DB update 2025_11_12_03 -> 2025_11_12_04
+--
+DELETE FROM `conditions` WHERE (`SourceTypeOrReferenceId` = 22) AND (`SourceGroup` = 1) AND (`SourceEntry` = 5440) AND (`SourceId` = 2) AND (`ElseGroup` = 0) AND (`ConditionTypeOrReference` = 1) AND (`ConditionTarget` = 0) AND (`ConditionValue1` = 47219) 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
+(22, 1, 5440, 2, 0, 1, 0, 47219, 0, 0, 0, 0, 0, '', 'Areatrigger 5440 require Cleared for Teleport (47219) ');
+
+UPDATE `creature_template` SET `AIName` = 'SmartAI' WHERE `entry` = 26619;
+
+DELETE FROM `smart_scripts` WHERE (`source_type` = 0 AND `entryorguid` = 26619);
+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
+(26619, 0, 0, 1, 62, 0, 100, 0, 9415, 0, 0, 0, 0, 0, 11, 47219, 0, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 0, 'Fizzcrank Paratrooper - On Gossip Option 0 Selected - Cast \'Cleared for Teleport\''),
+(26619, 0, 1, 0, 61, 0, 100, 0, 0, 0, 0, 0, 0, 0, 72, 0, 0, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 0, 'Fizzcrank Paratrooper - On Gossip Option 0 Selected - Close Gossip'),
+(26619, 0, 2, 0, 64, 0, 100, 0, 0, 0, 0, 0, 0, 0, 98, 9429, 12687, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 0, 'Fizzcrank Paratrooper - On Gossip Hello - Send Gossip'),
+(26619, 0, 3, 4, 62, 0, 100, 0, 9429, 1, 0, 0, 0, 0, 11, 47326, 2, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 0, 'Fizzcrank Paratrooper - On Gossip Option 1 Selected - Cast \'Create Item - Fizzcrank Practice Parachute\''),
+(26619, 0, 4, 0, 61, 0, 100, 0, 0, 0, 0, 0, 0, 0, 72, 0, 0, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 0, 'Fizzcrank Paratrooper - On Gossip Option 1 Selected - Close Gossip');
+
+DELETE FROM `areatrigger_scripts` WHERE `entry` = 5440;
+INSERT INTO `areatrigger_scripts` (`entry`, `ScriptName`) VALUES (5440, 'SmartTrigger');
+
+DELETE FROM `smart_scripts` WHERE (`entryorguid` = 5440) AND (`source_type` = 2) 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
+(5440, 2, 0, 0, 46, 0, 100, 0, 5440, 0, 0, 0, 0, 0, 62, 571, 0, 0, 0, 0, 0, 7, 0, 0, 0, 0, 4240.04, 5259.05, 72.3396, 2.274780035018921, 'Areatrigger - On Trigger - Teleport');
+
+DELETE FROM `gossip_menu` WHERE `MenuID` = 9429;
+INSERT INTO `gossip_menu` (`MenuID`, `TextID`) VALUES
+(9429, 12687);
+
+DELETE FROM `gossip_menu_option` WHERE (`OptionID`=1 AND `MenuID`=9429);
+INSERT INTO `gossip_menu_option` (`MenuID`, `OptionID`, `OptionIcon`, `OptionText`, `OptionBroadcastTextID`, `OptionType`, `OptionNpcFlag`, `ActionMenuID`, `ActionPoiID`, `BoxCoded`, `BoxMoney`, `BoxText`, `BoxBroadcastTextID`, `VerifiedBuild`) VALUES
+(9429, 1, 0, 'I\'ll show you! Give me that practice parachute!', 25923, 1, 1, 0, 0, 0, 0, NULL, 0, 64270);
+
+DELETE FROM `conditions` WHERE (`SourceTypeOrReferenceId` = 22) AND (`SourceGroup` = 3) AND (`SourceEntry` = 26619) AND (`SourceId` = 0) AND (`ElseGroup` = 0) AND (`ConditionTypeOrReference` = 30) AND (`ConditionTarget` = 0) AND (`ConditionValue1` = 188420) AND (`ConditionValue2` = 20) AND (`ConditionValue3` = 0);
+INSERT INTO `conditions` (`SourceTypeOrReferenceId`, `SourceGroup`, `SourceEntry`, `SourceId`, `ElseGroup`, `ConditionTypeOrReference`, `ConditionTarget`, `ConditionValue1`, `ConditionValue2`, `ConditionValue3`, `NegativeCondition`, `ErrorType`, `ErrorTextId`, `ScriptName`, `Comment`) VALUES
+(22, 3, 26619, 0, 0, 30, 0, 188420, 20, 0, 0, 0, 0, '', 'Requires Fizzcrank Parachute spell focus');
+
+UPDATE `gameobject` SET `position_x` = 4227.6616, `position_y` = 5270.674, `position_z` = 71.928215 WHERE `guid` = 99767 AND `id` = 188420;
diff --git a/data/sql/updates/db_world/2025_11_12_05.sql b/data/sql/updates/db_world/2025_11_12_05.sql
new file mode 100644
index 0000000000..4895bf0c26
--- /dev/null
+++ b/data/sql/updates/db_world/2025_11_12_05.sql
@@ -0,0 +1,5 @@
+-- DB update 2025_11_12_04 -> 2025_11_12_05
+--
+DELETE FROM `smart_scripts` WHERE (`entryorguid` = 27292) AND (`source_type` = 0) AND (`id` IN (0, 1));
+INSERT INTO `smart_scripts` (`entryorguid`, `source_type`, `id`, `link`, `event_type`, `event_phase_mask`, `event_chance`, `event_flags`, `event_param1`, `event_param2`, `event_param3`, `event_param4`, `event_param5`, `event_param6`, `action_type`, `action_param1`, `action_param2`, `action_param3`, `action_param4`, `action_param5`, `action_param6`, `target_type`, `target_param1`, `target_param2`, `target_param3`, `target_param4`, `target_x`, `target_y`, `target_z`, `target_o`, `comment`) VALUES
+(27292, 0, 1, 2, 62, 0, 100, 512, 0, 0, 0, 0, 0, 0, 11, 48606, 3, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 0, 'Flamebringer - On Gossip Option 0 Selected - Cast \'Flamebringer Summon Cue\'');
diff --git a/data/sql/updates/db_world/2025_11_12_06.sql b/data/sql/updates/db_world/2025_11_12_06.sql
new file mode 100644
index 0000000000..df18f9dbcc
--- /dev/null
+++ b/data/sql/updates/db_world/2025_11_12_06.sql
@@ -0,0 +1,11 @@
+-- DB update 2025_11_12_05 -> 2025_11_12_06
+
+-- Update AI
+UPDATE `creature_template` SET `AIName` = 'SmartAI' WHERE `entry` = 27254;
+
+DELETE FROM `smart_scripts` WHERE (`source_type` = 0 AND `entryorguid` = 27254);
+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
+(27254, 0, 0, 0, 25, 0, 100, 0, 0, 0, 0, 0, 0, 0, 90, 9, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Emerald Lasher - On Reset - Set Flag Standstate Submerged'),
+(27254, 0, 1, 2, 4, 0, 100, 0, 0, 0, 0, 0, 0, 0, 91, 9, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Emerald Lasher - On Aggro - Remove FlagStandstate Submerged'),
+(27254, 0, 2, 0, 61, 0, 100, 0, 0, 0, 0, 0, 0, 0, 11, 37752, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Emerald Lasher - On Aggro - Cast \'Stand\''),
+(27254, 0, 3, 0, 0, 0, 100, 0, 4000, 7000, 9000, 13000, 0, 0, 11, 51901, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 'Emerald Lasher - In Combat - Cast \'Dream Lash\'');
diff --git a/data/sql/updates/db_world/2025_11_13_00.sql b/data/sql/updates/db_world/2025_11_13_00.sql
new file mode 100644
index 0000000000..45f7a2fcb9
--- /dev/null
+++ b/data/sql/updates/db_world/2025_11_13_00.sql
@@ -0,0 +1,8 @@
+-- DB update 2025_11_12_06 -> 2025_11_13_00
+
+-- Update SmartAI
+UPDATE `creature_template` SET `AIName` = 'SmartAI' WHERE `entry` = 27358;
+
+DELETE FROM `smart_scripts` WHERE (`source_type` = 0 AND `entryorguid` = 27358);
+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
+(27358, 0, 0, 0, 0, 0, 100, 0, 0, 0, 7000, 10000, 0, 0, 11, 51431, 64, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 'Burning Depths Necromancer - In Combat - Cast \'Power Release\'');
diff --git a/data/sql/updates/db_world/2025_11_13_01.sql b/data/sql/updates/db_world/2025_11_13_01.sql
new file mode 100644
index 0000000000..722fb72777
--- /dev/null
+++ b/data/sql/updates/db_world/2025_11_13_01.sql
@@ -0,0 +1,5 @@
+-- DB update 2025_11_13_00 -> 2025_11_13_01
+
+-- Delete SmartAI
+UPDATE `creature_template` SET `AIName` = '' WHERE `entry` = 30066;
+DELETE FROM `smart_scripts` WHERE (`entryorguid` = 30066) AND (`source_type` = 0);
diff --git a/data/sql/updates/db_world/2025_11_13_02.sql b/data/sql/updates/db_world/2025_11_13_02.sql
new file mode 100644
index 0000000000..05b71f6cc1
--- /dev/null
+++ b/data/sql/updates/db_world/2025_11_13_02.sql
@@ -0,0 +1,5 @@
+-- DB update 2025_11_13_01 -> 2025_11_13_02
+--
+DELETE FROM `creature_template_movement` WHERE `CreatureId` = 27821;
+INSERT INTO `creature_template_movement` (`CreatureId`, `Ground`, `Flight`) VALUES
+(27821, 1, 1);
diff --git a/data/sql/updates/db_world/2025_11_13_03.sql b/data/sql/updates/db_world/2025_11_13_03.sql
new file mode 100644
index 0000000000..c04b81fa50
--- /dev/null
+++ b/data/sql/updates/db_world/2025_11_13_03.sql
@@ -0,0 +1,5 @@
+-- DB update 2025_11_13_02 -> 2025_11_13_03
+--
+DELETE FROM `spell_custom_attr` WHERE `spell_id` = 53094;
+INSERT INTO `spell_custom_attr` (`spell_id`, `attributes`) VALUES
+(53094, 0x00400000);
diff --git a/data/sql/updates/db_world/2025_11_13_04.sql b/data/sql/updates/db_world/2025_11_13_04.sql
new file mode 100644
index 0000000000..ddabdc4490
--- /dev/null
+++ b/data/sql/updates/db_world/2025_11_13_04.sql
@@ -0,0 +1,53 @@
+-- DB update 2025_11_13_03 -> 2025_11_13_04
+
+-- Set Sniffed Unit_flag (Vrykul Harpoon Gun)
+UPDATE `creature_template` SET `unit_flags` = `unit_flags` &~ 4 WHERE (`entry` = 27992);
+UPDATE `creature_template` SET `unit_flags` = `unit_flags` |33554432 WHERE (`entry` = 27992);
+
+-- Set Sniffed Movement Flags (Vrykul Harpoon Gun & Dragonflayer Defender)
+DELETE FROM `creature_template_movement` WHERE (`CreatureId` IN (24533, 27992));
+INSERT INTO `creature_template_movement` (`CreatureId`, `Ground`, `Swim`, `Flight`, `Rooted`, `Chase`, `Random`, `InteractionPauseTimer`) VALUES
+(24533, 0, 0, 1, 0, 0, 0, 0),
+(27992, 0, 0, 0, 1, 0, 0, 0);
+
+-- Update SmartAI (Vrykul Harpoon Gun)
+UPDATE `creature_template` SET `AIName` = 'SmartAI' WHERE `entry` = 27992;
+
+DELETE FROM `smart_scripts` WHERE (`source_type` = 0 AND `entryorguid` = 27992);
+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
+(27992, 0, 0, 0, 27, 0, 100, 0, 0, 0, 0, 0, 0, 0, 19, 33554432, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Vrykul Harpoon Gun - On Passenger Boarded - Remove Flags Not Selectable'),
+(27992, 0, 1, 0, 28, 0, 100, 0, 0, 0, 0, 0, 0, 0, 18, 33554432, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Vrykul Harpoon Gun - On Passenger Removed - Set Flags Not Selectable'),
+(27992, 0, 2, 3, 38, 0, 100, 512, 1, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Vrykul Harpoon Gun - On Data Set 1 1 - Say Line 0'),
+(27992, 0, 3, 0, 61, 0, 100, 512, 0, 0, 0, 0, 0, 0, 80, 2799200, 2, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Vrykul Harpoon Gun - On Data Set 1 1 - Run Script'),
+(27992, 0, 4, 5, 38, 0, 100, 512, 1, 2, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Vrykul Harpoon Gun - On Data Set 1 2 - Say Line 1'),
+(27992, 0, 5, 0, 61, 0, 100, 512, 0, 0, 0, 0, 0, 0, 80, 2799201, 2, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Vrykul Harpoon Gun - On Data Set 1 2 - Run Script'),
+(27992, 0, 6, 7, 38, 0, 100, 512, 1, 3, 0, 0, 0, 0, 1, 2, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Vrykul Harpoon Gun - On Data Set 1 3 - Say Line 2'),
+(27992, 0, 7, 0, 61, 0, 100, 512, 0, 0, 0, 0, 0, 0, 80, 2799202, 2, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Vrykul Harpoon Gun - On Data Set 1 3 - Run Script'),
+(27992, 0, 8, 0, 31, 0, 100, 512, 43997, 0, 0, 0, 0, 0, 11, 43998, 2, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Vrykul Harpoon Gun - On Target Spellhit \'Fiery Lance\' - Cast \'Fiery Lance\'');
+
+-- Update Action Lists (sniffed Spawn Points)
+DELETE FROM `smart_scripts` WHERE (`source_type` = 9) AND (`entryorguid` IN (2799200, 2799201, 2799202));
+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
+(2799200, 9, 0, 0, 0, 0, 100, 512, 3000, 3000, 0, 0, 0, 0, 12, 24533, 4, 60000, 0, 1, 0, 8, 0, 0, 0, 0, 1055.92, -5139.29, 177.646, 4.2569, 'Vrykul Harpoon Gun - Actionlist - Summon Creature \'Dragonflayer Defender\''),
+(2799200, 9, 1, 0, 0, 0, 100, 512, 0, 0, 0, 0, 0, 0, 12, 24533, 4, 60000, 0, 1, 0, 8, 0, 0, 0, 0, 1011.96, -5124.65, 185.217, 4.2505, 'Vrykul Harpoon Gun - Actionlist - Summon Creature \'Dragonflayer Defender\''),
+(2799200, 9, 2, 0, 0, 0, 100, 512, 0, 0, 0, 0, 0, 0, 12, 24533, 4, 60000, 0, 1, 0, 8, 0, 0, 0, 0, 1073.53, -5130.63, 209.704, 4.0369, 'Vrykul Harpoon Gun - Actionlist - Summon Creature \'Dragonflayer Defender\''),
+(2799200, 9, 3, 0, 0, 0, 100, 512, 0, 0, 0, 0, 0, 0, 12, 24533, 4, 60000, 0, 1, 0, 8, 0, 0, 0, 0, 1127.55, -5177.06, 212.394, 4.1176, 'Vrykul Harpoon Gun - Actionlist - Summon Creature \'Dragonflayer Defender\''),
+(2799201, 9, 0, 0, 0, 0, 100, 512, 3000, 3000, 0, 0, 0, 0, 12, 24533, 4, 60000, 0, 1, 0, 8, 0, 0, 0, 0, 1091.66, -5150.43, 121.44, 4.0841, 'Vrykul Harpoon Gun - Actionlist - Summon Creature \'Dragonflayer Defender\''),
+(2799201, 9, 1, 0, 0, 0, 100, 512, 0, 0, 0, 0, 0, 0, 12, 24533, 4, 60000, 0, 1, 0, 8, 0, 0, 0, 0, 1024.17, -5117.84, 141.756, 4.1904, 'Vrykul Harpoon Gun - Actionlist - Summon Creature \'Dragonflayer Defender\''),
+(2799201, 9, 2, 0, 0, 0, 100, 512, 0, 0, 0, 0, 0, 0, 12, 24533, 4, 60000, 0, 1, 0, 8, 0, 0, 0, 0, 964.811, -5123.2, 111.064, 3.997, 'Vrykul Harpoon Gun - Actionlist - Summon Creature \'Dragonflayer Defender\''),
+(2799202, 9, 0, 0, 0, 0, 100, 512, 3000, 3000, 0, 0, 0, 0, 12, 24533, 4, 60000, 0, 1, 0, 8, 0, 0, 0, 0, 1132.96, -5170, 261.992, 3.9751, 'Vrykul Harpoon Gun - Actionlist - Summon Creature \'Dragonflayer Defender\''),
+(2799202, 9, 1, 0, 0, 0, 100, 512, 0, 0, 0, 0, 0, 0, 12, 24533, 4, 60000, 0, 1, 0, 8, 0, 0, 0, 0, 1115.01, -5161.58, 207.852, 4.3169, 'Vrykul Harpoon Gun - Actionlist - Summon Creature \'Dragonflayer Defender\''),
+(2799202, 9, 2, 0, 0, 0, 100, 512, 0, 0, 0, 0, 0, 0, 12, 24533, 4, 60000, 0, 1, 0, 8, 0, 0, 0, 0, 1168.37, -5220.4, 243.869, 3.7683, 'Vrykul Harpoon Gun - Actionlist - Summon Creature \'Dragonflayer Defender\'');
+
+-- Set SmartAI (Dragonflayer Defender)
+UPDATE `creature_template` SET `AIName` = 'SmartAI' WHERE `entry` = 24533;
+
+DELETE FROM `smart_scripts` WHERE (`source_type` = 0 AND `entryorguid` = 24533);
+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
+(24533, 0, 0, 0, 0, 0, 100, 0, 500, 1000, 2000, 2000, 0, 0, 11, 44188, 64, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 'Dragonflayer Defender - In Combat - Cast \'Harpoon Toss\''),
+(24533, 0, 1, 0, 8, 0, 100, 0, 43997, 0, 0, 0, 0, 0, 37, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Dragonflayer Defender - On Spellhit \'Fiery Lance\' - Kill Self'),
+(24533, 0, 2, 3, 54, 0, 100, 0, 0, 0, 0, 0, 0, 0, 117, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Dragonflayer Defender - On Just Summoned - Disable Evade'),
+(24533, 0, 3, 0, 61, 0, 100, 0, 0, 0, 0, 0, 0, 0, 69, 25, 0, 1, 0, 1, 0, 23, 0, 0, 0, 0, 0, 0, 0, 0, 'Dragonflayer Defender - On Just Summoned - Move To Owner Or Summoner'),
+(24533, 0, 4, 5, 34, 0, 100, 0, 0, 25, 0, 0, 0, 0, 101, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Dragonflayer Defender - On Reached Point 25 - Set Home Position'),
+(24533, 0, 5, 6, 61, 0, 100, 0, 0, 0, 0, 0, 0, 0, 117, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Dragonflayer Defender - On Reached Point 25 - Enable Evade'),
+(24533, 0, 6, 0, 61, 0, 100, 0, 0, 0, 0, 0, 0, 0, 49, 0, 0, 0, 0, 0, 0, 23, 0, 0, 0, 0, 0, 0, 0, 0, 'Dragonflayer Defender - On Reached Point 25 - Start Attacking');
diff --git a/data/sql/updates/db_world/2025_11_13_05.sql b/data/sql/updates/db_world/2025_11_13_05.sql
new file mode 100644
index 0000000000..205f572e9f
--- /dev/null
+++ b/data/sql/updates/db_world/2025_11_13_05.sql
@@ -0,0 +1,4 @@
+-- DB update 2025_11_13_04 -> 2025_11_13_05
+-- Makes sure the Shaman player gets the required ritual toch item and that requires the quest to drop
+UPDATE `item_loot_template` SET `Chance` = 0, `QuestRequired` = 1, `GroupId` = 1 WHERE `Entry` = 24336 AND `Item` = 23682;
+UPDATE `item_loot_template` SET `Chance` = 0, `GroupId` = 2 WHERE `Entry` = 24336 AND `Item` = 24335;
diff --git a/data/sql/updates/db_world/2025_11_14_00.sql b/data/sql/updates/db_world/2025_11_14_00.sql
new file mode 100644
index 0000000000..ede32e3405
--- /dev/null
+++ b/data/sql/updates/db_world/2025_11_14_00.sql
@@ -0,0 +1,9 @@
+-- DB update 2025_11_13_05 -> 2025_11_14_00
+--
+DELETE FROM `spell_script_names` WHERE `spell_id` = 50380;
+INSERT INTO `spell_script_names` (`spell_id`, `ScriptName`) VALUES
+(50380, 'spell_bloodspore_haze');
+
+DELETE FROM `spell_custom_attr` WHERE `spell_id` = 50380;
+INSERT INTO `spell_custom_attr` (`spell_id`, `attributes`) VALUES
+(50380, 0x00400000);
diff --git a/data/sql/updates/db_world/2025_11_14_01.sql b/data/sql/updates/db_world/2025_11_14_01.sql
new file mode 100644
index 0000000000..7e0fa266f1
--- /dev/null
+++ b/data/sql/updates/db_world/2025_11_14_01.sql
@@ -0,0 +1,6 @@
+-- DB update 2025_11_14_00 -> 2025_11_14_01
+--
+DELETE FROM `smart_scripts` WHERE (`entryorguid` = 29445) AND (`source_type` = 0) AND (`id` IN (0, 1));
+INSERT INTO `smart_scripts` (`entryorguid`, `source_type`, `id`, `link`, `event_type`, `event_phase_mask`, `event_chance`, `event_flags`, `event_param1`, `event_param2`, `event_param3`, `event_param4`, `event_param5`, `event_param6`, `action_type`, `action_param1`, `action_param2`, `action_param3`, `action_param4`, `action_param5`, `action_param6`, `target_type`, `target_param1`, `target_param2`, `target_param3`, `target_param4`, `target_x`, `target_y`, `target_z`, `target_o`, `comment`) VALUES
+(29445, 0, 0, 0, 62, 0, 100, 0, 9926, 0, 0, 0, 0, 0, 134, 56940, 2, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 0, 'Thorim - On Gossip Option 0 Selected - Invoker Cast \'Thorim Story Kill Credit\''),
+(29445, 0, 1, 0, 19, 0, 100, 0, 12924, 0, 0, 0, 0, 0, 134, 56518, 0, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 0, 'Thorim - On Quest \'Forging an Alliance\' Taken - Invoker Cast \'Clearquests\'');
diff --git a/data/sql/updates/db_world/2025_11_14_02.sql b/data/sql/updates/db_world/2025_11_14_02.sql
new file mode 100644
index 0000000000..f9dc1bc72e
--- /dev/null
+++ b/data/sql/updates/db_world/2025_11_14_02.sql
@@ -0,0 +1,5 @@
+-- DB update 2025_11_14_01 -> 2025_11_14_02
+--
+DELETE FROM `smart_scripts` WHERE (`entryorguid` = 2943400) AND (`source_type` = 9) AND (`id` IN (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
+(2943400, 9, 2, 0, 0, 0, 100, 0, 0, 0, 0, 0, 0, 0, 26, 12832, 0, 0, 0, 0, 0, 12, 1, 0, 0, 0, 0, 0, 0, 0, 'Injured Goblin Miner - On Script - Quest Credit \'Bitter Departure\' (Stored Target)');
diff --git a/data/sql/updates/db_world/2025_11_14_03.sql b/data/sql/updates/db_world/2025_11_14_03.sql
new file mode 100644
index 0000000000..562a42a8d6
--- /dev/null
+++ b/data/sql/updates/db_world/2025_11_14_03.sql
@@ -0,0 +1,5 @@
+-- DB update 2025_11_14_02 -> 2025_11_14_03
+--
+DELETE FROM `conditions` WHERE (`SourceTypeOrReferenceId` = 17) AND (`SourceGroup` = 0) AND (`SourceEntry` = 55046) AND (`SourceId` = 0) AND (`ElseGroup` = 0) AND (`ConditionTypeOrReference` = 1) AND (`ConditionTarget` = 1) AND (`ConditionValue1` = 54894) 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
+(17, 0, 55046, 0, 0, 1, 1, 54894, 0, 0, 0, 0, 0, '', 'Ice Shard require Icy Imprisionment');
diff --git a/data/sql/updates/db_world/2025_11_15_00.sql b/data/sql/updates/db_world/2025_11_15_00.sql
new file mode 100644
index 0000000000..e6431368fd
--- /dev/null
+++ b/data/sql/updates/db_world/2025_11_15_00.sql
@@ -0,0 +1,5 @@
+-- DB update 2025_11_14_03 -> 2025_11_15_00
+--
+DELETE FROM `creature_loot_template` WHERE (`Entry` = 31231) AND (`Item` IN (42108));
+INSERT INTO `creature_loot_template` (`Entry`, `Item`, `Reference`, `Chance`, `QuestRequired`, `LootMode`, `GroupId`, `MinCount`, `MaxCount`, `Comment`) VALUES
+(31231, 42108, 0, 33, 1, 1, 0, 1, 1, 'Lost Shandaral Spirit - Scourge Curio');
diff --git a/data/sql/updates/db_world/2025_11_15_01.sql b/data/sql/updates/db_world/2025_11_15_01.sql
new file mode 100644
index 0000000000..ae17324684
--- /dev/null
+++ b/data/sql/updates/db_world/2025_11_15_01.sql
@@ -0,0 +1,3 @@
+-- DB update 2025_11_15_00 -> 2025_11_15_01
+-- fix spell focus location for quest 'Will of the Titans'
+UPDATE `gameobject` SET `position_x` = 5110.11, `position_y` = 5471.22, `position_z` = -91.84 WHERE `id` = 190781 AND `guid` = 99745;
diff --git a/data/sql/updates/db_world/2025_11_15_02.sql b/data/sql/updates/db_world/2025_11_15_02.sql
new file mode 100644
index 0000000000..66aad02a81
--- /dev/null
+++ b/data/sql/updates/db_world/2025_11_15_02.sql
@@ -0,0 +1,6 @@
+-- DB update 2025_11_15_01 -> 2025_11_15_02
+--
+DELETE FROM `creature_template_spell` WHERE (`CreatureID` = 35415);
+INSERT INTO `creature_template_spell` (`CreatureID`, `Index`, `Spell`, `VerifiedBuild`) VALUES
+(35415, 0, 68068, 0),
+(35415, 1, 67442, 0);
diff --git a/data/sql/updates/db_world/2025_11_15_03.sql b/data/sql/updates/db_world/2025_11_15_03.sql
new file mode 100644
index 0000000000..b55a0aa0c4
--- /dev/null
+++ b/data/sql/updates/db_world/2025_11_15_03.sql
@@ -0,0 +1,3 @@
+-- DB update 2025_11_15_02 -> 2025_11_15_03
+--
+UPDATE `creature_template` SET `npcflag` = `npcflag` |65536 WHERE `entry` = 29944;
diff --git a/data/sql/updates/db_world/2025_11_15_04.sql b/data/sql/updates/db_world/2025_11_15_04.sql
new file mode 100644
index 0000000000..d0c7e3db7c
--- /dev/null
+++ b/data/sql/updates/db_world/2025_11_15_04.sql
@@ -0,0 +1,3 @@
+-- DB update 2025_11_15_03 -> 2025_11_15_04
+--
+UPDATE `creature_template` SET `unit_flags` = `unit_flags` &~ 256 WHERE `entry` = 24787;
diff --git a/data/sql/updates/db_world/2025_11_15_05.sql b/data/sql/updates/db_world/2025_11_15_05.sql
new file mode 100644
index 0000000000..110691e3a0
--- /dev/null
+++ b/data/sql/updates/db_world/2025_11_15_05.sql
@@ -0,0 +1,6 @@
+-- DB update 2025_11_15_04 -> 2025_11_15_05
+--
+DELETE FROM `smart_scripts` WHERE (`entryorguid` = 26841) AND (`source_type` = 0) AND (`id` IN (0, 1));
+INSERT INTO `smart_scripts` (`entryorguid`, `source_type`, `id`, `link`, `event_type`, `event_phase_mask`, `event_chance`, `event_flags`, `event_param1`, `event_param2`, `event_param3`, `event_param4`, `event_param5`, `event_param6`, `action_type`, `action_param1`, `action_param2`, `action_param3`, `action_param4`, `action_param5`, `action_param6`, `target_type`, `target_param1`, `target_param2`, `target_param3`, `target_param4`, `target_x`, `target_y`, `target_z`, `target_o`, `comment`) VALUES
+(26841, 0, 0, 0, 0, 0, 100, 0, 0, 0, 5000, 7000, 0, 0, 11, 47425, 64, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 'Reanimated Frost Wyrm - In Combat - Cast \'Frost Breath\''),
+(26841, 0, 1, 0, 8, 0, 100, 0, 49587, 0, 0, 0, 0, 0, 49, 0, 0, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 0, 'Reanimated Frost Wyrm - On Spellhit \'Seeds of Nature`s Wrath\' - Start Attacking');
diff --git a/data/sql/updates/db_world/2025_11_15_06.sql b/data/sql/updates/db_world/2025_11_15_06.sql
new file mode 100644
index 0000000000..afeb1844d8
--- /dev/null
+++ b/data/sql/updates/db_world/2025_11_15_06.sql
@@ -0,0 +1,9 @@
+-- DB update 2025_11_15_05 -> 2025_11_15_06
+--
+DELETE FROM `conditions` WHERE (`SourceTypeOrReferenceId` = 13) AND (`SourceEntry` = 49765);
+INSERT INTO `conditions` (`SourceTypeOrReferenceId`, `SourceGroup`, `SourceEntry`, `SourceId`, `ElseGroup`, `ConditionTypeOrReference`, `ConditionTarget`, `ConditionValue1`, `ConditionValue2`, `ConditionValue3`, `NegativeCondition`, `ErrorType`, `ErrorTextId`, `ScriptName`, `Comment`) VALUES
+(13, 7, 49765, 0, 0, 31, 0, 3, 27713, 0, 0, 0, 0, '', 'Fordragon Resolve target 7th Legion Elite'),
+(13, 7, 49765, 0, 1, 31, 0, 3, 26780, 0, 0, 0, 0, '', 'Fordragon Resolve target 7th Legion Cleric'),
+(13, 7, 49765, 0, 2, 31, 0, 3, 27587, 0, 0, 0, 0, '', 'Fordragon Resolve target Legion Commander Yorik'),
+(13, 7, 49765, 0, 3, 31, 0, 3, 27858, 0, 0, 0, 0, '', 'Fordragon Resolve target Highlord Bolvar Fordragon'),
+(13, 7, 49765, 0, 4, 32, 0, 16, 0, 0, 0, 0, 0, '', 'Fordragon Resolve target players');
diff --git a/data/sql/updates/db_world/2025_11_15_07.sql b/data/sql/updates/db_world/2025_11_15_07.sql
new file mode 100644
index 0000000000..459cf6f267
--- /dev/null
+++ b/data/sql/updates/db_world/2025_11_15_07.sql
@@ -0,0 +1,5 @@
+-- DB update 2025_11_15_06 -> 2025_11_15_07
+--
+DELETE FROM `smart_scripts` WHERE (`entryorguid` = 2583500) AND (`source_type` = 9) AND (`id` IN (19));
+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
+(2583500, 9, 19, 0, 0, 0, 100, 0, 0, 0, 0, 0, 0, 0, 41, 5000, 6, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Nesingwary Trapper - Actionlist - Despawn In 5000 ms');
diff --git a/data/sql/updates/db_world/2025_11_15_08.sql b/data/sql/updates/db_world/2025_11_15_08.sql
new file mode 100644
index 0000000000..6e2a4c416d
--- /dev/null
+++ b/data/sql/updates/db_world/2025_11_15_08.sql
@@ -0,0 +1,69 @@
+-- DB update 2025_11_15_07 -> 2025_11_15_08
+
+-- Set Creature Template Addon (Amberpine Woodsman)
+DELETE FROM `creature_template_addon` WHERE (`entry` = 27293);
+INSERT INTO `creature_template_addon` (`entry`, `path_id`, `mount`, `bytes1`, `bytes2`, `emote`, `visibilityDistanceType`, `auras`) VALUES
+(27293, 0, 0, 0, 1, 0, 0, '');
+
+-- Update Spawn Points (Amberpine Woodsman)
+UPDATE `creature` SET `position_x` = 3499.0676, `position_y` = -2838.0798, `position_z` = 202.27922, `orientation` = 2.89724, `Comment` = 'Has Guid SAI' WHERE (`id1` = 27293) AND (`guid` = 110578);
+UPDATE `creature` SET `position_x` = 3497.1128, `position_y` = -2836.0088, `position_z` = 202.26859, `orientation` = 4.55530 WHERE (`id1` = 27293) AND (`guid` = 110579);
+UPDATE `creature` SET `position_x` = 3474.6736, `position_y` = -2776.7188, `position_z` = 201.02751, `orientation` = 2.56563, `Comment` = 'Has Guid SAI' WHERE (`id1` = 27293) AND (`guid` = 110580);
+UPDATE `creature` SET `position_x` = 3475.1519, `position_y` = -2774.3525, `position_z` = 200.75826, `orientation` = 3.59537 WHERE (`id1` = 27293) AND (`guid` = 110581);
+UPDATE `creature` SET `position_x` = 3374.5999, `position_y` = -2805.997, `position_z` = 199.0484, `orientation` = 1.34390, `Comment` = 'Has Guid SAI' WHERE (`id1` = 27293) AND (`guid` = 110582);
+UPDATE `creature` SET `position_x` = 3375.972, `position_y` = -2803.756, `position_z` = 199.01216, `orientation` = 3.99680 WHERE (`id1` = 27293) AND (`guid` = 110583);
+UPDATE `creature` SET `position_x` = 3460.5964, `position_y` = -2902.6494, `position_z` = 201.07785, `orientation` = 5.89921, `Comment` = 'Has Guid SAI' WHERE (`id1` = 27293) AND (`guid` = 110602);
+UPDATE `creature` SET `position_x` = 3460.07, `position_y` = -2904.9836, `position_z` = 201.10063, `orientation` = 0.52359 WHERE (`id1` = 27293) AND (`guid` = 110603);
+UPDATE `creature` SET `position_x` = 3390.5305, `position_y` = -2862.014, `position_z` = 199.62068, `orientation` = 3.24631 WHERE (`id1` = 27293) AND (`guid` = 110604);
+UPDATE `creature` SET `position_x` = 3390.0286, `position_y` = -2864.7012, `position_z` = 200.0756, `orientation` = 2.56563, `Comment` = 'Has Guid SAI' WHERE (`id1` = 27293) AND (`guid` = 110605);
+
+-- Set Creature Addon (Amberpine Woodsman)
+DELETE FROM `creature_addon` WHERE (`guid` IN (110578, 110579, 110580, 110581, 110582, 110583, 110602, 110603, 110604, 110605));
+INSERT INTO `creature_addon` (`guid`, `path_id`, `mount`, `bytes1`, `bytes2`, `emote`, `visibilityDistanceType`, `auras`) VALUES
+(110578, 0, 0, 8, 0, 0, 0, NULL),
+(110579, 0, 0, 0, 0, 133, 0, NULL),
+(110580, 0, 0, 8, 0, 0, 0, NULL),
+(110581, 0, 0, 0, 0, 133, 0, NULL),
+(110582, 0, 0, 8, 0, 0, 0, NULL),
+(110583, 0, 0, 0, 0, 133, 0, NULL),
+(110602, 0, 0, 8, 0, 0, 0, NULL),
+(110603, 0, 0, 0, 0, 133, 0, NULL),
+(110604, 0, 0, 0, 0, 133, 0, NULL),
+(110605, 0, 0, 8, 0, 0, 0, NULL);
+
+-- Remove Script Name and set SmartAI (Amberpine Woodsman)
+UPDATE `creature_template` SET `AIName` = 'SmartAI', `ScriptName` = '' WHERE (`entry` = 27293);
+
+-- Set Guid SmartAI
+DELETE FROM `smart_scripts` WHERE (`source_type` = 0) AND (`entryorguid` IN (-110578, -110580, -110582, -110602, -110605));
+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
+(-110578, 0, 0, 0, 1, 0, 100, 0, 1000, 3000, 500, 3000, 0, 0, 5, 36, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Amberpine Woodsman - Out of Combat - Play Emote 36'),
+(-110580, 0, 0, 0, 1, 0, 100, 0, 1000, 3000, 500, 3000, 0, 0, 5, 36, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Amberpine Woodsman - Out of Combat - Play Emote 36'),
+(-110582, 0, 0, 0, 1, 0, 100, 0, 1000, 3000, 500, 3000, 0, 0, 5, 36, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Amberpine Woodsman - Out of Combat - Play Emote 36'),
+(-110602, 0, 0, 0, 1, 0, 100, 0, 1000, 3000, 500, 3000, 0, 0, 5, 36, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Amberpine Woodsman - Out of Combat - Play Emote 36'),
+(-110605, 0, 0, 0, 1, 0, 100, 0, 1000, 3000, 500, 3000, 0, 0, 5, 36, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Amberpine Woodsman - Out of Combat - Play Emote 36');
+
+-- Remove Script Name and set SmartAI (Tallhorn Stag)
+UPDATE `creature_template` SET `AIName` = 'SmartAI', `ScriptName` = '' WHERE (`entry` = 26363);
+
+-- Set Comments (Tallhorn Stag)
+UPDATE `creature` SET `Comment` = 'Has Personal SAI' WHERE (`id1` = 26363) AND (`guid` IN (119621, 119622, 119642, 119643, 119656));
+
+-- Set Guid Sai (Tallhorn Stag)
+DELETE FROM `smart_scripts` WHERE (`source_type` = 0) AND (`entryorguid` IN (-119621, -119622, -119642, -119643, -119656));
+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
+(-119621, 0, 0, 1, 11, 0, 100, 0, 0, 0, 0, 0, 0, 0, 18, 537166592, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Tallhorn Stag - On Respawn - Set Flags Immune To Players & Immune To NPC\'s & Stunned & Prevent Emotes From Chat Text'),
+(-119621, 0, 1, 2, 61, 0, 100, 0, 0, 0, 0, 0, 0, 0, 18, 1, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Tallhorn Stag - On Respawn - Set Flags Feign Death'),
+(-119621, 0, 2, 0, 61, 0, 100, 0, 0, 0, 0, 0, 0, 0, 11, 29266, 2, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Tallhorn Stag - On Respawn - Cast \'Permanent Feign Death\''),
+(-119622, 0, 0, 1, 11, 0, 100, 0, 0, 0, 0, 0, 0, 0, 18, 537166592, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Tallhorn Stag - On Respawn - Set Flags Immune To Players & Immune To NPC\'s & Stunned & Prevent Emotes From Chat Text'),
+(-119622, 0, 1, 2, 61, 0, 100, 0, 0, 0, 0, 0, 0, 0, 18, 1, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Tallhorn Stag - On Respawn - Set Flags Feign Death'),
+(-119622, 0, 2, 0, 61, 0, 100, 0, 0, 0, 0, 0, 0, 0, 11, 29266, 2, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Tallhorn Stag - On Respawn - Cast \'Permanent Feign Death\''),
+(-119642, 0, 0, 1, 11, 0, 100, 0, 0, 0, 0, 0, 0, 0, 18, 537166592, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Tallhorn Stag - On Respawn - Set Flags Immune To Players & Immune To NPC\'s & Stunned & Prevent Emotes From Chat Text'),
+(-119642, 0, 1, 2, 61, 0, 100, 0, 0, 0, 0, 0, 0, 0, 18, 1, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Tallhorn Stag - On Respawn - Set Flags Feign Death'),
+(-119642, 0, 2, 0, 61, 0, 100, 0, 0, 0, 0, 0, 0, 0, 11, 29266, 2, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Tallhorn Stag - On Respawn - Cast \'Permanent Feign Death\''),
+(-119643, 0, 0, 1, 11, 0, 100, 0, 0, 0, 0, 0, 0, 0, 18, 537166592, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Tallhorn Stag - On Respawn - Set Flags Immune To Players & Immune To NPC\'s & Stunned & Prevent Emotes From Chat Text'),
+(-119643, 0, 1, 2, 61, 0, 100, 0, 0, 0, 0, 0, 0, 0, 18, 1, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Tallhorn Stag - On Respawn - Set Flags Feign Death'),
+(-119643, 0, 2, 0, 61, 0, 100, 0, 0, 0, 0, 0, 0, 0, 11, 29266, 2, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Tallhorn Stag - On Respawn - Cast \'Permanent Feign Death\''),
+(-119656, 0, 0, 1, 11, 0, 100, 0, 0, 0, 0, 0, 0, 0, 18, 537166592, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Tallhorn Stag - On Respawn - Set Flags Immune To Players & Immune To NPC\'s & Stunned & Prevent Emotes From Chat Text'),
+(-119656, 0, 1, 2, 61, 0, 100, 0, 0, 0, 0, 0, 0, 0, 18, 1, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Tallhorn Stag - On Respawn - Set Flags Feign Death'),
+(-119656, 0, 2, 0, 61, 0, 100, 0, 0, 0, 0, 0, 0, 0, 11, 29266, 2, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Tallhorn Stag - On Respawn - Cast \'Permanent Feign Death\'');
diff --git a/data/sql/updates/db_world/2025_11_15_09.sql b/data/sql/updates/db_world/2025_11_15_09.sql
new file mode 100644
index 0000000000..f86f64964a
--- /dev/null
+++ b/data/sql/updates/db_world/2025_11_15_09.sql
@@ -0,0 +1,3 @@
+-- DB update 2025_11_15_08 -> 2025_11_15_09
+
+UPDATE `creature_template` SET `flags_extra` = `flags_extra` |128 WHERE (`entry` = 25739);
diff --git a/data/sql/updates/db_world/2025_11_15_10.sql b/data/sql/updates/db_world/2025_11_15_10.sql
new file mode 100644
index 0000000000..63a030b748
--- /dev/null
+++ b/data/sql/updates/db_world/2025_11_15_10.sql
@@ -0,0 +1,9 @@
+-- DB update 2025_11_15_09 -> 2025_11_15_10
+--
+DELETE FROM `spell_linked_spell` WHERE `spell_trigger` = 54076;
+INSERT INTO `spell_linked_spell` (`spell_trigger`, `spell_effect`, `type`, `comment`) VALUES
+(54076, 49511, 0, 'Taxi validate - Gryphon to Star Rest');
+
+DELETE FROM `smart_scripts` WHERE (`entryorguid` = 26878) AND (`source_type` = 0) AND (`id` IN (3));
+INSERT INTO `smart_scripts` (`entryorguid`, `source_type`, `id`, `link`, `event_type`, `event_phase_mask`, `event_chance`, `event_flags`, `event_param1`, `event_param2`, `event_param3`, `event_param4`, `event_param5`, `event_param6`, `action_type`, `action_param1`, `action_param2`, `action_param3`, `action_param4`, `action_param5`, `action_param6`, `target_type`, `target_param1`, `target_param2`, `target_param3`, `target_param4`, `target_x`, `target_y`, `target_z`, `target_o`, `comment`) VALUES
+(26878, 0, 3, 0, 19, 0, 100, 0, 12440, 0, 0, 0, 0, 0, 11, 54076, 2, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 0, 'Rodney Wells - On Quest \'To Stars\' Rest!\' Taken - Cast \'Taxi to Stars` Rest Validate\'');
diff --git a/data/sql/updates/db_world/2025_11_15_11.sql b/data/sql/updates/db_world/2025_11_15_11.sql
new file mode 100644
index 0000000000..6350fbdb84
--- /dev/null
+++ b/data/sql/updates/db_world/2025_11_15_11.sql
@@ -0,0 +1,14 @@
+-- DB update 2025_11_15_10 -> 2025_11_15_11
+
+-- Add Immune To PC, Immune To Npc, Stunned, Prevent Emotes, Feign Death and remove All Dynamic Flags (Sniffed)
+UPDATE `creature_template` SET `unit_flags` = `unit_flags` |256|512|262144|536870912, `unit_flags2` = `unit_flags2` |1, `dynamicflags` = 0 WHERE (`entry` = 26514);
+
+-- Add Aura (Sniffed)
+DELETE FROM `creature_template_addon` WHERE (`entry` = 26514);
+INSERT INTO `creature_template_addon` (`entry`, `path_id`, `mount`, `bytes1`, `bytes2`, `emote`, `visibilityDistanceType`, `auras`) VALUES
+(26514, 0, 0, 0, 0, 0, 0, '29266');
+
+-- Add Disable Gravity and Rooted (Sniffed)
+DELETE FROM `creature_template_movement` WHERE (`CreatureId` = 26514);
+INSERT INTO `creature_template_movement` (`CreatureId`, `Ground`, `Swim`, `Flight`, `Rooted`, `Chase`, `Random`, `InteractionPauseTimer`) VALUES
+(26514, 0, 0, 1, 1, 0, 0, 0);
diff --git a/data/sql/updates/db_world/2025_11_15_12.sql b/data/sql/updates/db_world/2025_11_15_12.sql
new file mode 100644
index 0000000000..cb70c38343
--- /dev/null
+++ b/data/sql/updates/db_world/2025_11_15_12.sql
@@ -0,0 +1,3 @@
+-- DB update 2025_11_15_11 -> 2025_11_15_12
+--
+UPDATE `creature_loot_template` SET `Chance` = 100 WHERE `item` = 43159 AND `entry` = 30746;
diff --git a/data/sql/updates/db_world/2025_11_15_13.sql b/data/sql/updates/db_world/2025_11_15_13.sql
new file mode 100644
index 0000000000..69bb6ab04a
--- /dev/null
+++ b/data/sql/updates/db_world/2025_11_15_13.sql
@@ -0,0 +1,5 @@
+-- DB update 2025_11_15_12 -> 2025_11_15_13
+--
+DELETE FROM `spell_proc_event` WHERE `entry`= 45278;
+INSERT INTO `spell_proc_event` (`entry`, `procFlags`) VALUES
+(45278, 0x00004400|0x00010000);
diff --git a/data/sql/updates/db_world/2025_11_15_14.sql b/data/sql/updates/db_world/2025_11_15_14.sql
new file mode 100644
index 0000000000..18691bf41a
--- /dev/null
+++ b/data/sql/updates/db_world/2025_11_15_14.sql
@@ -0,0 +1,3 @@
+-- DB update 2025_11_15_13 -> 2025_11_15_14
+DELETE FROM `smart_scripts` WHERE `entryorguid` = 27598 AND `source_type` = 0;
+UPDATE `creature_template` SET `AIName` = '' WHERE `entry` = 27598;
diff --git a/data/sql/updates/db_world/2025_11_15_15.sql b/data/sql/updates/db_world/2025_11_15_15.sql
new file mode 100644
index 0000000000..c0e0fce5bb
--- /dev/null
+++ b/data/sql/updates/db_world/2025_11_15_15.sql
@@ -0,0 +1,31 @@
+-- DB update 2025_11_15_14 -> 2025_11_15_15
+--
+SET @MAXSTANDING := 7;
+SET @REPSUMMONS := 1;
+SET @REPREGULAR := 4;
+SET @REPHULK := 10;
+SET @REPBOSS := 50;
+DELETE FROM `creature_onkill_reputation` WHERE `creature_id` IN (26553, 26554, 26550, 26555, 26668, 26669, 26670, 26672, 26685, 26683, 26684,
+26686, 26687, 26692, 26690, 26691, 26693, 28368, 26696, 26694, 26861);
+INSERT INTO `creature_onkill_reputation` (`creature_id`, `RewOnKillRepFaction1`, `RewOnKillRepFaction2`, `MaxStanding1`, `RewOnKillRepValue1`, `MaxStanding2`, `RewOnKillRepValue2`, `TeamDependent`) VALUES
+(26550, 1037, 1052, @MAXSTANDING, @REPREGULAR, @MAXSTANDING, @REPREGULAR, 1), -- Dragonflayer Deathseeker
+(26553, 1037, 1052, @MAXSTANDING, @REPREGULAR, @MAXSTANDING, @REPREGULAR, 1), -- Dragonflayer Fanatic
+(26554, 1037, 1052, @MAXSTANDING, @REPREGULAR, @MAXSTANDING, @REPREGULAR, 1), -- Dragonflayer Seer
+(26555, 1037, 1052, @MAXSTANDING, @REPHULK, @MAXSTANDING, @REPHULK, 1), -- Scourge Hulk
+(26668, 1037, 1052, @MAXSTANDING, @REPBOSS, @MAXSTANDING, @REPBOSS, 1), -- Svala
+(26669, 1037, 1052, @MAXSTANDING, @REPREGULAR, @MAXSTANDING, @REPREGULAR, 1), -- Ymirjar Savage
+(26670, 1037, 1052, @MAXSTANDING, @REPREGULAR, @MAXSTANDING, @REPREGULAR, 1), -- Ymirjar Flesh Hunter
+(26672, 1037, 1052, @MAXSTANDING, @REPREGULAR, @MAXSTANDING, @REPREGULAR, 1), -- Bloodthirsty Tundra Wolf
+(26685, 1037, 1052, @MAXSTANDING, @REPREGULAR, @MAXSTANDING, @REPREGULAR, 1), -- Massive Jormungar
+(26683, 1037, 1052, @MAXSTANDING, @REPREGULAR, @MAXSTANDING, @REPREGULAR, 1), -- Frenzied Worgen
+(26684, 1037, 1052, @MAXSTANDING, @REPREGULAR, @MAXSTANDING, @REPREGULAR, 1), -- Ravenous Furbog
+(26686, 1037, 1052, @MAXSTANDING, @REPREGULAR, @MAXSTANDING, @REPREGULAR, 1), -- Ferocious Rhino
+(26687, 1037, 1052, @MAXSTANDING, @REPBOSS, @MAXSTANDING, @REPBOSS, 1), -- Gortok
+(26692, 1037, 1052, @MAXSTANDING, @REPSUMMONS, @MAXSTANDING, @REPSUMMONS, 1), -- Ymirjar Harpooner (Skadi)
+(26690, 1037, 1052, @MAXSTANDING, @REPSUMMONS, @MAXSTANDING, @REPSUMMONS, 1), -- Ymirjar Warrior (Skadi)
+(26691, 1037, 1052, @MAXSTANDING, @REPSUMMONS, @MAXSTANDING, @REPSUMMONS, 1), -- Ymirjar Shaman (Skadi)
+(26693, 1037, 1052, @MAXSTANDING, @REPBOSS, @MAXSTANDING, @REPBOSS, 1), -- Skadi
+(28368, 1037, 1052, @MAXSTANDING, @REPREGULAR, @MAXSTANDING, @REPREGULAR, 1), -- Ymirjar Necromancer
+(26696, 1037, 1052, @MAXSTANDING, @REPREGULAR, @MAXSTANDING, @REPREGULAR, 1), -- Ymirjar Berserker
+(26694, 1037, 1052, @MAXSTANDING, @REPREGULAR, @MAXSTANDING, @REPREGULAR, 1), -- Ymirjar Dark Shaman
+(26861, 1037, 1052, @MAXSTANDING, @REPBOSS, @MAXSTANDING, @REPBOSS, 1); -- Ymiron
diff --git a/data/sql/updates/db_world/2025_11_16_00.sql b/data/sql/updates/db_world/2025_11_16_00.sql
new file mode 100644
index 0000000000..517458edd8
--- /dev/null
+++ b/data/sql/updates/db_world/2025_11_16_00.sql
@@ -0,0 +1,10 @@
+-- DB update 2025_11_15_15 -> 2025_11_16_00
+--
+SET @REPTRASH := 1;
+SET @REPREGULAR := 5;
+SET @REPHULK := 10;
+SET @REPBOSS := 50;
+UPDATE `creature_onkill_reputation` SET `RewOnKillRepValue1` = @REPTRASH, `RewOnKillRepValue2` = @REPTRASH WHERE `creature_id` IN (27636, 27638);
+UPDATE `creature_onkill_reputation` SET `RewOnKillRepValue1` = @REPREGULAR, `RewOnKillRepValue2` = @REPREGULAR WHERE `creature_id` IN (26550, 26553, 26554, 26669, 26670, 26672, 26685, 26683, 26684, 26686, 28368, 26696, 26694); -- UP
+UPDATE `creature_onkill_reputation` SET `RewOnKillRepValue1` = @REPREGULAR, `RewOnKillRepValue2` = @REPREGULAR WHERE `creature_id` IN (27635, 27633, 27641, 27639, 27640, 27653, 27651, 27650, 27648, 27647, 27649, 27645, 27644, 27642); -- Oculus
+UPDATE `creature_onkill_reputation` SET `RewOnKillRepValue1` = @REPBOSS, `RewOnKillRepValue2` = @REPBOSS WHERE `creature_id` IN (27654, 27447, 27655, 27656);
diff --git a/data/sql/updates/db_world/2025_11_16_01.sql b/data/sql/updates/db_world/2025_11_16_01.sql
new file mode 100644
index 0000000000..ddd2f9424f
--- /dev/null
+++ b/data/sql/updates/db_world/2025_11_16_01.sql
@@ -0,0 +1,3 @@
+-- DB update 2025_11_16_00 -> 2025_11_16_01
+--
+UPDATE `quest_template_addon` SET `PrevQuestID` = 12611 WHERE (`ID` = 12805);
diff --git a/data/sql/updates/db_world/2025_11_16_02.sql b/data/sql/updates/db_world/2025_11_16_02.sql
new file mode 100644
index 0000000000..5730eeb0fd
--- /dev/null
+++ b/data/sql/updates/db_world/2025_11_16_02.sql
@@ -0,0 +1,3 @@
+-- DB update 2025_11_16_01 -> 2025_11_16_02
+--
+UPDATE `quest_template_addon` SET `PrevQuestID` = 0 WHERE (`ID` = 12827);
diff --git a/data/sql/updates/db_world/2025_11_17_00.sql b/data/sql/updates/db_world/2025_11_17_00.sql
new file mode 100644
index 0000000000..524b3c133b
--- /dev/null
+++ b/data/sql/updates/db_world/2025_11_17_00.sql
@@ -0,0 +1,19 @@
+-- DB update 2025_11_16_02 -> 2025_11_17_00
+--
+DELETE FROM `smart_scripts` WHERE (`entryorguid` = 24825) AND (`source_type` = 0) AND (`id` IN (2, 3, 4, 5, 6, 7));
+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
+(24825, 0, 2, 0, 72, 0, 100, 512, 1, 0, 0, 0, 0, 0, 53, 2, 24826, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Iron Rune Construct - On Action 1 Done - Start Waypoint Path 24826'),
+(24825, 0, 3, 0, 72, 0, 100, 512, 2, 0, 0, 0, 0, 0, 53, 2, 24827, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Iron Rune Construct - On Action 2 Done - Start Waypoint Path 24827'),
+(24825, 0, 4, 0, 72, 0, 100, 512, 3, 0, 0, 0, 0, 0, 53, 2, 24828, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Iron Rune Construct - On Action 3 Done - Start Waypoint Path 24828'),
+(24825, 0, 5, 0, 72, 0, 100, 512, 4, 0, 0, 0, 0, 0, 53, 2, 24831, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Iron Rune Construct - On Action 4 Done - Start Waypoint Path 24831'),
+(24825, 0, 6, 0, 72, 0, 100, 512, 5, 0, 0, 0, 0, 0, 53, 2, 24829, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Iron Rune Construct - On Action 5 Done - Start Waypoint Path 24829'),
+(24825, 0, 7, 0, 72, 0, 100, 512, 6, 0, 0, 0, 0, 0, 53, 2, 24832, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Iron Rune Construct - On Action 6 Done - Start Waypoint Path 24832');
+
+DELETE FROM `smart_scripts` WHERE (`source_type` = 0 AND `entryorguid` IN (24826, 24827, 24828, 24829, 24831, 24832));
+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
+(24826, 0, 0, 0, 8, 0, 100, 0, 44608, 0, 0, 0, 0, 0, 223, 1, 0, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 0, 'On Spellhit \'Rocket Jump\' - Do Action 1'),
+(24827, 0, 0, 0, 8, 0, 100, 0, 44608, 0, 0, 0, 0, 0, 223, 2, 0, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 0, 'On Spellhit \'Rocket Jump\' - Do Action 2'),
+(24828, 0, 0, 0, 8, 0, 100, 0, 44608, 0, 0, 0, 0, 0, 223, 3, 0, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 0, 'On Spellhit \'Rocket Jump\' - Do Action 3'),
+(24831, 0, 0, 0, 8, 0, 100, 0, 44608, 0, 0, 0, 0, 0, 223, 4, 0, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 0, 'On Spellhit \'Rocket Jump\' - Do Action 4'),
+(24829, 0, 0, 0, 8, 0, 100, 0, 44608, 0, 0, 0, 0, 0, 223, 5, 0, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 0, 'On Spellhit \'Rocket Jump\' - Do Action 5'),
+(24832, 0, 0, 0, 8, 0, 100, 0, 44608, 0, 0, 0, 0, 0, 223, 6, 0, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 0, 'On Spellhit \'Rocket Jump\' - Do Action 6');
diff --git a/data/sql/updates/db_world/2025_11_17_01.sql b/data/sql/updates/db_world/2025_11_17_01.sql
new file mode 100644
index 0000000000..4631988b57
--- /dev/null
+++ b/data/sql/updates/db_world/2025_11_17_01.sql
@@ -0,0 +1,5 @@
+-- DB update 2025_11_17_00 -> 2025_11_17_01
+--
+DELETE FROM `smart_scripts` WHERE (`entryorguid` = 27292) AND (`source_type` = 0) AND (`id` IN (1));
+INSERT INTO `smart_scripts` (`entryorguid`, `source_type`, `id`, `link`, `event_type`, `event_phase_mask`, `event_chance`, `event_flags`, `event_param1`, `event_param2`, `event_param3`, `event_param4`, `event_param5`, `event_param6`, `action_type`, `action_param1`, `action_param2`, `action_param3`, `action_param4`, `action_param5`, `action_param6`, `target_type`, `target_param1`, `target_param2`, `target_param3`, `target_param4`, `target_x`, `target_y`, `target_z`, `target_o`, `comment`) VALUES
+(27292, 0, 1, 2, 62, 0, 100, 512, 9512, 0, 0, 0, 0, 0, 11, 48606, 3, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 0, 'Flamebringer - On Gossip Option 0 Selected - Cast \'Flamebringer Summon Cue\'');
diff --git a/data/sql/updates/db_world/2025_11_17_02.sql b/data/sql/updates/db_world/2025_11_17_02.sql
new file mode 100644
index 0000000000..de286ebd95
--- /dev/null
+++ b/data/sql/updates/db_world/2025_11_17_02.sql
@@ -0,0 +1,22 @@
+-- DB update 2025_11_17_01 -> 2025_11_17_02
+
+-- Set Spelldifficulty
+DELETE FROM `spelldifficulty_dbc` WHERE (`ID` IN (52534, 52535));
+INSERT INTO `spelldifficulty_dbc` (`ID`,`DifficultySpellID_1`,`DifficultySpellID_2`,`DifficultySpellID_3`,`DifficultySpellID_4`) VALUES
+(52534, 52534, 59357, 0, 0),
+(52535, 52535, 59358, 0, 0);
+
+-- Update SmartAIs (call for help and comments).
+UPDATE `creature_template` SET `AIName` = 'SmartAI' WHERE (`entry` IN (28732, 28733, 28734));
+
+DELETE FROM `smart_scripts` WHERE (`source_type` = 0) AND (`entryorguid` IN (28732, 28733, 28734));
+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
+(28732, 0, 0, 0, 0, 0, 100, 0, 2000, 5000, 6000, 8000, 0, 0, 11, 52532, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 'Anub\'ar Warrior - In Combat - Cast \'Strike\''),
+(28732, 0, 1, 0, 0, 0, 100, 0, 2000, 10000, 15000, 15000, 0, 0, 11, 49806, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 'Anub\'ar Warrior - In Combat - Cast \'Cleave\''),
+(28732, 0, 2, 0, 4, 0, 100, 0, 0, 0, 0, 0, 0, 0, 39, 5, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Anub\'ar Warrior - On Aggro - Call For Help'),
+(28733, 0, 0, 0, 0, 0, 100, 0, 0, 0, 2000, 2500, 0, 0, 11, 52534, 64, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 'Anub\'ar Shadowcaster - In Combat - Cast \'Shadow Bolt\''),
+(28733, 0, 1, 0, 0, 0, 100, 0, 6000, 12000, 12000, 20000, 0, 0, 11, 52535, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Anub\'ar Shadowcaster - In Combat - Cast \'Shadow Nova\''),
+(28733, 0, 2, 0, 4, 0, 100, 0, 0, 0, 0, 0, 0, 0, 39, 5, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Anub\'ar Shadowcaster - On Aggro - Call For Help'),
+(28734, 0, 0, 0, 67, 0, 100, 0, 7000, 7000, 7000, 7000, 0, 5, 11, 52540, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 'Anub\'ar Skirmisher - On Behind Target - Cast \'Backstab\''),
+(28734, 0, 1, 0, 0, 0, 100, 0, 5000, 10000, 15000, 15000, 0, 0, 11, 52536, 0, 0, 0, 0, 0, 5, 40, 0, 0, 0, 0, 0, 0, 0, 'Anub\'ar Skirmisher - In Combat - Cast \'Fixate Trigger\''),
+(28734, 0, 2, 0, 4, 0, 100, 0, 0, 0, 0, 0, 0, 0, 39, 5, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Anub\'ar Skirmisher - On Aggro - Call For Help');
diff --git a/data/sql/updates/db_world/2025_11_17_03.sql b/data/sql/updates/db_world/2025_11_17_03.sql
new file mode 100644
index 0000000000..dd3e4e34f9
--- /dev/null
+++ b/data/sql/updates/db_world/2025_11_17_03.sql
@@ -0,0 +1,8 @@
+-- DB update 2025_11_17_02 -> 2025_11_17_03
+--
+DELETE FROM `smart_scripts` WHERE (`entryorguid` = 26814) AND (`source_type` = 0) AND (`id` IN (2, 4, 21, 32));
+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
+(26814, 0, 2, 32, 61, 0, 100, 512, 0, 0, 0, 0, 0, 0, 71, 0, 3, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Harrison Jones - On Respawn - Change Equipment'),
+(26814, 0, 4, 21, 61, 0, 100, 512, 0, 0, 0, 0, 0, 0, 64, 1, 0, 0, 0, 0, 0, 16, 0, 0, 0, 0, 0, 0, 0, 0, 'Harrison Jones - On Quest \'Dun-da-Dun-tah!\' Taken - Store Targetlist'),
+(26814, 0, 21, 0, 61, 0, 100, 0, 0, 0, 0, 0, 0, 0, 83, 2, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Harrison Jones - On Quest \'Dun-da-Dun-tah!\' Taken - Remove Npc Flags Questgiver'),
+(26814, 0, 32, 0, 61, 0, 100, 0, 0, 0, 0, 0, 0, 0, 82, 2, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Harrison Jones - On Respawn - Add Npc Flags Questgiver');
diff --git a/data/sql/updates/db_world/2025_11_17_04.sql b/data/sql/updates/db_world/2025_11_17_04.sql
new file mode 100644
index 0000000000..7cc968b76c
--- /dev/null
+++ b/data/sql/updates/db_world/2025_11_17_04.sql
@@ -0,0 +1,10 @@
+-- DB update 2025_11_17_03 -> 2025_11_17_04
+--
+DELETE FROM `acore_string` WHERE `entry` IN (5088, 5089);
+INSERT INTO `acore_string` (`entry`, `content_default`) VALUES
+(5088, 'Quest: {} ({}) \nStatus: {}'),
+(5089, 'Quest can\'t be taken!');
+
+DELETE FROM `command` WHERE `name` = 'quest status';
+INSERT INTO `command` (`name`, `security`, `help`) VALUES
+('quest status', 2, 'Syntax: .quest status $id [$name]. Displays the selected player\'s status for the specified quest.');
diff --git a/data/sql/updates/db_world/2025_11_18_00.sql b/data/sql/updates/db_world/2025_11_18_00.sql
new file mode 100644
index 0000000000..1954dd9011
--- /dev/null
+++ b/data/sql/updates/db_world/2025_11_18_00.sql
@@ -0,0 +1,45 @@
+-- DB update 2025_11_17_04 -> 2025_11_18_00
+--
+DELETE FROM `smart_scripts` WHERE (`source_type` = 0) AND (`entryorguid` IN (28732, 28733, 28734));
+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
+(28732, 0, 0, 0, 0, 0, 100, 0, 2000, 5000, 6000, 8000, 0, 0, 11, 52532, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 'Anub\'ar Warrior - In Combat - Cast \'Strike\''),
+(28732, 0, 1, 0, 0, 0, 100, 0, 2000, 10000, 15000, 15000, 0, 0, 11, 49806, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 'Anub\'ar Warrior - In Combat - Cast \'Cleave\''),
+(28733, 0, 0, 0, 0, 0, 100, 0, 0, 0, 2000, 2500, 0, 0, 11, 52534, 64, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 'Anub\'ar Shadowcaster - In Combat - Cast \'Shadow Bolt\''),
+(28733, 0, 1, 0, 0, 0, 100, 0, 6000, 12000, 12000, 20000, 0, 0, 11, 52535, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Anub\'ar Shadowcaster - In Combat - Cast \'Shadow Nova\''),
+(28734, 0, 0, 0, 67, 0, 100, 0, 7000, 7000, 7000, 7000, 0, 5, 11, 52540, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 'Anub\'ar Skirmisher - On Behind Target - Cast \'Backstab\''),
+(28734, 0, 1, 0, 0, 0, 100, 0, 5000, 10000, 15000, 15000, 0, 0, 11, 52536, 0, 0, 0, 0, 0, 5, 40, 0, 0, 0, 0, 0, 0, 0, 'Anub\'ar Skirmisher - In Combat - Cast \'Fixate Trigger\'');
+
+DELETE FROM `smart_scripts` WHERE (`entryorguid` = 28729) AND (`source_type` = 0) AND (`id` IN (6));
+DELETE FROM `smart_scripts` WHERE (`entryorguid` = 28730) AND (`source_type` = 0) AND (`id` IN (5));
+DELETE FROM `smart_scripts` WHERE (`entryorguid` = 28731) AND (`source_type` = 0) AND (`id` IN (6));
+
+SET @CGUID := 12758;
+
+DELETE FROM `creature` WHERE `guid` BETWEEN @CGUID+0 AND @CGUID+8;
+INSERT INTO `creature` (`guid`, `id1`, `map`, `zoneId`, `areaId`, `spawnMask`, `phaseMask`, `equipment_id`, `position_x`, `position_y`, `position_z`, `orientation`, `spawntimesecs`, `wander_distance`, `currentwaypoint`, `curhealth`, `curmana`, `MovementType`, `npcflag`, `unit_flags`,`dynamicflags`, `VerifiedBuild`) VALUES
+(@CGUID+0, 28731, 601, 4277, 4405, 3, 1, 0, 543.82611083984375, 665.12335205078125, 776.24530029296875, 1.553343057632446289, 7200, 0, 0, 11210, 0, 0, 0, 0, 0, 64395), -- 28731 (Area: 4405 - Difficulty: 1) CreateObject1 -- silthik
+(@CGUID+1, 28730, 601, 4277, 4405, 3, 1, 0, 526.66357421875, 663.6053466796875, 775.80523681640625, 1.239183783531188964, 7200, 0, 0, 11210, 0, 0, 0, 0, 0, 64395), -- 28730 (Area: 4405 - Difficulty: 1) CreateObject1 gashra
+(@CGUID+2, 28729, 601, 4277, 4405, 3, 1, 0, 511.809722900390625, 666.493408203125, 776.27813720703125, 0.977384388446807861, 7200, 0, 0, 11210, 0, 0, 0, 0, 0, 64395), -- 28729 (Area: 4405 - Difficulty: 1) CreateObject1 -- narjil
+(@CGUID+3, 28733, 601, 4277, 4405, 3, 1, 0, 549.69268798828125, 662.0069580078125, 776.99273681640625, 1.640609502792358398,7200, 0, 0, 5028, 6525, 0, 0, 0, 0, 64395),
+(@CGUID+4, 28734, 601, 4277, 4405, 3, 1, 0, 550.046142578125, 668.1309814453125, 776.2789306640625, 1.65806281566619873, 7200, 0, 0, 6285, 0, 0, 0, 0, 0, 64395),
+(@CGUID+5, 28732, 601, 4277, 4405, 3, 1, 0, 531.03082275390625, 658.173095703125, 776.2396240234375, 1.343903541564941406, 7200, 0, 0, 6285, 0, 0, 0, 0, 0, 64395),
+(@CGUID+6, 28734, 601, 4277, 4405, 3, 1, 0, 521.81475830078125, 659.4708251953125, 776.3131103515625, 1.186823844909667968, 7200, 0, 0, 6285, 0, 0, 0, 0, 0, 64395),
+(@CGUID+7, 28733, 601, 4277, 4405, 3, 1, 0, 506.17828369140625, 669.9266357421875, 776.3056640625, 0.855211317539215087, 7200, 0, 0, 5028, 6525, 0, 0, 0, 0, 64395),
+(@CGUID+8, 28732, 601, 4277, 4405, 3, 1, 0, 506.515625, 664.38018798828125, 776.97589111328125, 0.92502450942993164, 7200, 0, 0, 6285, 0, 0, 0, 0, 0, 64395);
+
+-- Prevent combat assist
+UPDATE `creature_template` SET `flags_extra` = `flags_extra`|33554432 WHERE `entry` IN (28732, 28733, 28734, 28731, 28730, 28729, 28684, 31612, 31616, 31615, 31617, 31608, 31605, 31606);
+
+DELETE FROM `creature_formations` WHERE `leaderGUID` IN (12758, 12759, 12760);
+INSERT INTO `creature_formations` (`leaderGUID`, `memberGUID`, `groupAI`) VALUES
+(12758, 12758, 11),
+(12758, 12762, 11),
+(12758, 12761, 11),
+
+(12759, 12759, 11),
+(12759, 12763, 11),
+(12759, 12764, 11),
+
+(12760, 12760, 11),
+(12760, 12765, 11),
+(12760, 12766, 11);
diff --git a/data/sql/updates/db_world/2025_11_18_01.sql b/data/sql/updates/db_world/2025_11_18_01.sql
new file mode 100644
index 0000000000..c9c4296176
--- /dev/null
+++ b/data/sql/updates/db_world/2025_11_18_01.sql
@@ -0,0 +1,3 @@
+-- DB update 2025_11_18_00 -> 2025_11_18_01
+-- despawn on evade
+UPDATE `creature_template` SET `flags_extra` = `flags_extra`|0x80000000 WHERE `entry` IN (26631, 31350);
diff --git a/data/sql/updates/db_world/2025_11_18_02.sql b/data/sql/updates/db_world/2025_11_18_02.sql
new file mode 100644
index 0000000000..15aac3ed2f
--- /dev/null
+++ b/data/sql/updates/db_world/2025_11_18_02.sql
@@ -0,0 +1,5 @@
+-- DB update 2025_11_18_01 -> 2025_11_18_02
+--
+DELETE FROM `conditions` WHERE (`SourceTypeOrReferenceId` = 17) AND (`SourceGroup` = 0) AND (`SourceEntry` = 43997) AND (`SourceId` = 0) AND (`ElseGroup` = 0) AND (`ConditionTypeOrReference` = 31) AND (`ConditionTarget` = 1) AND (`ConditionValue1` = 3) AND (`ConditionValue2` = 24533) AND (`ConditionValue3` = 0);
+INSERT INTO `conditions` (`SourceTypeOrReferenceId`, `SourceGroup`, `SourceEntry`, `SourceId`, `ElseGroup`, `ConditionTypeOrReference`, `ConditionTarget`, `ConditionValue1`, `ConditionValue2`, `ConditionValue3`, `NegativeCondition`, `ErrorType`, `ErrorTextId`, `ScriptName`, `Comment`) VALUES
+(17, 0, 43997, 0, 0, 31, 1, 3, 24533, 0, 0, 0, 0, '', 'target must be \'Dragonflayer Defender\'');
diff --git a/data/sql/updates/db_world/2025_11_20_00.sql b/data/sql/updates/db_world/2025_11_20_00.sql
new file mode 100644
index 0000000000..9e5bfd9873
--- /dev/null
+++ b/data/sql/updates/db_world/2025_11_20_00.sql
@@ -0,0 +1,14 @@
+-- DB update 2025_11_18_02 -> 2025_11_20_00
+--
+DELETE FROM `creature_summon_groups` WHERE `summonerId` = 29310 AND `summonerType` = 0 AND `groupId` = 2;
+INSERT INTO `creature_summon_groups`(`summonerId`, `summonerType`, `groupId`, `entry`, `position_x`, `position_y`, `position_z`, `orientation`, `summonType`, `summonTime`, `Comment`) VALUES
+(29310, 0, 2, 30111, 434.00433349609375, -702.8974609375, -17.9579715728759765, 3.124139308929443359, 8, 0, 'Jedoga Shadowseeker - Twilight Worshipper'),
+(29310, 0, 2, 30111, 429.734161376953125, -712.18231201171875, -17.9568767547607421, 2.862339973449707031, 8, 0, 'Jedoga Shadowseeker - Twilight Worshipper'),
+(29310, 0, 2, 30111, 388.307830810546875, -766.78399658203125, -17.9607582092285156, 2.094395160675048828, 8, 0, 'Jedoga Shadowseeker - Twilight Worshipper'),
+(29310, 0, 2, 30111, 392.577484130859375, -765.63641357421875, -17.9589138031005859, 2.251474618911743164, 8, 0, 'Jedoga Shadowseeker - Twilight Worshipper'),
+(29310, 0, 2, 30111, 381.83843994140625, -773.3897705078125, -17.9530143737792968, 1.762782573699951171, 8, 0, 'Jedoga Shadowseeker - Twilight Worshipper'),
+(29310, 0, 2, 30111, 439.982635498046875, -699.070068359375, -17.9527797698974609, 3.193952560424804687, 8, 0, 'Jedoga Shadowseeker - Twilight Worshipper'),
+(29310, 0, 2, 30111, 394.354156494140625, -760.810791015625, -17.9546241760253906, 2.443460941314697265, 8, 0, 'Jedoga Shadowseeker - Twilight Worshipper'),
+(29310, 0, 2, 30111, 434.4365234375, -709.4752197265625, -17.961435317993164, 2.94960641860961914, 8, 0, 'Jedoga Shadowseeker - Twilight Worshipper'),
+(29310, 0, 2, 30111, 387.0694580078125, -770.94964599609375, -17.957611083984375, 1.972222089767456054, 8, 0, 'Jedoga Shadowseeker - Twilight Worshipper'),
+(29310, 0, 2, 30111, 427.302093505859375, -717.3992919921875, -17.9517745971679687, 2.705260276794433593, 8, 0, 'Jedoga Shadowseeker - Twilight Worshipper');
diff --git a/data/sql/updates/db_world/2025_11_20_01.sql b/data/sql/updates/db_world/2025_11_20_01.sql
new file mode 100644
index 0000000000..ad17c2b25f
--- /dev/null
+++ b/data/sql/updates/db_world/2025_11_20_01.sql
@@ -0,0 +1,4 @@
+-- DB update 2025_11_20_00 -> 2025_11_20_01
+--
+UPDATE `creature_addon` SET `bytes2` = 1, `auras` = '31261' WHERE `guid` IN (114372, 114373, 114381);
+UPDATE `creature` SET `unit_flags` = `unit_flags`|256|512|536870912, `VerifiedBuild` = 64502 WHERE `guid` IN (114372, 114373, 114381) AND `id1` = 30148;
diff --git a/data/sql/updates/db_world/2025_11_20_02.sql b/data/sql/updates/db_world/2025_11_20_02.sql
new file mode 100644
index 0000000000..b8b12eb919
--- /dev/null
+++ b/data/sql/updates/db_world/2025_11_20_02.sql
@@ -0,0 +1,5 @@
+-- DB update 2025_11_20_01 -> 2025_11_20_02
+--
+UPDATE `creature_template` SET `speed_run` = 1.142857 WHERE `entry` = 31356;
+UPDATE `creature_template` SET `speed_run` = 0.428571 WHERE `entry` = 31873;
+UPDATE `creature_template` SET `speed_run` = 0.714285 WHERE `entry` = 31348;
diff --git a/data/sql/updates/db_world/2025_11_20_03.sql b/data/sql/updates/db_world/2025_11_20_03.sql
new file mode 100644
index 0000000000..5d252067d8
--- /dev/null
+++ b/data/sql/updates/db_world/2025_11_20_03.sql
@@ -0,0 +1,10 @@
+-- DB update 2025_11_20_02 -> 2025_11_20_03
+--
+UPDATE `creature_template` SET `AIName` = '', `npcflag` = 16777216 WHERE `entry` = 26809;
+DELETE FROM `smart_scripts` WHERE (`entryorguid` = 26809) AND (`source_type` = 0);
+
+DELETE FROM `npc_spellclick_spells` WHERE `npc_entry` = 26809;
+INSERT INTO `npc_spellclick_spells` (`npc_entry`, `spell_id`, `cast_flags`, `user_type`) VALUES
+(26809, 47416, 2, 1);
+
+UPDATE `spell_dbc` SET `Effect_1` = 24, `EffectBasePoints_1` = 1, `ImplicitTargetA_1` = 25, `EffectItemType_1` = 36765 WHERE `id` = 47416;
diff --git a/data/sql/updates/db_world/2025_11_20_04.sql b/data/sql/updates/db_world/2025_11_20_04.sql
new file mode 100644
index 0000000000..3eafbca145
--- /dev/null
+++ b/data/sql/updates/db_world/2025_11_20_04.sql
@@ -0,0 +1,11 @@
+-- DB update 2025_11_20_03 -> 2025_11_20_04
+--
+DELETE FROM `conditions` WHERE (`SourceTypeOrReferenceId` = 17) AND (`SourceGroup` = 0) AND (`SourceEntry` = 47431) AND (`SourceId` = 0) AND (`ElseGroup` = 0) AND (`ConditionTypeOrReference` = 29) AND (`ConditionTarget` = 1) AND (`ConditionValue1` = 26359) 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
+(17, 0, 47431, 0, 0, 29, 1, 26359, 0, 0, 0, 0, 0, '', 'Capture Jormungar Spawn require Ice Heart Jormungar Spawn');
+
+UPDATE `gameobject_template` SET `AIName` = 'SmartGameObjectAI' WHERE `entry` = 190510;
+
+DELETE FROM `smart_scripts` WHERE (`entryorguid` = 190510) AND (`source_type` = 1) 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
+(190510, 1, 0, 0, 63, 0, 100, 0, 0, 0, 0, 0, 0, 0, 41, 1000, 0, 0, 0, 0, 0, 19, 26359, 5, 0, 0, 0, 0, 0, 0, 'Captured Jormungar Spawn - On Just Created - Despawn In 1000 ms');
diff --git a/data/sql/updates/db_world/2025_11_21_00.sql b/data/sql/updates/db_world/2025_11_21_00.sql
new file mode 100644
index 0000000000..df1eaf216a
--- /dev/null
+++ b/data/sql/updates/db_world/2025_11_21_00.sql
@@ -0,0 +1,15 @@
+-- DB update 2025_11_20_04 -> 2025_11_21_00
+--
+SET @GUID := 1161;
+DELETE FROM `gameobject` WHERE `id` = 193997 AND `guid` BETWEEN @GUID AND @GUID+9;
+INSERT INTO `gameobject` (`guid`, `id`, `map`, `zoneId`, `areaId`, `spawnMask`, `phaseMask`, `position_x`, `position_y`, `position_z`, `orientation`, `rotation0`, `rotation1`, `rotation2`, `rotation3`, `spawntimesecs`, `animprogress`, `state`, `ScriptName`, `VerifiedBuild`) VALUES
+(@GUID+0, 193997, 571, 0, 0, 1, 1, 7330.44, -2212.68, 800.483, 4.25861, 0, 0, 0.848046, -0.529922, 120, 255, 1, '', 0),
+(@GUID+1, 193997, 571, 0, 0, 1, 1, 7211.5, -2373.86, 781.449, 4.38078, 0, 0, 0.814114, -0.580705, 120, 255, 1, '', 0),
+(@GUID+2, 193997, 571, 0, 0, 1, 1, 6973.8, -2096.83, 777.638, 3.26377, 0, 0, 0.998135, -0.0610507, 120, 255, 1, '', 0),
+(@GUID+3, 193997, 571, 0, 0, 1, 1, 7310.71, -2812.07, 798.081, 1.5708, 0, 0, 0.707108, 0.707106, 120, 255, 1, '', 0),
+(@GUID+4, 193997, 571, 0, 0, 1, 1, 7301.01, -2746.12, 749.508, 0.157079, 0, 0, 0.0784588, 0.996917, 120, 255, 1, '', 0),
+(@GUID+5, 193997, 571, 0, 0, 1, 1, 7550.37, -3154.98, 840.146, 4.41568, 0, 0, 0.803858, -0.594822, 120, 255, 1, '', 0),
+(@GUID+6, 193997, 571, 0, 0, 1, 1, 7177.29, -3071.11, 862.298, 0.680677, 0, 0, 0.333806, 0.942642, 120, 255, 1, '', 0),
+(@GUID+7, 193997, 571, 0, 0, 1, 1, 7694.28, -3154.72, 869.769, 3.76991, 0, 0, 0.951057, -0.309016, 120, 255, 1, '', 0),
+(@GUID+8, 193997, 571, 0, 0, 1, 1, 7155.12, -2096.03, 764.428, 2.53072, 0, 0, 0.953716, 0.300709, 300, 100, 1, '', 0),
+(@GUID+9, 193997, 571, 0, 0, 1, 1, 7218.2, -2139.83, 863.085, -1.09956, 0, 0, -0.5225, 0.852639, 300, 100, 1, '', 0);
diff --git a/data/sql/updates/db_world/2025_11_21_01.sql b/data/sql/updates/db_world/2025_11_21_01.sql
new file mode 100644
index 0000000000..b779b81005
--- /dev/null
+++ b/data/sql/updates/db_world/2025_11_21_01.sql
@@ -0,0 +1,3 @@
+-- DB update 2025_11_21_00 -> 2025_11_21_01
+--
+UPDATE `gameobject_loot_template` SET `QuestRequired` = 0 WHERE `Item` = 44724;
diff --git a/data/sql/updates/db_world/2025_11_21_02.sql b/data/sql/updates/db_world/2025_11_21_02.sql
new file mode 100644
index 0000000000..355d90f53b
--- /dev/null
+++ b/data/sql/updates/db_world/2025_11_21_02.sql
@@ -0,0 +1,10 @@
+-- DB update 2025_11_21_01 -> 2025_11_21_02
+--
+DELETE FROM `spell_linked_spell` WHERE `spell_trigger` = 54581;
+DELETE FROM `spell_script_names` WHERE `spell_id` = 54581;
+INSERT INTO `spell_script_names` (`spell_id`, `ScriptName`) VALUES
+(54581, 'spell_mammoth_explosion');
+
+DELETE FROM `smart_scripts` WHERE (`entryorguid` = 29402) AND (`source_type` = 0) AND (`id` IN (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
+(29402, 0, 2, 0, 61, 0, 100, 512, 0, 0, 0, 0, 0, 0, 41, 3000, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Ironwool Mammoth - On Spellhit \'Throw U.D.E.D.\' - Despawn In 3000 ms');
diff --git a/data/sql/updates/db_world/2025_11_21_03.sql b/data/sql/updates/db_world/2025_11_21_03.sql
new file mode 100644
index 0000000000..a53a7c4e5d
--- /dev/null
+++ b/data/sql/updates/db_world/2025_11_21_03.sql
@@ -0,0 +1,75 @@
+-- DB update 2025_11_21_02 -> 2025_11_21_03
+-- Update gameobject 'Everfrost Chip' with sniffed values
+-- updated spawns
+DELETE FROM `gameobject` WHERE (`id` IN (193997)) AND (`guid` IN (1161, 1162, 1163, 1164, 1165, 1167, 1168, 1169, 1170, 221001, 221003));
+INSERT INTO `gameobject` (`guid`, `id`, `map`, `zoneId`, `areaId`, `spawnMask`, `phaseMask`, `position_x`, `position_y`, `position_z`, `orientation`, `rotation0`, `rotation1`, `rotation2`, `rotation3`, `spawntimesecs`, `animprogress`, `state`, `ScriptName`, `VerifiedBuild`, `Comment`) VALUES
+(1161, 193997, 571, 0, 0, 1, 1, 7330.43603515625, -2212.681884765625, 800.4833984375, 4.258606910705566406, 0, 0, -0.84804725646972656, 0.529920578002929687, 120, 255, 1, "", 47720, NULL),
+(1162, 193997, 571, 0, 0, 1, 1, 7211.49853515625, -2373.85595703125, 781.44903564453125, 4.380776405334472656, 0, 0, -0.81411552429199218, 0.580702960491180419, 120, 255, 1, "", 46779, NULL),
+(1163, 193997, 571, 0, 0, 1, 1, 6973.80322265625, -2096.8271484375, 777.637451171875, 3.263772249221801757, 0, 0, -0.99813461303710937, 0.061051756143569946, 120, 255, 1, "", 47720, NULL),
+(1164, 193997, 571, 0, 0, 1, 1, 7310.7119140625, -2812.06591796875, 798.08099365234375, 1.570795774459838867, 0, 0, 0.707106590270996093, 0.707106947898864746, 120, 255, 1, "", 47720, NULL),
+(1165, 193997, 571, 0, 0, 1, 1, 7301.00634765625, -2746.119873046875, 749.50848388671875, 0.15707901120185852, 0, 0, 0.078458786010742187, 0.996917366981506347, 120, 255, 1, "", 46368, NULL),
+(1167, 193997, 571, 0, 0, 1, 1, 7177.28662109375, -3071.111083984375, 862.29815673828125, 0.680676698684692382, 0, 0, 0.333806037902832031, 0.942641794681549072, 120, 255, 1, "", 50664, NULL),
+(1168, 193997, 571, 0, 0, 1, 1, 7694.28369140625, -3154.7197265625, 869.7685546875, 3.769911527633666992, 0, 0, -0.95105648040771484, 0.309017121791839599, 120, 255, 1, "", 52237, NULL),
+(1169, 193997, 571, 0, 0, 1, 1, 7155.11767578125, -2096.0322265625, 764.4278564453125, 2.530723094940185546, 0, 0, 0.953716278076171875, 0.300707906484603881, 120, 255, 1, "", 48632, NULL),
+(1170, 193997, 571, 0, 0, 1, 1, 7218.19775390625, -2139.83154296875, 863.0850830078125, 5.183629035949707031, 0, 0, -0.52249813079833984, 0.852640450000762939, 120, 255, 1, "", 47720, NULL),
+(221001, 193997, 571, 0, 0, 1, 1, 7558.2021484375, -3285.407470703125, 879.133544921875, 2.635444164276123046, 0, 0, 0.96814727783203125, 0.250381410121917724, 120, 255, 1, "", 52237, NULL),
+(221003, 193997, 571, 0, 0, 1, 1, 7912.7431640625, -3406.700439453125, 865.29608154296875, 1.343901276588439941, 0, 0, 0.622513771057128906, 0.78260880708694458, 120, 255, 1, "", 46779, NULL);
+
+-- new spawns
+DELETE FROM `gameobject` WHERE (`id` IN (193997)) AND (`guid` IN (3721, 3722, 3723, 3724, 3725, 3726, 3727, 3728, 3729, 3730, 3731, 3732, 3733, 3734, 3735, 3736, 3737, 3738, 3739, 3740, 3741, 3742, 3743, 3744, 3745, 3746, 3747, 3748, 3749, 3750, 3751, 3752, 3753, 3754, 3755, 3756, 3757, 3758, 3759, 3760, 3761));
+INSERT INTO `gameobject` (`guid`, `id`, `map`, `zoneId`, `areaId`, `spawnMask`, `phaseMask`, `position_x`, `position_y`, `position_z`, `orientation`, `rotation0`, `rotation1`, `rotation2`, `rotation3`, `spawntimesecs`, `animprogress`, `state`, `ScriptName`, `VerifiedBuild`, `Comment`) VALUES
+(3721, 193997, 571, 0, 0, 1, 1, 6966.74658203125, -1889.3590087890625, 895.60174560546875, 1.099556446075439453, 0, 0, 0.522498130798339843, 0.852640450000762939, 120, 255, 1, "", 48632, NULL),
+(3722, 193997, 571, 0, 0, 1, 1, 6981.6015625, -2300.420654296875, 796.2930908203125, 2.426007747650146484, 0, 0, 0.936672210693359375, 0.350207358598709106, 120, 255, 1, "", 53788, NULL),
+(3723, 193997, 571, 0, 0, 1, 1, 6991.40185546875, -1943.47314453125, 855.679931640625, 0.174532130360603332, 0, 0, 0.087155342102050781, 0.996194720268249511, 120, 255, 1, "", 50664, NULL),
+(3724, 193997, 571, 0, 0, 1, 1, 6994.66064453125, -2035.5594482421875, 864.358642578125, 4.293513298034667968, 0, 0, -0.8386697769165039, 0.544640243053436279, 120, 255, 1, "", 48632, NULL),
+(3725, 193997, 571, 0, 0, 1, 1, 6996.35595703125, -2136.819580078125, 739.002197265625, 3.141592741012573242, 0, 0, -1, 0, 120, 255, 1, "", 46779, NULL),
+(3726, 193997, 571, 0, 0, 1, 1, 7051.85888671875, -2172.247314453125, 768.96563720703125, 4.939284324645996093, 0, 0, -0.6225137710571289, 0.78260880708694458, 120, 255, 1, "", 48632, NULL),
+(3727, 193997, 571, 0, 0, 1, 1, 7065.01416015625, -2197.10009765625, 765.82073974609375, 0.226892471313476562, 0, 0, 0.113203048706054687, 0.993571877479553222, 120, 255, 1, "", 48019, NULL),
+(3728, 193997, 571, 0, 0, 1, 1, 7087.513671875, -2469.864990234375, 1020.7822265625, 0.453785061836242675, 0, 0, 0.224950790405273437, 0.974370121955871582, 120, 255, 1, "", 46779, NULL),
+(3729, 193997, 571, 0, 0, 1, 1, 7091.23681640625, -2341.15966796875, 846.66546630859375, 1.448621988296508789, 0, 0, 0.662619590759277343, 0.748956084251403808, 120, 255, 1, "", 50664, NULL),
+(3730, 193997, 571, 0, 0, 1, 1, 7099.56982421875, -1978.443603515625, 769.72406005859375, 0.174532130360603332, 0, 0, 0.087155342102050781, 0.996194720268249511, 120, 255, 1, "", 47720, NULL),
+(3731, 193997, 571, 0, 0, 1, 1, 7128.27685546875, -2301.65625, 794.41070556640625, 3.78736734390258789, 0, 0, -0.94832324981689453, 0.317305892705917358, 120, 255, 1, "", 48019, NULL),
+(3732, 193997, 571, 0, 0, 1, 1, 7131.44287109375, -1925.8997802734375, 861.8017578125, 4.869470596313476562, 0, 0, -0.64944744110107421, 0.760406434535980224, 120, 255, 1, "", 48632, NULL),
+(3733, 193997, 571, 0, 0, 1, 1, 7136.599609375, -3013.7421875, 925.5281982421875, 0.523597896099090576, 0, 0, 0.258818626403808593, 0.965925931930541992, 120, 255, 1, "", 52237, NULL),
+(3734, 193997, 571, 0, 0, 1, 1, 7165.87353515625, -2420.04345703125, 893.84649658203125, 2.251473426818847656, 0, 0, 0.902585029602050781, 0.430511653423309326, 120, 255, 1, "", 46368, NULL),
+(3735, 193997, 571, 0, 0, 1, 1, 7169.20556640625, -3040.478759765625, 877.94464111328125, 3.176533222198486328, 0, 0, -0.999847412109375, 0.017469281330704689, 120, 255, 1, "", 50664, NULL),
+(3736, 193997, 571, 0, 0, 1, 1, 7181.78857421875, -2185.91015625, 761.67608642578125, 5.969027042388916015, 0, 0, -0.1564340591430664, 0.987688362598419189, 120, 255, 1, "", 48632, NULL),
+(3737, 193997, 571, 0, 0, 1, 1, 7187.119140625, -2160, 772.549560546875, 0.226892471313476562, 0, 0, 0.113203048706054687, 0.993571877479553222, 120, 255, 1, "", 50664, NULL),
+(3738, 193997, 571, 0, 0, 1, 1, 7188.72509765625, -2656.859375, 812.5784912109375, 3.211419343948364257, 0, 0, -0.9993906021118164, 0.034906134009361267, 120, 255, 1, "", 50375, NULL),
+(3739, 193997, 571, 0, 0, 1, 1, 7204.47900390625, -3115.85888671875, 839.8372802734375, 1.099556446075439453, 0, 0, 0.522498130798339843, 0.852640450000762939, 120, 255, 1, "", 50664, NULL),
+(3740, 193997, 571, 0, 0, 1, 1, 7218.46337890625, -2811.569580078125, 821.97149658203125, 3.001946926116943359, 0, 0, 0.997563362121582031, 0.069766148924827575, 120, 255, 1, "", 52237, NULL),
+(3741, 193997, 571, 0, 0, 1, 1, 7234.15869140625, -2995.100830078125, 845.96881103515625, 2.617989301681518554, 0, 0, 0.965925216674804687, 0.258821308612823486, 120, 255, 1, "", 47720, NULL),
+(3742, 193997, 571, 0, 0, 1, 1, 7255.27197265625, -2932.182373046875, 913.513671875, 0.645771682262420654, 0, 0, 0.317304611206054687, 0.948323667049407958, 120, 255, 1, "", 50375, NULL),
+(3743, 193997, 571, 0, 0, 1, 1, 7294.00244140625, -2323.291748046875, 750.2393798828125, 1.012289404869079589, 0, 0, 0.484808921813964843, 0.87462007999420166, 120, 255, 1, "", 52237, NULL),
+(3744, 193997, 571, 0, 0, 1, 1, 7323.62353515625, -3240.092041015625, 843.68536376953125, 4.223697185516357421, 0, 0, -0.85716724395751953, 0.515038192272186279, 120, 255, 1, "", 52237, NULL),
+(3745, 193997, 571, 0, 0, 1, 1, 7369.80322265625, -3274.489990234375, 855.65020751953125, 5.410521507263183593, 0, 0, -0.42261791229248046, 0.906307935714721679, 120, 255, 1, "", 52237, NULL),
+(3746, 193997, 571, 0, 0, 1, 1, 7372.5302734375, -2198.384033203125, 846.09051513671875, 1.692969322204589843, 0, 0, 0.748955726623535156, 0.662620067596435546, 120, 255, 1, "", 51666, NULL),
+(3747, 193997, 571, 0, 0, 1, 1, 7418.05126953125, -2554.40576171875, 749.71136474609375, 3.752462387084960937, 0, 0, -0.95371627807617187, 0.300707906484603881, 120, 255, 1, "", 53788, NULL),
+(3748, 193997, 571, 0, 0, 1, 1, 7440.8046875, -2885.421875, 822.1888427734375, 3.822272777557373046, 0, 0, -0.94264125823974609, 0.333807557821273803, 120, 255, 1, "", 51739, NULL),
+(3749, 193997, 571, 0, 0, 1, 1, 7453.85693359375, -2422.166015625, 757.46722412109375, 2.862335443496704101, 0, 0, 0.990267753601074218, 0.139175355434417724, 120, 255, 1, "", 50664, NULL),
+(3750, 193997, 571, 0, 0, 1, 1, 7457.181640625, -2679.326416015625, 807.17596435546875, 0.069811686873435974, 0, 0, 0.034898757934570312, 0.999390840530395507, 120, 255, 1, "", 46368, NULL),
+(3751, 193997, 571, 0, 0, 1, 1, 7459.62353515625, -3428.14892578125, 1016.05328369140625, 4.817109584808349609, 0, 0, -0.66913032531738281, 0.74314504861831665, 120, 255, 1, "", 52237, NULL),
+(3752, 193997, 571, 0, 0, 1, 1, 7462.48876953125, -2339.7900390625, 801.07098388671875, 1.32644820213317871, 0, 0, 0.615660667419433593, 0.788011372089385986, 120, 255, 1, "", 50375, NULL),
+(3753, 193997, 571, 0, 0, 1, 1, 7463.67822265625, -3317.8291015625, 897.6239013671875, 1.32644820213317871, 0, 0, 0.615660667419433593, 0.788011372089385986, 120, 255, 1, "", 51739, NULL),
+(3754, 193997, 571, 0, 0, 1, 1, 7474.890625, -2936.453125, 911.251220703125, 3.019413232803344726, 0, 0, 0.998134613037109375, 0.061051756143569946, 120, 255, 1, "", 52237, NULL),
+(3755, 193997, 571, 0, 0, 1, 1, 7499.189453125, -2326.282958984375, 873.71429443359375, 3.822272777557373046, 0, 0, -0.94264125823974609, 0.333807557821273803, 120, 255, 1, "", 50664, NULL),
+(3756, 193997, 571, 0, 0, 1, 1, 7527.39404296875, -2460.450439453125, 794.4395751953125, 5.166176319122314453, 0, 0, -0.52991867065429687, 0.84804844856262207, 120, 255, 1, "", 46368, NULL),
+(3757, 193997, 571, 0, 0, 1, 1, 7543.634765625, -3157.632080078125, 838.59716796875, 2.181660413742065429, 0, 0, 0.887010574340820312, 0.461749136447906494, 120, 255, 1, "", 52237, NULL),
+(3758, 193997, 571, 0, 0, 1, 1, 7547.81689453125, -3288.013427734375, 885.25384521484375, 2.042035102844238281, 0, 0, 0.852640151977539062, 0.522498607635498046, 120, 255, 1, "", 50664, NULL),
+(3759, 193997, 571, 0, 0, 1, 1, 7558.64404296875, -3311.80029296875, 941.5128173828125, 0.331610709428787231, 0, 0, 0.16504669189453125, 0.986285746097564697, 120, 255, 1, "", 50664, NULL),
+(3760, 193997, 571, 0, 0, 1, 1, 7620.017578125, -3140.361083984375, 856.6376953125, 5.567600727081298828, 0, 0, -0.35020732879638671, 0.936672210693359375, 120, 255, 1, "", 52237, NULL),
+(3761, 193997, 571, 0, 0, 1, 1, 7638.5, -2502.473876953125, 943.86505126953125, 2.478367090225219726, 0, 0, 0.94551849365234375, 0.325568377971649169, 120, 255, 1, "", 52237, NULL);
+
+-- remove duplicate spawns
+DELETE FROM `gameobject` WHERE (`id` IN (193997)) AND (`guid` IN (221003, 221004));
+DELETE FROM `gameobject_addon` WHERE (`guid` IN (221003, 221004));
+
+-- remaining spawns (no sniffed values available)
+-- (`guid` IN (221000, 221002, 1166))
+
+-- update phasemask of remaining spawns
+UPDATE `gameobject` SET `phaseMask` = 1 WHERE (`id` IN (193997)) AND (`guid` IN (221000, 221002, 1166));
+
+-- clear existing pool (pooling probably needs to be set up from scratch for all the new spawns instead if necessary)
+DELETE FROM `pool_gameobject` WHERE `pool_entry` = 383 AND (`guid` IN (221000, 221001, 221002, 221003, 221004));
+DELETE FROM `pool_template` WHERE `entry` = 383;
diff --git a/data/sql/updates/db_world/2025_11_21_04.sql b/data/sql/updates/db_world/2025_11_21_04.sql
new file mode 100644
index 0000000000..e4a2c2e929
--- /dev/null
+++ b/data/sql/updates/db_world/2025_11_21_04.sql
@@ -0,0 +1,23 @@
+-- DB update 2025_11_21_03 -> 2025_11_21_04
+
+-- Clean Script Name & add SmartAI (Beryl Sorcerer, Captured Beryl Sorcerer)
+UPDATE `creature_template` SET `AIName` = 'SmartAI', `ScriptName` = '' WHERE (`entry` IN (25316, 25474));
+
+DELETE FROM `smart_scripts` WHERE (`source_type` = 0) AND (`entryorguid` IN (25316, 25474));
+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
+(25316, 0, 0, 0, 8, 0, 100, 0, 45611, 0, 0, 0, 0, 0, 80, 2531600, 2, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Beryl Sorcerer - On Spellhit \'Arcane Chains\' - Run Script'),
+(25316, 0, 1, 0, 0, 0, 100, 0, 3000, 4000, 4000, 8000, 0, 0, 11, 9672, 64, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 'Beryl Sorcerer - In Combat - Cast \'Frostbolt\''),
+(25316, 0, 2, 0, 2, 0, 100, 0, 35, 50, 8000, 12000, 0, 0, 11, 50648, 64, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Beryl Sorcerer - Between 35-50% Health - Cast \'Blink\''),
+(25474, 0, 0, 0, 54, 0, 100, 0, 0, 0, 0, 0, 0, 0, 80, 2547400, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Captured Beryl Sorcerer - On Just Summoned - Run Script'),
+(25474, 0, 1, 0, 65, 0, 100, 0, 0, 0, 0, 0, 0, 0, 41, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Captured Beryl Sorcerer - On Follow Complete - Despawn Instant');
+
+-- Set Action Lists (Beryl Sorcerer, Captured Beryl Sorcerer)
+DELETE FROM `smart_scripts` WHERE (`source_type` = 9) AND (`entryorguid` IN (2531600, 2547400));
+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
+(2531600, 9, 0, 0, 0, 0, 100, 0, 3000, 3000, 0, 0, 0, 0, 11, 45625, 0, 524023, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 0, 'Beryl Sorcerer - Actionlist - Cast \'Arcane Chains: Character Force Cast\''),
+(2531600, 9, 1, 0, 0, 0, 100, 0, 0, 0, 0, 0, 0, 0, 33, 25474, 0, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 0, 'Beryl Sorcerer - Actionlist - Quest Credit \'null\''),
+(2531600, 9, 2, 0, 0, 0, 100, 0, 0, 0, 0, 0, 0, 0, 41, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Beryl Sorcerer - Actionlist - Despawn Instant'),
+(2547400, 9, 0, 0, 0, 0, 100, 0, 0, 0, 0, 0, 0, 0, 18, 10, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Captured Beryl Sorcerer - Actionlist - Set Flags Not Attackable & Player Controlled'),
+(2547400, 9, 1, 0, 0, 0, 100, 0, 0, 0, 0, 0, 0, 0, 8, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Captured Beryl Sorcerer - Actionlist - Set Reactstate Passive'),
+(2547400, 9, 2, 0, 0, 0, 100, 0, 200, 200, 0, 0, 0, 0, 11, 45632, 0, 0, 0, 0, 0, 23, 0, 0, 0, 0, 0, 0, 0, 0, 'Captured Beryl Sorcerer - Actionlist - Cast \'Enslaved Arcane Chains: Character Force Cast\''),
+(2547400, 9, 3, 0, 0, 0, 100, 0, 0, 0, 0, 0, 0, 0, 29, 2, 180, 25262, 0, 0, 0, 23, 0, 0, 0, 0, 0, 0, 0, 0, 'Captured Beryl Sorcerer - Actionlist - Start Follow Owner Or Summoner');
diff --git a/data/sql/updates/db_world/2025_11_21_05.sql b/data/sql/updates/db_world/2025_11_21_05.sql
new file mode 100644
index 0000000000..fdb2a63f92
--- /dev/null
+++ b/data/sql/updates/db_world/2025_11_21_05.sql
@@ -0,0 +1,10 @@
+-- DB update 2025_11_21_04 -> 2025_11_21_05
+--
+-- Megalith
+UPDATE `creature_template` SET `AIName` = 'SmartAI' WHERE `entry` = 24371;
+
+DELETE FROM `smart_scripts` WHERE (`entryorguid` = 24371) AND (`source_type` = 0);
+INSERT INTO `smart_scripts` (`entryorguid`, `source_type`, `id`, `link`, `event_type`, `event_phase_mask`, `event_chance`, `event_flags`, `event_param1`, `event_param2`, `event_param3`, `event_param4`, `event_param5`, `event_param6`, `action_type`, `action_param1`, `action_param2`, `action_param3`, `action_param4`, `action_param5`, `action_param6`, `target_type`, `target_param1`, `target_param2`, `target_param3`, `target_param4`, `target_x`, `target_y`, `target_z`, `target_o`, `comment`) VALUES
+(24371, 0, 0, 0, 0, 0, 100, 0, 3000, 5000, 15000, 20000, 0, 0, 11, 50084, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 'Megalith - In Combat - Cast \'Hulking Uppercut\''),
+(24371, 0, 1, 0, 0, 0, 100, 0, 0, 1000, 5000, 5000, 0, 0, 11, 50086, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 'Megalith - In Combat - Cast \'Boulder\''),
+(24371, 0, 2, 0, 6, 0, 100, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Megalith - On Just Died - Say Line 0');
diff --git a/data/sql/updates/db_world/2025_11_21_06.sql b/data/sql/updates/db_world/2025_11_21_06.sql
new file mode 100644
index 0000000000..d2f421d5ba
--- /dev/null
+++ b/data/sql/updates/db_world/2025_11_21_06.sql
@@ -0,0 +1,11 @@
+-- DB update 2025_11_21_05 -> 2025_11_21_06
+--
+-- Warbear Matriarch
+-- Disable AA
+UPDATE `creature_template` SET `AIName` = 'VehicleAI' WHERE (`entry` = 29918);
+-- Spells from 1,2,3 to 4,5,6
+DELETE FROM `creature_template_spell` WHERE (`CreatureID` = 29918);
+INSERT INTO `creature_template_spell` (`CreatureID`, `Index`, `Spell`, `VerifiedBuild`) VALUES
+(29918, 3, 54459, 12340),
+(29918, 4, 54458, 12340),
+(29918, 5, 54460, 12340);
diff --git a/data/sql/updates/db_world/2025_11_21_07.sql b/data/sql/updates/db_world/2025_11_21_07.sql
new file mode 100644
index 0000000000..39bd7a49ba
--- /dev/null
+++ b/data/sql/updates/db_world/2025_11_21_07.sql
@@ -0,0 +1,4 @@
+-- DB update 2025_11_21_06 -> 2025_11_21_07
+--
+-- replace woman with $gman:woman;
+UPDATE `quest_offer_reward` SET `RewardText` = 'Wintergarde is saved because of you, $N. To think that one $gman:woman; could so swiftly turn the tides of battle is hard for most to comprehend; yet here we are - victorious! You have managed to restore the faith of these people and earned the respect of your commanding officers.$B$B<Halford salutes.>$B$BLord Fordragon has returned to Angrathar to prepare our forces for the destruction of the Wrathgate and has requested that you join him! I couldn\'t recommend a better soldier for the job, $N.' WHERE (`ID` = 12473);
diff --git a/data/sql/updates/db_world/2025_11_23_00.sql b/data/sql/updates/db_world/2025_11_23_00.sql
new file mode 100644
index 0000000000..a883f44c84
--- /dev/null
+++ b/data/sql/updates/db_world/2025_11_23_00.sql
@@ -0,0 +1,3 @@
+-- DB update 2025_11_21_07 -> 2025_11_23_00
+--
+UPDATE `gameobject` SET `spawntimesecs` = 1800 WHERE `id` = 193997 AND `guid` IN (1161,1162,1163,1164,1165,1166,1167,1168,1169,1170,3721,3722,3723,3724,3725,3726,3727,3728,3729,3730,3731,3732,3733,3734,3735,3736,3737,3738,3739,3740,3741,3742,3743,3744,3745,3746,3747,3748,3749,3750,3751,3752,3753,3754,3755,3756,3757,3758,3759,3760,3761,221001);
diff --git a/data/sql/updates/db_world/2025_11_24_00.sql b/data/sql/updates/db_world/2025_11_24_00.sql
new file mode 100644
index 0000000000..ccbf878eb1
--- /dev/null
+++ b/data/sql/updates/db_world/2025_11_24_00.sql
@@ -0,0 +1,6 @@
+-- DB update 2025_11_23_00 -> 2025_11_24_00
+--
+-- Set GOSSIP flag
+UPDATE `creature_template` SET `npcflag` = `npcflag` | 1 WHERE (`entry` IN (34712, 34713, 34714, 34786, 34785));
+-- 10568 -- Hello, $N. If you're looking for cooking training, you've come to the right place. I usually get lots of new students when Pilgrim's Bounty rolls around.
+UPDATE `creature_template` SET `gossip_menu_id` = 10568 WHERE (`entry` IN (34708, 34712, 34713, 34714, 34786, 34785, 34711));
diff --git a/data/sql/updates/db_world/2025_11_24_01.sql b/data/sql/updates/db_world/2025_11_24_01.sql
new file mode 100644
index 0000000000..3811b0c7dc
--- /dev/null
+++ b/data/sql/updates/db_world/2025_11_24_01.sql
@@ -0,0 +1,3 @@
+-- DB update 2025_11_24_00 -> 2025_11_24_01
+--
+UPDATE `quest_template_addon` SET `PrevQuestID` = 0 WHERE (`ID` = 11311);
diff --git a/data/sql/updates/db_world/2025_11_24_02.sql b/data/sql/updates/db_world/2025_11_24_02.sql
new file mode 100644
index 0000000000..751231a409
--- /dev/null
+++ b/data/sql/updates/db_world/2025_11_24_02.sql
@@ -0,0 +1,5 @@
+-- DB update 2025_11_24_01 -> 2025_11_24_02
+-- Alliance
+UPDATE `conditions` SET `ConditionValue1` = 11248, `Comment` = 'Vrykul Scroll of Ascension - Requires quest Operation: Skornful Wrath completed' WHERE `SourceTypeOrReferenceId` = 1 AND `SourceEntry` = 33314 AND `ConditionTypeOrReference` = 8 AND `ConditionValue1` = 11247;
+-- Horde
+UPDATE `conditions` SET `ConditionValue1` = 11256, `Comment` = 'Vrykul Scroll of Ascension - Requires quest Skorn Must Fall! completed' WHERE `SourceTypeOrReferenceId` = 1 AND `SourceEntry` = 33345 AND `ConditionTypeOrReference` = 8 AND `ConditionValue1` = 11258;
diff --git a/data/sql/updates/db_world/2025_11_24_03.sql b/data/sql/updates/db_world/2025_11_24_03.sql
new file mode 100644
index 0000000000..2a8f48c4f3
--- /dev/null
+++ b/data/sql/updates/db_world/2025_11_24_03.sql
@@ -0,0 +1,3 @@
+-- DB update 2025_11_24_02 -> 2025_11_24_03
+--
+UPDATE `quest_template_addon` SET `PrevQuestID` = 0 WHERE (`ID` = 12487);
diff --git a/data/sql/updates/db_world/2025_11_25_00.sql b/data/sql/updates/db_world/2025_11_25_00.sql
new file mode 100644
index 0000000000..6579ab65db
--- /dev/null
+++ b/data/sql/updates/db_world/2025_11_25_00.sql
@@ -0,0 +1,3 @@
+-- DB update 2025_11_24_03 -> 2025_11_25_00
+-- Light Won't Grant Me Vengeance requires Crusader Forward Camp
+UPDATE `quest_template_addon` SET `PrevQuestID` = 12894 WHERE `ID` = 12904;
diff --git a/data/sql/updates/db_world/2025_11_25_01.sql b/data/sql/updates/db_world/2025_11_25_01.sql
new file mode 100644
index 0000000000..6ef704bb95
--- /dev/null
+++ b/data/sql/updates/db_world/2025_11_25_01.sql
@@ -0,0 +1,3 @@
+-- DB update 2025_11_25_00 -> 2025_11_25_01
+-- Makes the quest "Remember Everfrost" repetable
+UPDATE `quest_template_addon` SET `SpecialFlags` = `SpecialFlags` | 1 WHERE `ID` = 13421;
diff --git a/data/sql/updates/db_world/2025_11_25_02.sql b/data/sql/updates/db_world/2025_11_25_02.sql
new file mode 100644
index 0000000000..49dd261649
--- /dev/null
+++ b/data/sql/updates/db_world/2025_11_25_02.sql
@@ -0,0 +1,3 @@
+-- DB update 2025_11_25_01 -> 2025_11_25_02
+-- Removes the pre-quest for Elixir of Pain [502] for Elixir of Agony
+UPDATE `quest_template_addon` SET `PrevQuestID` = 0 WHERE (`ID` = 509);
diff --git a/data/sql/updates/db_world/2025_11_26_00.sql b/data/sql/updates/db_world/2025_11_26_00.sql
new file mode 100644
index 0000000000..5dc5d35968
--- /dev/null
+++ b/data/sql/updates/db_world/2025_11_26_00.sql
@@ -0,0 +1,7 @@
+-- DB update 2025_11_25_02 -> 2025_11_26_00
+--
+SET @link = 8;
+DELETE FROM `smart_scripts` WHERE `entryorguid` = 28948 AND `source_type` = 0 AND `id` = @link;
+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
+(28948, 0, @link, 0, 61, 0, 100, 0, 0, 0, 0, 0, 0, 0, 41, 0, 60, 0, 0, 0, 0, 14, 268515, 190949, 0, 0, 0, 0, 0, 0, 'Malmortis - On Just Summoned - Despawn Instant (Musty Coffin)');
+UPDATE `smart_scripts` SET `link` = @link WHERE `entryorguid` = 28948 AND `source_type` = 0 AND `id` = 1;
diff --git a/data/sql/updates/db_world/2025_11_26_01.sql b/data/sql/updates/db_world/2025_11_26_01.sql
new file mode 100644
index 0000000000..a6aedf1387
--- /dev/null
+++ b/data/sql/updates/db_world/2025_11_26_01.sql
@@ -0,0 +1,17 @@
+-- DB update 2025_11_26_00 -> 2025_11_26_01
+--
+DELETE FROM `waypoint_data` WHERE `id`=125946;
+
+UPDATE `creature_template_movement` SET `Flight` = 0 WHERE (`CreatureId` = 24083);
+
+DELETE FROM `creature` WHERE (`id1` = 24083) AND (`guid` IN (1971380));
+INSERT INTO `creature` (`guid`, `id1`, `id2`, `id3`, `map`, `zoneId`, `areaId`, `spawnMask`, `phaseMask`, `equipment_id`, `position_x`, `position_y`, `position_z`, `orientation`, `spawntimesecs`, `wander_distance`, `currentwaypoint`, `curhealth`, `curmana`, `MovementType`, `npcflag`, `unit_flags`, `dynamicflags`, `ScriptName`, `Comment`, `VerifiedBuild`) VALUES
+(1971380, 24083, 0, 0, 574, 0, 0, 3, 1, 0, 209.1206, -187.86578, 200.00346, 0.677681, 3600, 0, 0, 71856, 0, 0, 0, 0, 0, '', NULL, 0);
+
+DELETE FROM `vehicle_accessory` WHERE `guid` = 1971380 AND `accessory_entry` = 24849;
+INSERT INTO `vehicle_accessory` (`guid`, `accessory_entry`, `seat_id`, `minion`, `description`, `summontype`, `summontimer`) VALUES
+(1971380, 24849, 0, 0, 'Proto Drake Rider mounted to Enslaved Proto Drake', 6, 30000);
+
+DELETE FROM `creature_movement_override` WHERE `SpawnId`=1971380;
+INSERT INTO `creature_movement_override` (`SpawnId`, `Ground`, `Swim`, `Flight`, `Rooted`, `Chase`, `Random`, `InteractionPauseTimer`) VALUES
+(1971380, 1, 1, 2, 0, 0, 0, NULL);
diff --git a/data/sql/updates/db_world/2025_11_26_02.sql b/data/sql/updates/db_world/2025_11_26_02.sql
new file mode 100644
index 0000000000..9288d17df5
--- /dev/null
+++ b/data/sql/updates/db_world/2025_11_26_02.sql
@@ -0,0 +1,9 @@
+-- DB update 2025_11_26_01 -> 2025_11_26_02
+--
+-- Quest item Ahunae's Knife can target dead Heb'Drakkar Headhunter or dead Heb'Drakkar Striker
+DELETE FROM `conditions` WHERE (`SourceTypeOrReferenceId` = 17) AND (`SourceEntry` = 52090);
+INSERT INTO `conditions` (`SourceTypeOrReferenceId`, `SourceGroup`, `SourceEntry`, `SourceId`, `ElseGroup`, `ConditionTypeOrReference`, `ConditionTarget`, `ConditionValue1`, `ConditionValue2`, `ConditionValue3`, `NegativeCondition`, `ErrorType`, `ErrorTextId`, `ScriptName`, `Comment`) VALUES
+(17, 0, 52090, 0, 0, 31, 1, 3, 28600, 0, 0, 173, 0, '', 'Item 38731 "Ahunae\'s Knife" targets 28600 dead "Heb\'Drakkar Headhunter"'),
+(17, 0, 52090, 0, 0, 36, 1, 0, 0, 0, 1, 173, 0, '', 'Item 38731 "Ahunae\'s Knife" targets 28600 dead "Heb\'Drakkar Headhunter"'),
+(17, 0, 52090, 0, 1, 31, 1, 3, 28465, 0, 0, 173, 0, '', 'Item 38731 "Ahunae\'s Knife" targets 28465 dead "Heb\'Drakkar Striker"'),
+(17, 0, 52090, 0, 1, 36, 1, 0, 0, 0, 1, 173, 0, '', 'Item 38731 "Ahunae\'s Knife" targets 28465 dead "Heb\'Drakkar Striker"');
diff --git a/data/sql/updates/db_world/2025_11_26_03.sql b/data/sql/updates/db_world/2025_11_26_03.sql
new file mode 100644
index 0000000000..c47de45259
--- /dev/null
+++ b/data/sql/updates/db_world/2025_11_26_03.sql
@@ -0,0 +1,113 @@
+-- DB update 2025_11_26_02 -> 2025_11_26_03
+
+-- Set right factions (sniffed)
+UPDATE `creature_template` SET `faction` = 2068 WHERE (`entry` = 31301);
+UPDATE `creature_template` SET `faction` = 1770 WHERE (`entry` = 31306);
+UPDATE `creature_template` SET `faction` = 2102 WHERE (`entry` = 30698);
+
+-- Set Unit Flags (sniffed)
+UPDATE `creature_template` SET `unit_flags` = `unit_flags` |64 WHERE (`entry` = 30698);
+UPDATE `creature_template` SET `unit_flags` = `unit_flags` |32768 WHERE (`entry` IN (31314, 31428));
+
+-- Set emote 25 on text 0 (Crusader Olakin Sainrith)
+UPDATE `creature_text` SET `Emote` = 25 WHERE (`CreatureID` = 31428) AND (`GroupID` IN (0));
+
+-- Delete Olakin spawn point (it must be summoned)
+DELETE FROM `creature` WHERE `id1` = 31428;
+
+-- Set new Sniffed Spawn Points (Margrave Dhakar, Ebon Blade Veteran)
+DELETE FROM `creature` WHERE (`id1` IN (31306, 31314));
+INSERT INTO `creature` (`guid`, `id1`, `id2`, `id3`, `map`, `zoneId`, `areaId`, `spawnMask`, `phaseMask`, `equipment_id`, `position_x`, `position_y`, `position_z`, `orientation`, `spawntimesecs`, `wander_distance`, `currentwaypoint`, `curhealth`, `curmana`, `MovementType`, `npcflag`, `unit_flags`, `dynamicflags`, `ScriptName`, `VerifiedBuild`, `CreateObject`, `Comment`) VALUES
+(74974, 31306, 0, 0, 571, 0, 0, 1, 175, 1, 6865.82, 3577.98, 736.045, 2.93215, 300, 0, 0, 37800, 11982, 0, 0, 0, 0, '', NULL, 0, NULL),
+(75082, 31314, 0, 0, 571, 0, 0, 1, 175, 1, 6865.11, 3570.75, 736.079, 3.01942, 120, 0, 0, 12600, 3994, 0, 0, 0, 0, '', NULL, 0, NULL),
+(75083, 31314, 0, 0, 571, 0, 0, 1, 175, 1, 6868.48, 3579.73, 736.148, 2.9496, 120, 0, 0, 12600, 3994, 0, 0, 0, 0, '', NULL, 0, NULL),
+(75084, 31314, 0, 0, 571, 0, 0, 1, 175, 1, 6866.22, 3574.63, 735.908, 3.03687, 120, 0, 0, 12600, 3994, 0, 0, 0, 0, '', NULL, 0, NULL),
+(75085, 31314, 0, 0, 571, 0, 0, 1, 175, 1, 6869.78, 3584.1, 735.892, 2.87979, 120, 0, 0, 12600, 3994, 0, 0, 0, 0, '', NULL, 0, NULL);
+
+-- SmartAI (Margrave Dhakar)
+UPDATE `creature_template` SET `AIName` = 'SmartAI' WHERE `entry` = 31306;
+
+DELETE FROM `smart_scripts` WHERE (`source_type` = 0 AND `entryorguid` = 31306);
+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
+(31306, 0, 0, 1, 62, 0, 100, 0, 10060, 0, 0, 0, 0, 0, 64, 1, 0, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 0, 'Margrave Dhakar - On Gossip Option 0 Selected - Store Targetlist'),
+(31306, 0, 1, 2, 61, 0, 100, 0, 0, 0, 0, 0, 0, 0, 72, 0, 0, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 0, 'Margrave Dhakar - On Gossip Option 0 Selected - Close Gossip'),
+(31306, 0, 2, 3, 61, 0, 100, 0, 0, 0, 0, 0, 0, 0, 81, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Margrave Dhakar - On Gossip Option 0 Selected - Set Npc Flag '),
+(31306, 0, 3, 0, 61, 0, 100, 0, 0, 0, 0, 0, 0, 0, 80, 3130600, 2, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Margrave Dhakar - On Gossip Option 0 Selected - Run Script'),
+(31306, 0, 4, 5, 38, 0, 100, 0, 1, 1, 0, 0, 0, 0, 22, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Margrave Dhakar - On Data Set 1 1 - Set Event Phase 1'),
+(31306, 0, 5, 0, 61, 0, 100, 0, 0, 0, 0, 0, 0, 0, 49, 0, 0, 0, 0, 0, 0, 10, 74956, 30698, 0, 0, 0, 0, 0, 0, 'Margrave Dhakar - On Data Set 1 1 - Start Attacking'),
+(31306, 0, 6, 0, 7, 1, 100, 0, 0, 0, 0, 0, 0, 0, 80, 3130601, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Margrave Dhakar - On Evade - Run Script (Phase 1)'),
+(31306, 0, 7, 0, 4, 1, 100, 0, 0, 0, 0, 0, 0, 0, 11, 58949, 2, 0, 0, 0, 0, 10, 74956, 30698, 0, 0, 0, 0, 0, 0, 'Margrave Dhakar - On Aggro - Cast \'Ride Morbidus\' (Phase 1)'),
+(31306, 0, 8, 0, 0, 0, 100, 1, 1000, 2000, 0, 0, 0, 0, 11, 37548, 2, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 'Margrave Dhakar - In Combat - Cast \'Taunt\' (No Repeat)'),
+(31306, 0, 9, 0, 0, 0, 100, 0, 3000, 4000, 6000, 8000, 0, 0, 11, 5547, 2, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 'Margrave Dhakar - In Combat - Cast \'Swing\'');
+
+-- Action List (Margrave Dhakar)
+DELETE FROM `smart_scripts` WHERE (`source_type` = 9) AND (`entryorguid` IN (3130600, 3130601));
+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
+(3130600, 9, 0, 0, 0, 0, 100, 0, 1000, 1000, 0, 0, 0, 0, 12, 31301, 8, 0, 0, 0, 0, 8, 0, 0, 0, 0, 6858.5957, 3580.4998, 736.75116, 5.67231, 'Margrave Dhakar - Actionlist - Summon Creature \'The Lich King\''),
+(3130600, 9, 1, 0, 0, 0, 100, 0, 1000, 1000, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Margrave Dhakar - Actionlist - Say Line 0'),
+(3130601, 9, 0, 0, 0, 0, 100, 0, 3000, 3000, 0, 0, 0, 0, 5, 4, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Margrave Dhakar - Actionlist - Play Emote 4'),
+(3130601, 9, 1, 0, 0, 0, 100, 0, 0, 0, 0, 0, 0, 0, 41, 5000, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Margrave Dhakar - Actionlist - Despawn In 5000 ms');
+
+-- SmartAI (Lich King)
+UPDATE `creature_template` SET `AIName` = 'SmartAI' WHERE `entry` = 31301;
+
+DELETE FROM `smart_scripts` WHERE (`source_type` = 0 AND `entryorguid` = 31301);
+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
+(31301, 0, 0, 0, 54, 0, 100, 512, 0, 0, 0, 0, 0, 0, 80, 3130100, 2, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'The Lich King - On Just Summoned - Run Script');
+
+-- Action List (Lich King)
+DELETE FROM `smart_scripts` WHERE (`source_type` = 9 AND `entryorguid` = 3130100);
+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
+(3130100, 9, 0, 0, 0, 0, 100, 0, 100, 100, 0, 0, 0, 0, 11, 34427, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'The Lich King - Actionlist - Cast \'Ethereal Teleport\''),
+(3130100, 9, 1, 0, 0, 0, 100, 0, 500, 500, 0, 0, 0, 0, 11, 53274, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'The Lich King - Actionlist - Cast \'Icebound Visage\''),
+(3130100, 9, 2, 0, 0, 0, 100, 0, 1000, 1000, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'The Lich King - Actionlist - Say Line 0'),
+(3130100, 9, 3, 0, 0, 0, 100, 0, 7000, 7000, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'The Lich King - Actionlist - Say Line 1'),
+(3130100, 9, 4, 0, 0, 0, 100, 0, 4000, 4000, 0, 0, 0, 0, 1, 2, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'The Lich King - Actionlist - Say Line 2'),
+(3130100, 9, 5, 0, 0, 0, 100, 0, 7000, 7000, 0, 0, 0, 0, 1, 3, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'The Lich King - Actionlist - Say Line 3'),
+(3130100, 9, 6, 0, 0, 0, 100, 0, 8000, 8000, 0, 0, 0, 0, 1, 4, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'The Lich King - Actionlist - Say Line 4'),
+(3130100, 9, 7, 0, 0, 0, 100, 0, 6000, 6000, 0, 0, 0, 0, 12, 31428, 8, 0, 0, 0, 0, 8, 0, 0, 0, 0, 6857.33, 3571.49, 735.892, 1.15191, 'The Lich King - Actionlist - Summon Creature \'Crusader Olakin Sainrith\''),
+(3130100, 9, 8, 0, 0, 0, 100, 0, 0, 0, 0, 0, 0, 0, 45, 1, 1, 0, 0, 0, 0, 19, 30698, 0, 0, 0, 0, 0, 0, 0, 'The Lich King - Actionlist - Set Data 1 1'),
+(3130100, 9, 9, 0, 0, 0, 100, 0, 0, 0, 0, 0, 0, 0, 41, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'The Lich King - Actionlist - Despawn Instant');
+
+-- SmartAI (Crusader Olakin Sainrith)
+UPDATE `creature_template` SET `AIName` = 'SmartAI' WHERE `entry` = 31428;
+
+DELETE FROM `smart_scripts` WHERE (`source_type` = 0 AND `entryorguid` = 31428);
+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
+(31428, 0, 0, 1, 54, 0, 100, 0, 0, 0, 0, 0, 0, 0, 2, 1770, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Crusader Olakin Sainrith - On Just Summoned - Set Faction 1770'),
+(31428, 0, 1, 0, 61, 0, 100, 0, 0, 0, 0, 0, 0, 0, 80, 3142800, 2, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Crusader Olakin Sainrith - On Just Summoned - Run Script'),
+(31428, 0, 2, 3, 38, 0, 100, 0, 1, 1, 0, 0, 0, 0, 22, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Crusader Olakin Sainrith - On Data Set 1 1 - Set Event Phase 1'),
+(31428, 0, 3, 0, 61, 0, 100, 0, 0, 0, 0, 0, 0, 0, 49, 0, 0, 0, 0, 0, 0, 10, 74956, 30698, 0, 0, 0, 0, 0, 0, 'Crusader Olakin Sainrith - On Data Set 1 1 - Start Attacking'),
+(31428, 0, 4, 0, 7, 1, 100, 0, 0, 0, 0, 0, 0, 0, 41, 8000, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Crusader Olakin Sainrith - On Evade - Despawn In 8000 ms (Phase 1)');
+
+-- Action List (Crusader Olakin Sainrith)
+DELETE FROM `smart_scripts` WHERE (`source_type` = 9 AND `entryorguid` = 3142800);
+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
+(3142800, 9, 0, 0, 0, 0, 100, 0, 3000, 3000, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Crusader Olakin Sainrith - Actionlist - Say Line 0');
+
+-- SmartAI (Morbidus)
+UPDATE `creature_template` SET `AIName` = 'SmartAI' WHERE `entry` = 30698;
+
+DELETE FROM `smart_scripts` WHERE (`source_type` = 0 AND `entryorguid` = 30698);
+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
+(30698, 0, 0, 0, 38, 0, 100, 0, 1, 1, 0, 0, 0, 0, 80, 3069800, 2, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Morbidus - On Data Set 1 1 - Run Script'),
+(30698, 0, 1, 0, 25, 0, 100, 0, 0, 0, 0, 0, 0, 0, 18, 768, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Morbidus - On Reset - Set Flags Immune To Players & Immune To NPC\'s'),
+(30698, 0, 2, 0, 6, 0, 100, 0, 0, 0, 0, 0, 0, 0, 33, 30698, 0, 0, 0, 0, 0, 24, 0, 0, 0, 0, 0, 0, 0, 0, 'Morbidus - On Just Died - Quest Credit \'null\'');
+
+-- Action List (Morbidus)
+DELETE FROM `smart_scripts` WHERE (`source_type` = 9 AND `entryorguid` = 3069800);
+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
+(3069800, 9, 0, 0, 0, 0, 100, 0, 5000, 5000, 0, 0, 0, 0, 19, 768, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Morbidus - Actionlist - Remove Flags Immune To Players & Immune To NPC\'s'),
+(3069800, 9, 1, 0, 0, 0, 100, 0, 200, 200, 0, 0, 0, 0, 45, 1, 1, 0, 0, 0, 0, 9, 31306, 0, 200, 0, 0, 0, 0, 0, 'Morbidus - Actionlist - Set Data 1 1'),
+(3069800, 9, 2, 0, 0, 0, 100, 0, 0, 0, 0, 0, 0, 0, 45, 1, 1, 0, 0, 0, 0, 9, 31428, 0, 200, 0, 0, 0, 0, 0, 'Morbidus - Actionlist - Set Data 1 1'),
+(3069800, 9, 3, 0, 0, 0, 100, 0, 0, 0, 0, 0, 0, 0, 45, 1, 1, 0, 0, 0, 0, 9, 31314, 0, 200, 0, 0, 0, 0, 0, 'Morbidus - Actionlist - Set Data 1 1');
+
+-- SmartAI (Ebon Blade Veteran)
+UPDATE `creature_template` SET `AIName` = 'SmartAI' WHERE `entry` = 31314;
+
+DELETE FROM `smart_scripts` WHERE (`source_type` = 0 AND `entryorguid` = 31314);
+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
+(31314, 0, 0, 1, 38, 0, 100, 0, 1, 1, 0, 0, 0, 0, 22, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Ebon Blade Veteran - On Data Set 1 1 - Set Event Phase 1'),
+(31314, 0, 1, 0, 61, 0, 100, 0, 0, 0, 0, 0, 0, 0, 49, 0, 0, 0, 0, 0, 0, 10, 74956, 30698, 0, 0, 0, 0, 0, 0, 'Ebon Blade Veteran - On Data Set 1 1 - Start Attacking'),
+(31314, 0, 2, 0, 0, 0, 100, 0, 3000, 6000, 10000, 14000, 0, 0, 11, 50688, 2, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 'Ebon Blade Veteran - In Combat - Cast \'Plague Strike\''),
+(31314, 0, 3, 0, 7, 1, 100, 0, 0, 0, 0, 0, 0, 0, 41, 12000, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Ebon Blade Veteran - On Evade - Despawn In 12000 ms (Phase 1)');
diff --git a/data/sql/updates/db_world/2025_11_26_04.sql b/data/sql/updates/db_world/2025_11_26_04.sql
new file mode 100644
index 0000000000..1464e8d163
--- /dev/null
+++ b/data/sql/updates/db_world/2025_11_26_04.sql
@@ -0,0 +1,3 @@
+-- DB update 2025_11_26_03 -> 2025_11_26_04
+--
+UPDATE `smart_scripts` SET `action_param1`=51873, `comment`='Duke Vallenhal - Between 0-50% Health - Cast \'Bloodworm\'' WHERE `entryorguid`=26926 AND `source_type`=0 AND `id`=1;
diff --git a/data/sql/updates/db_world/2025_11_26_05.sql b/data/sql/updates/db_world/2025_11_26_05.sql
new file mode 100644
index 0000000000..bd2b6a34bd
--- /dev/null
+++ b/data/sql/updates/db_world/2025_11_26_05.sql
@@ -0,0 +1,6 @@
+-- DB update 2025_11_26_04 -> 2025_11_26_05
+--
+DELETE FROM `smart_scripts` WHERE `entryorguid` = 1200 AND `source_type` = 0 AND `id` IN (2, 3);
+INSERT INTO `smart_scripts` (`entryorguid`, `source_type`, `id`, `link`, `event_type`, `event_phase_mask`, `event_chance`, `event_flags`, `event_param1`, `event_param2`, `event_param3`, `event_param4`, `event_param5`, `event_param6`, `action_type`, `action_param1`, `action_param2`, `action_param3`, `action_param4`, `action_param5`, `action_param6`, `target_type`, `target_param1`, `target_param2`, `target_param3`, `target_param4`, `target_x`, `target_y`, `target_z`, `target_o`, `comment`) VALUES
+(1200, 0, 2, 0, 0, 0, 100, 0, 0, 0, 0, 6000, 0, 0, 11, 3108, 64, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 'Morbent Fel - In Combat - Cast \'Touch of Death\''),
+(1200, 0, 3, 0, 0, 0, 100, 0, 5000, 25000, 22500, 27500, 0, 0, 11, 3109, 64, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 'Morbent Fel - In Combat - Cast \'Presence of Death\'');
diff --git a/data/sql/updates/db_world/2025_11_26_06.sql b/data/sql/updates/db_world/2025_11_26_06.sql
new file mode 100644
index 0000000000..72170aa04e
--- /dev/null
+++ b/data/sql/updates/db_world/2025_11_26_06.sql
@@ -0,0 +1,12 @@
+-- DB update 2025_11_26_05 -> 2025_11_26_06
+
+-- Remove row 5 (set range 100) and update comments.
+UPDATE `creature_template` SET `AIName` = 'SmartAI' WHERE `entry` = 32769;
+
+DELETE FROM `smart_scripts` WHERE (`source_type` = 0 AND `entryorguid` = 32769);
+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
+(32769, 0, 0, 0, 1, 0, 100, 0, 5000, 10000, 3000, 6000, 0, 0, 49, 0, 0, 0, 0, 0, 0, 19, 31406, 80, 0, 0, 0, 0, 0, 0, 'Gargoyle Ambusher - Out of Combat - Start Attacking'),
+(32769, 0, 1, 0, 1, 0, 100, 0, 5000, 10000, 3000, 6000, 0, 0, 49, 0, 0, 0, 0, 0, 0, 19, 32512, 80, 0, 0, 0, 0, 0, 0, 'Gargoyle Ambusher - Out of Combat - Start Attacking'),
+(32769, 0, 2, 0, 1, 0, 100, 0, 5000, 10000, 3000, 6000, 0, 0, 49, 0, 0, 0, 0, 0, 0, 19, 31838, 80, 0, 0, 0, 0, 0, 0, 'Gargoyle Ambusher - Out of Combat - Start Attacking'),
+(32769, 0, 3, 0, 1, 0, 100, 0, 5000, 10000, 3000, 6000, 0, 0, 49, 0, 0, 0, 0, 0, 0, 19, 32513, 80, 0, 0, 0, 0, 0, 0, 'Gargoyle Ambusher - Out of Combat - Start Attacking'),
+(32769, 0, 4, 0, 9, 0, 100, 0, 0, 0, 1500, 1500, 0, 40, 11, 60239, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 'Gargoyle Ambusher - Within 0-40 Range - Cast \'Gargoyle Ambusher Strike\'');
diff --git a/data/sql/updates/db_world/2025_11_27_00.sql b/data/sql/updates/db_world/2025_11_27_00.sql
new file mode 100644
index 0000000000..8aba98c25a
--- /dev/null
+++ b/data/sql/updates/db_world/2025_11_27_00.sql
@@ -0,0 +1,41 @@
+-- DB update 2025_11_26_06 -> 2025_11_27_00
+--
+DELETE FROM `smart_scripts` WHERE (`source_type` = 0 AND `entryorguid` = 30474);
+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
+(30474, 0, 0, 1, 25, 0, 100, 0, 0, 0, 0, 0, 0, 0, 22, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'The North Wind - On Reset - Set Event Phase 1'),
+(30474, 0, 1, 0, 61, 0, 100, 0, 0, 0, 0, 0, 0, 0, 19, 256, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'The North Wind - On Reset - Remove Flags Immune To Players'),
+(30474, 0, 2, 0, 0, 1, 100, 0, 1000, 3000, 8000, 11000, 0, 0, 11, 61662, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 'The North Wind - In Combat - Cast \'Cyclone\' (Phase 1)'),
+(30474, 0, 3, 0, 0, 1, 100, 0, 1000, 8000, 12000, 16000, 0, 0, 11, 61663, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 'The North Wind - In Combat - Cast \'Gust of Wind\' (Phase 1)'),
+(30474, 0, 4, 0, 2, 0, 100, 1, 0, 20, 0, 0, 0, 0, 80, 3047400, 2, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'The North Wind - Between 0-20% Health - Run Script (No Repeat)');
+
+DELETE FROM `smart_scripts` WHERE (`source_type` = 9 AND `entryorguid` = 3047400);
+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
+(3047400, 9, 0, 0, 0, 0, 100, 0, 0, 0, 0, 0, 0, 0, 22, 2, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'The North Wind - Actionlist - Set Event Phase 2'),
+(3047400, 9, 1, 0, 0, 0, 100, 0, 0, 0, 0, 0, 0, 0, 224, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'The North Wind - Actionlist - Stop Attack'),
+(3047400, 9, 2, 0, 0, 0, 100, 0, 0, 0, 0, 0, 0, 0, 117, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'The North Wind - Actionlist - Disable Evade'),
+(3047400, 9, 3, 0, 0, 0, 100, 0, 0, 0, 0, 0, 0, 0, 2, 35, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'The North Wind - Actionlist - Set Faction 35'),
+(3047400, 9, 4, 0, 0, 0, 100, 0, 0, 0, 0, 0, 0, 0, 18, 256, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'The North Wind - Actionlist - Set Flags Immune To Players'),
+(3047400, 9, 5, 0, 0, 0, 100, 0, 0, 0, 0, 0, 0, 0, 11, 46957, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'The North Wind - Actionlist - Cast \'Cosmetic - Stun (Permanent)\''),
+(3047400, 9, 6, 0, 0, 0, 100, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'The North Wind - Actionlist - Say Line 0'),
+(3047400, 9, 7, 0, 0, 0, 100, 0, 1000, 1000, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 19, 30388, 100, 0, 0, 0, 0, 0, 0, 'The North Wind - Actionlist - Say Line 0'),
+(3047400, 9, 8, 0, 0, 0, 100, 0, 1000, 1000, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'The North Wind - Actionlist - Say Line 1'),
+(3047400, 9, 9, 0, 0, 0, 100, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 19, 30388, 100, 0, 0, 0, 0, 0, 0, 'The North Wind - Actionlist - Say Line 1'),
+(3047400, 9, 10, 0, 0, 0, 100, 0, 2000, 2000, 0, 0, 0, 0, 11, 56892, 2, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'The North Wind - Actionlist - Cast \'Drop Horn of Elemental Fury\''),
+(3047400, 9, 11, 0, 0, 0, 100, 0, 0, 0, 0, 0, 0, 0, 28, 46598, 0, 0, 0, 0, 0, 19, 30388, 100, 0, 0, 0, 0, 0, 0, 'The North Wind - Actionlist - Remove Aura \'Ride Vehicle Hardcoded\''),
+(3047400, 9, 12, 0, 0, 0, 100, 0, 0, 0, 0, 0, 0, 0, 41, 60000, 10, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'The North Wind - Actionlist - Despawn In 60000 ms');
+
+DELETE FROM `creature_template_spell` WHERE (`CreatureID` = 30388) AND (`Index` IN (0, 2));
+INSERT INTO `creature_template_spell` (`CreatureID`, `Index`, `Spell`, `VerifiedBuild`) VALUES
+(30388, 0, 56896, 12340),
+(30388, 2, 56897, 12340);
+
+-- eject forward and to the right
+DELETE FROM `vehicle_seat_addon` WHERE `SeatEntry` = 2245;
+INSERT INTO `vehicle_seat_addon` (`SeatEntry`, `SeatOrientation`, `ExitParamX`, `ExitParamY`, `ExitParamZ`, `ExitParamO`, `ExitParamValue`) VALUES
+(2245, 0.0, 3.0, -4.0, 3.0, 0.0, 1);
+
+DELETE FROM `smart_scripts` WHERE (`source_type` = 1 AND `entryorguid` = 194123);
+UPDATE `gameobject_template` SET `AIName` = '' WHERE (`entry` = 194123);
+
+-- Remove duplicate spawn of 'The North Wind'
+DELETE FROM `creature` WHERE `guid` = 1955014 AND `id1` = 30474;
diff --git a/data/sql/updates/db_world/2025_11_27_01.sql b/data/sql/updates/db_world/2025_11_27_01.sql
new file mode 100644
index 0000000000..2b9d7f64ab
--- /dev/null
+++ b/data/sql/updates/db_world/2025_11_27_01.sql
@@ -0,0 +1,745 @@
+-- DB update 2025_11_27_00 -> 2025_11_27_01
+--
+-- Setthek Talon Lord wields a sword, but shares id1 with War Hawk (no equipment)
+-- workaround for error: Table `creature` have creature (Entries: 18321, 21904, 0) one or more with equipment_id 1 not found in table `creature_equip_template`, set to no equipment.
+DELETE FROM `smart_scripts` WHERE (`entryorguid` = 18321) AND (`source_type` = 0) AND (`id` IN (1));
+INSERT INTO `smart_scripts` (`entryorguid`, `source_type`, `id`, `link`, `event_type`, `event_phase_mask`, `event_chance`, `event_flags`, `event_param1`, `event_param2`, `event_param3`, `event_param4`, `event_param5`, `event_param6`, `action_type`, `action_param1`, `action_param2`, `action_param3`, `action_param4`, `action_param5`, `action_param6`, `target_type`, `target_param1`, `target_param2`, `target_param3`, `target_param4`, `target_x`, `target_y`, `target_z`, `target_o`, `comment`) VALUES
+(18321, 0, 1, 0, 37, 0, 100, 0, 0, 0, 0, 0, 0, 0, 124, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Sethekk Talon Lord - On Initialize - Load Equipment Id 1');
+
+-- CreatureID 2603 (Kovork)
+UPDATE `creature` SET `equipment_id` = 1 WHERE `id1` = 2603 AND `guid` IN (300753);
+
+-- CreatureID 2604 (Molok the Crusher)
+UPDATE `creature` SET `equipment_id` = 1 WHERE `id1` = 2604 AND `guid` IN (300754);
+
+-- CreatureID 2605 (Zalas Witherbark)
+UPDATE `creature` SET `equipment_id` = 1 WHERE `id1` = 2605 AND `guid` IN (300757, 301300, 301301, 301302);
+
+-- CreatureID 2606 (Nimar the Slayer)
+UPDATE `creature` SET `equipment_id` = 1 WHERE `id1` = 2606 AND `guid` IN (300755, 301290, 301291, 301292);
+
+-- CreatureID 4842 (Earthcaller Halmgar)
+UPDATE `creature` SET `equipment_id` = 1 WHERE `id1` = 4842 AND `guid` IN (1975863);
+
+-- CreatureID 5569 (Fizzlebang Booms)
+UPDATE `creature` SET `equipment_id` = 1 WHERE `id1` = 5569 AND `guid` IN (12523);
+
+-- CreatureID 6490 (Azshir the Sleepless)
+UPDATE `creature` SET `equipment_id` = 1 WHERE `id1` = 6490 AND `guid` IN (1975841);
+
+-- CreatureID 7157 (Deadwood Avenger)
+UPDATE `creature` SET `equipment_id` = 1 WHERE `id1` = 7157 AND `guid` IN (40303, 40304, 40386, 40388);
+
+-- CreatureID 7158 (Deadwood Shaman)
+UPDATE `creature` SET `equipment_id` = 1 WHERE `id1` = 7158 AND `guid` IN (40305);
+
+-- CreatureID 7354 (Ragglesnout)
+UPDATE `creature` SET `equipment_id` = 1 WHERE `id1` = 7354 AND `guid` IN (247108);
+
+-- CreatureID 8116 (Ziggle Sparks)
+UPDATE `creature` SET `equipment_id` = 1 WHERE `id1` = 8116 AND `guid` IN (12524);
+
+-- CreatureID 8117 (Wizbang Booms)
+UPDATE `creature` SET `equipment_id` = 1 WHERE `id1` = 8117 AND `guid` IN (12525);
+
+-- CreatureID 8121 (Jaxxil Sparks)
+UPDATE `creature` SET `equipment_id` = 1 WHERE `id1` = 8121 AND `guid` IN (12527);
+
+-- CreatureID 8122 (Kizzak Sparks)
+UPDATE `creature` SET `equipment_id` = 1 WHERE `id1` = 8122 AND `guid` IN (12528);
+
+-- CreatureID 8387 (Horizon Scout First Mate)
+UPDATE `creature` SET `equipment_id` = 1 WHERE `id1` = 8387 AND `guid` IN (160359);
+
+-- CreatureID 8388 (Horizon Scout Cook)
+UPDATE `creature` SET `equipment_id` = 1 WHERE `id1` = 8388 AND `guid` IN (160360);
+
+-- CreatureID 8389 (Horizon Scout Engineer)
+UPDATE `creature` SET `equipment_id` = 1 WHERE `id1` = 8389 AND `guid` IN (160361);
+
+-- CreatureID 8478 (Second Mate Shandril)
+UPDATE `creature` SET `equipment_id` = 1 WHERE `id1` = 8478 AND `guid` IN (160363);
+
+-- CreatureID 9216 (Spirestone Warlord)
+UPDATE `creature` SET `equipment_id` = 1 WHERE `id1` = 9216 AND `guid` IN (24187, 24188, 248595, 248596, 248597, 248598, 248599, 248600);
+
+-- CreatureID 9462 (Chieftain Bloodmaw)
+UPDATE `creature` SET `equipment_id` = 1 WHERE `id1` = 9462 AND `guid` IN (40427);
+
+-- CreatureID 9693 (Bloodaxe Evoker)
+UPDATE `creature` SET `equipment_id` = 1 WHERE `id1` = 9693 AND `guid` IN (52124, 52125, 52126, 52127, 52128, 52129, 52130, 52131, 52132, 52133, 52134);
+
+-- CreatureID 11277 (Caer Darrow Citizen)
+UPDATE `creature` SET `equipment_id` = 1 WHERE `id1` = 11277 AND `guid` IN (131325, 131326, 131327, 131328, 131338, 131343, 131344, 131346, 131347);
+
+-- CreatureID 11279 (Caer Darrow Guardsman)
+UPDATE `creature` SET `equipment_id` = 1 WHERE `id1` = 11279 AND `guid` IN (131329, 131330, 131331, 131342);
+
+-- CreatureID 11280 (Caer Darrow Cannoneer)
+UPDATE `creature` SET `equipment_id` = 1 WHERE `id1` = 11280 AND `guid` IN (131332, 131333, 131334);
+
+-- CreatureID 11287 (Baker Masterson)
+UPDATE `creature` SET `equipment_id` = 1 WHERE `id1` = 11287 AND `guid` IN (131345);
+
+-- CreatureID 11316 (Joseph Dirte)
+UPDATE `creature` SET `equipment_id` = 1 WHERE `id1` = 11316 AND `guid` IN (131337);
+
+-- CreatureID 14684 (Balzaphon)
+UPDATE `creature` SET `equipment_id` = 1 WHERE `id1` = 14684 AND `guid` IN (248654);
+
+-- CreatureID 14695 (Lord Blackwood)
+UPDATE `creature` SET `equipment_id` = 1 WHERE `id1` = 14695 AND `guid` IN (153321);
+
+-- CreatureID 14724 (Bubulo Acerbus)
+UPDATE `creature` SET `equipment_id` = 1 WHERE `id1` = 14724 AND `guid` IN (1741);
+
+-- CreatureID 15197 (Darkcaller Yanka)
+UPDATE `creature` SET `equipment_id` = 1 WHERE `id1` = 15197 AND `guid` IN (240193);
+
+-- CreatureID 15199 (Sergeant Hartman)
+UPDATE `creature` SET `equipment_id` = 1 WHERE `id1` = 15199 AND `guid` IN (240192);
+
+-- CreatureID 15264 (Anubisath Sentinel)
+UPDATE `creature` SET `equipment_id` = 1 WHERE `id1` = 15264 AND `guid` IN (87564, 87565, 87566, 87567, 87568, 87569, 87570, 87571);
+
+-- CreatureID 15275 (Emperor Vek'nilash)
+UPDATE `creature` SET `equipment_id` = 1 WHERE `id1` = 15275 AND `guid` IN (88076);
+
+-- CreatureID 15276 (Emperor Vek'lor)
+UPDATE `creature` SET `equipment_id` = 1 WHERE `id1` = 15276 AND `guid` IN (88077);
+
+-- CreatureID 15383 (Sergeant Stonebrow)
+UPDATE `creature` SET `equipment_id` = 1 WHERE `id1` = 15383 AND `guid` IN (83120);
+
+-- CreatureID 15431 (Corporal Carnes)
+UPDATE `creature` SET `equipment_id` = 1 WHERE `id1` = 15431 AND `guid` IN (83121);
+
+-- CreatureID 15434 (Private Draxlegauge)
+UPDATE `creature` SET `equipment_id` = 1 WHERE `id1` = 15434 AND `guid` IN (83123);
+
+-- CreatureID 15437 (Master Nightsong)
+UPDATE `creature` SET `equipment_id` = 1 WHERE `id1` = 15437 AND `guid` IN (83124);
+
+-- CreatureID 15445 (Sergeant Major Germaine)
+UPDATE `creature` SET `equipment_id` = 1 WHERE `id1` = 15445 AND `guid` IN (83125);
+
+-- CreatureID 15446 (Bonnie Stoneflayer)
+UPDATE `creature` SET `equipment_id` = 1 WHERE `id1` = 15446 AND `guid` IN (83126);
+
+-- CreatureID 15448 (Private Porter)
+UPDATE `creature` SET `equipment_id` = 1 WHERE `id1` = 15448 AND `guid` IN (83127);
+
+-- CreatureID 15450 (Marta Finespindle)
+UPDATE `creature` SET `equipment_id` = 1 WHERE `id1` = 15450 AND `guid` IN (83128);
+
+-- CreatureID 15451 (Sentinel Silversky)
+UPDATE `creature` SET `equipment_id` = 1 WHERE `id1` = 15451 AND `guid` IN (83129);
+
+-- CreatureID 15453 (Keeper Moonshade)
+UPDATE `creature` SET `equipment_id` = 1 WHERE `id1` = 15453 AND `guid` IN (83131);
+
+-- CreatureID 15455 (Slicky Gastronome)
+UPDATE `creature` SET `equipment_id` = 1 WHERE `id1` = 15455 AND `guid` IN (83132);
+
+-- CreatureID 15457 (Huntress Swiftriver)
+UPDATE `creature` SET `equipment_id` = 1 WHERE `id1` = 15457 AND `guid` IN (83134);
+
+-- CreatureID 15458 (Commander Stronghammer)
+UPDATE `creature` SET `equipment_id` = 1 WHERE `id1` = 15458 AND `guid` IN (83146);
+
+-- CreatureID 15459 (Miner Cromwell)
+UPDATE `creature` SET `equipment_id` = 1 WHERE `id1` = 15459 AND `guid` IN (83152);
+
+-- CreatureID 15460 (Grunt Maug)
+UPDATE `creature` SET `equipment_id` = 1 WHERE `id1` = 15460 AND `guid` IN (83153);
+
+-- CreatureID 15469 (Senior Sergeant T'kelah)
+UPDATE `creature` SET `equipment_id` = 1 WHERE `id1` = 15469 AND `guid` IN (83154);
+
+-- CreatureID 15477 (Herbalist Proudfeather)
+UPDATE `creature` SET `equipment_id` = 1 WHERE `id1` = 15477 AND `guid` IN (83155);
+
+-- CreatureID 15502 (Andorgos)
+UPDATE `creature` SET `equipment_id` = 1 WHERE `id1` = 15502 AND `guid` IN (87527);
+
+-- CreatureID 15503 (Kandrostrasz)
+UPDATE `creature` SET `equipment_id` = 1 WHERE `id1` = 15503 AND `guid` IN (87529);
+
+-- CreatureID 15504 (Vethsera)
+UPDATE `creature` SET `equipment_id` = 1 WHERE `id1` = 15504 AND `guid` IN (87528);
+
+-- CreatureID 15508 (Batrider Pele'keiki)
+UPDATE `creature` SET `equipment_id` = 1 WHERE `id1` = 15508 AND `guid` IN (83156);
+
+-- CreatureID 15512 (Apothecary Jezel)
+UPDATE `creature` SET `equipment_id` = 1 WHERE `id1` = 15512 AND `guid` IN (83157);
+
+-- CreatureID 15515 (Skinner Jamani)
+UPDATE `creature` SET `equipment_id` = 1 WHERE `id1` = 15515 AND `guid` IN (83158);
+
+-- CreatureID 15522 (Sergeant Umala)
+UPDATE `creature` SET `equipment_id` = 1 WHERE `id1` = 15522 AND `guid` IN (83148);
+
+-- CreatureID 15525 (Doctor Serratus)
+UPDATE `creature` SET `equipment_id` = 1 WHERE `id1` = 15525 AND `guid` IN (83159);
+
+-- CreatureID 15528 (Healer Longrunner)
+UPDATE `creature` SET `equipment_id` = 1 WHERE `id1` = 15528 AND `guid` IN (83160);
+
+-- CreatureID 15532 (Stoneguard Clayhoof)
+UPDATE `creature` SET `equipment_id` = 1 WHERE `id1` = 15532 AND `guid` IN (83162);
+
+-- CreatureID 15533 (Bloodguard Rawtar)
+UPDATE `creature` SET `equipment_id` = 1 WHERE `id1` = 15533 AND `guid` IN (83149);
+
+-- CreatureID 15534 (Fisherman Lin'do)
+UPDATE `creature` SET `equipment_id` = 1 WHERE `id1` = 15534 AND `guid` IN (83150);
+
+-- CreatureID 15535 (Chief Sharpclaw)
+UPDATE `creature` SET `equipment_id` = 1 WHERE `id1` = 15535 AND `guid` IN (83151);
+
+-- CreatureID 15539 (General Zog)
+UPDATE `creature` SET `equipment_id` = 1 WHERE `id1` = 15539 AND `guid` IN (83118);
+
+-- CreatureID 15700 (Warlord Gorchuk)
+UPDATE `creature` SET `equipment_id` = 1 WHERE `id1` = 15700 AND `guid` IN (83168);
+
+-- CreatureID 15701 (Field Marshal Snowfall)
+UPDATE `creature` SET `equipment_id` = 1 WHERE `id1` = 15701 AND `guid` IN (83140);
+
+-- CreatureID 15702 (Senior Sergeant Taiga)
+UPDATE `creature` SET `equipment_id` = 1 WHERE `id1` = 15702 AND `guid` IN (83169);
+
+-- CreatureID 15703 (Senior Sergeant Grimsford)
+UPDATE `creature` SET `equipment_id` = 1 WHERE `id1` = 15703 AND `guid` IN (83170);
+
+-- CreatureID 15704 (Senior Sergeant Kai'jin)
+UPDATE `creature` SET `equipment_id` = 1 WHERE `id1` = 15704 AND `guid` IN (83171);
+
+-- CreatureID 15707 (Master Sergeant Fizzlebolt)
+UPDATE `creature` SET `equipment_id` = 1 WHERE `id1` = 15707 AND `guid` IN (83172);
+
+-- CreatureID 15709 (Master Sergeant Moonshadow)
+UPDATE `creature` SET `equipment_id` = 1 WHERE `id1` = 15709 AND `guid` IN (83174);
+
+-- CreatureID 15723 (Booty Bay Reveler)
+UPDATE `creature` SET `equipment_id` = 1 WHERE `id1` = 15723 AND `guid` IN (420041, 420042, 420043, 420044, 420045, 420046, 420047, 420048, 420049, 420050, 420051, 420052, 420053, 420054, 420055, 420056, 420057, 420058, 420059);
+
+-- CreatureID 15724 (Drunken Bruiser)
+UPDATE `creature` SET `equipment_id` = 1 WHERE `id1` = 15724 AND `guid` IN (420060, 420061, 420062, 420063, 420064, 420065, 420066, 420067, 420068, 420069, 420070, 420071, 420072, 420073, 420074, 420075, 420076, 420077, 420078, 420079, 420080, 420081, 420082, 420083, 420084, 420085, 420086, 420087, 420088, 420089, 420090, 420091, 420092, 420093, 420094, 420095, 420096, 420097, 420098, 420099, 420100, 420101, 420102, 420103, 420104, 420105, 420106, 420107, 420108, 420109, 420110, 420111, 420112, 420113, 420114, 420115, 420116, 420117, 420118, 420119, 420120, 420121);
+
+-- CreatureID 15765 (Officer Redblade)
+UPDATE `creature` SET `equipment_id` = 1 WHERE `id1` = 15765 AND `guid` IN (83179);
+
+-- CreatureID 16241 (Argent Recruiter)
+UPDATE `creature` SET `equipment_id` = 1 WHERE `id1` = 16241 AND `guid` IN (12863, 12867, 12870, 12871);
+
+-- CreatureID 16255 (Argent Scout)
+UPDATE `creature` SET `equipment_id` = 1 WHERE `id1` = 16255 AND `guid` IN (12876, 12880, 12884, 12887);
+
+-- CreatureID 16281 (Keeper of the Rolls)
+UPDATE `creature` SET `equipment_id` = 1 WHERE `id1` = 16281 AND `guid` IN (12860);
+
+-- CreatureID 16285 (Argent Emissary)
+UPDATE `creature` SET `equipment_id` = 1 WHERE `id1` = 16285 AND `guid` IN (12861, 12864, 12868, 12872);
+
+-- CreatureID 16359 (Argent Messenger)
+UPDATE `creature` SET `equipment_id` = 1 WHERE `id1` = 16359 AND `guid` IN (12877, 12881, 12885, 12888);
+
+-- CreatureID 16361 (Commander Thomas Helleran)
+UPDATE `creature` SET `equipment_id` = 1 WHERE `id1` = 16361 AND `guid` IN (12862);
+
+-- CreatureID 16384 (Argent Dawn Initiate)
+UPDATE `creature` SET `equipment_id` = 1 WHERE `id1` = 16384 AND `guid` IN (153326, 153327, 153328);
+
+-- CreatureID 16395 (Argent Dawn Paladin)
+UPDATE `creature` SET `equipment_id` = 1 WHERE `id1` = 16395 AND `guid` IN (153322, 153323, 153324, 153325);
+
+-- CreatureID 16433 (Argent Dawn Crusader)
+UPDATE `creature` SET `equipment_id` = 1 WHERE `id1` = 16433 AND `guid` IN (153329, 153330, 153331, 153332);
+
+-- CreatureID 16434 (Argent Dawn Champion)
+UPDATE `creature` SET `equipment_id` = 1 WHERE `id1` = 16434 AND `guid` IN (153336, 153337, 153338, 153339);
+
+-- CreatureID 16435 (Argent Dawn Cleric)
+UPDATE `creature` SET `equipment_id` = 1 WHERE `id1` = 16435 AND `guid` IN (153333, 153334, 153335);
+
+-- CreatureID 16436 (Argent Dawn Priest)
+UPDATE `creature` SET `equipment_id` = 1 WHERE `id1` = 16436 AND `guid` IN (153340, 153341, 153342);
+
+-- CreatureID 17190 (Siltfin Murloc)
+UPDATE `creature` SET `equipment_id` = 1 WHERE `id1` = 17190 AND `guid` IN (60815, 60818, 60820, 60821, 60822, 60825, 60827, 60830, 60831, 60834, 60836, 60837, 60839, 60842, 60845, 60847, 60853, 60854, 60858, 60859, 60863, 60864, 60870, 60871, 60872, 60875, 60877, 60879, 60884, 60887, 60889, 60892, 60895, 60899, 60901, 60903, 60904, 60906, 60907, 60908, 60911, 60913, 60916);
+
+-- CreatureID 17191 (Siltfin Oracle)
+UPDATE `creature` SET `equipment_id` = 1 WHERE `id1` = 17191 AND `guid` IN (60816, 60819, 60823, 60824, 60826, 60828, 60833, 60835, 60838, 60841, 60843, 60846, 60850, 60851, 60852, 60856, 60861, 60862, 60865, 60866, 60868, 60869, 60873, 60876, 60880, 60881, 60882, 60883, 60885, 60888, 60891, 60898, 60900, 60902, 60910, 60912, 60914, 60915);
+
+-- CreatureID 17192 (Siltfin Hunter)
+UPDATE `creature` SET `equipment_id` = 1 WHERE `id1` = 17192 AND `guid` IN (60817, 60829, 60832, 60840, 60844, 60848, 60849, 60860, 60867, 60874, 60878, 60886, 60894, 60905, 60909, 60917, 60918);
+
+-- CreatureID 17211 (Human Footman)
+UPDATE `creature` SET `equipment_id` = 1 WHERE `id1` = 17211 AND `guid` IN (76021, 76022, 76023, 76025, 76026, 76027, 76029, 76031);
+
+-- CreatureID 17469 (Orc Grunt)
+UPDATE `creature` SET `equipment_id` = 1 WHERE `id1` = 17469 AND `guid` IN (76020, 76028, 76030, 76032, 76033, 76035, 76036, 76040);
+
+-- CreatureID 17701 (Lord Xiz)
+UPDATE `creature` SET `equipment_id` = 1 WHERE `id1` = 17701 AND `guid` IN (63448);
+
+-- CreatureID 17885 (Earthbinder Rayge)
+UPDATE `creature` SET `equipment_id` = 1 WHERE `id1` = 17885 AND `guid` IN (138478);
+
+-- CreatureID 18192 (Horde Halaani Guard)
+UPDATE `creature` SET `equipment_id` = 1 WHERE `id1` = 18192 AND `guid` IN (12416, 12417, 12418, 12419, 12420, 12421, 12422, 12423, 12424, 12425, 12426, 12427, 12428, 12429, 12430);
+
+-- CreatureID 18206 (Wastewalker Captive)
+UPDATE `creature` SET `equipment_id` = 1 WHERE `id1` = 18206 AND `guid` IN (79461, 79463, 79469, 79471, 79472, 79475, 79482, 79488, 79490, 135044, 135045, 135047, 135048, 135049, 135050, 135051, 135052, 135054, 135055, 135057, 135058, 135060, 135061, 135062, 135063, 135064, 135065, 135066, 135067, 135072, 135073, 135074, 135075, 135076, 135077, 135078, 135079, 135080, 135081, 135082, 135083, 135084, 135085, 135086, 135087, 135089);
+
+-- CreatureID 18256 (Alliance Halaani Guard)
+UPDATE `creature` SET `equipment_id` = 1 WHERE `id1` = 18256 AND `guid` IN (12436, 12437, 12438, 12439, 12440, 12441, 12442, 12443, 12444, 12445, 12446, 12447, 12448, 12449, 12450);
+
+-- CreatureID 18556 (Phasing Soldier)
+UPDATE `creature` SET `equipment_id` = 1 WHERE `id1` = 18556 AND `guid` IN (132411, 132422, 132436);
+
+-- CreatureID 18557 (Phasing Cleric)
+UPDATE `creature` SET `equipment_id` = 1 WHERE `id1` = 18557 AND `guid` IN (132409, 132413, 132414, 132425, 132429, 132430);
+
+-- CreatureID 18558 (Phasing Sorcerer)
+UPDATE `creature` SET `equipment_id` = 1 WHERE `id1` = 18558 AND `guid` IN (132404, 132417, 132431, 132437);
+
+-- CreatureID 18559 (Phasing Stalker)
+UPDATE `creature` SET `equipment_id` = 1 WHERE `id1` = 18559 AND `guid` IN (132406, 132408, 132416, 132420, 132421, 132428);
+
+-- CreatureID 18684 (Bro'Gaz the Clanless)
+UPDATE `creature` SET `equipment_id` = 1 WHERE `id1` = 18684 AND `guid` IN (100866, 100867, 100868);
+
+-- CreatureID 20885 (Dalliah the Doomsayer)
+UPDATE `creature` SET `equipment_id` = 1 WHERE `id1` = 20885 AND `guid` IN (138950);
+
+-- CreatureID 21474 (Coreiel)
+UPDATE `creature` SET `equipment_id` = 1 WHERE `id1` = 21474 AND `guid` IN (12413);
+
+-- CreatureID 21485 (Aldraan)
+UPDATE `creature` SET `equipment_id` = 1 WHERE `id1` = 21485 AND `guid` IN (12433);
+
+-- CreatureID 21682 (Human Cleric)
+UPDATE `creature` SET `equipment_id` = 1 WHERE `id1` = 21682 AND `guid` IN (76046, 76048);
+
+-- CreatureID 21683 (Human Conjurer)
+UPDATE `creature` SET `equipment_id` = 1 WHERE `id1` = 21683 AND `guid` IN (76047);
+
+-- CreatureID 21684 (King Llane)
+UPDATE `creature` SET `equipment_id` = 1 WHERE `id1` = 21684 AND `guid` IN (76049);
+
+-- CreatureID 21726 (Summoned Daemon)
+UPDATE `creature` SET `equipment_id` = 1 WHERE `id1` = 21726 AND `guid` IN (76034, 76039);
+
+-- CreatureID 21736 (Wildhammer Defender)
+UPDATE `creature` SET `equipment_id` = 1 WHERE `id1` = 21736 AND `guid` IN (213465, 213466, 213467, 213468, 213469, 213470, 213471, 213472, 213473, 213474, 213475, 213476, 213477, 213478, 213479, 213480, 213481, 213482, 213483, 213484, 213485, 213486, 213487, 213488, 213489, 213490, 213491, 213492, 213493, 213494, 213495, 213496, 213497, 213498, 213499, 213500, 213501, 213502, 213503, 213504, 213505, 213506, 213507, 213508, 213509, 213510, 213511, 213512, 213513, 213514, 213515, 213516, 213517, 213518, 213519, 213520, 213521, 213522, 213523, 213524, 213525, 213526, 213527, 213528, 213529, 213530, 213531, 213532, 213533, 213534, 213535, 213536, 213537, 213538, 213539, 213540, 213541, 213542, 213543, 213544, 213545, 213546, 213547, 213548, 213549, 213550, 213551, 213552, 213553, 213554, 213555, 213556, 213557, 213558, 213559, 213560, 213561, 213562, 213563, 213564, 213565, 213566, 213567, 213568, 213569, 213570, 213571, 213572, 213573, 213574, 213575, 213576, 213577, 213578, 213579, 213580, 213581, 213582, 213583, 213584, 213585, 213586, 213587, 213588, 213589, 213590);
+
+-- CreatureID 21747 (Orc Necrolyte)
+UPDATE `creature` SET `equipment_id` = 1 WHERE `id1` = 21747 AND `guid` IN (76037, 76041);
+
+-- CreatureID 21748 (Orc Wolf)
+UPDATE `creature` SET `equipment_id` = 1 WHERE `id1` = 21748 AND `guid` IN (76038, 76042);
+
+-- CreatureID 21749 (Shadowmoon Scout)
+UPDATE `creature` SET `equipment_id` = 1 WHERE `id1` = 21749 AND `guid` IN (213591, 213592, 213593, 213594, 213595, 213596, 213597, 213598, 213599, 213600, 213601, 213602, 213603, 213604, 213605, 213606, 213607, 213608, 213609, 213610, 213611, 213612, 213613, 213614, 213615, 213616, 213617, 213618, 213619, 213620, 213621, 213622, 213623, 213624, 213625, 213626, 213627, 213628, 213629, 213630, 213631, 213632, 213633, 213634, 213635, 213636, 213637, 213638, 213639, 213640, 213641, 213642, 213643, 213644, 213645, 213646, 213647, 213648, 213649, 213650, 213651, 213652, 213653, 213654, 213655, 213656, 213657, 213658, 213659, 213660, 213661, 213662, 213663, 213664, 213665, 213666, 213667, 213668, 213669, 213670, 213671, 213672, 213673, 213674, 213675, 213676, 213677, 213678, 213679, 213680, 213681, 213682, 213683, 213684, 213685, 213686, 213687, 213688, 213689, 213690, 213691, 213692, 213693, 213694, 213695, 213696, 213697, 213698, 213699, 213700, 213701, 213702, 213703, 213704, 213705, 213706, 213707, 213708, 213709, 213710, 213711, 213712, 213713, 213714, 213715, 213716, 213717, 213718, 213719);
+
+-- CreatureID 21750 (Orc Warlock)
+UPDATE `creature` SET `equipment_id` = 1 WHERE `id1` = 21750 AND `guid` IN (76043);
+
+-- CreatureID 21752 (Warchief Blackhand)
+UPDATE `creature` SET `equipment_id` = 1 WHERE `id1` = 21752 AND `guid` IN (76044);
+
+-- CreatureID 21797 (Ancient Shadowmoon Spirit)
+UPDATE `creature` SET `equipment_id` = 1 WHERE `id1` = 21797 AND `guid` IN (100050);
+
+-- CreatureID 21846 (Slain Auchenai Warrior)
+UPDATE `creature` SET `equipment_id` = 1 WHERE `id1` = 21846 AND `guid` IN (1977353, 1977354, 1977355, 1977356, 1977357, 1977358, 1977359, 1977360, 1977361, 1977362, 1977363, 1977364, 1977365, 1977366, 1977367, 1977368, 1977369, 1977370, 1977371, 1977372, 1977373, 1977374, 1977375, 1977376, 1977377, 1977378, 1977379, 1977380, 1977381, 1977382, 1977383, 1977384, 1977385, 1977386, 1977387, 1977388);
+
+-- CreatureID 21961 (Cataclysm Overseer)
+UPDATE `creature` SET `equipment_id` = 1 WHERE `id1` = 21961 AND `guid` IN (213306, 213307, 213308, 213309, 213310, 213311, 213312, 213313);
+
+-- CreatureID 22954 (Illidari Fearbringer)
+UPDATE `creature` SET `equipment_id` = 1 WHERE `id1` = 22954 AND `guid` IN (148140, 148141, 148142, 148143);
+
+-- CreatureID 22955 (Charming Courtesan)
+UPDATE `creature` SET `equipment_id` = 1 WHERE `id1` = 22955 AND `guid` IN (148543, 148544, 148547, 148548, 148549, 148551, 148554, 148556, 148558, 148559, 148560, 148562, 148563, 148565, 148568, 148571, 148572, 148576, 148577, 148578, 148581, 148584, 148586, 148588, 148589, 148593, 148594, 148597, 148598, 148600, 148603, 148609, 148610, 148612, 148613, 148614, 148616, 148619, 148621, 148622, 148624, 148626, 148627, 148628, 148629, 148632, 148634, 148636, 148638, 148639, 148640, 148643, 148645, 148648, 148649, 148650, 148653, 148656, 148658, 148661, 148662, 148664, 148666, 148668, 148670, 148671, 148674, 148675);
+
+-- CreatureID 23008 (Ethereum Jailor)
+UPDATE `creature` SET `equipment_id` = 1 WHERE `id1` = 23008 AND `guid` IN (1975937, 1975938, 1975939, 1975940, 1975941, 1975942, 1975943, 1975944, 1975945, 1975946, 1975947, 1975948, 1975949, 1975950, 1975951, 1975952, 1975953, 1975954, 1975955, 1975956, 1975957);
+
+-- CreatureID 23023 (Scryer Reveler)
+UPDATE `creature` SET `equipment_id` = 1 WHERE `id1` = 23023 AND `guid` IN (420203, 420204, 420205, 420206, 420207, 420208, 420209, 420210, 420211, 420212);
+
+-- CreatureID 23024 (Aldor Reveler)
+UPDATE `creature` SET `equipment_id` = 1 WHERE `id1` = 23024 AND `guid` IN (420213, 420214, 420215, 420216, 420217, 420218, 420219, 420220);
+
+-- CreatureID 23039 (Draenei Reveler)
+UPDATE `creature` SET `equipment_id` = 1 WHERE `id1` = 23039 AND `guid` IN (420221, 420222, 420223, 420224, 420225, 420226, 420227, 420228, 420229, 420230, 420231, 420232, 420233, 420234, 420235, 420236, 420237, 420238, 420239);
+
+-- CreatureID 23045 (Blood Elf Reveler)
+UPDATE `creature` SET `equipment_id` = 1 WHERE `id1` = 23045 AND `guid` IN (420240, 420241, 420242, 420243, 420244, 420245, 420246, 420247, 420248, 420249, 420250, 420251, 420252, 420253, 420254, 420255, 420256);
+
+-- CreatureID 23146 (Dragonmaw Enforcer)
+UPDATE `creature` SET `equipment_id` = 1 WHERE `id1` = 23146 AND `guid` IN (52106, 52107, 52108, 52109, 52110, 52111, 52112, 52113, 52114, 52115, 52121, 52230, 52231, 143596, 143597, 143598);
+
+-- CreatureID 23196 (Bonechewer Behemoth)
+UPDATE `creature` SET `equipment_id` = 1 WHERE `id1` = 23196 AND `guid` IN (148360, 148361, 148362, 148363, 148364);
+
+-- CreatureID 23305 (Crazed Murkblood Foreman)
+UPDATE `creature` SET `equipment_id` = 1 WHERE `id1` = 23305 AND `guid` IN (143892, 143893);
+
+-- CreatureID 23311 (Disobedient Dragonmaw Peon)
+UPDATE `creature` SET `equipment_id` = 1 WHERE `id1` = 23311 AND `guid` IN (136178, 136179, 136180, 136181, 136182, 136183, 136184, 136185, 136186, 136187, 136188, 136189, 136190, 136191, 136192, 136193, 136194, 136195, 136196, 136197, 136198, 136199, 136200, 136201, 136202, 136203, 136204, 136205, 136206, 136207, 136208, 136209, 136210, 136211, 136212, 136213, 136214, 136215, 136216, 136217, 136218, 136219, 136220, 136221, 136222);
+
+-- CreatureID 23324 (Crazed Murkblood Miner)
+UPDATE `creature` SET `equipment_id` = 1 WHERE `id1` = 23324 AND `guid` IN (143882, 143883, 143884, 143885, 143886, 143887, 143888, 143889, 143890, 143891);
+
+-- CreatureID 23381 (Tydormu)
+UPDATE `creature` SET `equipment_id` = 1 WHERE `id1` = 23381 AND `guid` IN (139700);
+
+-- CreatureID 23437 (Indormi)
+UPDATE `creature` SET `equipment_id` = 1 WHERE `id1` = 23437 AND `guid` IN (139701);
+
+-- CreatureID 23718 (Mack)
+UPDATE `creature` SET `equipment_id` = 1 WHERE `id1` = 23718 AND `guid` IN (139273);
+
+-- CreatureID 23748 (Kurzel)
+UPDATE `creature` SET `equipment_id` = 1 WHERE `id1` = 23748 AND `guid` IN (139328);
+
+-- CreatureID 23872 (Coren Direbrew)
+UPDATE `creature` SET `equipment_id` = 1 WHERE `id1` = 23872 AND `guid` IN (240000);
+
+-- CreatureID 23982 (Forsaken Deckhand)
+UPDATE `creature` SET `equipment_id` = 1 WHERE `id1` = 23982 AND `guid` IN (88486, 88487, 88488, 88489, 88490, 88491, 88492, 88493, 88494, 88495, 88496, 88497, 88498, 88499, 88500, 88501, 88502, 88503, 88504, 88505, 88506, 88507, 88508, 88509, 88510, 88511, 88512, 88513, 88514, 88515, 88516, 88517, 88518, 88519, 88520, 88521, 88522, 88523, 88524, 88525, 88526, 88527, 88528, 88529, 88530, 88531, 88532, 88533, 88534, 88535, 88536, 88537, 88538);
+
+-- CreatureID 24239 (Hex Lord Malacrass)
+UPDATE `creature` SET `equipment_id` = 1 WHERE `id1` = 24239 AND `guid` IN (89357);
+
+-- CreatureID 24364 (Flynn Firebrew)
+UPDATE `creature` SET `equipment_id` = 1 WHERE `id1` = 24364 AND `guid` IN (240002);
+
+-- CreatureID 24527 (Bok Dropcertain)
+UPDATE `creature` SET `equipment_id` = 1 WHERE `id1` = 24527 AND `guid` IN (134677, 240001);
+
+-- CreatureID 24833 (Captain "Stash" Torgoley)
+UPDATE `creature` SET `equipment_id` = 1 WHERE `id1` = 24833 AND `guid` IN (52011);
+
+-- CreatureID 24834 (Galley Chief Grace)
+UPDATE `creature` SET `equipment_id` = 1 WHERE `id1` = 24834 AND `guid` IN (52012);
+
+-- CreatureID 24835 (First Mate Kowalski)
+UPDATE `creature` SET `equipment_id` = 1 WHERE `id1` = 24835 AND `guid` IN (52013);
+
+-- CreatureID 24838 (Sailor Henders)
+UPDATE `creature` SET `equipment_id` = 1 WHERE `id1` = 24838 AND `guid` IN (52016);
+
+-- CreatureID 24839 (Sailor Wicks)
+UPDATE `creature` SET `equipment_id` = 1 WHERE `id1` = 24839 AND `guid` IN (52017);
+
+-- CreatureID 24840 (Sailor Vines)
+UPDATE `creature` SET `equipment_id` = 1 WHERE `id1` = 24840 AND `guid` IN (52018);
+
+-- CreatureID 24841 (Marine Halters)
+UPDATE `creature` SET `equipment_id` = 1 WHERE `id1` = 24841 AND `guid` IN (52019);
+
+-- CreatureID 24842 (Marine Anderson)
+UPDATE `creature` SET `equipment_id` = 1 WHERE `id1` = 24842 AND `guid` IN (52020);
+
+-- CreatureID 24843 (Engineer Combs)
+UPDATE `creature` SET `equipment_id` = 1 WHERE `id1` = 24843 AND `guid` IN (52021);
+
+-- CreatureID 25239 (Thulrin)
+UPDATE `creature` SET `equipment_id` = 1 WHERE `id1` = 25239 AND `guid` IN (110115);
+
+-- CreatureID 25258 (Footman Rob)
+UPDATE `creature` SET `equipment_id` = 1 WHERE `id1` = 25258 AND `guid` IN (85221);
+
+-- CreatureID 25259 (Footman George)
+UPDATE `creature` SET `equipment_id` = 1 WHERE `id1` = 25259 AND `guid` IN (85222);
+
+-- CreatureID 25261 (Footman Chuck)
+UPDATE `creature` SET `equipment_id` = 1 WHERE `id1` = 25261 AND `guid` IN (85226);
+
+-- CreatureID 25338 (Warsong Caravan Guard)
+UPDATE `creature` SET `equipment_id` = 1 WHERE `id1` = 25338 AND `guid` IN (74539, 74540, 74541);
+
+-- CreatureID 26335 (Fallen Earthen Warrior)
+UPDATE `creature` SET `equipment_id` = 1 WHERE `id1` = 26335 AND `guid` IN (117222);
+
+-- CreatureID 26772 (Icemist Warrior)
+UPDATE `creature` SET `equipment_id` = 1 WHERE `id1` = 26772 AND `guid` IN (75010, 75011, 75012, 75013, 75014, 75015, 75016, 75017, 75018, 75019, 75020, 75021);
+
+-- CreatureID 28106 (Shaman Jakjek)
+UPDATE `creature` SET `equipment_id` = 1 WHERE `id1` = 28106 AND `guid` IN (1975898);
+
+-- CreatureID 28209 (Mizli Crankwheel)
+UPDATE `creature` SET `equipment_id` = 1 WHERE `id1` = 28209 AND `guid` IN (12564);
+
+-- CreatureID 28210 (Ognip Blastbolt)
+UPDATE `creature` SET `equipment_id` = 1 WHERE `id1` = 28210 AND `guid` IN (12565);
+
+-- CreatureID 28344 (Blazzle)
+UPDATE `creature` SET `equipment_id` = 1 WHERE `id1` = 28344 AND `guid` IN (116);
+
+-- CreatureID 28347 (Miles Sidney)
+UPDATE `creature` SET `equipment_id` = 1 WHERE `id1` = 28347 AND `guid` IN (45216);
+
+-- CreatureID 28355 (Wright Williams)
+UPDATE `creature` SET `equipment_id` = 1 WHERE `id1` = 28355 AND `guid` IN (45215);
+
+-- CreatureID 28495 (Gawanil)
+UPDATE `creature` SET `equipment_id` = 1 WHERE `id1` = 28495 AND `guid` IN (110277);
+
+-- CreatureID 28496 (Chulo the Mad)
+UPDATE `creature` SET `equipment_id` = 1 WHERE `id1` = 28496 AND `guid` IN (110278);
+
+-- CreatureID 28668 (Zepik the Gorloc Hunter)
+UPDATE `creature` SET `equipment_id` = 1 WHERE `id1` = 28668 AND `guid` IN (202970);
+
+-- CreatureID 29503 (Fjorn)
+UPDATE `creature` SET `equipment_id` = 1 WHERE `id1` = 29503 AND `guid` IN (88308);
+
+-- CreatureID 29519 (Unworthy Initiate)
+UPDATE `creature` SET `equipment_id` = 1 WHERE `id1` = 29519 AND `guid` IN (128557, 128558, 128559);
+
+-- CreatureID 29520 (Unworthy Initiate)
+UPDATE `creature` SET `equipment_id` = 1 WHERE `id1` = 29520 AND `guid` IN (128561, 128563);
+
+-- CreatureID 29565 (Unworthy Initiate)
+UPDATE `creature` SET `equipment_id` = 1 WHERE `id1` = 29565 AND `guid` IN (128740);
+
+-- CreatureID 29566 (Unworthy Initiate)
+UPDATE `creature` SET `equipment_id` = 1 WHERE `id1` = 29566 AND `guid` IN (128742, 128743, 128744);
+
+-- CreatureID 29567 (Unworthy Initiate)
+UPDATE `creature` SET `equipment_id` = 1 WHERE `id1` = 29567 AND `guid` IN (128747, 128748, 128749);
+
+-- CreatureID 29862 (Stormforged Monitor)
+UPDATE `creature` SET `equipment_id` = 1 WHERE `id1` = 29862 AND `guid` IN (1975936);
+
+-- CreatureID 30060 (Stormforged Warmonger)
+UPDATE `creature` SET `equipment_id` = 1 WHERE `id1` = 30060 AND `guid` IN (1976443, 1976444, 1976445, 1976446, 1976447, 1976448, 1976449, 1976450, 1976451, 1976452, 1976453, 1976454);
+
+-- CreatureID 30065 (Frostborn Axemaster)
+UPDATE `creature` SET `equipment_id` = 1 WHERE `id1` = 30065 AND `guid` IN (1976470, 1976471, 1976472, 1976473, 1976474, 1976475, 1976476, 1976477, 1976478, 1976479, 1976480, 1976481, 1976482, 1976483, 1976484, 1976485, 1976486, 1976487, 1976488, 1976489, 1976490, 1976491, 1976492);
+
+-- CreatureID 30099 (Njormeld)
+UPDATE `creature` SET `equipment_id` = 1 WHERE `id1` = 30099 AND `guid` IN (1975964);
+
+-- CreatureID 30121 (Frost Giant Stormherald)
+UPDATE `creature` SET `equipment_id` = 1 WHERE `id1` = 30121 AND `guid` IN (1975993, 1975994, 1975995);
+
+-- CreatureID 30182 (Yorg Stormheart)
+UPDATE `creature` SET `equipment_id` = 1 WHERE `id1` = 30182 AND `guid` IN (1976494);
+
+-- CreatureID 30188 (Argent Champion)
+UPDATE `creature` SET `equipment_id` = 1 WHERE `id1` = 30188 AND `guid` IN (1977144, 1977145, 1977146, 1977147, 1977148, 1977149, 1977150, 1977151, 1977152, 1977153, 1977154, 1977155, 1977156, 1977157, 1977158, 1977159, 1977160, 1977161, 1977162, 1977163, 1977164, 1977165, 1977166, 1977167, 1977168);
+
+-- CreatureID 30295 (Thorim)
+UPDATE `creature` SET `equipment_id` = 1 WHERE `id1` = 30295 AND `guid` IN (1955077);
+
+-- CreatureID 30382 (Brann Bronzebeard)
+UPDATE `creature` SET `equipment_id` = 1 WHERE `id1` = 30382 AND `guid` IN (1976495);
+
+-- CreatureID 30399 (Thorim)
+UPDATE `creature` SET `equipment_id` = 1 WHERE `id1` = 30399 AND `guid` IN (49141);
+
+-- CreatureID 30571 (Michael Belfast)
+UPDATE `creature` SET `equipment_id` = 1 WHERE `id1` = 30571 AND `guid` IN (1970932);
+
+-- CreatureID 31283 (Orbaz Bloodbane)
+UPDATE `creature` SET `equipment_id` = 1 WHERE `id1` = 31283 AND `guid` IN (129851);
+
+-- CreatureID 31306 (Margrave Dhakar)
+UPDATE `creature` SET `equipment_id` = 1 WHERE `id1` = 31306 AND `guid` IN (74957);
+
+-- CreatureID 31314 (Ebon Blade Veteran)
+UPDATE `creature` SET `equipment_id` = 1 WHERE `id1` = 31314 AND `guid` IN (74952, 74953, 74954, 74955);
+
+-- CreatureID 31316 (Ebon Blade Reaper)
+UPDATE `creature` SET `equipment_id` = 1 WHERE `id1` = 31316 AND `guid` IN (129852, 129853, 129859, 129860, 129862, 129863, 129865, 129866, 129867, 129868, 129869, 129870, 129871, 129872, 129873, 129874);
+
+-- CreatureID 31412 (Thrall)
+UPDATE `creature` SET `equipment_id` = 1 WHERE `id1` = 31412 AND `guid` IN (3108763);
+
+-- CreatureID 31420 (Karus)
+UPDATE `creature` SET `equipment_id` = 1 WHERE `id1` = 31420 AND `guid` IN (1976083);
+
+-- CreatureID 31421 (Koma)
+UPDATE `creature` SET `equipment_id` = 1 WHERE `id1` = 31421 AND `guid` IN (1976084);
+
+-- CreatureID 31422 (Soran)
+UPDATE `creature` SET `equipment_id` = 1 WHERE `id1` = 31422 AND `guid` IN (1976085);
+
+-- CreatureID 31423 (Kaja)
+UPDATE `creature` SET `equipment_id` = 1 WHERE `id1` = 31423 AND `guid` IN (1976086);
+
+-- CreatureID 31425 (Olvia)
+UPDATE `creature` SET `equipment_id` = 1 WHERE `id1` = 31425 AND `guid` IN (1976088);
+
+-- CreatureID 31426 (Doras)
+UPDATE `creature` SET `equipment_id` = 1 WHERE `id1` = 31426 AND `guid` IN (1976089);
+
+-- CreatureID 31427 (Felika)
+UPDATE `creature` SET `equipment_id` = 1 WHERE `id1` = 31427 AND `guid` IN (1976090);
+
+-- CreatureID 31428 (Crusader Olakin Sainrith)
+UPDATE `creature` SET `equipment_id` = 1 WHERE `id1` = 31428 AND `guid` IN (74958);
+
+-- CreatureID 31431 (Overlord Runthak)
+UPDATE `creature` SET `equipment_id` = 1 WHERE `id1` = 31431 AND `guid` IN (1976093);
+
+-- CreatureID 31440 (Sergeant Kregga)
+UPDATE `creature` SET `equipment_id` = 1 WHERE `id1` = 31440 AND `guid` IN (1975899);
+
+-- CreatureID 31649 (Vol'jin)
+UPDATE `creature` SET `equipment_id` = 1 WHERE `id1` = 31649 AND `guid` IN (3109787);
+
+-- CreatureID 31739 (Warsong Battleguard)
+UPDATE `creature` SET `equipment_id` = 1 WHERE `id1` = 31739 AND `guid` IN (3109792, 3109793, 3109794, 3109795);
+
+-- CreatureID 32239 (Highlord Tirion Fordring)
+UPDATE `creature` SET `equipment_id` = 2 WHERE `id1` = 32239 AND `guid` IN (74512);
+
+-- CreatureID 32241 (Disguised Crusader)
+UPDATE `creature` SET `equipment_id` = 1 WHERE `id1` = 32241 AND `guid` IN (74513, 74514, 74515);
+
+-- CreatureID 32365 (Lady Sylvanas Windrunner)
+UPDATE `creature` SET `equipment_id` = 1 WHERE `id1` = 32365 AND `guid` IN (3109786);
+
+-- CreatureID 32376 (Broll Bearmantle)
+UPDATE `creature` SET `equipment_id` = 1 WHERE `id1` = 32376 AND `guid` IN (3109766);
+
+-- CreatureID 32378 (Valeera Sanguinar)
+UPDATE `creature` SET `equipment_id` = 1 WHERE `id1` = 32378 AND `guid` IN (3109767);
+
+-- CreatureID 32387 (Stormwind Elite)
+UPDATE `creature` SET `equipment_id` = 1 WHERE `id1` = 32387 AND `guid` IN (3109768, 3109769, 3109770, 3109771, 3109772, 3109773);
+
+-- CreatureID 32401 (King Varian Wrynn)
+UPDATE `creature` SET `equipment_id` = 1 WHERE `id1` = 32401 AND `guid` IN (3109764);
+
+-- CreatureID 32402 (Lady Jaina Proudmoore)
+UPDATE `creature` SET `equipment_id` = 1 WHERE `id1` = 32402 AND `guid` IN (3109765);
+
+-- CreatureID 32518 (Thrall)
+UPDATE `creature` SET `equipment_id` = 1 WHERE `id1` = 32518 AND `guid` IN (3109785);
+
+-- CreatureID 34382 (Chapman)
+UPDATE `creature` SET `equipment_id` = 1 WHERE `id1` = 34382 AND `guid` IN (240228, 240229, 240251, 240252, 240253, 240254, 240255, 240256, 240257, 240258);
+
+-- CreatureID 34383 (Catrina)
+UPDATE `creature` SET `equipment_id` = 1 WHERE `id1` = 34383 AND `guid` IN (240226, 240227, 240259, 240260, 240261, 240262, 240263, 240264, 240265, 240266);
+
+-- CreatureID 34478 (Cheerful Dwarf Spirit)
+UPDATE `creature` SET `equipment_id` = 1 WHERE `id1` = 34478 AND `guid` IN (240293);
+
+-- CreatureID 34528 (Tahu Sagewind)
+UPDATE `creature` SET `equipment_id` = 1 WHERE `id1` = 34528 AND `guid` IN (37);
+
+-- CreatureID 34712 (Roberta Carter)
+UPDATE `creature` SET `equipment_id` = 1 WHERE `id1` = 34712 AND `guid` IN (240609);
+
+-- CreatureID 34713 (Ondani Greatmill)
+UPDATE `creature` SET `equipment_id` = 1 WHERE `id1` = 34713 AND `guid` IN (240534);
+
+-- CreatureID 34714 (Mahara Goldwheat)
+UPDATE `creature` SET `equipment_id` = 1 WHERE `id1` = 34714 AND `guid` IN (240577);
+
+-- CreatureID 34744 (Jasper Moore)
+UPDATE `creature` SET `equipment_id` = 1 WHERE `id1` = 34744 AND `guid` IN (240458);
+
+-- CreatureID 34768 (William Mullins)
+UPDATE `creature` SET `equipment_id` = 1 WHERE `id1` = 34768 AND `guid` IN (240610);
+
+-- CreatureID 34785 (Alnar Whitebough)
+UPDATE `creature` SET `equipment_id` = 1 WHERE `id1` = 34785 AND `guid` IN (240519);
+
+-- CreatureID 34786 (Alice Rigsdale)
+UPDATE `creature` SET `equipment_id` = 1 WHERE `id1` = 34786 AND `guid` IN (240642);
+
+-- CreatureID 36162 (Goblin Engineering Crew)
+UPDATE `creature` SET `equipment_id` = 1 WHERE `id1` = 36162 AND `guid` IN (74976, 74977);
+
+-- CreatureID 36164 (Kor'kron Reaver)
+UPDATE `creature` SET `equipment_id` = 1 WHERE `id1` = 36164 AND `guid` IN (74978, 74979, 74980, 74981, 74982, 74983, 74984, 74985, 74986, 74987);
+
+-- CreatureID 36165 (7th Legion Deckhand)
+UPDATE `creature` SET `equipment_id` = 1 WHERE `id1` = 36165 AND `guid` IN (74998, 74999);
+
+-- CreatureID 36166 (7th Legion Marine)
+UPDATE `creature` SET `equipment_id` = 1 WHERE `id1` = 36166 AND `guid` IN (74988, 74989, 74990, 74991, 74992, 74993, 74994, 74995, 74996, 74997);
+
+-- CreatureID 36217 (Overseer Kraggosh)
+UPDATE `creature` SET `equipment_id` = 1 WHERE `id1` = 36217 AND `guid` IN (79263);
+
+-- CreatureID 36296 (Apothecary Hummel)
+UPDATE `creature` SET `equipment_id` = 1 WHERE `id1` = 36296 AND `guid` IN (146623);
+
+-- CreatureID 36888 (Rescued Alliance Slave)
+UPDATE `creature` SET `equipment_id` = 1 WHERE `id1` = 36888 AND `guid` IN (202285, 202286, 202287, 202288);
+
+-- CreatureID 36889 (Rescued Horde Slave)
+UPDATE `creature` SET `equipment_id` = 1 WHERE `id1` = 36889 AND `guid` IN (202279, 202280, 202283, 202284);
+
+-- CreatureID 36970 (Skybreaker Deckhand)
+UPDATE `creature` SET `equipment_id` = 1 WHERE `id1` = 36970 AND `guid` IN (133978, 133979, 133980, 133981, 133982, 133983, 133984, 133985);
+
+-- CreatureID 36971 (Orgrim's Hammer Crew)
+UPDATE `creature` SET `equipment_id` = 1 WHERE `id1` = 36971 AND `guid` IN (133964, 133965, 133966, 133967, 133968, 133969, 133970, 133971, 133975);
+
+-- CreatureID 37182 (High Captain Justin Bartlett)
+UPDATE `creature` SET `equipment_id` = 1 WHERE `id1` = 37182 AND `guid` IN (133977);
+
+-- CreatureID 37184 (Zafod Boombox)
+UPDATE `creature` SET `equipment_id` = 1 WHERE `id1` = 37184 AND `guid` IN (133957, 133976);
+
+-- CreatureID 37214 (Crown Lackey)
+UPDATE `creature` SET `equipment_id` = 1 WHERE `id1` = 37214 AND `guid` IN (12461, 12462, 12463, 12464, 12465, 12466, 244581, 244582, 244583, 244584, 244585, 244586, 244587, 244588, 244589, 244590);
+
+-- CreatureID 37226 (The Lich King)
+UPDATE `creature` SET `equipment_id` = 1 WHERE `id1` = 37226 AND `guid` IN (1971982);
+
+-- CreatureID 37523 (Warden of the Sunwell)
+UPDATE `creature` SET `equipment_id` = 1 WHERE `id1` = 37523 AND `guid` IN (1976590, 1976591);
+
+-- CreatureID 37527 (Halduron Brightwing)
+UPDATE `creature` SET `equipment_id` = 1 WHERE `id1` = 37527 AND `guid` IN (43498);
+
+-- CreatureID 37715 (Snivel Rustrocket)
+UPDATE `creature` SET `equipment_id` = 1 WHERE `id1` = 37715 AND `guid` IN (244629, 244630);
+
+-- CreatureID 37763 (Grand Magister Rommath)
+UPDATE `creature` SET `equipment_id` = 1 WHERE `id1` = 37763 AND `guid` IN (1976652);
+
+-- CreatureID 37765 (Captain Auric Sunchaser)
+UPDATE `creature` SET `equipment_id` = 1 WHERE `id1` = 37765 AND `guid` IN (1976655);
+
+-- CreatureID 37833 (Sky-Reaver Korm Blackscar)
+UPDATE `creature` SET `equipment_id` = 1 WHERE `id1` = 37833 AND `guid` IN (133958);
+
+-- CreatureID 37917 (Crown Thug)
+UPDATE `creature` SET `equipment_id` = 1 WHERE `id1` = 37917 AND `guid` IN (12483, 12484, 12485, 12486, 12487, 12488, 12489, 12490, 12491, 12492, 12493, 12494, 244567, 244568, 244569, 244570, 244591, 244592, 244593, 244594, 244595);
+
+-- CreatureID 37984 (Crown Duster)
+UPDATE `creature` SET `equipment_id` = 1 WHERE `id1` = 37984 AND `guid` IN (12468, 12469, 12470, 12471, 12472, 244621, 244622, 244623, 244624, 244625);
+
+-- CreatureID 38006 (Crown Hoodlum)
+UPDATE `creature` SET `equipment_id` = 1 WHERE `id1` = 38006 AND `guid` IN (12473, 12474, 12475, 12476, 12477, 244616, 244617, 244618, 244619, 244620);
+
+-- CreatureID 38023 (Crown Sprinkler)
+UPDATE `creature` SET `equipment_id` = 1 WHERE `id1` = 38023 AND `guid` IN (12500, 12501, 12502, 12503, 12504, 244596, 244597, 244598, 244599, 244600);
+
+-- CreatureID 38030 (Crown Underling)
+UPDATE `creature` SET `equipment_id` = 1 WHERE `id1` = 38030 AND `guid` IN (12505, 12506, 12507, 12508, 12509, 12510, 12511, 244601, 244602, 244603, 244604, 244605);
+
+-- CreatureID 38032 (Crown Sprayer)
+UPDATE `creature` SET `equipment_id` = 1 WHERE `id1` = 38032 AND `guid` IN (12512, 12513, 12514, 12515, 12516, 12517, 12518, 12519, 12520, 12521, 12522, 244532, 244533, 244534, 244535, 244536, 244537, 244538, 244539, 244540, 244541, 244542, 244543, 244544);
+
+-- CreatureID 38065 (Crown Supply Sentry)
+UPDATE `creature` SET `equipment_id` = 1 WHERE `id1` = 38065 AND `guid` IN (244631, 244632, 244633);
+
+-- CreatureID 40446 (Skar'this the Summoner)
+UPDATE `creature` SET `equipment_id` = 1 WHERE `id1` = 40446 AND `guid` IN (12549);
diff --git a/data/sql/updates/db_world/2025_11_27_02.sql b/data/sql/updates/db_world/2025_11_27_02.sql
new file mode 100644
index 0000000000..2c804e5607
--- /dev/null
+++ b/data/sql/updates/db_world/2025_11_27_02.sql
@@ -0,0 +1,12 @@
+-- DB update 2025_11_27_01 -> 2025_11_27_02
+-- Fix Plagued Proto-Drake Egg not despawning after being frozen
+-- https://github.com/azerothcore/azerothcore-wotlk/issues/23851
+-- Quests: Aberrations (12925), The Aberrations Must Die (13425)
+
+-- Set SmartGameObjectAI for Plagued Proto-Drake Egg
+UPDATE `gameobject_template` SET `AIName` = 'SmartGameObjectAI' WHERE `entry` = 191840;
+
+-- Add SmartAI script: On spell hit by Vial of Frost Oil (55647), despawn immediately
+DELETE FROM `smart_scripts` WHERE `entryorguid` = 191840 AND `source_type` = 1;
+INSERT INTO `smart_scripts` (`entryorguid`, `source_type`, `id`, `link`, `event_type`, `event_phase_mask`, `event_chance`, `event_flags`, `event_param1`, `event_param2`, `event_param3`, `event_param4`, `event_param5`, `event_param6`, `action_type`, `action_param1`, `action_param2`, `action_param3`, `action_param4`, `action_param5`, `action_param6`, `target_type`, `target_param1`, `target_param2`, `target_param3`, `target_param4`, `target_x`, `target_y`, `target_z`, `target_o`, `comment`) VALUES
+(191840, 1, 0, 0, 8, 0, 100, 0, 55647, 0, 0, 0, 0, 0, 41, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Plagued Proto-Drake Egg - On Spell Hit (Vial of Frost Oil) - Despawn');
diff --git a/data/sql/updates/db_world/2025_11_27_03.sql b/data/sql/updates/db_world/2025_11_27_03.sql
new file mode 100644
index 0000000000..586c44e30b
--- /dev/null
+++ b/data/sql/updates/db_world/2025_11_27_03.sql
@@ -0,0 +1,3 @@
+-- DB update 2025_11_27_02 -> 2025_11_27_03
+-- Sets all Everfrost Gameobjects to be able to seen in phase 1, 2, 4, 8 and 12
+UPDATE `gameobject` SET `phaseMask` = 15 WHERE `id` = 193997;
diff --git a/data/sql/updates/db_world/2025_11_27_04.sql b/data/sql/updates/db_world/2025_11_27_04.sql
new file mode 100644
index 0000000000..7ddce6ecb8
--- /dev/null
+++ b/data/sql/updates/db_world/2025_11_27_04.sql
@@ -0,0 +1,2 @@
+-- DB update 2025_11_27_03 -> 2025_11_27_04
+DELETE FROM `gameobject` WHERE `guid` = 21197;
diff --git a/data/sql/updates/db_world/2025_11_27_05.sql b/data/sql/updates/db_world/2025_11_27_05.sql
new file mode 100644
index 0000000000..8d58407d74
--- /dev/null
+++ b/data/sql/updates/db_world/2025_11_27_05.sql
@@ -0,0 +1,16 @@
+-- DB update 2025_11_27_04 -> 2025_11_27_05
+
+-- Updated SAI & comments
+UPDATE `creature_template` SET `AIName` = 'SmartAI' WHERE `entry` = 27587;
+
+DELETE FROM `smart_scripts` WHERE (`source_type` = 0 AND `entryorguid` = 27587);
+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
+(27587, 0, 0, 0, 38, 0, 100, 512, 0, 1, 0, 0, 0, 0, 11, 49122, 0, 0, 0, 0, 0, 23, 0, 0, 0, 0, 0, 0, 0, 0, 'Alliance Steam Tank - On Data Set 0 1 - Cast \'Plague Wagon Credit\''),
+(27587, 0, 1, 0, 25, 0, 100, 512, 0, 0, 0, 0, 0, 0, 8, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Alliance Steam Tank - On Reset - Set Reactstate Passive'),
+(27587, 0, 2, 0, 1, 0, 100, 512, 30000, 30000, 50000, 50000, 0, 0, 1, 1, 0, 0, 0, 0, 0, 19, 27588, 10, 0, 0, 0, 0, 0, 0, 'Alliance Steam Tank - Out of Combat - Say Line 1'),
+(27587, 0, 3, 0, 8, 0, 100, 512, 49081, 0, 0, 0, 0, 0, 80, 2758700, 2, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Alliance Steam Tank - On Spellhit \'Drop Off Soldier\' - Run Script'),
+(27587, 0, 4, 0, 25, 0, 100, 512, 0, 0, 0, 0, 0, 0, 59, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Alliance Steam Tank - On Reset - Set Run On'),
+(27587, 0, 5, 6, 28, 0, 100, 0, 0, 0, 0, 0, 0, 0, 41, 6000, 0, 0, 0, 0, 0, 29, 1, 0, 0, 0, 0, 0, 0, 0, 'Alliance Steam Tank - On Passenger Removed - Despawn In 6000 ms'),
+(27587, 0, 6, 7, 61, 0, 100, 0, 0, 0, 0, 0, 0, 0, 41, 6000, 0, 0, 0, 0, 0, 29, 2, 0, 0, 0, 0, 0, 0, 0, 'Alliance Steam Tank - On Passenger Removed - Despawn In 6000 ms'),
+(27587, 0, 7, 8, 61, 0, 100, 0, 0, 0, 0, 0, 0, 0, 41, 6000, 0, 0, 0, 0, 0, 29, 3, 0, 0, 0, 0, 0, 0, 0, 'Alliance Steam Tank - On Passenger Removed - Despawn In 6000 ms'),
+(27587, 0, 8, 0, 61, 0, 100, 0, 0, 0, 0, 0, 0, 0, 41, 6000, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Alliance Steam Tank - On Passenger Removed - Despawn In 6000 ms');
diff --git a/data/sql/updates/db_world/2025_11_27_06.sql b/data/sql/updates/db_world/2025_11_27_06.sql
new file mode 100644
index 0000000000..e9726779a6
--- /dev/null
+++ b/data/sql/updates/db_world/2025_11_27_06.sql
@@ -0,0 +1,167 @@
+-- DB update 2025_11_27_05 -> 2025_11_27_06
+--
+DELETE FROM `smart_scripts` WHERE (`source_type` = 0 AND `entryorguid` = 27719);
+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
+(27719, 0, 0, 0, 19, 0, 100, 0, 12427, 0, 0, 0, 0, 0, 80, 2771900, 2, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Grennix Shivwiggle - On Quest \'The Conquest Pit: Bear Wrestling!\' Taken - Run Script'),
+(27719, 0, 1, 0, 19, 0, 100, 0, 12428, 0, 0, 0, 0, 0, 80, 2771910, 2, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Grennix Shivwiggle - On Quest \'The Conquest Pit: Mad Furbolg Fighting\' Taken - Run Script'),
+(27719, 0, 2, 0, 19, 0, 100, 0, 12429, 0, 0, 0, 0, 0, 80, 2771920, 2, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Grennix Shivwiggle - On Quest \'The Conquest Pit: Blood and Metal\' Taken - Run Script'),
+(27719, 0, 3, 0, 19, 0, 100, 0, 12430, 0, 0, 0, 0, 0, 80, 2771930, 2, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Grennix Shivwiggle - On Quest \'The Conquest Pit: Death Is Likely\' Taken - Run Script'),
+(27719, 0, 4, 0, 19, 0, 100, 0, 12431, 0, 0, 0, 0, 0, 80, 2771940, 2, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Grennix Shivwiggle - On Quest \'The Conquest Pit: Final Showdown\' Taken - Run Script'),
+(27719, 0, 5, 0, 38, 0, 100, 0, 0, 1, 0, 0, 0, 0, 80, 2771901, 2, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Grennix Shivwiggle - On Data Set 0 1 - Run Script'),
+(27719, 0, 6, 0, 38, 0, 100, 0, 0, 2, 0, 0, 0, 0, 80, 2771902, 2, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Grennix Shivwiggle - On Data Set 0 2 - Run Script'),
+(27719, 0, 7, 0, 38, 0, 100, 0, 1, 1, 0, 0, 0, 0, 80, 2771911, 2, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Grennix Shivwiggle - On Data Set 1 1 - Run Script'),
+(27719, 0, 8, 0, 38, 0, 100, 0, 1, 2, 0, 0, 0, 0, 80, 2771912, 2, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Grennix Shivwiggle - On Data Set 1 2 - Run Script'),
+(27719, 0, 9, 0, 38, 0, 100, 0, 2, 1, 0, 0, 0, 0, 80, 2771921, 2, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Grennix Shivwiggle - On Data Set 2 1 - Run Script'),
+(27719, 0, 10, 0, 38, 0, 100, 0, 2, 2, 0, 0, 0, 0, 80, 2771922, 2, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Grennix Shivwiggle - On Data Set 2 2 - Run Script'),
+(27719, 0, 11, 0, 38, 0, 100, 0, 3, 1, 0, 0, 0, 0, 80, 2771931, 2, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Grennix Shivwiggle - On Data Set 3 1 - Run Script'),
+(27719, 0, 12, 0, 38, 0, 100, 0, 3, 2, 0, 0, 0, 0, 80, 2771932, 2, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Grennix Shivwiggle - On Data Set 3 2 - Run Script'),
+(27719, 0, 13, 0, 38, 0, 100, 0, 4, 1, 0, 0, 0, 0, 80, 2771941, 2, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Grennix Shivwiggle - On Data Set 4 1 - Run Script'),
+(27719, 0, 14, 0, 38, 0, 100, 0, 4, 2, 0, 0, 0, 0, 80, 2771942, 2, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Grennix Shivwiggle - On Data Set 4 2 - Run Script');
+
+-- Quest start actionlists
+DELETE FROM `smart_scripts` WHERE (`source_type` = 9 AND `entryorguid` IN (2771900, 2771910, 2771920, 2771930, 2771940));
+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
+(2771900, 9, 0, 0, 0, 0, 100, 0, 0, 0, 0, 0, 0, 0, 64, 1, 0, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 0, 'Gurgthock - Actionlist - Store Targetlist'),
+(2771900, 9, 1, 0, 0, 0, 100, 0, 0, 0, 0, 0, 0, 0, 64, 2, 0, 0, 0, 0, 0, 16, 0, 0, 0, 0, 0, 0, 0, 0, 'Gurgthock - Actionlist - Store Targetlist'),
+(2771900, 9, 2, 0, 0, 0, 100, 0, 0, 0, 0, 0, 0, 0, 83, 2, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Gurgthock - Actionlist - Remove Npc Flags Questgiver'),
+(2771900, 9, 3, 0, 0, 0, 100, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 1, 0, 0, 0, 12, 1, 0, 0, 0, 0, 0, 0, 0, 'Gurgthock - Actionlist - Say Line 0'),
+(2771900, 9, 5, 0, 0, 0, 100, 0, 0, 0, 0, 0, 0, 0, 12, 27715, 6, 5000, 0, 0, 0, 8, 0, 0, 0, 0, 3242.77, -2340.98, 92.34, 0.98, 'Gurgthock - Actionlist - Summon Creature \'Ironhide\''),
+(2771910, 9, 0, 0, 0, 0, 100, 0, 0, 0, 0, 0, 0, 0, 64, 1, 0, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 0, 'Gurgthock - Actionlist - Store Targetlist'),
+(2771910, 9, 1, 0, 0, 0, 100, 0, 0, 0, 0, 0, 0, 0, 64, 2, 0, 0, 0, 0, 0, 16, 0, 0, 0, 0, 0, 0, 0, 0, 'Gurgthock - Actionlist - Store Targetlist'),
+(2771910, 9, 2, 0, 0, 0, 100, 0, 0, 0, 0, 0, 0, 0, 83, 2, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Gurgthock - Actionlist - Remove Npc Flags Questgiver'),
+(2771910, 9, 3, 0, 0, 0, 100, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 1, 0, 0, 0, 12, 1, 0, 0, 0, 0, 0, 0, 0, 'Grennix Shivwiggle - Actionlist - Say Line 1'),
+(2771910, 9, 5, 0, 0, 0, 100, 0, 0, 0, 0, 0, 0, 0, 12, 27716, 6, 5000, 0, 0, 0, 8, 0, 0, 0, 0, 3242.77, -2340.98, 92.34, 0.98, 'Grennix Shivwiggle - Actionlist - Summon Creature \'Torgg Thundertotem\''),
+(2771920, 9, 0, 0, 0, 0, 100, 0, 0, 0, 0, 0, 0, 0, 64, 1, 0, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 0, 'Grennix Shivwiggle - Actionlist - Store Targetlist'),
+(2771920, 9, 1, 0, 0, 0, 100, 0, 0, 0, 0, 0, 0, 0, 64, 2, 0, 0, 0, 0, 0, 16, 0, 0, 0, 0, 0, 0, 0, 0, 'Grennix Shivwiggle - Actionlist - Store Targetlist'),
+(2771920, 9, 2, 0, 0, 0, 100, 0, 0, 0, 0, 0, 0, 0, 83, 2, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Grennix Shivwiggle - Actionlist - Remove Npc Flags Questgiver'),
+(2771920, 9, 3, 0, 0, 0, 100, 0, 0, 0, 0, 0, 0, 0, 1, 2, 0, 1, 0, 0, 0, 12, 1, 0, 0, 0, 0, 0, 0, 0, 'Grennix Shivwiggle - Actionlist - Say Line 2'),
+(2771920, 9, 4, 0, 0, 0, 100, 0, 7000, 7000, 0, 0, 0, 0, 1, 3, 0, 1, 0, 0, 0, 12, 1, 0, 0, 0, 0, 0, 0, 0, 'Grennix Shivwiggle - Actionlist - Say Line 3'),
+(2771920, 9, 5, 0, 0, 0, 100, 0, 0, 0, 0, 0, 0, 0, 12, 27717, 6, 5000, 0, 0, 0, 8, 0, 0, 0, 0, 3242.77, -2340.98, 92.34, 0.98, 'Grennix Shivwiggle - Actionlist - Summon Creature \'Rustblood\''),
+(2771930, 9, 0, 0, 0, 0, 100, 0, 0, 0, 0, 0, 0, 0, 64, 1, 0, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 0, 'Grennix Shivwiggle - Actionlist - Store Targetlist'),
+(2771930, 9, 1, 0, 0, 0, 100, 0, 0, 0, 0, 0, 0, 0, 64, 2, 0, 0, 0, 0, 0, 16, 0, 0, 0, 0, 0, 0, 0, 0, 'Grennix Shivwiggle - Actionlist - Store Targetlist'),
+(2771930, 9, 2, 0, 0, 0, 100, 0, 0, 0, 0, 0, 0, 0, 83, 2, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Grennix Shivwiggle - Actionlist - Remove Npc Flags Questgiver'),
+(2771930, 9, 3, 0, 0, 0, 100, 0, 0, 0, 0, 0, 0, 0, 1, 4, 0, 1, 0, 0, 0, 12, 4, 0, 0, 0, 0, 0, 0, 0, 'Grennix Shivwiggle - Actionlist - Say Line 4'),
+(2771930, 9, 4, 0, 0, 0, 100, 0, 7000, 7000, 0, 0, 0, 0, 1, 5, 0, 1, 0, 0, 0, 12, 1, 0, 0, 0, 0, 0, 0, 0, 'Grennix Shivwiggle - Actionlist - Say Line 5'),
+(2771930, 9, 5, 0, 0, 0, 100, 0, 10000, 10000, 0, 0, 0, 0, 1, 6, 0, 1, 0, 0, 0, 12, 1, 0, 0, 0, 0, 0, 0, 0, 'Grennix Shivwiggle - Actionlist - Say Line 6'),
+(2771930, 9, 6, 0, 0, 0, 100, 0, 0, 0, 0, 0, 0, 0, 12, 27718, 6, 5000, 0, 0, 0, 8, 0, 0, 0, 0, 3242.77, -2340.98, 92.34, 0.98, 'Grennix Shivwiggle - Actionlist - Summon Creature \'Horgrenn Hellcleave\''),
+(2771940, 9, 0, 0, 0, 0, 100, 0, 0, 0, 0, 0, 0, 0, 64, 1, 0, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 0, 'Grennix Shivwiggle - Actionlist - Store Targetlist'),
+(2771940, 9, 1, 0, 0, 0, 100, 0, 0, 0, 0, 0, 0, 0, 64, 2, 0, 0, 0, 0, 0, 16, 0, 0, 0, 0, 0, 0, 0, 0, 'Grennix Shivwiggle - Actionlist - Store Targetlist'),
+(2771940, 9, 2, 0, 0, 0, 100, 0, 0, 0, 0, 0, 0, 0, 83, 2, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Grennix Shivwiggle - Actionlist - Remove Npc Flags Questgiver'),
+(2771940, 9, 3, 0, 0, 0, 100, 0, 0, 0, 0, 0, 0, 0, 1, 7, 0, 1, 0, 0, 0, 12, 1, 0, 0, 0, 0, 0, 0, 0, 'Grennix Shivwiggle - Actionlist - Say Line 7'),
+(2771940, 9, 4, 0, 0, 0, 100, 0, 0, 0, 0, 0, 0, 0, 12, 27727, 6, 5000, 0, 0, 0, 8, 0, 0, 0, 0, 3251.91, -2340.61, 91.86, 3.1, 'Grennix Shivwiggle - Actionlist - Summon Creature \'Conqueror Krenna\'');
+
+-- Quest success and fail actionlists
+DELETE FROM `smart_scripts` WHERE (`entryorguid` IN (2771901, 2771902, 2771911, 2771912, 2771921, 2771922, 2771931, 2771932, 2771941, 2771942)) AND (`source_type` = 9);
+INSERT INTO `smart_scripts` (`entryorguid`, `source_type`, `id`, `link`, `event_type`, `event_phase_mask`, `event_chance`, `event_flags`, `event_param1`, `event_param2`, `event_param3`, `event_param4`, `event_param5`, `event_param6`, `action_type`, `action_param1`, `action_param2`, `action_param3`, `action_param4`, `action_param5`, `action_param6`, `target_type`, `target_param1`, `target_param2`, `target_param3`, `target_param4`, `target_x`, `target_y`, `target_z`, `target_o`, `comment`) VALUES
+(2771901, 9, 0, 0, 0, 0, 100, 0, 0, 0, 0, 0, 0, 0, 82, 2, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Grennix Shivwiggle - Actionlist - Add Npc Flags Questgiver'),
+(2771901, 9, 1, 0, 0, 0, 100, 0, 0, 0, 0, 0, 0, 0, 15, 12427, 0, 0, 0, 0, 0, 12, 2, 0, 0, 0, 0, 0, 0, 0, 'Grennix Shivwiggle - Actionlist - Quest Credit \'The Conquest Pit: Bear Wrestling!\''),
+(2771902, 9, 0, 0, 0, 0, 100, 0, 0, 0, 0, 0, 0, 0, 82, 2, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Grennix Shivwiggle - Actionlist - Add Npc Flags Questgiver'),
+(2771902, 9, 1, 0, 0, 0, 100, 0, 0, 0, 0, 0, 0, 0, 6, 12427, 0, 0, 0, 0, 0, 12, 2, 0, 0, 0, 0, 0, 0, 0, 'Grennix Shivwiggle - Actionlist - Fail Quest \'The Conquest Pit: Bear Wrestling!\''),
+(2771911, 9, 0, 0, 0, 0, 100, 0, 0, 0, 0, 0, 0, 0, 82, 2, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Grennix Shivwiggle - Actionlist - Add Npc Flags Questgiver'),
+(2771911, 9, 1, 0, 0, 0, 100, 0, 0, 0, 0, 0, 0, 0, 15, 12428, 0, 0, 0, 0, 0, 12, 2, 0, 0, 0, 0, 0, 0, 0, 'Grennix Shivwiggle - Actionlist - Quest Credit \'The Conquest Pit: Mad Furbolg Fighting!\''),
+(2771912, 9, 0, 0, 0, 0, 100, 0, 0, 0, 0, 0, 0, 0, 82, 2, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Grennix Shivwiggle - Actionlist - Add Npc Flags Questgiver'),
+(2771912, 9, 1, 0, 0, 0, 100, 0, 0, 0, 0, 0, 0, 0, 6, 12428, 0, 0, 0, 0, 0, 12, 2, 0, 0, 0, 0, 0, 0, 0, 'Grennix Shivwiggle - Actionlist - Fail Quest \'The Conquest Pit: Mad Furbolg Fighting!\''),
+(2771921, 9, 0, 0, 0, 0, 100, 0, 0, 0, 0, 0, 0, 0, 82, 2, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Grennix Shivwiggle - Actionlist - Add Npc Flags Questgiver'),
+(2771921, 9, 1, 0, 0, 0, 100, 0, 0, 0, 0, 0, 0, 0, 15, 12429, 0, 0, 0, 0, 0, 12, 2, 0, 0, 0, 0, 0, 0, 0, 'Grennix Shivwiggle - Actionlist - Quest Credit \'The Conquest Pit: Blood and Metal!\''),
+(2771922, 9, 0, 0, 0, 0, 100, 0, 0, 0, 0, 0, 0, 0, 82, 2, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Grennix Shivwiggle - Actionlist - Add Npc Flags Questgiver'),
+(2771922, 9, 1, 0, 0, 0, 100, 0, 0, 0, 0, 0, 0, 0, 6, 12429, 0, 0, 0, 0, 0, 12, 2, 0, 0, 0, 0, 0, 0, 0, 'Grennix Shivwiggle - Actionlist - Fail Quest \'The Conquest Pit: Blood and Metal!\''),
+(2771931, 9, 0, 0, 0, 0, 100, 0, 0, 0, 0, 0, 0, 0, 82, 2, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Grennix Shivwiggle - Actionlist - Add Npc Flags Questgiver'),
+(2771931, 9, 1, 0, 0, 0, 100, 0, 0, 0, 0, 0, 0, 0, 15, 12430, 0, 0, 0, 0, 0, 12, 2, 0, 0, 0, 0, 0, 0, 0, 'Grennix Shivwiggle - Actionlist - Quest Credit \'The Conquest Pit: Blood and Metal!\''),
+(2771932, 9, 0, 0, 0, 0, 100, 0, 0, 0, 0, 0, 0, 0, 82, 2, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Grennix Shivwiggle - Actionlist - Add Npc Flags Questgiver'),
+(2771932, 9, 1, 0, 0, 0, 100, 0, 0, 0, 0, 0, 0, 0, 6, 12430, 0, 0, 0, 0, 0, 12, 2, 0, 0, 0, 0, 0, 0, 0, 'Grennix Shivwiggle - Actionlist - Fail Quest \'The Conquest Pit: Blood and Metal!\''),
+(2771941, 9, 0, 0, 0, 0, 100, 0, 0, 0, 0, 0, 0, 0, 15, 12431, 0, 0, 0, 0, 0, 12, 2, 0, 0, 0, 0, 0, 0, 0, 'Grennix Shivwiggle - Actionlist - Quest Credit \'The Conquest Pit: Final Showdown!\''),
+(2771941, 9, 1, 0, 0, 0, 100, 0, 15000, 15000, 0, 0, 0, 0, 82, 2, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Grennix Shivwiggle - Actionlist - Add Npc Flags Questgiver'),
+(2771942, 9, 0, 0, 0, 0, 100, 0, 0, 0, 0, 0, 0, 0, 82, 2, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Grennix Shivwiggle - Actionlist - Add Npc Flags Questgiver'),
+(2771942, 9, 1, 0, 0, 0, 100, 0, 0, 0, 0, 0, 0, 0, 6, 12431, 0, 0, 0, 0, 0, 12, 2, 0, 0, 0, 0, 0, 0, 0, 'Grennix Shivwiggle - Actionlist - Fail Quest \'The Conquest Pit: Final Showdown!\'');
+
+DELETE FROM `smart_scripts` WHERE (`source_type` = 0 AND `entryorguid` IN (27715, 27716, 27717, 27718, 27727));
+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
+(27715, 0, 0, 0, 6, 0, 100, 0, 0, 0, 0, 0, 0, 0, 45, 0, 1, 0, 0, 0, 0, 10, 102451, 27719, 0, 0, 0, 0, 0, 0, 'Ironhide - On Just Died - Set Data 0 1 on Grennix'),
+(27715, 0, 1, 2, 1, 0, 100, 1, 30000, 30000, 0, 0, 0, 0, 45, 0, 2, 0, 0, 0, 0, 10, 102451, 27719, 0, 0, 0, 0, 0, 0, 'Ironhide - Out of Combat - Set Data 0 2 on Grennix (No Repeat)'),
+(27715, 0, 2, 0, 61, 0, 100, 0, 0, 0, 0, 0, 0, 0, 41, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Ironhide - Out of Combat - Despawn Instant (No Repeat)'),
+(27715, 0, 3, 0, 9, 0, 100, 0, 0, 0, 17000, 24000, 8, 25, 11, 32323, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 'Ironhide - Within 8-25 Range - Cast \'Charge\''),
+(27715, 0, 4, 0, 0, 0, 100, 0, 5000, 7000, 7000, 9000, 0, 0, 11, 34298, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 'Ironhide - In Combat - Cast \'Maul\''),
+(27715, 0, 5, 0, 9, 0, 100, 0, 0, 0, 7000, 11000, 0, 5, 11, 31279, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 'Ironhide - Within 0-5 Range - Cast \'Swipe\''),
+(27716, 0, 0, 0, 6, 0, 100, 0, 0, 0, 0, 0, 0, 0, 45, 1, 1, 0, 0, 0, 0, 10, 102451, 27719, 0, 0, 0, 0, 0, 0, 'Torgg Thundertotem - On Just Died - Set Data 1 1 on Grennix'),
+(27716, 0, 1, 2, 1, 0, 100, 1, 30000, 30000, 0, 0, 0, 0, 45, 1, 2, 0, 0, 0, 0, 10, 102451, 27719, 0, 0, 0, 0, 0, 0, 'Torgg Thundertotem - Out of Combat - Set Data 1 2 on Grennix (No Repeat)'),
+(27716, 0, 2, 0, 61, 0, 100, 0, 0, 0, 0, 0, 0, 0, 41, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Torgg Thundertotem - Out of Combat - Despawn Instant (No Repeat)'),
+(27716, 0, 3, 0, 0, 0, 100, 0, 1000, 3000, 6000, 8000, 0, 0, 11, 16033, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 'Torgg Thundertotem - In Combat - Cast \'Chain Lightning\''),
+(27716, 0, 4, 0, 2, 0, 100, 0, 0, 30, 15000, 25000, 0, 0, 11, 15982, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Torgg Thundertotem - Between 0-30% Health - Cast \'Healing Wave\''),
+(27716, 0, 5, 0, 0, 0, 100, 0, 0, 0, 21000, 21000, 0, 0, 11, 31991, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Torgg Thundertotem - In Combat - Cast \'Corrupted Nova Totem\''),
+(27716, 0, 6, 0, 0, 0, 100, 0, 4000, 4000, 12000, 12000, 0, 0, 11, 15501, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 'Torgg Thundertotem - In Combat - Cast \'Earth Shock\''),
+(27717, 0, 0, 0, 6, 0, 100, 0, 0, 0, 0, 0, 0, 0, 45, 2, 1, 0, 0, 0, 0, 10, 102451, 27719, 0, 0, 0, 0, 0, 0, 'Rustblood - On Just Died - Set Data 2 1 on Grennix'),
+(27717, 0, 1, 2, 1, 0, 100, 1, 30000, 30000, 0, 0, 0, 0, 45, 2, 2, 0, 0, 0, 0, 10, 102451, 27719, 0, 0, 0, 0, 0, 0, 'Rustblood - Out of Combat - Set Data 2 2 on Grennix (No Repeat)'),
+(27717, 0, 2, 0, 61, 0, 100, 0, 0, 0, 0, 0, 0, 0, 41, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Rustblood - Out of Combat - Despawn Instant (No Repeat)'),
+(27717, 0, 3, 0, 0, 0, 100, 0, 5000, 7000, 5000, 7000, 0, 0, 11, 42746, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 'Rustblood - In Combat - Cast \'Cleave\''),
+(27717, 0, 4, 0, 9, 0, 100, 0, 0, 0, 22000, 30000, 0, 5, 11, 49398, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 'Rustblood - Within 0-5 Range - Cast \'Knockback\''),
+(27717, 0, 5, 0, 0, 0, 100, 0, 12000, 15000, 18000, 21000, 0, 0, 11, 14102, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 'Rustblood - In Combat - Cast \'Head Smash\''),
+(27717, 0, 6, 0, 0, 0, 100, 0, 0, 3000, 12000, 12000, 0, 0, 11, 61893, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 'Rustblood - In Combat - Cast \'Lightning Bolt\''),
+(27718, 0, 0, 0, 6, 0, 100, 0, 0, 0, 0, 0, 0, 0, 45, 3, 1, 0, 0, 0, 0, 10, 102451, 27719, 0, 0, 0, 0, 0, 0, 'Horgrenn Hellcleave - On Just Died - Set Data 3 1 on Grennix'),
+(27718, 0, 1, 2, 1, 0, 100, 1, 30000, 30000, 0, 0, 0, 0, 45, 3, 2, 0, 0, 0, 0, 10, 102451, 27719, 0, 0, 0, 0, 0, 0, 'Horgrenn Hellcleave - Out of Combat - Set Data 3 2 on Grennix (No Repeat)'),
+(27718, 0, 2, 0, 61, 0, 100, 0, 0, 0, 0, 0, 0, 0, 41, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Horgrenn Hellcleave - Out of Combat - Despawn Instant (No Repeat)'),
+(27718, 0, 3, 0, 9, 1, 100, 0, 0, 0, 21000, 29000, 0, 10, 11, 16508, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 'Horgrenn Hellcleave - Within 0-10 Range - Cast \'Intimidating Roar\' (Phase 1)'),
+(27718, 0, 4, 0, 0, 1, 100, 0, 3000, 6000, 8000, 12000, 0, 0, 11, 15572, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 'Horgrenn Hellcleave - In Combat - Cast \'Sunder Armor\' (Phase 1)'),
+(27718, 0, 5, 0, 0, 1, 100, 0, 9000, 12000, 12000, 16000, 0, 0, 11, 39171, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 'Horgrenn Hellcleave - In Combat - Cast \'Mortal Strike\' (Phase 1)'),
+(27718, 0, 6, 0, 0, 1, 100, 0, 13000, 15000, 13000, 18000, 0, 0, 11, 38618, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 'Horgrenn Hellcleave - In Combat - Cast \'Whirlwind\' (Phase 1)'),
+(27718, 0, 7, 0, 37, 0, 100, 0, 0, 0, 0, 0, 0, 0, 80, 2771800, 2, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Horgrenn Hellcleave - On Initialize - Run Script'),
+(27727, 0, 0, 9, 6, 0, 100, 0, 0, 0, 0, 0, 0, 0, 45, 4, 1, 0, 0, 0, 0, 10, 102451, 27719, 0, 0, 0, 0, 0, 0, 'Conqueror Krenna - On Just Died - Set Data 4 1 on Grennix'),
+(27727, 0, 1, 2, 1, 0, 100, 1, 60000, 60000, 0, 0, 0, 0, 45, 4, 2, 0, 0, 0, 0, 10, 102451, 27719, 0, 0, 0, 0, 0, 0, 'Conqueror Krenna - Out of Combat - Set Data 4 2 on Grennix (No Repeat)'),
+(27727, 0, 2, 10, 61, 0, 100, 0, 0, 0, 0, 0, 0, 0, 41, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Conqueror Krenna - Out of Combat - Despawn Instant (No Repeat)'),
+(27727, 0, 3, 0, 9, 1, 100, 0, 0, 0, 7000, 9000, 0, 5, 11, 15284, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 'Conqueror Krenna - Within 0-5 Range - Cast \'Cleave\' (Phase 1)'),
+(27727, 0, 4, 0, 0, 1, 100, 0, 9000, 12000, 12000, 17000, 0, 0, 11, 11430, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 'Conqueror Krenna - In Combat - Cast \'Slam\' (Phase 1)'),
+(27727, 0, 5, 0, 105, 1, 100, 0, 14000, 17000, 14000, 17000, 0, 5, 11, 12555, 0, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 0, 'Conqueror Krenna - On Hostile Casting in Range - Cast \'Pummel\' (Phase 1)'),
+(27727, 0, 6, 0, 13, 1, 100, 0, 3000, 6000, 6000, 0, 0, 0, 11, 34719, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 'Conqueror Krenna - On Victim Casting \'Open Wound\' - Cast \'Fixate\' (Phase 1)'),
+(27727, 0, 7, 0, 37, 0, 100, 0, 0, 0, 0, 0, 0, 0, 80, 2772700, 2, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Conqueror Krenna - On Initialize - Run Script'),
+(27727, 0, 8, 0, 52, 0, 100, 0, 2, 27726, 0, 0, 0, 0, 80, 2772701, 2, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Conqueror Krenna - On Text 2 Over - Run Script'),
+(27727, 0, 9, 0, 61, 0, 100, 0, 0, 0, 0, 0, 0, 0, 45, 1, 1, 0, 0, 0, 0, 204, 27726, 0, 0, 0, 0, 0, 0, 0, 'Conqueror Krenna - On Just Died - Set Data 1 1'),
+(27727, 0, 10, 0, 61, 0, 100, 0, 0, 0, 0, 0, 0, 0, 45, 1, 2, 0, 0, 0, 0, 204, 27726, 0, 0, 0, 0, 0, 0, 0, 'Conqueror Krenna - Out of Combat - Set Data 1 2 (No Repeat)');
+
+DELETE FROM `smart_scripts` WHERE (`source_type` = 9 AND `entryorguid` = 2771800);
+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
+(2771800, 9, 0, 0, 0, 0, 100, 0, 0, 0, 0, 0, 0, 0, 18, 256, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Horgrenn Hellcleave - Actionlist - Set Flags Immune To Players'),
+(2771800, 9, 1, 0, 0, 0, 100, 0, 3000, 3000, 0, 0, 0, 0, 11, 48350, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Horgrenn Hellcleave - Actionlist - Cast \'Emote Roar\''),
+(2771800, 9, 2, 0, 0, 0, 100, 0, 7000, 7000, 0, 0, 0, 0, 19, 256, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Horgrenn Hellcleave - Actionlist - Remove Flags Immune To Players'),
+(2771800, 9, 3, 0, 0, 0, 100, 0, 0, 0, 0, 0, 0, 0, 22, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Horgrenn Hellcleave - Actionlist - Set Event Phase 1');
+
+DELETE FROM `smart_scripts` WHERE (`source_type` = 9 AND `entryorguid` = 2772700);
+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
+(2772700, 9, 0, 0, 0, 0, 100, 0, 0, 0, 0, 0, 0, 0, 12, 27726, 3, 300000, 0, 0, 0, 8, 0, 0, 0, 0, 3244.5, -2340.56, 92.14, 6.27, 'Conqueror Krenna - Actionlist - Summon Creature \'Gorgonna\''),
+(2772700, 9, 1, 0, 0, 0, 100, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Conqueror Krenna - Actionlist - Say Line 0'),
+(2772700, 9, 2, 0, 0, 0, 100, 0, 18000, 18000, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Conqueror Krenna - Actionlist - Say Line 1'),
+(2772700, 9, 3, 0, 0, 0, 100, 0, 18000, 18000, 0, 0, 0, 0, 2, 4, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Conqueror Krenna - Actionlist - Set Faction 4'),
+(2772700, 9, 4, 0, 0, 0, 100, 0, 0, 0, 0, 0, 0, 0, 22, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Conqueror Krenna - Actionlist - Set Event Phase 1'),
+(2772700, 9, 5, 0, 0, 0, 100, 0, 0, 0, 0, 0, 0, 0, 49, 0, 0, 0, 0, 0, 0, 11, 27726, 40, 1, 0, 0, 0, 0, 0, 'Conqueror Krenna - Actionlist - Start Attacking');
+
+DELETE FROM `smart_scripts` WHERE (`source_type` = 0 AND `entryorguid` = 27726);
+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
+(27726, 0, 0, 0, 37, 0, 100, 0, 0, 0, 0, 0, 0, 0, 80, 2772600, 2, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Gorgonna - On Initialize - Run Script'),
+(27726, 0, 1, 0, 38, 0, 100, 0, 1, 1, 0, 0, 0, 0, 80, 2772601, 2, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Gorgonna - On Data Set 1 1 - Run Script'),
+(27726, 0, 2, 0, 38, 0, 100, 0, 1, 2, 0, 0, 0, 0, 41, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Gorgonna - On Data Set 1 2 - Despawn Instant');
+
+DELETE FROM `smart_scripts` WHERE (`source_type` = 9 AND `entryorguid` IN (2772600, 2772601));
+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
+(2772600, 9, 0, 0, 0, 0, 100, 0, 0, 0, 0, 0, 0, 0, 83, 2, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Gorgonna - Actionlist - Remove Npc Flags Questgiver'),
+(2772600, 9, 1, 0, 0, 0, 100, 0, 0, 0, 0, 0, 0, 0, 117, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Gorgonna - Actionlist - Disable Evade'),
+(2772600, 9, 2, 0, 0, 0, 100, 0, 6000, 6000, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Gorgonna - Actionlist - Say Line 0'),
+(2772600, 9, 3, 0, 0, 0, 100, 0, 6000, 6000, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Gorgonna - Actionlist - Say Line 1'),
+(2772600, 9, 4, 0, 0, 0, 100, 0, 18000, 18000, 0, 0, 0, 0, 1, 2, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Gorgonna - Actionlist - Say Line 2'),
+(2772601, 9, 0, 0, 0, 0, 100, 0, 0, 0, 0, 0, 0, 0, 81, 2, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Gorgonna - Actionlist - Set Npc Flags Questgiver'),
+(2772601, 9, 1, 0, 0, 0, 100, 0, 0, 0, 0, 0, 0, 0, 90, 8, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Gorgonna - Actionlist - Set Flag Standstate Kneel'),
+(2772601, 9, 2, 0, 0, 0, 100, 0, 0, 0, 0, 0, 0, 0, 41, 30000, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Gorgonna - Actionlist - Despawn In 25000 ms'),
+(2772601, 9, 3, 0, 0, 0, 100, 0, 5000, 5000, 0, 0, 0, 0, 1, 3, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Gorgonna - Actionlist - Say Line 2');
+
+DELETE FROM `creature_text` WHERE (`CreatureID` = 27719);
+INSERT INTO `creature_text` (`CreatureID`, `GroupID`, `ID`, `Text`, `Type`, `Language`, `Probability`, `Emote`, `Duration`, `Sound`, `BroadcastTextId`, `TextRange`, `comment`) VALUES
+(27719, 0, 0, 'Ladies and gentlemen, gather round the Conquest Pit! Witness the battle of $r versus bear and place your bets with confidence!', 14, 0, 100, 0, 0, 0, 27017, 0, 'Grennix Shivwiggle - Quest Accepted'),
+(27719, 1, 0, 'Just when you think you\'ve seen it all! $n will square off with an authentic Grizzly Hills crazed furbolg in front of your very eyes here at the Conquest Pit! Place your bets, folks!', 14, 0, 100, 0, 0, 0, 27018, 0, 'Grennix Shivwiggle - Quest Accepted'),
+(27719, 2, 0, 'Gather round, folks! Grab a warm drink and find a good seat for you\'re about to witness a showdown between $r and machine!', 14, 0, 100, 0, 0, 0, 27019, 0, 'Grennix Shivwiggle - Quest Accepted'),
+(27719, 3, 0, 'Straight out of Thor Modan and made of 100 percent authentic... metal... here is Rustblood, the lightning-powered iron golem!', 14, 0, 100, 0, 0, 0, 27020, 0, 'Grennix Shivwiggle - Spawn'),
+(27719, 4, 0, 'Ladies and gentlemen... gather round the pit!', 14, 0, 100, 0, 0, 0, 27014, 0, 'Grennix Shivwiggle - Quest Accepted'),
+(27719, 5, 0, 'In one corner we have... $n, truly a world class $c. Slayer of reptiles, mammals, mechanical constructs and the odd dragon...kin. You\'ve never seen another $r like $g him : her;.', 14, 0, 100, 0, 0, 0, 27015, 0, 'Grennix Shivwiggle - Spawn'),
+(27719, 6, 0, 'In the other corner, a serial killer, mass defenestrator, sentenced to death multiple times by noose and by blunt instrument! Horgrenn... Hellcleave! Ladies and gentlemen... place your bets!', 14, 0, 100, 0, 0, 0, 27016, 0, 'Grennix Shivwiggle - Spawn'),
+(27719, 7, 0, 'Ladies and gentlemen! Well... let\'s just say you don\'t want to miss this one!', 14, 0, 100, 0, 0, 0, 27032, 0, 'Grennix Shivwiggle - Quest Accepted');
+
+UPDATE `creature_template` SET `npcflag` = `npcflag` | 2 WHERE (`entry` = 27726);
+DELETE FROM `creature_questender` WHERE (`id` = 27726 AND `quest` = 12431);
+INSERT INTO `creature_questender` (`id`, `quest`) VALUES
+(27726, 12431);
diff --git a/data/sql/updates/db_world/2025_11_27_07.sql b/data/sql/updates/db_world/2025_11_27_07.sql
new file mode 100644
index 0000000000..850402fd3d
--- /dev/null
+++ b/data/sql/updates/db_world/2025_11_27_07.sql
@@ -0,0 +1,3 @@
+-- DB update 2025_11_27_06 -> 2025_11_27_07
+-- Following the same rule as the herbs, ores and fishing for the everfrost to be visible by all possible, they all use phase 255.
+UPDATE `gameobject` SET `phaseMask` = 255 WHERE `id` = 193997;
diff --git a/data/sql/updates/db_world/2025_11_27_08.sql b/data/sql/updates/db_world/2025_11_27_08.sql
new file mode 100644
index 0000000000..d982851c81
--- /dev/null
+++ b/data/sql/updates/db_world/2025_11_27_08.sql
@@ -0,0 +1,11 @@
+-- DB update 2025_11_27_07 -> 2025_11_27_08
+
+-- Set respawn time to 120 secs.
+UPDATE `creature` SET `spawntimesecs` = 120 WHERE `id1` = 31306 AND `guid` = 74974;
+
+-- Add row Set Invincibility to 1% (Margrave Dhakar)
+UPDATE `creature_template` SET `AIName` = 'SmartAI' WHERE `entry` = 31306;
+
+DELETE FROM `smart_scripts` WHERE (`entryorguid` = 31306) AND (`source_type` = 0) AND (`id` IN (10));
+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
+(31306, 0, 10, 0, 25, 0, 100, 0, 0, 0, 0, 0, 0, 0, 42, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Margrave Dhakar - On Reset - Set Invincibility Hp 1%');
diff --git a/data/sql/updates/db_world/2025_11_27_09.sql b/data/sql/updates/db_world/2025_11_27_09.sql
new file mode 100644
index 0000000000..304d392aed
--- /dev/null
+++ b/data/sql/updates/db_world/2025_11_27_09.sql
@@ -0,0 +1,36 @@
+-- DB update 2025_11_27_08 -> 2025_11_27_09
+-- Update SAI Comments (Image of Megalith)
+UPDATE `creature_template` SET `AIName` = 'SmartAI' WHERE `entry` = 24381;
+
+DELETE FROM `smart_scripts` WHERE (`source_type` = 0 AND `entryorguid` = 24381);
+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
+(24381, 0, 0, 0, 54, 0, 100, 512, 0, 0, 0, 0, 0, 0, 80, 2438100, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Image of Megalith - On Just Summoned - Run Script');
+
+-- Update Action List (Image of Megalith)
+DELETE FROM `smart_scripts` WHERE (`source_type` = 9 AND `entryorguid` = 2438100);
+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
+(2438100, 9, 0, 0, 0, 0, 100, 0, 0, 0, 0, 0, 0, 0, 12, 24385, 7, 0, 0, 0, 0, 8, 0, 0, 0, 0, 2410.14, -5727.26, 270.986, 4.28769, 'Image of Megalith - Actionlist - Summon Creature \'Image of Stone Giant\''),
+(2438100, 9, 1, 0, 0, 0, 100, 0, 0, 0, 0, 0, 0, 0, 12, 24385, 7, 0, 0, 0, 0, 8, 0, 0, 0, 0, 2414.86, -5729.5, 272.095, 3.98296, 'Image of Megalith - Actionlist - Summon Creature \'Image of Stone Giant\''),
+(2438100, 9, 2, 0, 0, 0, 100, 0, 0, 0, 0, 0, 0, 0, 12, 24385, 7, 0, 0, 0, 0, 8, 0, 0, 0, 0, 2417.34, -5733.23, 273.029, 3.60361, 'Image of Megalith - Actionlist - Summon Creature \'Image of Stone Giant\''),
+(2438100, 9, 3, 0, 0, 0, 100, 0, 0, 0, 0, 0, 0, 0, 12, 24385, 7, 0, 0, 0, 0, 8, 0, 0, 0, 0, 2419.4, -5738.03, 274.121, 3.24154, 'Image of Megalith - Actionlist - Summon Creature \'Image of Stone Giant\''),
+(2438100, 9, 4, 0, 0, 0, 100, 0, 4000, 4000, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Image of Megalith - Actionlist - Say Line 0'),
+(2438100, 9, 5, 0, 0, 0, 100, 0, 4000, 4000, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Image of Megalith - Actionlist - Say Line 1'),
+(2438100, 9, 6, 0, 0, 0, 100, 0, 5000, 5000, 0, 0, 0, 0, 1, 2, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Image of Megalith - Actionlist - Say Line 2'),
+(2438100, 9, 7, 0, 0, 0, 100, 0, 2000, 2000, 0, 0, 0, 0, 223, 45, 0, 0, 0, 0, 0, 204, 24385, 0, 0, 0, 0, 0, 0, 0, 'Image of Megalith - Actionlist - Do Action ID 45'), -- Action Changed with do action / target summoned creatures
+(2438100, 9, 8, 0, 0, 0, 100, 0, 0, 0, 0, 0, 0, 0, 11, 43693, 0, 0, 0, 0, 0, 21, 40, 0, 0, 0, 0, 0, 0, 0, 'Image of Megalith - Actionlist - Cast \'Image of Megalith Kill Credit\''),
+(2438100, 9, 9, 0, 0, 0, 100, 0, 3000, 3000, 0, 0, 0, 0, 1, 3, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Image of Megalith - Actionlist - Say Line 3'),
+(2438100, 9, 10, 0, 0, 0, 100, 0, 3000, 3000, 0, 0, 0, 0, 41, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Image of Megalith - Actionlist - Despawn Instant');
+
+-- Add SAI (Image of Stone Giant)
+UPDATE `creature_template` SET `AIName` = 'SmartAI' WHERE `entry` = 24385;
+
+DELETE FROM `smart_scripts` WHERE (`source_type` = 0 AND `entryorguid` = 24385);
+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
+(24385, 0, 0, 0, 72, 0, 100, 0, 45, 0, 0, 0, 0, 0, 80, 2438500, 2, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Image of Stone Giant - On Action 45 Done - Run Script'); -- Added this event.
+
+-- Update Action List comments (Image of Stone Giant)
+DELETE FROM `smart_scripts` WHERE (`source_type` = 9 AND `entryorguid` = 2438500);
+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
+(2438500, 9, 0, 0, 0, 0, 100, 0, 0, 0, 0, 0, 0, 0, 59, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Image of Stone Giant - Actionlist - Set Run Off'),
+(2438500, 9, 1, 0, 0, 0, 100, 0, 0, 0, 0, 0, 0, 0, 69, 0, 0, 0, 0, 0, 0, 8, 0, 0, 0, 0, 2515.45, -5670.36, 298.778, 0.618311, 'Image of Stone Giant - Actionlist - Move To Position'),
+(2438500, 9, 2, 0, 0, 0, 100, 0, 7000, 7000, 0, 0, 0, 0, 41, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Image of Stone Giant - Actionlist - Despawn Instant');
diff --git a/data/sql/updates/db_world/2025_11_27_10.sql b/data/sql/updates/db_world/2025_11_27_10.sql
new file mode 100644
index 0000000000..c92d1157e1
--- /dev/null
+++ b/data/sql/updates/db_world/2025_11_27_10.sql
@@ -0,0 +1,8 @@
+-- DB update 2025_11_27_09 -> 2025_11_27_10
+-- Sets all Herbs spawn time to be 15 minutes (as they are currently not pooled).
+-- Goldclover, Tiger Lily, Talandra's Rose, Lichbloom, Icethorn, Frozen Herb (190173, 190174 and 190175), Adder's Tongue and Frost Lotus (currently can be farmed in an instance for free.)
+UPDATE `gameobject` SET `spawntimesecs` = 900 WHERE `id` IN (189973, 190169, 190170, 190171, 190172, 190173, 190174, 190175, 191019, 190176) AND `SpawnMask` != 3;
+
+-- Sets all Ore Veins spawn time to be 15 minutes (as they are currently not pooled).
+-- Colbat Deposit, Rich Cobalt Deposit, Sranoite Depoist, Rich Saronite Deposit, Titatinum Vein and Pure Sarotine Depoist
+UPDATE `gameobject` SET `spawntimesecs` = 900 WHERE `id` IN (189980, 189981, 189978, 189979, 191133, 195036) AND `SpawnMask` != 3;
diff --git a/data/sql/updates/db_world/2025_11_28_00.sql b/data/sql/updates/db_world/2025_11_28_00.sql
new file mode 100644
index 0000000000..f06028a208
--- /dev/null
+++ b/data/sql/updates/db_world/2025_11_28_00.sql
@@ -0,0 +1,3 @@
+-- DB update 2025_11_27_10 -> 2025_11_28_00
+--
+UPDATE `creature_template_addon` SET `bytes2` = 3, `auras` = '49132 55795 61204' WHERE `entry` = 27530;
diff --git a/data/sql/updates/db_world/2025_11_28_01.sql b/data/sql/updates/db_world/2025_11_28_01.sql
new file mode 100644
index 0000000000..78b491e609
--- /dev/null
+++ b/data/sql/updates/db_world/2025_11_28_01.sql
@@ -0,0 +1,7 @@
+-- DB update 2025_11_28_00 -> 2025_11_28_01
+--
+-- Modify Target 9 - CREATURE_RANGE (can have multiple targets) to Target 19 - CLOSEST_CREATURE
+DELETE FROM `smart_scripts` WHERE (`entryorguid` = 18649100) AND (`source_type` = 9) AND (`id` IN (0, 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
+(18649100, 9, 0, 0, 0, 0, 100, 0, 0, 0, 0, 0, 0, 0, 45, 1, 1, 0, 0, 0, 0, 19, 24035, 10, 0, 0, 0, 0, 0, 0, 'Gjalerbron Cage - Script - Set Data'),
+(18649100, 9, 2, 0, 0, 0, 100, 0, 0, 0, 0, 0, 0, 0, 100, 1, 0, 0, 0, 0, 0, 19, 24035, 10, 0, 0, 0, 0, 0, 0, 'Gjalerbron Cage - Script - Send Targetlist');
diff --git a/data/sql/updates/db_world/2025_11_28_02.sql b/data/sql/updates/db_world/2025_11_28_02.sql
new file mode 100644
index 0000000000..c12a7a004d
--- /dev/null
+++ b/data/sql/updates/db_world/2025_11_28_02.sql
@@ -0,0 +1,9 @@
+-- DB update 2025_11_28_01 -> 2025_11_28_02
+-- update loot of Deep Sea Monsterbelly School (192053)
+-- Crystallized Water, Deep Sea Monsterbelly, Reinforced Crate
+UPDATE `gameobject_loot_template` SET `GroupId` = 1 WHERE (`Entry` = 25671) AND (`Item` IN (37705, 41800, 44475));
+-- Crystallized Water, Reinforced Crate
+UPDATE `gameobject_loot_template` SET `Chance` = 0 WHERE (`Entry` = 25671) AND (`Item` IN (37705, 44475));
+
+-- Pygmy Suckerfish, Sea Turtle, Blacktip Shark
+UPDATE `gameobject_loot_template` SET `GroupId` = 2 WHERE (`Entry` = 25671) AND (`Item` IN (40199, 46109, 50289));
diff --git a/data/sql/updates/db_world/2025_11_28_03.sql b/data/sql/updates/db_world/2025_11_28_03.sql
new file mode 100644
index 0000000000..a4e2628337
--- /dev/null
+++ b/data/sql/updates/db_world/2025_11_28_03.sql
@@ -0,0 +1,8 @@
+-- DB update 2025_11_28_02 -> 2025_11_28_03
+--
+DELETE FROM `smart_scripts` WHERE (`entryorguid` = 18636) AND (`source_type` = 0) AND (`id` IN (1, 2, 3, 4));
+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
+(18636, 0, 1, 0, 10, 0, 100, 1, 0, 8, 4000, 8000, 0, 0, 11, 30986, 0, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 0, 'Cabal Assassin - Out of Combat LoS - Cast \'Cheap Shot\''),
+(18636, 0, 2, 0, 67, 0, 100, 0, 5000, 7000, 4500, 6500, 0, 5, 11, 30992, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 'Cabal Assassin - On Behind Target - Cast \'Backstab\''),
+(18636, 0, 3, 0, 0, 0, 100, 0, 2000, 4500, 12000, 20000, 0, 0, 11, 30981, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 'Cabal Assassin - In Combat - Cast \'Crippling Poison\''),
+(18636, 0, 4, 0, 0, 0, 100, 0, 8000, 11000, 22000, 25000, 0, 0, 11, 36974, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 'Cabal Assassin - In Combat - Cast \'Wound Poison\'');
diff --git a/data/sql/updates/db_world/2025_11_28_04.sql b/data/sql/updates/db_world/2025_11_28_04.sql
new file mode 100644
index 0000000000..2436adc342
--- /dev/null
+++ b/data/sql/updates/db_world/2025_11_28_04.sql
@@ -0,0 +1,15 @@
+-- DB update 2025_11_28_03 -> 2025_11_28_04
+
+-- Morbidus send a set data to Dhakar on death.
+UPDATE `creature_template` SET `AIName` = 'SmartAI' WHERE `entry` = 30698;
+
+DELETE FROM `smart_scripts` WHERE (`entryorguid` = 30698) AND (`source_type` = 0) AND (`id` IN (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
+(30698, 0, 2, 0, 6, 0, 100, 0, 0, 0, 0, 0, 0, 0, 45, 1, 2, 0, 0, 0, 0, 10, 74974, 31306, 0, 0, 0, 0, 0, 0, 'Morbidus - On Just Died - Set Data 1 2');
+
+-- Margrave Dhakar gives credit to stored target on data set.
+UPDATE `creature_template` SET `AIName` = 'SmartAI' WHERE `entry` = 31306;
+
+DELETE FROM `smart_scripts` WHERE (`entryorguid` = 31306) AND (`source_type` = 0) AND (`id` IN (11));
+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
+(31306, 0, 11, 0, 38, 0, 100, 0, 1, 2, 0, 0, 0, 0, 33, 30698, 0, 0, 0, 0, 0, 12, 1, 0, 0, 0, 0, 0, 0, 0, 'Margrave Dhakar - On Data Set 1 2 - Quest Credit \'Morbidus\'');
diff --git a/data/sql/updates/db_world/2025_11_28_05.sql b/data/sql/updates/db_world/2025_11_28_05.sql
new file mode 100644
index 0000000000..91b2340831
--- /dev/null
+++ b/data/sql/updates/db_world/2025_11_28_05.sql
@@ -0,0 +1,214 @@
+-- DB update 2025_11_28_04 -> 2025_11_28_05
+ALTER TABLE `spell_group` DROP `special_flag`;
+ALTER TABLE `spell_group` MODIFY COLUMN `spell_id` int;
+
+-- import from trinitycore
+DELETE FROM `spell_group`;
+INSERT INTO `spell_group` (`id`,`spell_id`) VALUES
+(1, 2367), (1, 2374), (1, 3160), (1, 3164), (1, 7844), (1, 8212), (1, 10667), (1, 10669), (1, 11328), (1, 11334), (1, 11390), (1, 11405), (1, 11406), (1, 11474), (1, 16322), (1, 16323), (1, 16329), (1, 17038), (1, 17537), (1, 17538), (1, 17539), (1, 17626), (1, 17627), (1, 17628), (1, 17629), (1, 21920), (1, 26276), (1, 28486), (1, 28488), (1, 28490), (1, 28491), (1, 28493), (1, 28497), (1, 28501), (1, 28503), (1, 28518), (1, 28519), (1, 28520), (1, 28521), (1, 28540), (1, 33720), (1, 33721), (1, 33726), (1, 38954), (1, 40567), (1, 40568), (1, 40572), (1, 40573), (1, 40575), (1, 40576), (1, 41608), (1, 41609), (1, 41610), (1, 41611), (1, 42735), (1, 45373), (1, 46837), (1, 46839), (1, 53746), (1, 53748), (1, 53749), (1, 53752), (1, 53755), (1, 53758), (1, 53760), (1, 54212), (1, 54452), (1, 54494), (1, 60340), (1, 60341), (1, 60344), (1, 60345), (1, 60346), (1, 62380), (1, 63729), (1, 67016), (1, 67017), (1, 67018),
+(2, 673), (2, 2378), (2, 2380), (2, 3166), (2, 3219), (2, 3220), (2, 3222), (2, 3223), (2, 3593), (2, 10668), (2, 10692), (2, 10693), (2, 11319), (2, 11348), (2, 11349), (2, 11371), (2, 11396), (2, 15231), (2, 15233), (2, 16321), (2, 16325), (2, 16326), (2, 16327), (2, 17535), (2, 17626), (2, 17627), (2, 17628), (2, 17629), (2, 24361), (2, 24363), (2, 24382), (2, 24383), (2, 24417), (2, 27652), (2, 27653), (2, 28502), (2, 28509), (2, 28514), (2, 28518), (2, 28519), (2, 28520), (2, 28521), (2, 28540), (2, 29348), (2, 39625), (2, 39626), (2, 39627), (2, 39628), (2, 40567), (2, 40568), (2, 40572), (2, 40573), (2, 40575), (2, 40576), (2, 41608), (2, 41609), (2, 41610), (2, 41611), (2, 42735), (2, 46837), (2, 46839), (2, 53747), (2, 53751), (2, 53752), (2, 53755), (2, 53758), (2, 53760), (2, 53763), (2, 53764), (2, 54212), (2, 60343), (2, 60347), (2, 62380), (2, 67016), (2, 67017), (2, 67018),
+(1001, 18125), (1001, 18141), (1001, 19705), (1001, 19706), (1001, 19708), (1001, 19709), (1001, 19710), (1001, 19711), (1001, 20875), (1001, 23697), (1001, 24799), (1001, 24870), (1001, 25037), (1001, 25694), (1001, 25722), (1001, 25804), (1001, 25941), (1001, 33254), (1001, 33256), (1001, 33257), (1001, 33259), (1001, 33261), (1001, 33263), (1001, 33265), (1001, 33268), (1001, 33272), (1001, 35272), (1001, 40323), (1001, 42293), (1001, 43722), (1001, 43764), (1001, 43771), (1001, 44097), (1001, 44098), (1001, 44099), (1001, 44100), (1001, 44101), (1001, 44102), (1001, 44104), (1001, 44105), (1001, 44106), (1001, 45245), (1001, 45619), (1001, 45694), (1001, 46682), (1001, 46687), (1001, 46899), (1001, 53284), (1001, 57079), (1001, 57097), (1001, 57100), (1001, 57102), (1001, 57107), (1001, 57111), (1001, 57139), (1001, 57286), (1001, 57288), (1001, 57291), (1001, 57294), (1001, 57325), (1001, 57327), (1001, 57329), (1001, 57332), (1001, 57334), (1001, 57356), (1001, 57358), (1001, 57360), (1001, 57363), (1001, 57365), (1001, 57367), (1001, 57371), (1001, 57373), (1001, 57399), (1001, 58468), (1001, 58479), (1001, 59230), (1001, 62349), (1001, 64057), (1001, 65247), (1001, 65365), (1001, 65410), (1001, 65412), (1001, 65414), (1001, 65415), (1001, 65416), (1001, 66623), (1001, 66624), (1001, 69559),
+(1002, 19740), (1002, 25782), (1002, 56520), -- Blessing of Might
+(1003, 6673), -- Battle Shout
+(1004, -1003), (1004, -1002), -- Flap AP Buffs
+(1005, 19742), (1005, 25894), (1005, 56521), -- Blessing of Wisdom
+(1006, 20217), (1006, 25898), (1006, 43223), (1006, 56525), (1006, 58054), (1006, 72586), -- All Stats Percentage
+(1007, 20911), (1007, 25899), -- Blessing of Sanctuary
+(1008, 23415), (1008, 41450), -- Blessing of Protection
+(1009, 32770), -- Blessing of Light
+(1010, -1009), (1010, -1008), (1010, -1007), (1010, -1006), (1010, -1005), (1010, -1002), -- Blessings
+(1011, -1091), (1011, -1003), -- Warrior Shouts
+(1012, 55749), -- Acid Spit
+(1013, 8647), -- Expose Armor
+(1014, 58567), -- Sunder Armor
+(1015, -1014), (1015, -1013), (1015, -1012), -- Major Armor Debuffs
+(1016, 770), (1016, 16857), -- Faerie Fire
+(1017, 56626), -- Sting
+(1019, -1063), (1019, -1017), (1019, -1016), -- Minor Armor Debuffs
+(1020, 55610), -- Icy Talons
+(1021, 8515), -- Windfury Totem
+(1022, -1021), (1022, -1020), -- Melee Haste Buffs
+(1023, 24932), -- Leader of the Pack
+(1024, 29801), -- Rampage
+(1025, -1024), (1025, -1023), -- Physical Crit Buffs
+(1026, 53137), -- Abomination's Might
+(1027, 19506), -- Trueshot Aura
+(1028, 30802), -- Unleashed Rage
+(1029, -1028), (1029, -1027), (1029, -1026), -- Percentage AP Buffs
+(1030, 33878), -- Mangle (Bear)
+(1031, 33876), -- Mangle (Cat)
+(1032, 46856), -- Trauma
+(1033, -1032), (1033, -1031), (1033, -1030), -- Bleed Debuffs
+(1034, 24907), -- Moonkin Aura
+(1035, 51466), -- Elemental Oath
+(1036, -1035), (1036, -1034), -- Spell Crit Buffs
+(1037, 12579), (1037, 17794), (1037, 17797), (1037, 17798), (1037, 17799), (1037, 17800), (1037, 22959), -- Spell Crit Debuffs
+(1038, -1006), (1038, 67480), -- All Stats Percentage with Sanctuary
+-- 1039-44
+(1045, 52109), -- Flametongue Totem
+(1046, 57658), -- Totem of Wrath
+(1047, 48090), -- Demonic Pact
+(1048, -1047), (1048, -1046), (1048, -1045), -- Spell Power Buffs
+-- 1049
+(1050, 33196), -- Misery
+(1051, -1050), (1051, -1016), -- Spell Hit Debuffs
+(1052, 7294), -- Retribution Aura
+(1053, 63531), -- Sanctified Retribution
+(1054, -1053), (1054, -1052), (1054, 50170), -- Haste Buffs
+-- 1055
+(1056, -1053), (1056, -1052), (1056, 31579), (1056, 75593), -- Damage Done Buffs
+(1057, 13218), -- Wound Poison
+(1058, -1057), (1058, 2818), (1058, 3409), (1058, 5760), (1058, 21183), (1058, 30708), -- Crit Taken Debuffs
+(1059, 89), (1059, 6136), (1059, 6343), (1059, 6360), (1059, 7321), (1059, 8042), (1059, 16914), (1059, 20005), (1059, 27648), (1059, 51693), (1059, 55095), (1059, 58179), (1059, 68055), -- Attack Speed Debuffs
+(1060, 3043), (1060, 5570), -- Hit Chance Debuffs
+(1061, -1057), (1061, 12294), (1061, 19434), (1061, 56112), -- Healing Taken Debuffs
+(1062, -1063), (1062, 67), (1062, 99), (1062, 1160), -- AP Debuffs
+(1063, 702), -- Curse of Weakness
+(1064, 8076), -- Strength of Earth
+(1065, 57330), -- Horn of Winter
+(1066, 8118), -- Strength Scroll
+(1067, 8115), -- Agility Scroll
+(1068, 8096), -- Intellect Scroll
+(1069, 8099), -- Stamina Scroll
+(1070, 8112), -- Spirit Scroll
+(1071, 8091), -- Armor Scroll
+(1072, 1459), -- Arcane Intellect
+(1073, 54424), -- Fel Intelligence
+(1074, 1243), -- Power Word: Fortitude
+(1075, 21562), -- Prayer of Fortitude
+(1076, 14752), -- Divine Spirit
+(1077, 27681), -- Prayer of Spirit
+(1078, 1126), -- Mark of the Wild
+(1079, 21849), -- Gift of the Wild
+(1080, 23028), -- Arcane Brilliance
+(1081, 61024), -- Dalaran Intellect
+(1082, 61316), -- Dalaran Brilliance
+(1083, -1082), (1083, -1081), (1083, -1080), (1083, -1072), (1083, -1068), -- Mage Intellect Buffs
+(1084, -1075), (1084, -1074), (1084, -1069), (1084, 72590), -- Priest Stamina Buffs
+(1085, -1077), (1085, -1076), (1085, -1070), -- Priest Spirit Buffs
+(1086, -1071), (1086, 8072), -- Armor Buffs
+(1087, -1071), (1087, -1070), (1087, -1069), (1087, -1068), (1087, -1067), (1087, -1066),-- Scrolls
+(1088, -1065), (1088, -1064), -- Strength and Agility Buffs
+(1091, 469), -- Commanding Shout
+(1092, 6307), -- Blood Pact
+(1093, -1092), (1093, -1091), -- HP Buffs
+(1094, 34123), (1094, 63514), -- Healing Taken Buffs
+(1095, 14893), (1095, 16177), -- Physical Taken Buffs
+(1096, 1714), (1096, 5760), (1096, 31589), -- Cast Time Debuffs
+(1097, 122), (1097, 33395), (1097, 55080), -- Frost Novas
+(1098, 976), (1098, 27683), -- Shadow Protection
+(1099, 348), (1099, 30108), -- Immolate and Unstable Affliction
+(1100, 604), (1100, 1008), -- Dampen/Amplify Magic
+(1101, 1490), (1101, 51726), (1101, 60431), -- Spell Damage Taken Debuffs
+(1102, 40055), (1102, 40165), (1102, 40166), (1102, 40167), -- Introspection
+(1103, 40623), (1103, 40625), (1103, 40626), -- Apexis Movement Speed
+(1104, 12880), (1104, 57514), (1104, 57518), -- Warrior Enrages
+(1105, -1005), (1105, 5677), -- MP5 Buffs
+(1106, 6562), (1106, 28878), -- Heroic Presence
+(1107, 12042), (1107, 12292), (1107, 31884), (1107, 34471), (1107, 49016), (1107, 57933), -- Temporary Damage Increases
+(1108, 30069), (1108, 58684), -- Phys Damage Taken Debuffs
+(1110, 74826), (1110, 74827), (1110, 74828), (1110, 74829), (1110, 74830), (1110, 74831), (1110, 74832), (1110, 74833), (1110, 74834), (1110, 74835), (1110, 74836), -- Corporeality
+(1111, 62727), (1111, 63438), (1111, 63439), (1111, 63440), (1111, 63441), (1111, 63442), (1111, 63443), (1111, 63444), (1111, 63445), (1111, 63446), -- Champion's Pennant
+(1112, 8219), (1112, 8220), (1112, 8221), (1112, 8222), -- Flip Out
+-- 1116-20
+(1121, 3671), (1121, 3672), (1121, 3673), -- Elemental Slave Buffs
+(1122, 2825), (1122, 10060), (1122, 32182), -- Temporary Haste Buffs
+(1123, 10060), (1123, 12042), -- Power Infusion and Arcane Power
+(1124, -1085), (1124, -1073), -- Intellect Buffs
+(1125, -1083), (1125, -1073), -- Spirit Buffs
+
+-- values missing from trinitycore
+(1, 33053), -- Crawdad Flask
+(1001, 5020), (1001, 5021), (1001, 5257), (1001, 6114), (1001, 15852), (1001, 18191), (1001, 18192), (1001, 18193), (1001, 18194), (1001, 18222), (1001, 22730), (1001, 22789), (1001, 25661), (1001, 37058), (1001, 43730), -- More Foods
+(1006, 26393), -- Elune's Blessing
+(1062, 24423), -- Demoralizing Screech
+(1019, 50274), -- Spore Cloud
+(1022, 23060), -- Battle Squawk
+-- (1058, 45176), -- Server Side Master Poisoner (is it needed?)
+(1084, 23947), (1084, 23948), -- NPC Power Word Fortitude
+(1096, 35387), -- Poison Spit
+(1096, 58604), -- Lava Breath
+(1089, -1079), (1089, -1078), (1089, 72588), (1089, 16878), (1089, 24752), (1089, 39233), -- Mark of the Wild
+(1107, 48391), -- Owlkin Frenzy
+(1090, 7481), (1090, 7483), (1090, 7484), -- Howling Rage
+(1113, 467), -- Thorns
+(1114, 70233), (1114, 70234), (1114, 70235), (1114, 70242), (1114, 70243), (1114, 70244), -- Perfumes/Colognes
+(1115, 46302), -- K'iru's Song of Victory
+(1126, -1115), (1126, -1084), -- Stamina Buffs
+(1124, -1115); -- Intellect Buffs
+
+DELETE FROM `spell_group_stack_rules`;
+INSERT INTO `spell_group_stack_rules` (`group_id`,`stack_rule`, `description`) VALUES
+(1, 1,'Battle Elixir'),
+(2, 1, 'Guardian Elixir'),
+(1001, 1, 'Well Fed'),
+(1002, 4, 'Blessing of Might'),
+(1003, 4, 'Battle Shout'),
+(1004, 4, 'Flat AP Buffs'),
+(1005, 4, 'Blessing of Wisdom'),
+(1006, 1, 'All Stats Percentage'),
+(1007, 1, 'Blessing of Sanctuary'),
+(1008, 1, 'Blessing of Protection'),
+(1009, 1, 'Blessing of Light'),
+(1010, 2, 'Blessings'),
+(1011, 2, 'Warrior Shouts'),
+(1015, 3, 'Major Armor Debuffs'),
+(1016, 4, 'Faerie Fire'),
+(1019, 3, 'Minor Armor Debuffs'),
+(1022, 3, 'Melee Haste Buffs'),
+(1023, 4, 'Leader of the Pack'),
+(1024, 4, 'Rampage'),
+(1025, 3, 'Physical Crit Buffs'),
+(1029, 1, 'Percentage AP Buffs'),
+(1033, 1, 'Bleed Debuffs'),
+(1036, 4, 'Spell Crit Buffs'),
+(1037, 3, 'Spell Crit Debuffs'),
+(1038, 3, 'All Stats Percentage with Sanctuary'),
+(1046, 4, 'Totem of Wrath'),
+(1048, 4, 'Spell Power Buffs'),
+(1051, 3, 'Spell Hit Debuffs'),
+(1054, 3, 'Haste Buffs'),
+(1056, 3, 'Damage Done Buffs'),
+(1058, 3, 'Poisons'),
+(1059, 3, 'Attack Speed Debuffs'),
+(1060, 3, 'Hit Chance Debuffs'),
+(1061, 4, 'Healing Taken Debuffs'),
+(1062, 4, 'AP Debuffs'),
+(1083, 4, 'Single Intellect Buffs'),
+(1084, 4, 'Single Stamina Buffs'),
+(1085, 4, 'Single Spirit Buffs'),
+(1086, 4, 'Armor Buffs'),
+(1087, 4, 'Scrolls'),
+(1088, 4, 'Strength and Agility Buffs'),
+(1091, 0, 'Commanding Shout'),
+(1092, 0, 'Blood Pact'),
+(1093, 4, 'Flat HP Buffs'),
+(1094, 3, 'Healing Taken Buffs'),
+(1095, 4, 'Physical Taken Buffs'),
+(1096, 4, 'Cast Time Debuffs'),
+(1097, 1, 'Frost Novals'),
+(1098, 4, 'Shadow Protection'),
+(1099, 2, 'Immolate and Unstable Affliction'),
+(1100, 1, 'Dampen/Amplify Magic'),
+(1101, 3, 'Spell Damage Taken Debuffs'),
+(1104, 1, 'Warrior Enrages'),
+(1105, 3, 'MP5 Buffs'),
+(1106, 1, 'Heroic Presence'),
+(1107, 4, 'Temporary Damage Increases'),
+(1108, 4, 'Phys Damage Taken Debuffs'),
+(1110, 1, 'Corporeality'),
+(1111, 1, 'Champion''s Pennants'),
+(1112, 1, 'Flip Out'),
+(1121, 1, 'Elemental Slave Buffs'),
+(1122, 4, 'Temporary Haste Buffs'),
+(1123, 1, 'Power Infusion and Arcane Power'),
+(1124, 3, 'Intellect Buffs'),
+(1125, 3, 'Spirit Buffs'),
+
+-- additions
+(1089, 4, 'Mark of the Wild'),
+(1113, 4, 'Thorns'),
+(1126, 3, 'Stamina Buffs');
+
+DELETE FROM `spell_script_names` WHERE `spell_id` IN (18735, 56246, 56247);
+INSERT INTO `spell_script_names` VALUES (18735, 'spell_warl_voidwalker_pet_passive'); \ No newline at end of file
diff --git a/data/sql/updates/db_world/2025_11_28_06.sql b/data/sql/updates/db_world/2025_11_28_06.sql
new file mode 100644
index 0000000000..b2d5d6b30e
--- /dev/null
+++ b/data/sql/updates/db_world/2025_11_28_06.sql
@@ -0,0 +1,47 @@
+-- DB update 2025_11_28_05 -> 2025_11_28_06
+--
+-- Increase despawn timer
+UPDATE `smart_scripts` SET `action_param3`=180000 WHERE `entryorguid` IN (-125414, -123669, -123663, -123660) AND `source_type`=0 AND `id`=0;
+
+-- Spawn only when there's a Wyrm Reanimator nearby
+DELETE FROM `conditions` WHERE (`SourceTypeOrReferenceId` = 22) AND (`SourceGroup` = 1) AND (`SourceEntry` IN (-125414, -123669, -123663, -123660)) AND (`SourceId` = 0) AND (`ElseGroup` = 0) AND (`ConditionTypeOrReference` = 29) AND (`ConditionTarget` = 1) AND (`ConditionValue1` = 31731) AND (`ConditionValue2` = 30) AND (`ConditionValue3` = 0);
+INSERT INTO `conditions` (`SourceTypeOrReferenceId`, `SourceGroup`, `SourceEntry`, `SourceId`, `ElseGroup`, `ConditionTypeOrReference`, `ConditionTarget`, `ConditionValue1`, `ConditionValue2`, `ConditionValue3`, `NegativeCondition`, `ErrorType`, `ErrorTextId`, `ScriptName`, `Comment`) VALUES
+(22, 1, -125414, 0, 0, 29, 1, 31731, 30, 0, 0, 0, 0, '', 'must be near \'Wyrm Reanimator\''),
+(22, 1, -123669, 0, 0, 29, 1, 31731, 30, 0, 0, 0, 0, '', 'must be near \'Wyrm Reanimator\''),
+(22, 1, -123663, 0, 0, 29, 1, 31731, 30, 0, 0, 0, 0, '', 'must be near \'Wyrm Reanimator\''),
+(22, 1, -123660, 0, 0, 29, 1, 31731, 30, 0, 0, 0, 0, '', 'must be near \'Wyrm Reanimator\'');
+
+DELETE FROM `smart_scripts` WHERE (`source_type` = 0 AND `entryorguid` = 31702);
+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
+(31702, 0, 0, 1, 54, 0, 100, 0, 0, 0, 0, 0, 0, 0, 64, 1, 0, 0, 0, 0, 0, 19, 31731, 0, 0, 0, 0, 0, 0, 0, 'Frostbrood Spawn - On Just Summoned - Store Targetlist'),
+(31702, 0, 1, 0, 61, 0, 100, 0, 0, 0, 0, 0, 0, 0, 80, 3170200, 2, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Frostbrood Spawn - On Just Summoned - Run Script'),
+(31702, 0, 2, 0, 34, 0, 100, 0, 8, 1, 0, 0, 0, 0, 80, 3170201, 2, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Frostbrood Spawn - On Reached Point 1 - Run Script'),
+(31702, 0, 3, 0, 0, 0, 100, 0, 0, 5000, 5000, 15000, 0, 0, 11, 60667, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 'Frostbrood Spawn - In Combat - Cast \'Frost Breath\''),
+(31702, 0, 4, 0, 17, 0, 100, 0, 31731, 0, 0, 0, 0, 0, 64, 1, 0, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 0, 'Frostbrood Spawn - On Summoned Unit - Store Targetlist');
+
+DELETE FROM `smart_scripts` WHERE (`source_type` = 9 AND `entryorguid` = 3170200);
+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
+(3170200, 9, 0, 0, 0, 0, 100, 0, 0, 0, 0, 0, 0, 0, 60, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Frostbrood Spawn - Actionlist - Set Fly On'),
+(3170200, 9, 1, 0, 0, 0, 100, 0, 0, 0, 0, 0, 0, 0, 41, 0, 30, 0, 0, 0, 0, 12, 1, 0, 0, 0, 0, 0, 0, 0, 'Frostbrood Spawn - Actionlist - Despawn Instant'),
+(3170200, 9, 2, 0, 0, 0, 100, 0, 0, 0, 0, 0, 0, 0, 12, 31731, 1, 120000, 0, 0, 0, 12, 1, 0, 0, 0, 0, 0, 0, 0, 'Frostbrood Spawn - Actionlist - Summon Creature \'Wyrm Reanimator\''),
+(3170200, 9, 3, 0, 0, 0, 100, 0, 0, 0, 0, 0, 0, 0, 48, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Frostbrood Spawn - Actionlist - Set Active On'),
+(3170200, 9, 4, 0, 0, 0, 100, 0, 2000, 2000, 0, 0, 0, 0, 69, 1, 0, 0, 0, 0, 0, 12, 1, 0, 0, 0, 0, 0, 0, 0, 'Frostbrood Spawn - Actionlist - Move To Stored');
+
+DELETE FROM `smart_scripts` WHERE (`source_type` = 9 AND `entryorguid` = 3170201);
+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
+(3170201, 9, 0, 0, 0, 0, 100, 0, 0, 0, 0, 0, 0, 0, 11, 36380, 2, 0, 0, 0, 0, 12, 1, 0, 0, 0, 0, 0, 0, 0, 'Frostbrood Spawn - Actionlist - Cast \'Special Unarmed\''),
+(3170201, 9, 1, 0, 0, 0, 100, 0, 0, 0, 0, 0, 0, 0, 86, 52391, 2, 12, 1, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Frostbrood Spawn - Actionlist - Cross Cast \'Ride Vehicle\''),
+(3170201, 9, 2, 0, 0, 0, 100, 0, 0, 0, 0, 0, 0, 0, 53, 2, 317020, 0, 0, 0, 1, 8, 0, 0, 0, 0, 7326.43, 1289.52, 611.652, 0, 'Frostbrood Spawn - Actionlist - Start Waypoint Path 317020'),
+(3170201, 9, 3, 0, 0, 0, 100, 0, 30000, 30000, 0, 0, 0, 0, 41, 0, 0, 0, 0, 0, 0, 12, 1, 0, 0, 0, 0, 0, 0, 0, 'Frostbrood Spawn - Actionlist - Despawn Instant'),
+(3170201, 9, 4, 0, 0, 0, 100, 0, 0, 0, 0, 0, 0, 0, 41, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Frostbrood Spawn - Actionlist - Despawn Instant');
+
+DELETE FROM `smart_scripts` WHERE (`source_type` = 0 AND `entryorguid` = 31731);
+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
+(31731, 0, 0, 0, 0, 0, 100, 0, 5000, 9000, 15000, 15000, 0, 0, 11, 32063, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 'Wyrm Reanimator - In Combat - Cast \'Corruption\''),
+(31731, 0, 1, 0, 0, 0, 100, 0, 1000, 1000, 3000, 4000, 0, 0, 11, 9613, 64, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 'Wyrm Reanimator - In Combat - Cast \'Shadow Bolt\''),
+(31731, 0, 2, 0, 0, 0, 100, 0, 4000, 7000, 16000, 22000, 0, 0, 11, 11443, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 'Wyrm Reanimator - In Combat - Cast \'Cripple\''),
+(31731, 0, 3, 0, 1, 1, 100, 0, 0, 0, 30000, 30000, 0, 0, 11, 59661, 0, 0, 0, 0, 0, 19, 27047, 0, 0, 0, 0, 0, 0, 0, 'Wyrm Reanimator - Out of Combat - Cast \'Icecrown Purple Beam\' (Phase 1)'),
+(31731, 0, 4, 5, 54, 0, 100, 0, 0, 0, 0, 0, 0, 0, 92, 0, 59661, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Wyrm Reanimator - On Just Summoned - Interrupt Spell \'Icecrown Purple Beam\''),
+(31731, 0, 5, 6, 61, 0, 100, 0, 0, 0, 0, 0, 0, 0, 11, 52385, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Wyrm Reanimator - On Just Summoned - Cast \'Cosmetic - Periodic Cower\''),
+(31731, 0, 6, 0, 61, 0, 100, 0, 0, 0, 0, 0, 0, 0, 22, 2, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Wyrm Reanimator - On Just Summoned - Set Event Phase 2'),
+(31731, 0, 7, 0, 11, 0, 100, 0, 0, 0, 0, 0, 0, 0, 22, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Wyrm Reanimator - On Respawn - Set Event Phase 1');
diff --git a/data/sql/updates/db_world/2025_11_28_07.sql b/data/sql/updates/db_world/2025_11_28_07.sql
new file mode 100644
index 0000000000..715309451e
--- /dev/null
+++ b/data/sql/updates/db_world/2025_11_28_07.sql
@@ -0,0 +1,128 @@
+-- DB update 2025_11_28_06 -> 2025_11_28_07
+--
+-- Gryphon Commander Urik SAI
+UPDATE `creature_template` SET `AIName` = 'SmartAI' WHERE `entry` = 27317;
+DELETE FROM `smart_scripts` WHERE (`source_type` = 0 AND `entryorguid` = 27317);
+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
+(27317, 0, 0, 0, 19, 0, 100, 0, 12511, 0, 0, 0, 0, 0, 11, 50629, 0, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 0, 'Gryphon Commander Urik - On Quest \'The Hills Have Us\' Taken - Cast \'Gryphon to Amberpine Lodge\'');
+
+-- Wintergarde Gryphon SAI
+UPDATE `creature_template` SET `AIName` = 'SmartAI' WHERE `entry` = 28061;
+
+DELETE FROM `smart_scripts` WHERE (`source_type` = 0 AND `entryorguid` = 28061);
+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
+(28061, 0, 0, 0, 54, 0, 100, 0, 0, 0, 0, 0, 0, 0, 80, 2806100, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Wintergarde Gryphon - On Just Summoned - Run Script'),
+(28061, 0, 1, 0, 40, 0, 100, 0, 10, 0, 0, 0, 0, 0, 80, 2806101, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Wintergarde Gryphon - On Point 10 of Path Any Reached - Run Script'),
+(28061, 0, 2, 0, 40, 0, 100, 0, 21, 0, 0, 0, 0, 0, 80, 2806102, 2, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Wintergarde Gryphon - On Point 21 of Path Any Reached - Run Script'),
+(28061, 0, 3, 0, 40, 0, 100, 0, 22, 0, 0, 0, 0, 0, 54, 4000, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Wintergarde Gryphon - On Point 22 of Path Any Reached - Pause Waypoint'),
+(28061, 0, 4, 5, 40, 0, 100, 0, 31, 0, 0, 0, 0, 0, 54, 7000, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Wintergarde Gryphon - On Point 31 of Path Any Reached - Pause Waypoint'),
+(28061, 0, 5, 0, 61, 0, 100, 0, 0, 0, 0, 0, 0, 0, 80, 2806103, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Wintergarde Gryphon - On Point 31 of Path Any Reached - Run Script'),
+(28061, 0, 6, 0, 40, 0, 100, 0, 33, 0, 0, 0, 0, 0, 80, 2806104, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Wintergarde Gryphon - On Point 33 of Path Any Reached - Run Script');
+
+DELETE FROM `smart_scripts` WHERE `entryorguid` BETWEEN 2806100 AND 2806104 AND `source_type` = 9;
+INSERT INTO `smart_scripts` (`entryorguid`, `source_type`, `id`, `link`, `event_type`, `event_phase_mask`, `event_chance`, `event_flags`, `event_param1`, `event_param2`, `event_param3`, `event_param4`, `event_param5`, `event_param6`, `action_type`, `action_param1`, `action_param2`, `action_param3`, `action_param4`, `action_param5`, `action_param6`, `target_type`, `target_param1`, `target_param2`, `target_param3`, `target_param4`, `target_x`, `target_y`, `target_z`, `target_o`, `comment`) VALUES
+(2806100, 9, 0, 0, 0, 0, 100, 0, 1000, 1000, 0, 0, 0, 0, 53, 2, 28061, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Wintergarde Gryphon - Actionlist - Start Waypoint Path 28061'),
+(2806100, 9, 1, 0, 0, 0, 100, 0, 0, 0, 0, 0, 0, 0, 60, 1, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Wintergarde Gryphon - Actionlist - Set Fly On'),
+(2806100, 9, 2, 0, 0, 0, 100, 0, 2000, 2000, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 19, 28065, 0, 0, 0, 0, 0, 0, 0, 'Wintergarde Gryphon - Actionlist - Say Line 0'),
+(2806101, 9, 0, 0, 0, 0, 100, 0, 1000, 1000, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 19, 28065, 0, 0, 0, 0, 0, 0, 0, 'Wintergarde Gryphon - On Script - Say Line 1 (Wintergarde Gryphon Rider)'),
+(2806102, 9, 0, 0, 0, 0, 100, 0, 0, 0, 0, 0, 0, 0, 1, 2, 0, 0, 0, 0, 0, 19, 28065, 0, 0, 0, 0, 0, 0, 0, 'Wintergarde Gryphon - On Script - Say Line 2 (Wintergarde Gryphon Rider)'),
+(2806102, 9, 1, 0, 0, 0, 100, 0, 2000, 2000, 0, 0, 0, 0, 11, 50560, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Wintergarde Gryphon - On Script - Cast \'Summon Conquest War Rider\''),
+(2806102, 9, 2, 0, 0, 0, 100, 0, 0, 0, 0, 0, 0, 0, 11, 50560, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Wintergarde Gryphon - On Script - Cast \'Summon Conquest War Rider\''),
+(2806102, 9, 3, 0, 0, 0, 100, 0, 2000, 2000, 0, 0, 0, 0, 11, 50560, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Wintergarde Gryphon - On Script - Cast \'Summon Conquest War Rider\''),
+(2806102, 9, 4, 0, 0, 0, 100, 0, 0, 0, 0, 0, 0, 0, 11, 44423, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Wintergarde Gryphon - On Script - Cast \'Soar\''),
+(2806102, 9, 5, 0, 0, 0, 100, 0, 0, 0, 0, 0, 0, 0, 1, 3, 0, 0, 0, 0, 0, 19, 28065, 0, 0, 0, 0, 0, 0, 0, 'Wintergarde Gryphon - On Script - Say Line 3 (Wintergarde Gryphon Rider)'),
+(2806103, 9, 0, 0, 0, 0, 100, 0, 1000, 1000, 0, 0, 0, 0, 1, 4, 0, 0, 0, 0, 0, 19, 28065, 0, 0, 0, 0, 0, 0, 0, 'Wintergarde Gryphon - On Script - Say Line 4 (Wintergarde Gryphon Rider)'),
+(2806103, 9, 1, 0, 0, 0, 100, 0, 5000, 5000, 0, 0, 0, 0, 11, 49261, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Wintergarde Gryphon - On Script - Cast \'Dismount Passenger\''),
+(2806104, 9, 0, 0, 0, 0, 100, 0, 0, 0, 0, 0, 0, 0, 11, 49259, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Wintergarde Gryphon - On Script - Cast \'Despawn Driver\''),
+(2806104, 9, 1, 0, 0, 0, 100, 0, 0, 0, 0, 0, 0, 0, 41, 0, 0, 0, 0, 0, 0, 19, 28065, 0, 0, 0, 0, 0, 0, 0, 'Wintergarde Gryphon - On Script - Despawn Instant Closest Creature \'Wintergarde Gryphon Rider\''),
+(2806104, 9, 2, 0, 0, 0, 100, 0, 0, 0, 0, 0, 0, 0, 41, 3000, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Wintergarde Gryphon - On Script - Despawn (3000)');
+
+-- SmartAI ignores 'delay' column
+DELETE FROM `waypoints` WHERE `entry` = 28061;
+INSERT INTO `waypoints` (`entry`, `pointid`, `position_x`, `position_y`, `position_z`, `orientation`, `delay`, `point_comment`) VALUES
+(28061, 1, 3699.6936, -721.9221, 219.29805, 0, 0, 'Wintergarde Gryphon'),
+(28061, 2, 3716.3372, -744.8086, 219.29805, 0, 0, 'Wintergarde Gryphon'),
+(28061, 3, 3754.6975, -766.4142, 219.29805, 0, 0, 'Wintergarde Gryphon'),
+(28061, 4, 3823.4036, -778.20447, 229.43698, 0, 0, 'Wintergarde Gryphon'),
+(28061, 5, 3855.0312, -824.1102, 240.18695, 0, 0, 'Wintergarde Gryphon'),
+(28061, 6, 3854.3972, -931.2962, 240.18697, 0, 0, 'Wintergarde Gryphon'),
+(28061, 7, 3816.714, -1052.798, 218.93703, 0, 0, 'Wintergarde Gryphon'),
+(28061, 8, 3674.9307, -1234.0061, 169.63153, 0, 0, 'Wintergarde Gryphon'),
+(28061, 9, 3562.7188, -1421.7626, 169.63153, 0, 0, 'Wintergarde Gryphon'),
+(28061, 10, 3549.2375, -1556.2838, 169.63153, 0, 0, 'Wintergarde Gryphon'),
+(28061, 11, 3494.7446, -1667.5358, 166.7296, 0, 0, 'Wintergarde Gryphon'),
+(28061, 12, 3469.591, -1731.115, 160.06296, 0, 0, 'Wintergarde Gryphon'),
+(28061, 13, 3398.6677, -1834.3002, 160.06296, 0, 0, 'Wintergarde Gryphon'),
+(28061, 14, 3326.5435, -1956.757, 160.06296, 0, 0, 'Wintergarde Gryphon'),
+(28061, 15, 3302.4072, -2047.635, 160.06296, 0, 0, 'Wintergarde Gryphon'),
+(28061, 16, 3321.5894, -2172.2275, 169.86847, 0, 0, 'Wintergarde Gryphon'),
+(28061, 17, 3352.4548, -2278.8647, 174.61842, 0, 0, 'Wintergarde Gryphon'),
+(28061, 18, 3349.7534, -2368.1155, 174.61842, 0, 0, 'Wintergarde Gryphon'),
+(28061, 19, 3273.5618, -2401.9539, 174.61842, 0, 0, 'Wintergarde Gryphon'),
+(28061, 20, 3236.3962, -2316.1958, 174.61842, 0, 0, 'Wintergarde Gryphon'),
+(28061, 21, 3353.9648, -2232.0115, 170.36844, 0, 0, 'Wintergarde Gryphon'), -- delay: 4000
+(28061, 22, 3406.751, -2232.2563, 159.57182, 0, 0, 'Wintergarde Gryphon'),
+(28061, 23, 3484.2961, -2251.2778, 147.90515, 0, 0, 'Wintergarde Gryphon'),
+(28061, 24, 3584.2512, -2299.296, 147.90515, 0, 0, 'Wintergarde Gryphon'),
+(28061, 25, 3687.5261, -2328.181, 173.07814, 0, 0, 'Wintergarde Gryphon'),
+(28061, 26, 3739.8252, -2392.6477, 199.38365, 0, 0, 'Wintergarde Gryphon'),
+(28061, 27, 3800.0535, -2478.2786, 214.51729, 0, 0, 'Wintergarde Gryphon'),
+(28061, 28, 3769.2024, -2553.0325, 213.62839, 0, 0, 'Wintergarde Gryphon'),
+(28061, 29, 3692.256, -2609.5562, 206.48958, 0, 0, 'Wintergarde Gryphon'),
+(28061, 30, 3558.7239, -2723.1643, 213.62839, 0, 0, 'Wintergarde Gryphon'),
+(28061, 31, 3439.4553, -2757.1624, 223.79466, 0, 0, 'Wintergarde Gryphon'), -- delay: 7000
+(28061, 32, 3406.0881, -2755.1821, 227.184, 0, 0, 'Wintergarde Gryphon'),
+(28061, 33, 3390.089, -2773.591, 227.184, 0, 0, 'Wintergarde Gryphon');
+
+DELETE FROM `creature_template_movement` WHERE `CreatureId` IN (28061, 28063);
+INSERT INTO `creature_template_movement` (`CreatureId`, `Ground`, `Swim`, `Flight`, `Rooted`, `Chase`, `Random`) VALUES
+(28061, 0, 0, 1, 0, 0, 0),
+(28063, 0, 0, 1, 0, 0, 0);
+
+DELETE FROM `vehicle_template_accessory` WHERE `entry` = 28061;
+INSERT INTO `vehicle_template_accessory` (`entry`, `accessory_entry`, `seat_id`, `minion`, `description`, `summontype`, `summontimer`) VALUES
+(28061, 28065, 0, 1, 'Wintergarde Gryphon - Wintergarde Gryphon Rider', 8, 0);
+
+DELETE FROM `spell_script_names` WHERE `spell_id` IN (49261, 49259) AND `ScriptName` = 'spell_gen_eject_passenger';
+INSERT INTO `spell_script_names` (`spell_id`, `ScriptName`) VALUES
+(49261, 'spell_gen_eject_passenger'),
+(49259, 'spell_gen_eject_passenger');
+
+-- Conquest Hold Windrager SAI
+UPDATE `creature_template` SET `AIName` = 'SmartAI' WHERE `entry` = 28063;
+
+DELETE FROM `smart_scripts` WHERE (`source_type` = 0 AND `entryorguid` = 28063);
+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
+(28063, 0, 0, 1, 54, 0, 100, 0, 0, 0, 0, 0, 0, 0, 80, 2806300, 2, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Conquest Hold Windrager - On Just Summoned - Run Script'),
+(28063, 0, 1, 0, 61, 0, 100, 0, 0, 0, 0, 0, 0, 0, 20, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Conquest Hold Windrager - On Just Summoned - Stop Attacking');
+
+DELETE FROM `smart_scripts` WHERE (`source_type` = 9 AND `entryorguid` = 2806300);
+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
+(2806300, 9, 0, 0, 0, 0, 100, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 1, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 0, 'Conquest Hold Windrager - Actionlist - Say Line 0'),
+(2806300, 9, 1, 0, 0, 0, 100, 0, 1000, 3000, 0, 0, 0, 0, 11, 50593, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Conquest Hold Windrager - Actionlist - Cast \'Throw Spear\''),
+(2806300, 9, 2, 0, 0, 0, 100, 0, 1000, 3000, 0, 0, 0, 0, 11, 50593, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Conquest Hold Windrager - Actionlist - Cast \'Throw Spear\''),
+(2806300, 9, 3, 0, 0, 0, 100, 0, 1000, 3000, 0, 0, 0, 0, 11, 50593, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Conquest Hold Windrager - Actionlist - Cast \'Throw Spear\''),
+(2806300, 9, 4, 0, 0, 0, 100, 0, 13000, 16000, 0, 0, 0, 0, 41, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Conquest Hold Windrager - Actionlist - Despawn Instant');
+
+DELETE FROM `conditions` WHERE (`SourceTypeOrReferenceId` = 13) AND (`SourceGroup` = 1) AND (`SourceEntry` = 50592) AND (`SourceId` = 0) AND (`ElseGroup` = 0) AND (`ConditionTypeOrReference` = 31) AND (`ConditionTarget` = 0) AND (`ConditionValue1` = 3) AND (`ConditionValue2` = 28061) AND (`ConditionValue3` = 0);
+INSERT INTO `conditions` (`SourceTypeOrReferenceId`, `SourceGroup`, `SourceEntry`, `SourceId`, `ElseGroup`, `ConditionTypeOrReference`, `ConditionTarget`, `ConditionValue1`, `ConditionValue2`, `ConditionValue3`, `NegativeCondition`, `ErrorType`, `ErrorTextId`, `ScriptName`, `Comment`) VALUES
+(13, 1, 50592, 0, 0, 31, 0, 3, 28061, 0, 0, 0, 0, '', 'Group 0: Spell \'Throw Spear\' (Effect 1) targets creature \'Wintergarde Gryphon\'');
+
+DELETE FROM `creature_text` WHERE `CreatureID` IN (28065, 28063);
+INSERT INTO `creature_text` (`CreatureID`, `GroupID`, `ID`, `Text`, `Type`, `Language`, `Probability`, `Emote`, `Duration`, `Sound`, `BroadcastTextId`, `TextRange`, `comment`) VALUES
+(28063, 0, 0, 'INTRUDERS! KILL THEM!', 12, 1, 100, 0, 0, 0, 27473, 0, 'Conquest Hold Windrager'),
+(28063, 0, 1, 'ALLIANCE FILTH! DIE! DIE!', 12, 1, 100, 0, 0, 0, 27474, 0, 'Conquest Hold Windrager'),
+(28063, 0, 2, 'Take their heads! For the Horde!', 12, 1, 100, 0, 0, 0, 27475, 0, 'Conquest Hold Windrager'),
+(28065, 0, 0, 'I\'ll have you at Amberpine Lodge in no time, ally! We just have to make one brief stop first...', 12, 7, 100, 0, 0, 0, 27440, 0, 'Wintergarde Gryphon Rider'),
+(28065, 1, 0, 'We\'re gonna do a quick fly by Conquest Hold to see what those filthy, no good, Horde are up to. Keep your eyes peeled for their wind riders. Not that they\'d ever catch me!', 12, 7, 100, 0, 0, 0, 27442, 0, 'Wintergarde Gryphon Rider'),
+(28065, 2, 0, 'What in the name of Bronzebeard is goin\' on here? Look at this place! I think...', 12, 7, 100, 0, 0, 0, 27443, 0, 'Wintergarde Gryphon Rider'),
+(28065, 3, 0, 'Uh-oh. We\'ve got company! HOLD ON TIGHT! I\'m gonna try and lose \'em!', 12, 7, 100, 0, 0, 0, 27444, 0, 'Wintergarde Gryphon Rider'),
+(28065, 4, 0, 'I think we lost \'em! That was a close one! Welp, as promised, Amberpine Lodge in one piece! Keep your feet on the ground, friend!', 12, 7, 100, 0, 0, 0, 27472, 0, 'Wintergarde Gryphon Rider');
+
+-- Spell 50557 specified in npc_spellclick_spells is not a valid vehicle enter aura
+UPDATE `npc_spellclick_spells` SET `spell_id` = 46598 WHERE `npc_entry` = 28061 AND `spell_id` = 50557;
+
+-- 'Flight + Speed' aura
+DELETE FROM `creature_template_addon` WHERE (`entry` = 28061);
+INSERT INTO `creature_template_addon` (`entry`, `path_id`, `mount`, `bytes1`, `bytes2`, `emote`, `visibilityDistanceType`, `auras`) VALUES
+(28061, 0, 0, 0, 0, 0, 0, '49303');
diff --git a/data/sql/updates/db_world/2025_11_28_08.sql b/data/sql/updates/db_world/2025_11_28_08.sql
new file mode 100644
index 0000000000..cc5800b569
--- /dev/null
+++ b/data/sql/updates/db_world/2025_11_28_08.sql
@@ -0,0 +1,25 @@
+-- DB update 2025_11_28_07 -> 2025_11_28_08
+--
+SET @CGUID := 20861;
+DELETE FROM `creature` WHERE (`id1` = 31881) AND (`guid` = @CGUID);
+INSERT INTO `creature` (`guid`, `id1`, `id2`, `id3`, `map`, `zoneId`, `areaId`, `spawnMask`, `phaseMask`, `equipment_id`, `position_x`, `position_y`, `position_z`, `orientation`, `spawntimesecs`, `wander_distance`, `currentwaypoint`, `curhealth`, `curmana`, `MovementType`, `npcflag`, `unit_flags`, `dynamicflags`, `ScriptName`, `Comment`, `VerifiedBuild`) VALUES
+(@CGUID, 31881, 0, 0, 571, 0, 0, 1, 1, 0, 7505.81, 1707.04, 350.194, 1.53589, 300, 0, 0, 63000, 0, 0, 0, 0, 0, '', '', 0);
+
+UPDATE `creature_template` SET `ArmorModifier` = 0 WHERE (`entry` = 32227);
+
+-- Disable Gravity, allows Parachute on exit
+DELETE FROM `creature_template_movement` WHERE (`CreatureId` IN (31884, 32227));
+INSERT INTO `creature_template_movement` (`CreatureId`, `Ground`, `Swim`, `Flight`, `Rooted`, `Chase`, `Random`, `InteractionPauseTimer`) VALUES
+(31884, 0, 0, 1, 0, 0, 0, 0),
+(32227, 0, 0, 1, 0, 0, 0, 0);
+
+DELETE FROM `conditions` WHERE (`SourceTypeOrReferenceId` = 18) AND (`SourceGroup` IN (31884, 32227)) AND (`SourceEntry` = 46598) AND (`SourceId` = 0);
+INSERT INTO `conditions` (`SourceTypeOrReferenceId`, `SourceGroup`, `SourceEntry`, `SourceId`, `ElseGroup`, `ConditionTypeOrReference`, `ConditionTarget`, `ConditionValue1`, `ConditionValue2`, `ConditionValue3`, `NegativeCondition`, `ErrorType`, `ErrorTextId`, `ScriptName`, `Comment`) VALUES
+(18, 31884, 46598, 0, 0, 9, 0, 13310, 0, 0, 0, 0, 0, '', 'Kor\'kron Suppression Turret requires player to be on quest Assault by Air'),
+(18, 32227, 46598, 0, 0, 9, 0, 13309, 0, 0, 0, 0, 0, '', 'Skybreaker Suppression Turret requires player to be on quest Assault by Air');
+
+UPDATE `vehicle_template_accessory` SET `summontype`=5 WHERE `entry`=31881 AND `seat_id`=1;
+UPDATE `vehicle_template_accessory` SET `summontype`=5 WHERE `entry`=32225 AND `seat_id`=1;
+
+-- Prevent vehicle and passengers to attack players from the opposite faction
+UPDATE `creature_template` SET `unit_flags` = `unit_flags` | 256 WHERE (`entry` IN (32225, 31881, 31882, 31891, 32223, 32225));
diff --git a/data/sql/updates/db_world/2025_11_29_00.sql b/data/sql/updates/db_world/2025_11_29_00.sql
new file mode 100644
index 0000000000..bc7f243229
--- /dev/null
+++ b/data/sql/updates/db_world/2025_11_29_00.sql
@@ -0,0 +1,5 @@
+-- DB update 2025_11_28_08 -> 2025_11_29_00
+-- Add creature_text for Eck the Ferocious "grows increasingly crazed" emote
+DELETE FROM `creature_text` WHERE `CreatureID` = 29932 AND `GroupID` = 1;
+INSERT INTO `creature_text` (`CreatureID`, `GroupID`, `ID`, `Text`, `Type`, `Language`, `Probability`, `Emote`, `Duration`, `Sound`, `BroadcastTextId`, `TextRange`, `comment`)
+VALUES (29932, 1, 0, '%s grows increasingly crazed!', 16, 0, 100, 0, 0, 0, 30727, 0, 'Eck the Ferocious - Crazed Warning');
diff --git a/data/sql/updates/db_world/2025_11_29_01.sql b/data/sql/updates/db_world/2025_11_29_01.sql
new file mode 100644
index 0000000000..54434ca272
--- /dev/null
+++ b/data/sql/updates/db_world/2025_11_29_01.sql
@@ -0,0 +1,8 @@
+-- DB update 2025_11_29_00 -> 2025_11_29_01
+--
+SET @REPTRASH := 1;
+SET @REPREGULAR := 18;
+SET @REPBOSS := 275;
+UPDATE `creature_onkill_reputation` SET `RewOnKillRepValue1` = @REPTRASH, `RewOnKillRepValue2` = @REPTRASH WHERE `creature_id` IN (30902, 30903);
+UPDATE `creature_onkill_reputation` SET `RewOnKillRepValue1` = @REPREGULAR, `RewOnKillRepValue2` = @REPREGULAR WHERE `creature_id` IN (30901, 30904, 30905, 30915, 30916, 30906, 30913, 30907, 30908, 30909, 30910, 30911, 30912, 30914);
+UPDATE `creature_onkill_reputation` SET `RewOnKillRepValue1` = @REPBOSS, `RewOnKillRepValue2` = @REPBOSS WHERE `creature_id` IN (31558, 31559, 31560, 31561);
diff --git a/data/sql/updates/db_world/2025_11_29_02.sql b/data/sql/updates/db_world/2025_11_29_02.sql
new file mode 100644
index 0000000000..c4da8275c2
--- /dev/null
+++ b/data/sql/updates/db_world/2025_11_29_02.sql
@@ -0,0 +1,5 @@
+-- DB update 2025_11_29_01 -> 2025_11_29_02
+--
+UPDATE `quest_template` SET `RewardNextQuest` = 0 WHERE (`ID` = 11287);
+UPDATE `quest_template_addon` SET `NextQuestID` = 0 WHERE (`ID` = 11287);
+UPDATE `quest_template_addon` SET `ExclusiveGroup` = 11287 WHERE `ID` IN (11287, 11286);
diff --git a/data/sql/updates/db_world/2025_11_29_03.sql b/data/sql/updates/db_world/2025_11_29_03.sql
new file mode 100644
index 0000000000..f11598497c
--- /dev/null
+++ b/data/sql/updates/db_world/2025_11_29_03.sql
@@ -0,0 +1,3 @@
+-- DB update 2025_11_29_02 -> 2025_11_29_03
+UPDATE `quest_template_addon` SET `PrevQuestID` = 13348 WHERE `ID` = 13359;
+UPDATE `quest_template_addon` SET `PrevQuestID` = 13396 WHERE `ID` = 13398;
diff --git a/data/sql/updates/db_world/2025_11_30_00.sql b/data/sql/updates/db_world/2025_11_30_00.sql
new file mode 100644
index 0000000000..2c17d4fd58
--- /dev/null
+++ b/data/sql/updates/db_world/2025_11_30_00.sql
@@ -0,0 +1,8 @@
+-- DB update 2025_11_29_03 -> 2025_11_30_00
+--
+DELETE FROM `smart_scripts` WHERE `entryorguid` = 1889 AND `source_type` = 0 AND `id` IN (0, 1, 2, 3);
+INSERT INTO `smart_scripts` (`entryorguid`, `source_type`, `id`, `link`, `event_type`, `event_phase_mask`, `event_chance`, `event_flags`, `event_param1`, `event_param2`, `event_param3`, `event_param4`, `event_param5`, `event_param6`, `action_type`, `action_param1`, `action_param2`, `action_param3`, `action_param4`, `action_param5`, `action_param6`, `target_type`, `target_param1`, `target_param2`, `target_param3`, `target_param4`, `target_x`, `target_y`, `target_z`, `target_o`, `comment`) VALUES
+(1889, 0, 0, 0, 1, 0, 100, 0, 1000, 1000, 1000, 1000, 0, 0, 11, 12544, 32, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Dalaran Wizard - Out of Combat - Cast \'Frost Armor\''),
+(1889, 0, 1, 0, 0, 0, 100, 0, 0, 0, 3400, 5400, 0, 0, 11, 20792, 64, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 'Dalaran Wizard - In Combat - Cast \'Frostbolt\''),
+(1889, 0, 2, 0, 106, 0, 100, 0, 12500, 45000, 15000, 45000, 0, 10, 11, 11831, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Dalaran Wizard - On Hostile in Range - Cast \'Frost Nova\''),
+(1889, 0, 3, 0, 0, 0, 100, 1, 3000, 5000, 14000, 20000, 0, 0, 11, 4980, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Dalaran Wizard - In Combat - Cast \'Quick Frost Ward\' (No Repeat)');
diff --git a/data/sql/updates/db_world/2025_11_30_01.sql b/data/sql/updates/db_world/2025_11_30_01.sql
new file mode 100644
index 0000000000..1d3b995119
--- /dev/null
+++ b/data/sql/updates/db_world/2025_11_30_01.sql
@@ -0,0 +1,3 @@
+-- DB update 2025_11_30_00 -> 2025_11_30_01
+-- Burning to Help doesn't require Sharpening Your Talons
+UPDATE `quest_template_addon` SET `PrevQuestID` = 0 WHERE `ID` = 12683;
diff --git a/data/sql/updates/db_world/2025_11_30_02.sql b/data/sql/updates/db_world/2025_11_30_02.sql
new file mode 100644
index 0000000000..86ab760949
--- /dev/null
+++ b/data/sql/updates/db_world/2025_11_30_02.sql
@@ -0,0 +1,6 @@
+-- DB update 2025_11_30_01 -> 2025_11_30_02
+
+-- Event occours only if a player dismount.
+DELETE FROM `conditions` WHERE (`SourceTypeOrReferenceId` = 22) AND (`SourceGroup` = 6) AND (`SourceEntry` = 27587) AND (`SourceId` = 0) AND (`ElseGroup` = 0) AND (`ConditionTypeOrReference` = 32) AND (`ConditionTarget` = 0) AND (`ConditionValue1` = 16) 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
+(22, 6, 27587, 0, 0, 32, 0, 16, 0, 0, 0, 0, 0, '', 'Event occours only if a player dismount.');
diff --git a/data/sql/updates/db_world/2025_11_30_03.sql b/data/sql/updates/db_world/2025_11_30_03.sql
new file mode 100644
index 0000000000..a59af90568
--- /dev/null
+++ b/data/sql/updates/db_world/2025_11_30_03.sql
@@ -0,0 +1,8 @@
+-- DB update 2025_11_30_02 -> 2025_11_30_03
+
+-- Add SmartAI
+UPDATE `creature_template` SET `AIName` = 'SmartAI' WHERE `entry` = 26523;
+
+DELETE FROM `smart_scripts` WHERE (`source_type` = 0 AND `entryorguid` = 26523);
+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
+(26523, 0, 0, 0, 28, 0, 100, 0, 0, 0, 0, 0, 0, 0, 41, 6000, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Forsaken Blight Spreader - On Passenger Removed - Despawn In 6000 ms');
diff --git a/data/sql/updates/db_world/2025_11_30_04.sql b/data/sql/updates/db_world/2025_11_30_04.sql
new file mode 100644
index 0000000000..f2462e6997
--- /dev/null
+++ b/data/sql/updates/db_world/2025_11_30_04.sql
@@ -0,0 +1,4 @@
+-- DB update 2025_11_30_03 -> 2025_11_30_04
+--
+UPDATE `creature_template` SET `lootid` = 29605 WHERE `entry` = 30291;
+DELETE FROM `creature_loot_template` WHERE `Entry` = 30291;
diff --git a/data/sql/updates/db_world/2025_11_30_05.sql b/data/sql/updates/db_world/2025_11_30_05.sql
new file mode 100644
index 0000000000..a8f2539156
--- /dev/null
+++ b/data/sql/updates/db_world/2025_11_30_05.sql
@@ -0,0 +1,4 @@
+-- DB update 2025_11_30_04 -> 2025_11_30_05
+--
+-- Remove the RewardNextQuest, previously: 12070 (Rallying the Troops), link from 12249 (Ursoc, the Bear God)
+UPDATE `quest_template` SET `RewardNextQuest` = 0 WHERE (`ID` = 12249);
diff --git a/data/sql/updates/db_world/2025_11_30_06.sql b/data/sql/updates/db_world/2025_11_30_06.sql
new file mode 100644
index 0000000000..83b9493be3
--- /dev/null
+++ b/data/sql/updates/db_world/2025_11_30_06.sql
@@ -0,0 +1,8 @@
+-- DB update 2025_11_30_05 -> 2025_11_30_06
+--
+-- Judgment Day Comes! should not be available if Honor Above All Else is taken/complete/rewarded
+-- Uses CONDITION_QUESTSTATE (47) with state_mask 74 (2+8+64 = Completed+InProgress+Rewarded)
+DELETE FROM `conditions` WHERE (`SourceTypeOrReferenceId` = 19) AND (`SourceEntry` IN (13226, 13227)) AND (`ConditionTypeOrReference` = 47) AND (`ConditionValue1` = 13036);
+INSERT INTO `conditions` (`SourceTypeOrReferenceId`, `SourceGroup`, `SourceEntry`, `SourceId`, `ElseGroup`, `ConditionTypeOrReference`, `ConditionTarget`, `ConditionValue1`, `ConditionValue2`, `ConditionValue3`, `NegativeCondition`, `ErrorType`, `ErrorTextId`, `ScriptName`, `Comment`) VALUES
+(19, 0, 13226, 0, 0, 47, 0, 13036, 74, 0, 1, 0, 0, '', 'Judgment Day Comes! - NOT have Honor Above All Else (taken/complete/rewarded)'),
+(19, 0, 13227, 0, 0, 47, 0, 13036, 74, 0, 1, 0, 0, '', 'Judgment Day Comes! - NOT have Honor Above All Else (taken/complete/rewarded)');
diff --git a/data/sql/updates/db_world/2025_11_30_07.sql b/data/sql/updates/db_world/2025_11_30_07.sql
new file mode 100644
index 0000000000..fa6fe98c34
--- /dev/null
+++ b/data/sql/updates/db_world/2025_11_30_07.sql
@@ -0,0 +1,90 @@
+-- DB update 2025_11_30_06 -> 2025_11_30_07
+--
+DELETE FROM `spell_linked_spell` WHERE `spell_trigger`=-43351 AND `spell_effect`=50167 AND `type`=0;
+
+DELETE FROM `spell_script_names` WHERE (`spell_id` = 43365 AND `ScriptName` = 'spell_the_cleansing_shrine_cast');
+DELETE FROM `spell_script_names` WHERE (`spell_id` = 43351 AND (`ScriptName` = 'spell_the_cleansing_cleansing_soul' OR `ScriptName` = 'spell_q11322_q11317_the_cleansing'));
+DELETE FROM `spell_script_names` WHERE (`spell_id` = 50217 AND `ScriptName` = 'spell_the_cleansing_mirror_image_script_effect');
+DELETE FROM `spell_script_names` WHERE (`spell_id` = 50238 AND `ScriptName` = 'spell_the_cleansing_on_death_cast_on_master');
+DELETE FROM `spell_script_names` WHERE (`spell_id` = 39823 AND `ScriptName` = 'spell_gen_whisper_to_controller');
+DELETE FROM `spell_script_names` WHERE (`spell_id` = 39825 AND `ScriptName` = 'spell_gen_whisper_to_controller');
+DELETE FROM `spell_script_names` WHERE (`spell_id` = 40201 AND `ScriptName` = 'spell_gen_whisper_to_controller');
+DELETE FROM `spell_script_names` WHERE (`spell_id` = 40203 AND `ScriptName` = 'spell_gen_whisper_to_controller');
+DELETE FROM `spell_script_names` WHERE (`spell_id` = 40204 AND `ScriptName` = 'spell_gen_whisper_to_controller');
+DELETE FROM `spell_script_names` WHERE (`spell_id` = 40205 AND `ScriptName` = 'spell_gen_whisper_to_controller');
+DELETE FROM `spell_script_names` WHERE (`spell_id` = 40206 AND `ScriptName` = 'spell_gen_whisper_to_controller');
+DELETE FROM `spell_script_names` WHERE (`spell_id` = 40207 AND `ScriptName` = 'spell_gen_whisper_to_controller');
+DELETE FROM `spell_script_names` WHERE (`spell_id` = 40208 AND `ScriptName` = 'spell_gen_whisper_to_controller');
+DELETE FROM `spell_script_names` WHERE (`spell_id` = 40210 AND `ScriptName` = 'spell_gen_whisper_to_controller');
+DELETE FROM `spell_script_names` WHERE (`spell_id` = 40213 AND `ScriptName` = 'spell_gen_whisper_to_controller');
+DELETE FROM `spell_script_names` WHERE (`spell_id` = 40217 AND `ScriptName` = 'spell_gen_whisper_to_controller');
+DELETE FROM `spell_script_names` WHERE (`spell_id` = 40218 AND `ScriptName` = 'spell_gen_whisper_to_controller');
+DELETE FROM `spell_script_names` WHERE (`spell_id` = 40233 AND `ScriptName` = 'spell_gen_whisper_to_controller');
+DELETE FROM `spell_script_names` WHERE (`spell_id` = 40252 AND `ScriptName` = 'spell_gen_whisper_to_controller');
+DELETE FROM `spell_script_names` WHERE (`spell_id` = 40352 AND `ScriptName` = 'spell_gen_whisper_to_controller');
+DELETE FROM `spell_script_names` WHERE (`spell_id` = 50014 AND `ScriptName` = 'spell_gen_whisper_to_controller');
+DELETE FROM `spell_script_names` WHERE (`spell_id` = 50023 AND `ScriptName` = 'spell_gen_whisper_to_controller');
+DELETE FROM `spell_script_names` WHERE (`spell_id` = 50219 AND `ScriptName` = 'spell_gen_whisper_to_controller');
+DELETE FROM `spell_script_names` WHERE (`spell_id` = 50221 AND `ScriptName` = 'spell_gen_whisper_to_controller');
+DELETE FROM `spell_script_names` WHERE (`spell_id` = 50222 AND `ScriptName` = 'spell_gen_whisper_to_controller');
+DELETE FROM `spell_script_names` WHERE (`spell_id` = 50223 AND `ScriptName` = 'spell_gen_whisper_to_controller');
+DELETE FROM `spell_script_names` WHERE (`spell_id` = 53374 AND `ScriptName` = 'spell_gen_whisper_to_controller');
+DELETE FROM `spell_script_names` WHERE (`spell_id` = 60807 AND `ScriptName` = 'spell_gen_whisper_to_controller');
+DELETE FROM `spell_script_names` WHERE (`spell_id` = 60811 AND `ScriptName` = 'spell_gen_whisper_to_controller');
+INSERT INTO `spell_script_names` (`spell_id`, `ScriptName`) VALUES
+(43365, 'spell_the_cleansing_shrine_cast'),
+(43351, 'spell_the_cleansing_cleansing_soul'),
+(50217, 'spell_the_cleansing_mirror_image_script_effect'),
+(50238, 'spell_the_cleansing_on_death_cast_on_master'),
+(39823, 'spell_gen_whisper_to_controller'),
+(39825, 'spell_gen_whisper_to_controller'),
+(40201, 'spell_gen_whisper_to_controller'),
+(40203, 'spell_gen_whisper_to_controller'),
+(40204, 'spell_gen_whisper_to_controller'),
+(40205, 'spell_gen_whisper_to_controller'),
+(40206, 'spell_gen_whisper_to_controller'),
+(40207, 'spell_gen_whisper_to_controller'),
+(40208, 'spell_gen_whisper_to_controller'),
+(40210, 'spell_gen_whisper_to_controller'),
+(40213, 'spell_gen_whisper_to_controller'),
+(40217, 'spell_gen_whisper_to_controller'),
+(40218, 'spell_gen_whisper_to_controller'),
+(40233, 'spell_gen_whisper_to_controller'),
+(40252, 'spell_gen_whisper_to_controller'),
+(40352, 'spell_gen_whisper_to_controller'),
+(50014, 'spell_gen_whisper_to_controller'),
+(50023, 'spell_gen_whisper_to_controller'),
+(50219, 'spell_gen_whisper_to_controller'),
+(50221, 'spell_gen_whisper_to_controller'),
+(50222, 'spell_gen_whisper_to_controller'),
+(50223, 'spell_gen_whisper_to_controller'),
+(53374, 'spell_gen_whisper_to_controller'),
+(60807, 'spell_gen_whisper_to_controller'),
+(60811, 'spell_gen_whisper_to_controller');
+
+DELETE FROM `creature_text` WHERE `CreatureID` = 27959;
+
+UPDATE `creature_template` SET `ScriptName` = '', `AIName` = 'SmartAI' WHERE `entry` = 27959;
+DELETE FROM `smart_scripts` WHERE `entryorguid` = 27959 AND `source_type` = 0;
+DELETE FROM `smart_scripts` WHERE `entryorguid` = 2795900 AND `source_type` = 9;
+INSERT INTO `smart_scripts` (`entryorguid`,`source_type`,`id`,`link`,`event_type`,`event_phase_mask`,`event_chance`,`event_flags`,`event_param1`,`event_param2`,`event_param3`,`event_param4`,`event_param5`,`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
+(27959, 0, 0, 0, 37, 0, 100, 0, 0, 0, 0, 0, 0, 116, 2, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Your Inner Turmoil - On Initialize - Set Corpse Delay to 2s'),
+(27959, 0, 1, 0, 11, 0, 100, 0, 0, 0, 0, 0, 0, 80, 2795900, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Your Inner Turmoil - On Respawn - Run Script'),
+(27959, 0, 2, 0, 2, 0, 100, 1, 0, 50, 0, 0, 0, 11, 50222, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Your Inner Turmoil - Between 0-50% Health - Cast \'The Cleansing: Your Inner Turmoil`s Whisper to Controller - On Health 50%\' (No Repeat)'),
+(27959, 0, 3, 0, 6, 0, 100, 0, 0, 0, 0, 0, 0, 11, 50223, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Your Inner Turmoil - On Just Died - Cast \'The Cleansing: Your Inner Turmoil`s Whisper to Controller - On Death\''),
+(27959, 0, 4, 0, 6, 0, 100, 0, 0, 0, 0, 0, 0, 11, 50238, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Your Inner Turmoil - On Just Died - Cast \'The Cleansing: Your Inner Turmoil`s On Death Cast on Master\''),
+-- It has SPELL_ATTR3_DEATH_PERSISTENT but actually is removed after death, maybe not manually
+-- Kinda odd because it makes creature invisible, but Copy Weapon auras are not removed, so only weapons are visible without body
+(27959, 0, 5, 0, 6, 0, 100, 0, 0, 0, 0, 0, 0, 28, 50218, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Your Inner Turmoil - On Just Died - Remove Aura \'The Cleansing: Your Inner Turmoil`s Mirror Image Aura\''),
+(2795900, 9, 0, 0, 0, 0, 100, 0, 0, 0, 0, 0, 0, 11, 50217, 0, 0, 0, 0, 0, 23, 0, 0, 0, 0, 0, 0, 0, 0, 'Your Inner Turmoil - Actionlist - Cast \'The Cleansing: Script Effect Player Cast Mirror Image\''),
+(2795900, 9, 1, 0, 0, 0, 100, 0, 0, 0, 0, 0, 0, 11, 41408, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Your Inner Turmoil - Actionlist - Cast \'Shadowform\''),
+(2795900, 9, 2, 0, 0, 0, 100, 0, 1000, 1000, 0, 0, 0, 66, 0, 0, 0, 0, 0, 0, 23, 0, 0, 0, 0, 0, 0, 0, 0, 'Your Inner Turmoil - Actionlist - Set Orientation Owner Or Summoner'),
+(2795900, 9, 3, 0, 0, 0, 100, 0, 0, 0, 0, 0, 0, 11, 50219, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Your Inner Turmoil - Actionlist - Cast \'The Cleansing: Your Inner Turmoil`s Whisper to Controller - Spawn 01\''),
+(2795900, 9, 4, 0, 0, 0, 100, 0, 0, 0, 0, 0, 0, 5, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Your Inner Turmoil - Actionlist - Play Emote 1'),
+(2795900, 9, 5, 0, 0, 0, 100, 0, 6000, 6000, 0, 0, 0, 66, 0, 0, 0, 0, 0, 0, 23, 0, 0, 0, 0, 0, 0, 0, 0, 'Your Inner Turmoil - Actionlist - Set Orientation Owner Or Summoner'),
+(2795900, 9, 6, 0, 0, 0, 100, 0, 0, 0, 0, 0, 0, 11, 50221, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Your Inner Turmoil - Actionlist - Cast \'The Cleansing: Your Inner Turmoil`s Whisper to Controller - Spawn 02\''),
+(2795900, 9, 7, 0, 0, 0, 100, 0, 0, 0, 0, 0, 0, 5, 25, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Your Inner Turmoil - Actionlist - Play Emote 25'),
+-- Yes, again
+(2795900, 9, 8, 0, 0, 0, 100, 0, 6000, 6000, 0, 0, 0, 11, 50217, 0, 0, 0, 0, 0, 23, 0, 0, 0, 0, 0, 0, 0, 0, 'Your Inner Turmoil - Actionlist - Cast \'The Cleansing: Script Effect Player Cast Mirror Image\''),
+(2795900, 9, 9, 0, 0, 0, 100, 0, 0, 0, 0, 0, 0, 19, 512, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Your Inner Turmoil - Actionlist - Remove Flags Immune To NPC\'s'),
+(2795900, 9, 10, 0, 0, 0, 100, 0, 0, 0, 0, 0, 0, 49, 0, 0, 0, 0, 0, 0, 23, 0, 0, 0, 0, 0, 0, 0, 0, 'Your Inner Turmoil - Actionlist - Start Attacking');
diff --git a/data/sql/updates/db_world/2025_11_30_08.sql b/data/sql/updates/db_world/2025_11_30_08.sql
new file mode 100644
index 0000000000..babbf5e14b
--- /dev/null
+++ b/data/sql/updates/db_world/2025_11_30_08.sql
@@ -0,0 +1,18 @@
+-- DB update 2025_11_30_07 -> 2025_11_30_08
+SET @ITEM = 6995;
+SET @ENTRY = 1055;
+
+-- Creates a reference loot for "Corrupted Kor Gem"
+DELETE FROM `reference_loot_template` WHERE `Entry` = @ENTRY AND `Item` = @ITEM;
+INSERT INTO `reference_loot_template` (`Entry`, `Item`, `Reference`, `Chance`, `QuestRequired`, `LootMode`, `GroupId`, `MinCount`, `MaxCount`, `Comment`) VALUES
+(@ENTRY, @ITEM, 0, 100, 1, 1, 1, 1, 1, 'Corrupted Kor Gem');
+
+-- Deletes "Corrupted Kor Gem" from every creature's loot
+DELETE FROM `creature_loot_template` WHERE `item` = @ITEM;
+
+-- Adds reference loot for "Corrupted Kor Gem" for each creature below
+DELETE FROM `creature_loot_template` WHERE `Reference` = @ENTRY AND `Entry` IN (4802, 4803, 4805);
+INSERT INTO `creature_loot_template` (`Entry`, `Item`, `Reference`, `Chance`, `QuestRequired`, `LootMode`, `GroupId`, `MinCount`, `MaxCount`, `Comment`) VALUES
+(4802, @ITEM, @ENTRY, 80, 0, 1, 0, 1, 1, 'Blackfathom Tide Priestess - Corrupted Kor Gem'),
+(4803, @ITEM, @ENTRY, 80, 0, 1, 0, 1, 1, 'Blackfathom Oracle - Corrupted Kor Gem'),
+(4805, @ITEM, @ENTRY, 80, 0, 1, 0, 1, 1, 'Blackfathom Sea Witch - Corrupted Kor Gem');
diff --git a/data/sql/updates/db_world/2025_12_01_00.sql b/data/sql/updates/db_world/2025_12_01_00.sql
new file mode 100644
index 0000000000..cdc6629f00
--- /dev/null
+++ b/data/sql/updates/db_world/2025_12_01_00.sql
@@ -0,0 +1,3 @@
+-- DB update 2025_11_30_08 -> 2025_12_01_00
+--
+UPDATE `spell_group_stack_rules` SET `stack_rule` = 1 WHERE `group_id` = 1087;
diff --git a/data/sql/updates/db_world/2025_12_01_01.sql b/data/sql/updates/db_world/2025_12_01_01.sql
new file mode 100644
index 0000000000..cdbff3fc43
--- /dev/null
+++ b/data/sql/updates/db_world/2025_12_01_01.sql
@@ -0,0 +1,124 @@
+-- DB update 2025_12_01_00 -> 2025_12_01_01
+--
+SET @CGUID:=126834;
+
+-- Remove old '[DND]' bunnies
+DELETE FROM `creature` WHERE `id1` IN (30655, 30640, 30832, 30646, 30651, 30707, 30649, 30749, 30700, 30699, 30690, 31246, 31353, 30589, 30588, 30476, 30559);
+DELETE FROM `creature` WHERE `id1` = 15214 AND `guid` IN (122568, 122569, 122570);
+DELETE FROM `creature` WHERE `guid` BETWEEN @CGUID+0 AND @CGUID+29;
+INSERT INTO `creature` (`guid`, `id1`, `map`, `spawnMask`, `phaseMask`, `position_x`, `position_y`, `position_z`, `orientation`, `spawntimesecs`, `wander_distance`, `MovementType`) VALUES
+(@CGUID+0, 30640, 623, 1, 1, 35.03846, 36.06336, 25.11708, 5.288348, 120, 0, 0), -- 30640 (Area: 4508) (possible waypoints or random movement)
+(@CGUID+1, 30640, 623, 1, 1, 6.909693, 9.529325, 20.54005, 2.303835, 120, 0, 0), -- 30640 (Area: 4508) (possible waypoints or random movement)
+(@CGUID+2, 30640, 623, 1, 1, -27.16368, 2.981263, 20.54094, 0.122173, 120, 0, 0), -- 30640 (Area: 4508) (possible waypoints or random movement)
+(@CGUID+3, 30640, 623, 1, 1, -56.31194, 12.39219, 31.00466, 3.281219, 120, 0, 0), -- 30640 (Area: 4537) (possible waypoints or random movement)
+(@CGUID+4, 30646, 623, 1, 1, -30.25571, 31.80029, 12.35424, 1.605703, 120, 0, 0), -- 30646 (Area: 4508) (possible waypoints or random movement)
+(@CGUID+5, 30646, 623, 1, 1, -5.325279, 31.62501, 12.34004, 1.500983, 120, 0, 0), -- 30646 (Area: 4508) (possible waypoints or random movement)
+(@CGUID+6, 30651, 623, 1, 1, -40.68238, 29.21558, 12.33503, 1.919862, 120, 0, 0), -- 30651 (Area: 4508) (possible waypoints or random movement)
+(@CGUID+7, 30651, 623, 1, 1, -17.81335, 32.07878, 12.3449, 1.553343, 120, 0, 0), -- 30651 (Area: 4508) (possible waypoints or random movement)
+(@CGUID+8, 30651, 623, 1, 1, 5.88316, 30.50419, 12.34755, 1.32645, 120, 0, 0), -- 30651 (Area: 4508) (possible waypoints or random movement)
+(@CGUID+9, 30655, 623, 1, 1, 6.662919, 19.23895, 10.05156, 0.5061455, 120, 0, 0), -- 30655 (Area: 4509)
+(@CGUID+10, 30655, 623, 1, 1, -43.53964, 18.66365, 9.692578, 3.246312, 120, 0, 0), -- 30655 (Area: 4509) (possible waypoints or random movement)
+(@CGUID+11, 30559, 623, 1, 1, 38.16154, -0.040522, 40.16801, 4.223697, 120, 0, 0), -- 30559 (Area: 4508) (possible waypoints or random movement)
+(@CGUID+12, 30476, 623, 1, 1, 31.41805, 0.126893, 41.69821, 0.05235988, 120, 0, 0), -- 30476 (Area: 4508) (Auras: 56852 - 56852) (possible waypoints or random movement)
+(@CGUID+13, 31353, 623, 1, 1, -21.7234, 19.33753, 9.687197, 1.64061, 120, 0, 0), -- 31353 (Area: 4509) (Auras: 57726 - 57726)
+(@CGUID+14, 30690, 622, 1, 1, 15.24723, 32.37709, 10.63188, 1.553343, 120, 0, 0), -- 30690 (Area: 4533) (possible waypoints or random movement)
+(@CGUID+15, 30690, 622, 1, 1, -11.22309, 32.91199, 10.55865, 1.58825, 120, 0, 0), -- 30690 (Area: 4533) (possible waypoints or random movement)
+(@CGUID+16, 30649, 622, 1, 1, 4.109683, 19.52689, 34.74765, 3.752458, 120, 0, 0), -- 30649 (Area: 4533) (possible waypoints or random movement)
+(@CGUID+17, 30649, 622, 1, 1, -32.53434, 24.30232, 33.9708, 3.211406, 120, 0, 0), -- 30649 (Area: 4533) (possible waypoints or random movement)
+(@CGUID+18, 30649, 622, 1, 1, 50.99569, 46.95655, 23.41373, 2.583087, 120, 0, 0), -- 30649 (Area: 4533) (possible waypoints or random movement)
+(@CGUID+19, 30649, 622, 1, 1, 2.006737, 15.73845, 9.250069, 3.368485, 120, 0, 0), -- 30649 (Area: 4533) (possible waypoints or random movement)
+(@CGUID+20, 30699, 622, 1, 1, 1.853844, 32.8888, 10.02361, 1.58825, 120, 0, 0), -- 30699 (Area: 4533) (possible waypoints or random movement)
+(@CGUID+21, 30700, 622, 1, 1, -35.66628, 29.43331, 1.87925, 1.745329, 120, 0, 0), -- 30700 (Area: 0) (possible waypoints or random movement)
+(@CGUID+22, 30700, 622, 1, 1, 7.417077, 32.82674, 38.35604, 1.553343, 120, 0, 0), -- 30700 (Area: 0) (possible waypoints or random movement)
+(@CGUID+23, 30700, 622, 1, 1, -55.9708, 28.44186, 18.02501, 2.268928, 120, 0, 0), -- 30700 (Area: 0) (possible waypoints or random movement)
+(@CGUID+24, 30700, 622, 1, 1, 38.76255, 30.09343, 2.308181, 1.134464, 120, 0, 0), -- 30700 (Area: 4533) (possible waypoints or random movement)
+(@CGUID+25, 30707, 622, 1, 1, 19.47087, 27.5296, 10.64527, 1.396263, 120, 0, 0), -- 30707 (Area: 4533) (possible waypoints or random movement)
+(@CGUID+26, 30707, 622, 1, 1, -15.3085, 30.59285, 11.11614, 2.635447, 120, 0, 0), -- 30707 (Area: 0) (possible waypoints or random movement)
+(@CGUID+27, 31353, 622, 1, 1, -7.999845, 17.85185, 35.04856, 2.460914, 120, 0, 0), -- 31353 (Area: 0) (possible waypoints or random movement)
+(@CGUID+28, 30588, 622, 1, 1, -18.10283, -0.042108, 45.31725, 1.762783, 120, 0, 0), -- 30588 (Area: 4533) (Auras: 57424 - 57424) (possible waypoints or random movement)
+(@CGUID+29, 30589, 622, 1, 1, -11.83204, -0.019289, 43.11467, 4.153883, 120, 0, 0); -- 30589 (Area: 4533) (possible waypoints or random movement)
+
+UPDATE `creature_template` SET `flags_extra`= `flags_extra` | 128 WHERE `entry` IN (30690, 30699);
+
+DELETE FROM `creature_addon` WHERE `guid` IN (122568, 122569, 122758, 122777, 124002, 124113);
+
+-- Match existing (A) entry, 'To Icecrown - Airship (H) - Aura - Approach'
+UPDATE `creature_template_addon` SET `auras` = '57424' WHERE (`entry` = 30588);
+
+DELETE FROM `creature_template_movement` WHERE (`CreatureId` IN (30476, 30588));
+INSERT INTO `creature_template_movement` (`CreatureId`, `Ground`, `Swim`, `Flight`, `Rooted`, `Chase`, `Random`, `InteractionPauseTimer`) VALUES
+(30476, 0, 0, 1, 0, 0, 0, 0),
+(30588, 0, 0, 1, 0, 0, 0, 0);
+
+UPDATE `creature_template_addon` SET `auras` = '' WHERE (`entry` IN (30470, 30585));
+DELETE FROM `creature_template_movement` WHERE (`CreatureId` IN (30470, 30585));
+INSERT INTO `creature_template_movement` (`CreatureId`, `Ground`, `Swim`, `Flight`, `Rooted`, `Chase`, `Random`, `InteractionPauseTimer`) VALUES
+(30470, 0, 0, 1, 0, 0, 0, 0),
+(30585, 0, 0, 1, 0, 0, 0, 0);
+
+-- teleport target condition
+DELETE FROM `conditions` WHERE (`SourceTypeOrReferenceId` = 13) AND (`SourceGroup` = 1) AND (`SourceEntry` IN (56905, 56917, 57420, 57417)) AND (`SourceId` = 0) AND (`ElseGroup` IN (0, 1)) AND (`ConditionTypeOrReference` = 31) AND (`ConditionTarget` = 0) AND (`ConditionValue1` = 3) AND (`ConditionValue2` IN (30476, 30559, 30588, 30589)) AND (`ConditionValue3` = 0);
+INSERT INTO `conditions` (`SourceTypeOrReferenceId`, `SourceGroup`, `SourceEntry`, `SourceId`, `ElseGroup`, `ConditionTypeOrReference`, `ConditionTarget`, `ConditionValue1`, `ConditionValue2`, `ConditionValue3`, `NegativeCondition`, `ErrorType`, `ErrorTextId`, `ScriptName`, `Comment`) VALUES
+(13, 1, 56905, 0, 0, 31, 0, 3, 30476, 0, 0, 0, 0, '', 'target must be [DND] Icecrown Flight To Airship Bunny (A)'),
+(13, 1, 56917, 0, 0, 31, 0, 3, 30559, 0, 0, 0, 0, '', 'target must be [DND] Icecrown Flight To Airship Bunny (A) Teleport Target'),
+(13, 1, 57420, 0, 0, 31, 0, 3, 30588, 0, 0, 0, 0, '', 'target must be [DND] Icecrown Flight To Airship Bunny (H)'),
+(13, 1, 57417, 0, 0, 31, 0, 3, 30589, 0, 0, 0, 0, '', 'target must be [DND] Icecrown Flight To Airship Bunny (H) Teleport Target');
+
+-- dismount trigger condition
+DELETE FROM `conditions` WHERE (`SourceTypeOrReferenceId` = 17) AND (`SourceGroup` = 0) AND (`SourceEntry` = 56921) AND (`SourceId` = 0) AND (`ElseGroup` IN (0, 1)) AND (`ConditionTypeOrReference` = 31) AND (`ConditionTarget` = 1) AND (`ConditionValue1` = 3) AND (`ConditionValue2` IN (30470, 30585)) AND (`ConditionValue3` = 0);
+INSERT INTO `conditions` (`SourceTypeOrReferenceId`, `SourceGroup`, `SourceEntry`, `SourceId`, `ElseGroup`, `ConditionTypeOrReference`, `ConditionTarget`, `ConditionValue1`, `ConditionValue2`, `ConditionValue3`, `NegativeCondition`, `ErrorType`, `ErrorTextId`, `ScriptName`, `Comment`) VALUES
+(17, 0, 56921, 0, 0, 31, 1, 3, 30470, 0, 0, 0, 0, '', 'target must be Skybreaker Cloudbuster'),
+(17, 0, 56921, 0, 1, 31, 1, 3, 30585, 0, 0, 0, 0, '', 'target must be Hammerhead');
+
+UPDATE `creature_template` SET `AIName` = 'SmartAI' WHERE `entry` IN (30476, 30588);
+DELETE FROM `smart_scripts` WHERE (`source_type` = 0 AND `entryorguid` IN (30476, 30588));
+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
+(30476, 0, 0, 1, 8, 0, 100, 0, 56905, 0, 0, 0, 0, 0, 11, 57554, 2, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 0, '[DND] Icecrown Flight To Airship Bunny (A) - On Spellhit \'To Icecrown - Player - Aura (A) - Dismount Trigger\' - Cast \'To Icecrown Airship - Teleport to Airship (A) Force Player to Cast\''),
+(30476, 0, 1, 0, 61, 0, 100, 0, 0, 0, 0, 0, 0, 0, 11, 56921, 2, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 0, '[DND] Icecrown Flight To Airship Bunny (A) - On Spellhit \'To Icecrown - Player - Aura (A) - Dismount Trigger\' - Cast \'To Icecrown - Aura - Dismount Response\''),
+(30588, 0, 0, 1, 8, 0, 100, 0, 57420, 0, 0, 0, 0, 0, 11, 57556, 2, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 0, '[DND] Icecrown Flight To Airship Bunny (H) - On Spellhit \'To Icecrown - Player - Aura (A) - Dismount Trigger\' - Cast \'To Icecrown Airship - Teleport to Airship (H) Force Player to Cast\''),
+(30588, 0, 1, 0, 61, 0, 100, 0, 0, 0, 0, 0, 0, 0, 11, 56921, 2, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 0, '[DND] Icecrown Flight To Airship Bunny (H) - On Spellhit \'To Icecrown - Player - Aura (A) - Dismount Trigger\' - Cast \'To Icecrown - Aura - Dismount Response\'');
+
+DELETE FROM `waypoints` WHERE `entry` IN (30470, 30585) AND `pointid` BETWEEN 1 AND 18;
+INSERT INTO `waypoints` (`entry`, `pointid`, `position_x`, `position_y`, `position_z`, `point_comment`) VALUES
+(30470, 1, 5818.54, 483.97, 660.0, 'Skybreaker Cloudbuster'),
+(30470, 2, 5810.04, 486.907, 660.167, 'Skybreaker Cloudbuster'),
+(30470, 3, 5827.64, 482.851, 669.25, 'Skybreaker Cloudbuster'),
+(30470, 4, 5845.60, 505.766, 677.9, 'Skybreaker Cloudbuster'),
+(30470, 5, 5865.83, 544.756, 689.667, 'Skybreaker Cloudbuster'),
+(30470, 6, 5897.43, 586.118, 689.667, 'Skybreaker Cloudbuster'),
+(30470, 7, 5936.38, 642.625, 682.418, 'Skybreaker Cloudbuster'),
+(30470, 8, 5954.68, 688.565, 678.141, 'Skybreaker Cloudbuster'),
+(30470, 9, 5987.02, 725.128, 673.53, 'Skybreaker Cloudbuster'),
+(30470, 10, 6055.09, 766.575, 663.057, 'Skybreaker Cloudbuster'),
+(30470, 11, 6077.21, 796.139, 663.057, 'Skybreaker Cloudbuster'),
+(30470, 12, 6089.87, 824.184, 658.753, 'Skybreaker Cloudbuster'),
+(30470, 13, 6119.88, 881.953, 657.474, 'Skybreaker Cloudbuster'),
+(30470, 14, 6187.39, 959.597, 663.057, 'Skybreaker Cloudbuster'),
+(30470, 15, 6346.12, 1060.05, 654.669, 'Skybreaker Cloudbuster'),
+(30470, 16, 6466.61, 1107.18, 653.78, 'Skybreaker Cloudbuster'),
+(30470, 17, 6626.67, 1136.81, 647.084, 'Skybreaker Cloudbuster'),
+(30470, 18, 6733.84, 1153.34, 663.057, 'Skybreaker Cloudbuster'),
+(30585, 1, 5836.95, 475.408, 660.167, 'Hammerhead'),
+(30585, 2, 5835.36, 490.093, 669.25, 'Hammerhead'),
+(30585, 3, 5845.6, 505.766, 677.9, 'Hammerhead'),
+(30585, 4, 5865.83, 544.756, 689.667, 'Hammerhead'),
+(30585, 5, 5897.43, 586.118, 689.667, 'Hammerhead'),
+(30585, 6, 5936.38, 642.625, 682.418, 'Hammerhead'),
+(30585, 7, 5954.68, 688.565, 678.141, 'Hammerhead'),
+(30585, 8, 5987.02, 725.128, 673.53, 'Hammerhead'),
+(30585, 9, 6055.09, 766.575, 663.057, 'Hammerhead'),
+(30585, 10, 6077.21, 796.139, 663.057, 'Hammerhead'),
+(30585, 11, 6089.87, 824.184, 663.057, 'Hammerhead'),
+(30585, 12, 6133.36, 911.233, 642.309, 'Hammerhead'),
+(30585, 13, 6187.39, 959.597, 625.03, 'Hammerhead'),
+(30585, 14, 6346.12, 1060.05, 631.336, 'Hammerhead'),
+(30585, 15, 6466.61, 1107.18, 640.891, 'Hammerhead'),
+(30585, 16, 6626.67, 1136.81, 639.669, 'Hammerhead'),
+(30585, 17, 6733.84, 1153.34, 637.03, 'Hammerhead'),
+(30585, 18, 6835.57, 1203.64, 642.974, 'Hammerhead');
+
+-- TP To Dalaran after 5 minutes
+-- Location copied from 30719 'Teleport to Dalaran'
+DELETE FROM `spell_target_position` WHERE `ID` = 57461 AND `EffectIndex` = 0;
+INSERT INTO `spell_target_position` (`ID`, `EffectIndex`, `MapID`, `PositionX`, `PositionY`, `PositionZ`, `Orientation`, `VerifiedBuild`) VALUES
+(57461, 0, 571, 5807.75, 588.347, 661.505, 1.663, 0);
diff --git a/data/sql/updates/db_world/2025_12_01_02.sql b/data/sql/updates/db_world/2025_12_01_02.sql
new file mode 100644
index 0000000000..5f3db97d55
--- /dev/null
+++ b/data/sql/updates/db_world/2025_12_01_02.sql
@@ -0,0 +1,4 @@
+-- DB update 2025_12_01_01 -> 2025_12_01_02
+
+-- Set HP
+UPDATE `creature` SET `curhealth` = 8982 WHERE (`id1` = 26523) AND (`guid` IN (150213, 150214, 150215, 150216, 150217));
diff --git a/data/sql/updates/db_world/2025_12_01_03.sql b/data/sql/updates/db_world/2025_12_01_03.sql
new file mode 100644
index 0000000000..1ac4d11d6f
--- /dev/null
+++ b/data/sql/updates/db_world/2025_12_01_03.sql
@@ -0,0 +1,5 @@
+-- DB update 2025_12_01_02 -> 2025_12_01_03
+DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId` = 13 AND `SourceEntry` = 52457;
+INSERT INTO `conditions` (`SourceTypeOrReferenceId`, `SourceGroup`, `SourceEntry`, `SourceId`, `ElseGroup`, `ConditionTypeOrReference`, `ConditionTarget`, `ConditionValue1`, `ConditionValue2`, `ConditionValue3`, `NegativeCondition`, `ErrorType`, `ErrorTextId`, `ScriptName`, `Comment`) VALUES
+(13, 1, 52457, 0, 0, 31, 0, 3, 26797, 0, 0, 0, 0, '', 'Spell 52457 (Drak\'aguul\'s Soldiers) - Target Drakkari Protector'),
+(13, 1, 52457, 0, 1, 31, 0, 3, 26795, 0, 0, 0, 0, '', 'Spell 52457 (Drak\'aguul\'s Soldiers) - Target Drakkari Oracle');
diff --git a/data/sql/updates/db_world/2025_12_01_04.sql b/data/sql/updates/db_world/2025_12_01_04.sql
new file mode 100644
index 0000000000..a4c5268e09
--- /dev/null
+++ b/data/sql/updates/db_world/2025_12_01_04.sql
@@ -0,0 +1,43 @@
+-- DB update 2025_12_01_03 -> 2025_12_01_04
+-- Update gameobject 'Kaskala Supplies' with sniffed values
+-- updated spawns
+DELETE FROM `gameobject` WHERE (`id` IN (188164)) AND (`guid` IN (21196, 21198, 21199, 21200, 21201, 55049, 55050, 55053, 55054, 55055, 55056, 55062, 55063, 55064, 55065, 55066, 55067, 55068, 55069, 55070, 55071, 55072, 55073, 55074, 55075, 55076));
+INSERT INTO `gameobject` (`guid`, `id`, `map`, `zoneId`, `areaId`, `spawnMask`, `phaseMask`, `position_x`, `position_y`, `position_z`, `orientation`, `rotation0`, `rotation1`, `rotation2`, `rotation3`, `spawntimesecs`, `animprogress`, `state`, `ScriptName`, `VerifiedBuild`, `Comment`) VALUES
+(21196, 188164, 571, 0, 0, 1, 1, 3090.959716796875, 4834.1533203125, 1.773596048355102539, 4.258606910705566406, 0, 0, -0.84804725646972656, 0.529920578002929687, 300, 255, 1, "", 46368, NULL),
+(21198, 188164, 571, 0, 0, 1, 1, 2852.42529296875, 4359.61181640625, 2.469172000885009765, 3.45575571060180664, 0, 0, -0.98768806457519531, 0.156436234712600708, 300, 255, 1, "", 45854, NULL),
+(21199, 188164, 571, 0, 0, 1, 1, 2861.06689453125, 4320.09130859375, 1.672091960906982421, 4.258606910705566406, 0, 0, -0.84804725646972656, 0.529920578002929687, 300, 255, 1, "", 45854, NULL),
+(21200, 188164, 571, 0, 0, 1, 1, 2903.911376953125, 4342.56689453125, 3.770941972732543945, 1.884953022003173828, 0, 0, 0.809016227722167968, 0.587786316871643066, 300, 255, 1, "", 45854, NULL),
+(21201, 188164, 571, 0, 0, 1, 1, 2920.125732421875, 4348.05224609375, 4.131337165832519531, 2.827429771423339843, 0, 0, 0.987688064575195312, 0.156436234712600708, 300, 255, 1, "", 45854, NULL),
+(55049, 188164, 571, 0, 0, 1, 1, 2971.307861328125, 4833.74755859375, 0.396221011877059936, 0.872663915157318115, 0, 0, 0.422617912292480468, 0.906307935714721679, 300, 255, 1, "", 45854, NULL),
+(55050, 188164, 571, 0, 0, 1, 1, 3021.4794921875, 4658.08935546875, 0.396221011877059936, 3.822272777557373046, 0, 0, -0.94264125823974609, 0.333807557821273803, 300, 255, 1, "", 46158, NULL),
+(55053, 188164, 571, 0, 0, 1, 1, 3026.746826171875, 4698.53955078125, 0.396218985319137573, 5.864306926727294921, 0, 0, -0.20791149139404296, 0.978147625923156738, 300, 255, 1, "", 46158, NULL),
+(55054, 188164, 571, 0, 0, 1, 1, 2988.111572265625, 4615.74853515625, 0.39622199535369873, 4.607671737670898437, 0, 0, -0.74314403533935546, 0.669131457805633544, 300, 255, 1, "", 46158, NULL),
+(55055, 188164, 571, 0, 0, 1, 1, 2999.525634765625, 4844.74462890625, 0.396218985319137573, 0.104719325900077819, 0, 0, 0.052335739135742187, 0.998629570007324218, 300, 255, 1, "", 45854, NULL),
+(55056, 188164, 571, 0, 0, 1, 1, 3092.693115234375, 4880.60107421875, 0.396218985319137573, 4.48549652099609375, 0, 0, -0.7826080322265625, 0.622514784336090087, 300, 255, 1, "", 46158, NULL),
+(55062, 188164, 571, 0, 0, 1, 1, 2877.409423828125, 4866.79833984375, 0.396219998598098754, 4.520402908325195312, 0, 0, -0.77162456512451171, 0.636078238487243652, 300, 255, 1, "", 46158, NULL),
+(55063, 188164, 571, 0, 0, 1, 1, 3021.50048828125, 4881.67431640625, 0.396218985319137573, 3.961898565292358398, 0, 0, -0.91705989837646484, 0.398749500513076782, 300, 255, 1, "", 45854, NULL),
+(55064, 188164, 571, 0, 0, 1, 1, 2923.610595703125, 4830.14697265625, 0.396219998598098754, 6.09120035171508789, 0, 0, -0.09584522247314453, 0.995396256446838378, 300, 255, 1, "", 45854, NULL),
+(55065, 188164, 571, 0, 0, 1, 1, 3123.70458984375, 4742.7275390625, 7.44305276870727539, 3.071766138076782226, 0, 0, 0.999390602111816406, 0.034906134009361267, 300, 255, 1, "", 46158, NULL),
+(55066, 188164, 571, 0, 0, 1, 1, 2890.171875, 4936.33447265625, 1.871719002723693847, 4.345870018005371093, 0, 0, -0.82412624359130859, 0.566406130790710449, 300, 255, 1, "", 45854, NULL),
+(55067, 188164, 571, 0, 0, 1, 1, 2969.289794921875, 4851.22705078125, 0.408302009105682373, 1.745326757431030273, 0, 0, 0.766043663024902343, 0.642788589000701904, 300, 255, 1, "", 45854, NULL),
+(55068, 188164, 571, 0, 0, 1, 1, 2879.10107421875, 4905.57763671875, 2.53964996337890625, 3.595378875732421875, 0, 0, -0.97437000274658203, 0.224951311945915222, 300, 255, 1, "", 45854, NULL),
+(55069, 188164, 571, 0, 0, 1, 1, 2918.706298828125, 4889.00537109375, 2.560297966003417968, 0.907570242881774902, 0, 0, 0.438370704650878906, 0.898794233798980712, 300, 255, 1, "", 45854, NULL),
+(55070, 188164, 571, 0, 0, 1, 1, 3083.975830078125, 4848.85400390625, 3.177611112594604492, 0.575957298278808593, 0, 0, 0.284014701843261718, 0.958819925785064697, 300, 255, 1, "", 45854, NULL),
+(55071, 188164, 571, 0, 0, 1, 1, 3027.964599609375, 4724.9462890625, 0.396210014820098876, 6.230826377868652343, 0, 0, -0.02617645263671875, 0.999657332897186279, 300, 255, 1, "", 46158, NULL),
+(55072, 188164, 571, 0, 0, 1, 1, 3099.82373046875, 4804.06005859375, 1.220486998558044433, 1.308995485305786132, 0, 0, 0.608760833740234375, 0.793353796005249023, 300, 255, 1, "", 46158, NULL),
+(55073, 188164, 571, 0, 0, 1, 1, 3056.2587890625, 4769.31591796875, 1.679136037826538085, 2.548179388046264648, 0, 0, 0.956304550170898437, 0.292372345924377441, 300, 255, 1, "", 46368, NULL),
+(55074, 188164, 571, 0, 0, 1, 1, 3133.72998046875, 4752.50341796875, 8.12195587158203125, 5.969027042388916015, 0, 0, -0.1564340591430664, 0.987688362598419189, 300, 255, 1, "", 46158, NULL),
+(55075, 188164, 571, 0, 0, 1, 1, 3051.9287109375, 4808.58056640625, 2.0370330810546875, 0.820303261280059814, 0, 0, 0.398748397827148437, 0.917060375213623046, 300, 255, 1, "", 45854, NULL),
+(55076, 188164, 571, 0, 0, 1, 1, 3035.663818359375, 4777.59912109375, 0.396205991506576538, 3.874631166458129882, 0, 0, -0.93358039855957031, 0.358368009328842163, 300, 255, 1, "", 46368, NULL);
+
+-- new spawns
+DELETE FROM `gameobject` WHERE (`id` IN (188164)) AND (`guid` IN (582, 583, 584, 585, 586, 587, 588, 589));
+INSERT INTO `gameobject` (`guid`, `id`, `map`, `zoneId`, `areaId`, `spawnMask`, `phaseMask`, `position_x`, `position_y`, `position_z`, `orientation`, `rotation0`, `rotation1`, `rotation2`, `rotation3`, `spawntimesecs`, `animprogress`, `state`, `ScriptName`, `VerifiedBuild`, `Comment`) VALUES
+(582, 188164, 571, 0, 0, 1, 1, 2913.260498046875, 4930.26806640625, 2.561732053756713867, 3.45575571060180664, 0, 0, -0.98768806457519531, 0.156436234712600708, 300, 255, 1, "", 46158, NULL),
+(583, 188164, 571, 0, 0, 1, 1, 2991.869384765625, 4628.22216796875, 0.396219998598098754, 5.672322273254394531, 0, 0, -0.3007049560546875, 0.953717231750488281, 300, 255, 1, "", 46158, NULL),
+(584, 188164, 571, 0, 0, 1, 1, 3058.022705078125, 4826.490234375, 1.375823974609375, 1.85004889965057373, 0, 0, 0.798635482788085937, 0.60181504487991333, 300, 255, 1, "", 45854, NULL),
+(585, 188164, 571, 0, 0, 1, 1, 3060.99365234375, 4765.1005859375, 1.134042024612426757, 4.537858963012695312, 0, 0, -0.76604366302490234, 0.642788589000701904, 300, 255, 1, "", 46158, NULL),
+(586, 188164, 571, 0, 0, 1, 1, 3075.670654296875, 4824.07275390625, 1.220486044883728027, 1.884953022003173828, 0, 0, 0.809016227722167968, 0.587786316871643066, 300, 255, 1, "", 48632, NULL),
+(587, 188164, 571, 0, 0, 1, 1, 3094.1884765625, 4792.8369140625, 1.994282007217407226, 1.274088263511657714, 0, 0, 0.594821929931640625, 0.80385744571685791, 300, 255, 1, "", 45854, NULL),
+(588, 188164, 571, 0, 0, 1, 1, 3109.00830078125, 4778.85791015625, 6.534741878509521484, 3.211419343948364257, 0, 0, -0.9993906021118164, 0.034906134009361267, 300, 255, 1, "", 46158, NULL),
+(589, 188164, 571, 0, 0, 1, 1, 3122.1181640625, 4826.61669921875, 1.442281007766723632, 0.471238493919372558, 0, 0, 0.233445167541503906, 0.972369968891143798, 300, 255, 1, "", 46158, NULL);
diff --git a/data/sql/updates/db_world/2025_12_01_05.sql b/data/sql/updates/db_world/2025_12_01_05.sql
new file mode 100644
index 0000000000..81ce9a5adb
--- /dev/null
+++ b/data/sql/updates/db_world/2025_12_01_05.sql
@@ -0,0 +1,9 @@
+-- DB update 2025_12_01_04 -> 2025_12_01_05
+--
+-- Wolfsbane Root (189313) - Despawn on use via SmartAI
+-- Closes https://github.com/azerothcore/azerothcore-wotlk/issues/23904
+UPDATE `gameobject_template` SET `AIName` = 'SmartGameObjectAI' WHERE `entry` = 189313;
+
+DELETE FROM `smart_scripts` WHERE `entryorguid` = 189313 AND `source_type` = 1;
+INSERT INTO `smart_scripts` (`entryorguid`, `source_type`, `id`, `link`, `event_type`, `event_phase_mask`, `event_chance`, `event_flags`, `event_param1`, `event_param2`, `event_param3`, `event_param4`, `event_param5`, `event_param6`, `action_type`, `action_param1`, `action_param2`, `action_param3`, `action_param4`, `action_param5`, `action_param6`, `target_type`, `target_param1`, `target_param2`, `target_param3`, `target_param4`, `target_x`, `target_y`, `target_z`, `target_o`, `comment`) VALUES
+(189313, 1, 0, 0, 70, 0, 100, 0, 2, 0, 0, 0, 0, 0, 41, 1000, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Wolfsbane Root - On State Changed - Despawn');
diff --git a/data/sql/updates/db_world/2025_12_02_00.sql b/data/sql/updates/db_world/2025_12_02_00.sql
new file mode 100644
index 0000000000..ca9e7aea3a
--- /dev/null
+++ b/data/sql/updates/db_world/2025_12_02_00.sql
@@ -0,0 +1,4 @@
+-- DB update 2025_12_01_05 -> 2025_12_02_00
+
+-- Remove double spawn point
+DELETE FROM `creature` WHERE (`id1` = 32250) AND (`guid` IN (125031));
diff --git a/data/sql/updates/db_world/2025_12_02_01.sql b/data/sql/updates/db_world/2025_12_02_01.sql
new file mode 100644
index 0000000000..63705b3fcf
--- /dev/null
+++ b/data/sql/updates/db_world/2025_12_02_01.sql
@@ -0,0 +1,38 @@
+-- DB update 2025_12_02_00 -> 2025_12_02_01
+--
+DELETE FROM `smart_scripts` WHERE (`entryorguid` = 29796) 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
+(29796, 0, 0, 0, 19, 0, 100, 0, 12886, 0, 0, 0, 0, 0, 11, 55253, 0, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 0, 'Gretta the Arbiter - On Quest \'The Drakkensryd\' Taken - Cast \'Force Cast Initial Proto-Drake\'');
+
+UPDATE `creature_template` SET `speed_run` = 3.2 WHERE (`entry` = 29679);
+
+-- 55971 Eagle Flight
+UPDATE `creature_template_addon` SET `auras` = '55971' WHERE (`entry` = 29679);
+
+-- Update comments, Exit vehicle on death
+DELETE FROM `smart_scripts` WHERE (`entryorguid` = 29694) 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
+(29694, 0, 0, 0, 0, 0, 100, 0, 2000, 5000, 5000, 9000, 0, 0, 11, 32736, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 'Hyldsmeet Drakerider - In Combat - Cast \'Mortal Strike\''),
+(29694, 0, 1, 2, 6, 0, 100, 512, 0, 0, 0, 0, 0, 0, 33, 29800, 0, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 0, 'Hyldsmeet Drakerider - On Just Died - Quest Credit \'null\''),
+(29694, 0, 2, 0, 61, 0, 100, 0, 0, 0, 0, 0, 0, 0, 203, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Hyldsmeet Drakerider - On Just Died - Exit vehicle');
+
+-- Hyldsmeet Drakerider eject NPC passenger vertically
+DELETE FROM `vehicle_seat_addon` WHERE (`SeatEntry` = 2101);
+INSERT INTO `vehicle_seat_addon` (`SeatEntry`, `SeatOrientation`, `ExitParamX`, `ExitParamY`, `ExitParamZ`, `ExitParamO`, `ExitParamValue`) VALUES
+(2101, 0, 0, 0, 4, 0, 1);
+
+-- Update Comments, Reduce despawn time from 2s to 1s
+DELETE FROM `smart_scripts` WHERE (`entryorguid` = 29679) 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
+(29679, 0, 0, 0, 60, 0, 100, 513, 1000, 1000, 0, 0, 0, 0, 53, 2, 29679, 0, 0, 1000, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Hyldsmeet Proto-Drake - On Update - Start Waypoint Path 29679 (No Repeat)'),
+(29679, 0, 1, 0, 60, 0, 100, 513, 500, 500, 0, 0, 0, 0, 60, 1, 500, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Hyldsmeet Proto-Drake - On Update - Set Fly On (No Repeat)'),
+(29679, 0, 2, 0, 28, 0, 100, 512, 0, 0, 0, 0, 0, 0, 41, 1000, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Hyldsmeet Proto-Drake - On Passenger Removed - Despawn In 1000 ms');
+
+DELETE FROM `spell_area` WHERE `spell` IN (55012, 72914) AND `area` IN (4430, 4431, 4432) AND `quest_start` = 12886;
+INSERT INTO `spell_area` (`spell`, `area`, `quest_start`, `quest_end`, `aura_spell`, `racemask`, `gender`, `autocast`, `quest_start_status`, `quest_end_status`) VALUES
+(55012, 4430, 12886, 0, 0, 0, 2, 1, 10, 0),
+(55012, 4431, 12886, 0, 0, 0, 2, 1, 10, 0),
+(55012, 4432, 12886, 0, 0, 0, 2, 1, 10, 0),
+(72914, 4430, 12886, 0, 0, 0, 2, 1, 10, 0),
+(72914, 4431, 12886, 0, 0, 0, 2, 1, 10, 0),
+(72914, 4432, 12886, 0, 0, 0, 2, 1, 10, 0);
diff --git a/data/sql/updates/db_world/2025_12_02_02.sql b/data/sql/updates/db_world/2025_12_02_02.sql
new file mode 100644
index 0000000000..e2f4488bda
--- /dev/null
+++ b/data/sql/updates/db_world/2025_12_02_02.sql
@@ -0,0 +1,66 @@
+-- DB update 2025_12_02_01 -> 2025_12_02_02
+-- Makes all Everfrost Chips spawns 45 minutes (before 30 and 1 hour).
+UPDATE `gameobject` SET `spawntimesecs` = 2700 WHERE `id` = 193997;
+
+DELETE FROM `pool_template` WHERE `entry` IN (150, 151, 152);
+INSERT INTO `pool_template` (`entry`, `max_limit`, `description`) VALUES
+(150, 8, "Everfrost Chip - Valley of Ancient Winters"), -- Total 30 / 4 = 7.5 rounded to 8
+(151, 4, "Everfrost Chip - Frostfield Lake"), -- Total 16 / 4 = 4
+(152, 2, "Everfrost Chip - Dun Niffelem"); -- Total 08 / 4 = 2
+
+DELETE FROM `pool_gameobject` WHERE `pool_entry` IN (150, 151, 152) AND `guid` IN (221000, 221002, 1161, 1162, 1163, 1164, 1165, 1166, 1167, 1168, 1169, 1170, 3721, 3722, 3723, 3724, 3725, 3726, 3727, 3728, 3729, 3730, 3731, 3732, 3733, 3734, 3735, 3736, 3737, 3738, 3739, 3740, 3741, 3742, 3743, 3744, 3745, 3746, 3747, 3748, 3749, 3750, 3751, 3752, 3753, 3754, 3755, 3756, 3757, 3758, 3759, 3760, 3761, 221001);
+INSERT INTO `pool_gameobject` (`guid`, `pool_entry`, `chance`, `description`) VALUES
+(3728, 150, 0, "Everfrost Chip - Valley of Ancient Winters"),
+(3751, 150, 0, "Everfrost Chip - Valley of Ancient Winters"),
+(3761, 150, 0, "Everfrost Chip - Valley of Ancient Winters"),
+(3721, 150, 0, "Everfrost Chip - Valley of Ancient Winters"),
+(3734, 150, 0, "Everfrost Chip - Valley of Ancient Winters"),
+(3755, 150, 0, "Everfrost Chip - Valley of Ancient Winters"),
+(3724, 150, 0, "Everfrost Chip - Valley of Ancient Winters"),
+(1170, 150, 0, "Everfrost Chip - Valley of Ancient Winters"),
+(3732, 150, 0, "Everfrost Chip - Valley of Ancient Winters"),
+(3723, 150, 0, "Everfrost Chip - Valley of Ancient Winters"),
+(3729, 150, 0, "Everfrost Chip - Valley of Ancient Winters"),
+(3746, 150, 0, "Everfrost Chip - Valley of Ancient Winters"),
+(3752, 150, 0, "Everfrost Chip - Valley of Ancient Winters"),
+(1161, 150, 0, "Everfrost Chip - Valley of Ancient Winters"),
+(3722, 150, 0, "Everfrost Chip - Valley of Ancient Winters"),
+(3756, 150, 0, "Everfrost Chip - Valley of Ancient Winters"),
+(3731, 150, 0, "Everfrost Chip - Valley of Ancient Winters"),
+(1162, 150, 0, "Everfrost Chip - Valley of Ancient Winters"),
+(1163, 150, 0, "Everfrost Chip - Valley of Ancient Winters"),
+(3737, 150, 0, "Everfrost Chip - Valley of Ancient Winters"),
+(3730, 150, 0, "Everfrost Chip - Valley of Ancient Winters"),
+(3726, 150, 0, "Everfrost Chip - Valley of Ancient Winters"),
+(3727, 150, 0, "Everfrost Chip - Valley of Ancient Winters"),
+(1169, 150, 0, "Everfrost Chip - Valley of Ancient Winters"),
+(3736, 150, 0, "Everfrost Chip - Valley of Ancient Winters"),
+(221002, 150, 0, "Everfrost Chip - Valley of Ancient Winters"),
+(3749, 150, 0, "Everfrost Chip - Valley of Ancient Winters"),
+(221000, 150, 0, "Everfrost Chip - Valley of Ancient Winters"),
+(3743, 150, 0, "Everfrost Chip - Valley of Ancient Winters"),
+(3725, 150, 0, "Everfrost Chip - Valley of Ancient Winters"),
+(3759, 151, 0, "Everfrost Chip - Frostfield Lake"),
+(3733, 151, 0, "Everfrost Chip - Frostfield Lake"),
+(3753, 151, 0, "Everfrost Chip - Frostfield Lake"),
+(3758, 151, 0, "Everfrost Chip - Frostfield Lake"),
+(221001, 151, 0, "Everfrost Chip - Frostfield Lake"),
+(3735, 151, 0, "Everfrost Chip - Frostfield Lake"),
+(1168, 151, 0, "Everfrost Chip - Frostfield Lake"),
+(1167, 151, 0, "Everfrost Chip - Frostfield Lake"),
+(3760, 151, 0, "Everfrost Chip - Frostfield Lake"),
+(3745, 151, 0, "Everfrost Chip - Frostfield Lake"),
+(3741, 151, 0, "Everfrost Chip - Frostfield Lake"),
+(3744, 151, 0, "Everfrost Chip - Frostfield Lake"),
+(1166, 151, 0, "Everfrost Chip - Frostfield Lake"),
+(3739, 151, 0, "Everfrost Chip - Frostfield Lake"),
+(3757, 151, 0, "Everfrost Chip - Frostfield Lake"),
+(3748, 152, 0, "Everfrost Chip - Dun Niffelem"),
+(3740, 152, 0, "Everfrost Chip - Dun Niffelem"),
+(3738, 152, 0, "Everfrost Chip - Dun Niffelem"),
+(3750, 152, 0, "Everfrost Chip - Dun Niffelem"),
+(1164, 152, 0, "Everfrost Chip - Dun Niffelem"),
+(3747, 152, 0, "Everfrost Chip - Dun Niffelem"),
+(1165, 152, 0, "Everfrost Chip - Dun Niffelem"),
+(3742, 152, 0, "Everfrost Chip - Dun Niffelem"),
+(3754, 152, 0, "Everfrost Chip - Dun Niffelem");
diff --git a/data/sql/updates/db_world/2025_12_02_03.sql b/data/sql/updates/db_world/2025_12_02_03.sql
new file mode 100644
index 0000000000..7dc7171969
--- /dev/null
+++ b/data/sql/updates/db_world/2025_12_02_03.sql
@@ -0,0 +1,3 @@
+-- DB update 2025_12_02_02 -> 2025_12_02_03
+-- From: "from that $r" to "from that troll" as refers to the troll (Drakkari prisoner) and not the player's race.
+UPDATE `quest_offer_reward` SET `RewardText` = 'You\'ve done it!$B$BThe intelligence gathered from that troll will undoubtedly be of great value. I\'ll be certain to make mention of your efforts in my report to the commander.$B$BThank you, $N.' WHERE `ID` = 12541;
diff --git a/data/sql/updates/db_world/2025_12_02_04.sql b/data/sql/updates/db_world/2025_12_02_04.sql
new file mode 100644
index 0000000000..d4388331db
--- /dev/null
+++ b/data/sql/updates/db_world/2025_12_02_04.sql
@@ -0,0 +1,23 @@
+-- DB update 2025_12_02_03 -> 2025_12_02_04
+-- Seething Revenant (30387) - Add missing loot
+-- Closes https://github.com/azerothcore/azerothcore-wotlk/issues/23807
+
+UPDATE `creature_loot_template` SET `Chance` = 0.04 WHERE `Entry` = 30387 AND `Item` = 45912;
+
+DELETE FROM `creature_loot_template` WHERE `Entry` = 30387 AND `Item` IN (39512, 42780, 37702, 39513, 43624, 42173, 42175, 26001, 26002, 26013, 26014, 26015, 26027, 26028, 35074);
+INSERT INTO `creature_loot_template` (`Entry`, `Item`, `Reference`, `Chance`, `QuestRequired`, `LootMode`, `GroupId`, `MinCount`, `MaxCount`, `Comment`) VALUES
+(30387, 39512, 0, 56, 0, 1, 0, 1, 1, 'Seething Revenant - Hoary Crystals'),
+(30387, 42780, 0, 26, 0, 1, 0, 1, 1, 'Seething Revenant - Relic of Ulduar'),
+(30387, 37702, 0, 19, 0, 1, 0, 1, 2, 'Seething Revenant - Crystallized Fire'),
+(30387, 39513, 0, 14, 0, 1, 0, 1, 1, 'Seething Revenant - Efflorescing Shards'),
+(30387, 43624, 0, 0.01, 0, 1, 0, 1, 1, 'Seething Revenant - Titanium Lockbox'),
+(30387, 42173, 0, 0.005, 0, 1, 0, 1, 1, 'Seething Revenant - Pattern: Blue Lumberjack Shirt'),
+(30387, 42175, 0, 0.005, 0, 1, 0, 1, 1, 'Seething Revenant - Pattern: Green Lumberjack Shirt'),
+(30387, 26001, 26001, 3, 0, 1, 1, 1, 1, 'Seething Revenant - (ReferenceTable)'),
+(30387, 26002, 26002, 3, 0, 1, 1, 1, 1, 'Seething Revenant - (ReferenceTable)'),
+(30387, 26013, 26013, 1, 0, 1, 1, 1, 1, 'Seething Revenant - (ReferenceTable)'),
+(30387, 26014, 26014, 1, 0, 1, 1, 1, 1, 'Seething Revenant - (ReferenceTable)'),
+(30387, 26015, 26015, 1, 0, 1, 1, 1, 1, 'Seething Revenant - (ReferenceTable)'),
+(30387, 26027, 26027, 0.5, 0, 1, 1, 1, 1, 'Seething Revenant - (ReferenceTable)'),
+(30387, 26028, 26028, 0.5, 0, 1, 1, 1, 1, 'Seething Revenant - (ReferenceTable)'),
+(30387, 35074, 35074, 0.1, 0, 1, 1, 1, 1, 'Seething Revenant - (ReferenceTable)');
diff --git a/data/sql/updates/db_world/2025_12_04_00.sql b/data/sql/updates/db_world/2025_12_04_00.sql
new file mode 100644
index 0000000000..a57036c8ae
--- /dev/null
+++ b/data/sql/updates/db_world/2025_12_04_00.sql
@@ -0,0 +1,4 @@
+-- DB update 2025_12_02_04 -> 2025_12_04_00
+
+UPDATE `creature_template` SET `exp` = 2 WHERE (`entry` = 32263);
+UPDATE `creature` SET `curhealth` = 10080 WHERE (`id1` = 32263) AND `guid` = 85056;
diff --git a/data/sql/updates/db_world/2025_12_05_00.sql b/data/sql/updates/db_world/2025_12_05_00.sql
new file mode 100644
index 0000000000..f2564e9ab4
--- /dev/null
+++ b/data/sql/updates/db_world/2025_12_05_00.sql
@@ -0,0 +1,9 @@
+-- DB update 2025_12_04_00 -> 2025_12_05_00
+-- DB/Quest: Westguard Sergeant despawns when leaving Skorn
+DELETE FROM `smart_scripts` WHERE `entryorguid` = 24060 AND `source_type` = 0 AND `id` = 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
+(24060, 0, 2, 0, 1, 0, 100, 0, 3000, 5000, 3000, 5000, 0, 0, 41, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Westguard Sergeant - Out of Combat - Despawn Instant (Outside Skorn)');
+
+DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId` = 22 AND `SourceGroup` = 3 AND `SourceEntry` = 24060 AND `SourceId` = 0;
+INSERT INTO `conditions` (`SourceTypeOrReferenceId`, `SourceGroup`, `SourceEntry`, `SourceId`, `ElseGroup`, `ConditionTypeOrReference`, `ConditionTarget`, `ConditionValue1`, `ConditionValue2`, `ConditionValue3`, `NegativeCondition`, `ErrorType`, `ErrorTextId`, `ScriptName`, `Comment`) VALUES
+(22, 3, 24060, 0, 0, 23, 1, 4002, 0, 0, 1, 0, 0, '', 'Westguard Sergeant - Despawn script only triggers when NOT in Skorn (area 4002)');
diff --git a/data/sql/updates/db_world/2025_12_05_01.sql b/data/sql/updates/db_world/2025_12_05_01.sql
new file mode 100644
index 0000000000..24a1cbe94a
--- /dev/null
+++ b/data/sql/updates/db_world/2025_12_05_01.sql
@@ -0,0 +1,146 @@
+-- DB update 2025_12_05_00 -> 2025_12_05_01
+
+-- Add sniffed Waypoints
+DELETE FROM `waypoint_data` WHERE (`id` IN (12641600, 12641900, 12642000, 12640000, 12639700));
+INSERT INTO `waypoint_data` (`id`, `point`, `position_x`, `position_y`, `position_z`, `orientation`, `delay`, `move_type`, `action`, `action_chance`, `wpguid`) VALUES
+(12641600, 1, 3122.1736, 532.6602, 88.01989, NULL, 0, 0, 0, 100, 0),
+(12641600, 2, 3125.966, 508.25412, 88.542816, NULL, 0, 0, 0, 100, 0),
+(12641600, 3, 3146.3586, 476.755, 78.63365, NULL, 0, 0, 0, 100, 0),
+(12641600, 4, 3176.8057, 466.12268, 63.954556, NULL, 0, 0, 0, 100, 0),
+(12641600, 5, 3186.5317, 454.58585, 62.529587, NULL, 0, 0, 0, 100, 0),
+(12641600, 6, 3203.792, 452.24567, 60.55202, NULL, 2000, 0, 0, 100, 0),
+(12641600, 7, 3186.5317, 454.58585, 62.529587, NULL, 0, 0, 0, 100, 0),
+(12641600, 8, 3176.8057, 466.12268, 63.954556, NULL, 0, 0, 0, 100, 0),
+(12641600, 9, 3146.3586, 476.755, 78.63365, NULL, 0, 0, 0, 100, 0),
+(12641600, 10, 3125.966, 508.25412, 88.542816, NULL, 0, 0, 0, 100, 0),
+(12641600, 11, 3127.8643, 505.31055, 87.93867, NULL, 0, 0, 0, 100, 0),
+(12641600, 12, 3121.3276, 554.1918, 89.05305, NULL, 0, 0, 0, 100, 0),
+(12641600, 13, 3122.1736, 532.6602, 88.01989, NULL, 0, 0, 0, 100, 0),
+(12641600, 14, 3121.3276, 554.1918, 89.05305, NULL, 0, 0, 0, 100, 0),
+(12641900, 1, 3169.1216, 650.4629, 73.140945, NULL, 0, 0, 0, 100, 0),
+(12641900, 2, 3174.4927, 671.8068, 80.675766, NULL, 0, 0, 0, 100, 0),
+(12641900, 3, 3192.1406, 689.416, 89.47004, NULL, 0, 0, 0, 100, 0),
+(12641900, 4, 3217.8877, 703.09235, 93.65135, NULL, 0, 0, 0, 100, 0),
+(12641900, 5, 3264.109, 700.6325, 92.4675, NULL, 0, 0, 0, 100, 0),
+(12641900, 6, 3288.6113, 691.9492, 90.03599, NULL, 0, 0, 0, 100, 0),
+(12641900, 7, 3296.816, 667.01575, 83.845055, NULL, 0, 0, 0, 100, 0),
+(12641900, 8, 3294.3733, 646.39856, 78.13237, NULL, 0, 0, 0, 100, 0),
+(12641900, 9, 3299.9355, 631.39844, 74.52907, NULL, 0, 0, 0, 100, 0),
+(12641900, 10, 3292.5527, 608.5703, 64.710144, NULL, 2000, 0, 0, 100, 0),
+(12641900, 11, 3299.9355, 631.39844, 74.52907, NULL, 0, 0, 0, 100, 0),
+(12641900, 12, 3294.3733, 646.39856, 78.13237, NULL, 0, 0, 0, 100, 0),
+(12641900, 13, 3296.816, 667.01575, 83.845055, NULL, 0, 0, 0, 100, 0),
+(12641900, 14, 3288.6113, 691.9492, 90.03599, NULL, 0, 0, 0, 100, 0),
+(12641900, 15, 3264.109, 700.6325, 92.4675, NULL, 0, 0, 0, 100, 0),
+(12641900, 16, 3217.8877, 703.09235, 93.65135, NULL, 0, 0, 0, 100, 0),
+(12641900, 17, 3192.1406, 689.416, 89.47004, NULL, 0, 0, 0, 100, 0),
+(12641900, 18, 3174.4927, 671.8068, 80.675766, NULL, 0, 0, 0, 100, 0),
+(12641900, 19, 3169.1216, 650.4629, 73.140945, NULL, 0, 0, 0, 100, 0),
+(12641900, 20, 3166.53, 627.90375, 68.15999, NULL, 0, 0, 0, 100, 0),
+(12641900, 21, 3176.731, 609.7736, 62.805485, NULL, 0, 0, 0, 100, 0),
+(12641900, 22, 3166.53, 627.90375, 68.15999, NULL, 0, 0, 0, 100, 0),
+(12642000, 1, 3386.952, 502.5323, 95.89945, NULL, 0, 0, 0, 100, 0),
+(12642000, 2, 3375.5227, 476.80362, 91.18758, NULL, 0, 0, 0, 100, 0),
+(12642000, 3, 3358.9795, 465.80887, 87.52131, NULL, 0, 0, 0, 100, 0),
+(12642000, 4, 3339.3208, 447.99405, 84.71066, NULL, 0, 0, 0, 100, 0),
+(12642000, 5, 3328.7197, 425.91498, 76.79626, NULL, 0, 0, 0, 100, 0),
+(12642000, 6, 3318.7969, 413.56195, 70.89054, NULL, 0, 0, 0, 100, 0),
+(12642000, 7, 3299.4473, 435.4253, 64.41885, NULL, 0, 0, 0, 100, 0),
+(12642000, 8, 3289.706, 451.7539, 63.35991, NULL, 0, 0, 0, 100, 0),
+(12642000, 9, 3276.5793, 458.35553, 61.149826, NULL, 0, 0, 0, 100, 0),
+(12642000, 10, 3261.4954, 463.6344, 58.083496, NULL, 2000, 0, 0, 100, 0),
+(12642000, 11, 3276.5793, 458.35553, 61.149826, NULL, 0, 0, 0, 100, 0),
+(12642000, 12, 3289.706, 451.7539, 63.35991, NULL, 0, 0, 0, 100, 0),
+(12642000, 13, 3299.4473, 435.4253, 64.41885, NULL, 0, 0, 0, 100, 0),
+(12642000, 14, 3318.7969, 413.56195, 70.89054, NULL, 0, 0, 0, 100, 0),
+(12642000, 15, 3328.7197, 425.91498, 76.79626, NULL, 0, 0, 0, 100, 0),
+(12642000, 16, 3339.3208, 447.99405, 84.71066, NULL, 0, 0, 0, 100, 0),
+(12642000, 17, 3358.9795, 465.80887, 87.52131, NULL, 0, 0, 0, 100, 0),
+(12642000, 18, 3375.5227, 476.80362, 91.18758, NULL, 0, 0, 0, 100, 0),
+(12642000, 19, 3386.952, 502.5323, 95.89945, NULL, 0, 0, 0, 100, 0),
+(12642000, 20, 3388.6235, 530.1738, 97.31077, NULL, 0, 0, 0, 100, 0),
+(12642000, 21, 3390.374, 550.4353, 95.18623, NULL, 0, 0, 0, 100, 0),
+(12642000, 22, 3388.6235, 530.1738, 97.31077, NULL, 0, 0, 0, 100, 0),
+(12640000, 1, 3112.822, 652.9017, 79.580154, NULL, 0, 0, 0, 100, 0),
+(12640000, 2, 3106.8435, 626.3539, 77.43082, NULL, 0, 0, 0, 100, 0),
+(12640000, 3, 3092.7388, 610.93243, 77.23309, NULL, 0, 0, 0, 100, 0),
+(12640000, 4, 3100.2705, 593.8865, 78.54593, NULL, 0, 0, 0, 100, 0),
+(12640000, 5, 3119.237, 590.99493, 75.144455, NULL, 0, 0, 0, 100, 0),
+(12640000, 6, 3142.236, 594.5618, 69.939224, NULL, 0, 0, 0, 100, 0),
+(12640000, 7, 3151.5881, 617.27466, 68.80421, NULL, 0, 0, 0, 100, 0),
+(12640000, 8, 3149.7422, 647.2168, 74.23805, NULL, 0, 0, 0, 100, 0),
+(12640000, 9, 3154.8203, 666.55273, 77.53181, NULL, 0, 0, 0, 100, 0),
+(12640000, 10, 3143.1262, 667.666, 79.811264, NULL, 0, 0, 0, 100, 0),
+(12640000, 11, 3130.7563, 662.6465, 80.169395, NULL, 0, 0, 0, 100, 0),
+(12639700, 1, 3314.8162, 664.1162, 84.00654, NULL, 0, 0, 0, 100, 0),
+(12639700, 2, 3308.4458, 649.0255, 81.44372, NULL, 0, 0, 0, 100, 0),
+(12639700, 3, 3314.9888, 625.7648, 76.64586, NULL, 0, 0, 0, 100, 0),
+(12639700, 4, 3334.93, 617.82074, 80.46573, NULL, 0, 0, 0, 100, 0),
+(12639700, 5, 3355.2317, 616.2408, 84.47163, NULL, 0, 0, 0, 100, 0),
+(12639700, 6, 3348.8887, 616.72656, 82.99916, NULL, 0, 0, 0, 100, 0),
+(12639700, 7, 3347.2444, 636.7253, 85.3196, NULL, 0, 0, 0, 100, 0),
+(12639700, 8, 3331.8745, 656.21674, 85.11536, NULL, 0, 0, 0, 100, 0);
+
+-- Add Spell Difficulty (Devotion Aura)
+DELETE FROM `spelldifficulty_dbc` WHERE (`ID` IN (57740));
+INSERT INTO `spelldifficulty_dbc` (`ID`,`DifficultySpellID_1`,`DifficultySpellID_2`,`DifficultySpellID_3`,`DifficultySpellID_4`) VALUES
+(57740, 57740, 58944, 0, 0);
+
+-- Remove auras from Onyx Brood General
+UPDATE `creature_template_addon` SET `auras` = '' WHERE (`entry` IN (30680, 30999));
+
+-- Update SP, MT and WD (sniffed values)
+UPDATE `creature` SET `position_x` = 3123.9624, `position_y` = 563.4905, `position_z` = 89.08344, `orientation` = 4.43663, `MovementType` = 2, `wander_distance` = 0, `VerifiedBuild` = 64481 WHERE (`id1` = 30453) AND `guid` = 126416;
+UPDATE `creature` SET `position_x` = 3125.977, `position_y` = 574.3518, `position_z` = 86.13242, `orientation` = 5.34753, `MovementType` = 0, `wander_distance` = 0, `VerifiedBuild` = 64481 WHERE (`id1` = 30453) AND `guid` = 126417;
+UPDATE `creature` SET `position_x` = 3181.6206, `position_y` = 604.76, `position_z` = 60.37278, `orientation` = 5.04935, `MovementType` = 0, `wander_distance` = 0, `VerifiedBuild` = 64481 WHERE (`id1` = 30453) AND `guid` = 126418;
+UPDATE `creature` SET `position_x` = 3177.7805, `position_y` = 616.0001, `position_z` = 64.20651, `orientation` = 4.54553, `MovementType` = 2, `wander_distance` = 0, `VerifiedBuild` = 64481 WHERE (`id1` = 30453) AND `guid` = 126419;
+UPDATE `creature` SET `position_x` = 3391.5247, `position_y` = 554.5057, `position_z` = 94.93257, `orientation` = 4.43663, `MovementType` = 2, `wander_distance` = 0, `VerifiedBuild` = 64481 WHERE (`id1` = 30453) AND `guid` = 126420;
+UPDATE `creature` SET `position_x` = 3393.2766, `position_y` = 567.3406, `position_z` = 91.24738, `orientation` = 4.13784, `MovementType` = 0, `wander_distance` = 0, `VerifiedBuild` = 64481 WHERE (`id1` = 30453) AND `guid` = 126421;
+UPDATE `creature` SET `position_x` = 3149.0312, `position_y` = 668.306, `position_z` = 79.01899, `orientation` = 3.24923, `MovementType` = 2, `wander_distance` = 0, `VerifiedBuild` = 64481 WHERE (`id1` = 30680) AND `guid` = 126400;
+UPDATE `creature` SET `position_x` = 3351.0344, `position_y` = 636.5978, `position_z` = 85.80331, `orientation` = 3.10852, `MovementType` = 2, `wander_distance` = 0, `VerifiedBuild` = 64481 WHERE (`id1` = 30680) AND `guid` = 126397;
+UPDATE `creature` SET `position_x` = 3361.3906, `position_y` = 625.84937, `position_z` = 87.20121, `orientation` = 3.07296, `MovementType` = 0, `wander_distance` = 0, `VerifiedBuild` = 64481 WHERE (`id1` = 30682) AND `guid` = 126407;
+UPDATE `creature` SET `position_x` = 3149.0798, `position_y` = 677.131, `position_z` = 81.535164, `orientation` = 4.61926, `MovementType` = 0, `wander_distance` = 0, `VerifiedBuild` = 64481 WHERE (`id1` = 30682) AND `guid` = 126412;
+UPDATE `creature` SET `position_x` = 3157.8823, `position_y` = 666.0498, `position_z` = 77.16373, `orientation` = 3.85403, `MovementType` = 0, `wander_distance` = 0, `VerifiedBuild` = 64481 WHERE (`id1` = 30682) AND `guid` = 126408;
+UPDATE `creature` SET `position_x` = 3351.464, `position_y` = 627.4477, `position_z` = 85.05361, `orientation` = 2.89519, `MovementType` = 0, `wander_distance` = 0, `VerifiedBuild` = 64481 WHERE (`id1` = 30681) AND `guid` = 126401;
+UPDATE `creature` SET `position_x` = 3160.2383, `position_y` = 676.69977, `position_z` = 80.68675, `orientation` = 4.17643, `MovementType` = 0, `wander_distance` = 0, `VerifiedBuild` = 64481 WHERE (`id1` = 30681) AND `guid` = 126405;
+UPDATE `creature` SET `position_x` = 3361.7314, `position_y` = 635.8682, `position_z` = 87.79267, `orientation` = 3.46105, `MovementType` = 0, `wander_distance` = 0, `VerifiedBuild` = 64481 WHERE (`id1` = 30681) AND `guid` = 126406;
+
+-- Set creature formations
+DELETE FROM `creature_formations` WHERE (`leaderGUID` IN (126416, 126419, 126420, 126397, 126400));
+INSERT INTO `creature_formations` (`leaderGUID`, `memberGUID`, `dist`, `angle`, `groupAI`, `point_1`, `point_2`) VALUES
+(126416, 126416, 0, 0, 515, 0, 0),
+(126416, 126417, 10, 180, 515, 0, 0),
+(126420, 126420, 0, 0, 515, 0, 0),
+(126420, 126421, 10, 180, 515, 0, 0),
+(126419, 126419, 0, 0, 515, 0, 0),
+(126419, 126418, 10, 180, 515, 0, 0),
+(126397, 126397, 0, 0, 515, 0, 0),
+(126397, 126406, 10, 240, 515, 0, 0),
+(126397, 126401, 10, 120, 515, 0, 0),
+(126397, 126407, 15, 180, 515, 0, 0),
+(126400, 126400, 0, 0, 515, 0, 0),
+(126400, 126412, 10, 240, 515, 0, 0),
+(126400, 126408, 10, 120, 515, 0, 0),
+(126400, 126405, 15, 180, 515, 0, 0);
+
+-- Set Waypoints
+DELETE FROM `creature_addon` WHERE (`guid` IN (126416, 126419, 126420, 126400, 126397));
+INSERT INTO `creature_addon` (`guid`, `path_id`, `mount`, `bytes1`, `bytes2`, `emote`, `visibilityDistanceType`, `auras`) VALUES
+(126416, 12641600, 0, 0, 1, 0, 0, NULL),
+(126419, 12641900, 0, 0, 1, 0, 0, NULL),
+(126420, 12642000, 0, 0, 1, 0, 0, NULL),
+(126400, 12640000, 0, 0, 1, 0, 0, NULL),
+(126397, 12639700, 0, 0, 1, 0, 0, NULL);
+
+-- Update SmartAI (Onyx Sanctum Guardian & Onyx Brood General)
+UPDATE `creature_template` SET `AIName` = 'SmartAI' WHERE (`entry` IN (30453, 30680));
+
+DELETE FROM `smart_scripts` WHERE (`source_type` = 0) AND (`entryorguid` IN (30453, 30680));
+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
+(30453, 0, 0, 0, 0, 0, 100, 0, 7000, 9000, 17000, 18000, 0, 0, 11, 57728, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 'Onyx Sanctum Guardian - In Combat - Cast \'Shockwave\''),
+(30453, 0, 1, 0, 0, 0, 100, 0, 13000, 13000, 30000, 30000, 0, 0, 11, 39647, 0, 0, 0, 0, 0, 5, 0, 0, 0, 0, 0, 0, 0, 0, 'Onyx Sanctum Guardian - In Combat - Cast \'Curse of Mending\''),
+(30453, 0, 2, 0, 12, 0, 100, 0, 25, 30, 5000, 5000, 0, 0, 11, 53801, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Onyx Sanctum Guardian - Target Between 25-30% Health - Cast \'Frenzy\''),
+(30680, 0, 0, 0, 60, 0, 100, 0, 0, 0, 600000, 600000, 0, 0, 11, 57740, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Onyx Brood General - On Update - Cast \'Devotion Aura\''),
+(30680, 0, 1, 0, 0, 0, 100, 0, 5000, 6000, 7000, 8000, 0, 0, 11, 13737, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 'Onyx Brood General - In Combat - Cast \'Mortal Strike\''),
+(30680, 0, 2, 0, 0, 0, 100, 0, 15000, 15000, 40000, 40000, 0, 0, 11, 57733, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Onyx Brood General - In Combat - Cast \'Draconic Rage\''),
+(30680, 0, 3, 0, 6, 0, 100, 0, 0, 0, 0, 0, 0, 0, 11, 57742, 2, 0, 0, 0, 0, 26, 10, 0, 0, 0, 0, 0, 0, 0, 'Onyx Brood General - On Just Died - Cast \'Avenging Fury\'');
diff --git a/data/sql/updates/db_world/2025_12_08_00.sql b/data/sql/updates/db_world/2025_12_08_00.sql
new file mode 100644
index 0000000000..c87a2a8f93
--- /dev/null
+++ b/data/sql/updates/db_world/2025_12_08_00.sql
@@ -0,0 +1,3 @@
+-- DB update 2025_12_05_01 -> 2025_12_08_00
+-- A Spark of Hope requires The Refiner's Fire
+UPDATE `quest_template_addon` SET `PrevQuestID` = 12922 WHERE `ID` = 12956;
diff --git a/data/sql/updates/db_world/2025_12_08_01.sql b/data/sql/updates/db_world/2025_12_08_01.sql
new file mode 100644
index 0000000000..9ca7132a5e
--- /dev/null
+++ b/data/sql/updates/db_world/2025_12_08_01.sql
@@ -0,0 +1,19 @@
+-- DB update 2025_12_08_00 -> 2025_12_08_01
+-- PrevQuestID 0 to 12598, Skimmer Spinnerets requires Throwing Down
+-- NextQuestID 12555 to 12583, Skimmer Spinnerets opens up Crashed Sprayer, not A Tangled Skein
+-- ExclusiveGroup -12583 to 0, linear chain, no need for a group
+UPDATE `quest_template_addon` SET `PrevQuestID` = 12598 , `NextQuestID` = 12583, `ExclusiveGroup` = 0 WHERE (`ID` = 12553);
+
+-- ExclusiveGroup -12583 to 0, linear chain, no need for a group
+UPDATE `quest_template_addon` SET `ExclusiveGroup` = 0 WHERE (`ID` = 12583);
+
+-- PrevQuestID 0 to 12598, Cocooned! requires Throwing Down
+-- NextQuestID 12555 to 0, Cocooned! doesn't open up A Tangled Skein
+-- ExclusiveGroup -12583 to 0, linear chain, no need for a group
+UPDATE `quest_template_addon` SET `PrevQuestID` = 12598, `NextQuestID` = 0, `ExclusiveGroup` = 0 WHERE (`ID` = 12606);
+
+-- PrevQuestID 0 to 12552, Pure Evil requires Death to the Necromagi
+UPDATE `quest_template_addon` SET `PrevQuestID` = 12552 WHERE (`ID` = 12584);
+
+-- PrevQuestId 12596 to 12598, Death to the Necromagi requires Throwing Down, not Pa'Troll
+UPDATE `quest_template_addon` SET `PrevQuestID` = 12598 WHERE (`ID` = 12552);
diff --git a/data/sql/updates/db_world/2025_12_09_00.sql b/data/sql/updates/db_world/2025_12_09_00.sql
new file mode 100644
index 0000000000..a7b766d7c9
--- /dev/null
+++ b/data/sql/updates/db_world/2025_12_09_00.sql
@@ -0,0 +1,23 @@
+-- DB update 2025_12_08_01 -> 2025_12_09_00
+SET @ITEM = 7666;
+SET @REFERENCE = 1056;
+SET @INSIDE = 6;
+SET @OUTSIDE = 3;
+
+-- Creates a reference loot for "Shattered Necklace"
+DELETE FROM `reference_loot_template` WHERE `Entry` = @REFERENCE AND `Item` = @ITEM;
+INSERT INTO `reference_loot_template` (`Entry`, `Item`, `Reference`, `Chance`, `QuestRequired`, `LootMode`, `GroupId`, `MinCount`, `MaxCount`, `Comment`) VALUES
+(@REFERENCE, @ITEM, 0, 100, 0, 1, 1, 1, 1, 'Shattered Necklace');
+
+-- Deletes "Shattered Necklace" from every creature's loot
+DELETE FROM `creature_loot_template` WHERE `item` = @ITEM;
+
+-- Adds reference loot for "Shattered Necklace" for each creature below
+DELETE FROM `creature_loot_template` WHERE `Reference` = @REFERENCE AND `Entry` IN (4852, 4851, 4856, 4845, 4846, 4844);
+INSERT INTO `creature_loot_template` (`Entry`, `Item`, `Reference`, `Chance`, `QuestRequired`, `LootMode`, `GroupId`, `MinCount`, `MaxCount`, `Comment`) VALUES
+(4852, @ITEM, @REFERENCE, @INSIDE, 0, 1, 0, 1, 1, 'Stonevault Oracle - Shattered Necklace'),
+(4851, @ITEM, @REFERENCE, @INSIDE, 0, 1, 0, 1, 1, 'Stonevault Rockchewer - Shattered Necklace'),
+(4856, @ITEM, @REFERENCE, @INSIDE, 0, 1, 0, 1, 1, 'Stonevault Cave Hunter - Shattered Necklace'),
+(4845, @ITEM, @REFERENCE, @OUTSIDE, 0, 1, 0, 1, 1, 'Shadowforge Ruffian - Shattered Necklace'),
+(4846, @ITEM, @REFERENCE, @OUTSIDE, 0, 1, 0, 1, 1, 'Shadowforge Digger - Shattered Necklace'),
+(4844, @ITEM, @REFERENCE, @OUTSIDE, 0, 1, 0, 1, 1, 'Shadowforge Surveyor - Shattered Necklace');
diff --git a/data/sql/updates/db_world/2025_12_10_00.sql b/data/sql/updates/db_world/2025_12_10_00.sql
new file mode 100644
index 0000000000..00f9e0e2fe
--- /dev/null
+++ b/data/sql/updates/db_world/2025_12_10_00.sql
@@ -0,0 +1,3 @@
+-- DB update 2025_12_09_00 -> 2025_12_10_00
+
+UPDATE `gameobject` SET `position_z` = 203.3 WHERE (`id` = 176583) AND (`guid` IN (18926));
diff --git a/data/sql/updates/db_world/2025_12_10_01.sql b/data/sql/updates/db_world/2025_12_10_01.sql
new file mode 100644
index 0000000000..5ad78a965b
--- /dev/null
+++ b/data/sql/updates/db_world/2025_12_10_01.sql
@@ -0,0 +1,3 @@
+-- DB update 2025_12_10_00 -> 2025_12_10_01
+--
+UPDATE `spell_proc_event` SET `procPhase`=2 WHERE `entry`=-19184;
diff --git a/deps/CMakeLists.txt b/deps/CMakeLists.txt
index 8364181a9f..869351a371 100644
--- a/deps/CMakeLists.txt
+++ b/deps/CMakeLists.txt
@@ -45,4 +45,5 @@ endif()
if (BUILD_TOOLS_MAPS)
add_subdirectory(bzip2)
add_subdirectory(libmpq)
+ add_subdirectory(fkYAML)
endif()
diff --git a/deps/PackageList.txt b/deps/PackageList.txt
index f771c3b734..70e9f695c3 100644
--- a/deps/PackageList.txt
+++ b/deps/PackageList.txt
@@ -81,3 +81,7 @@ recastnavigation (Recast is state of the art navigation mesh construction toolse
{fmt} is an open-source formatting library providing a fast and safe alternative to C stdio and C++ iostreams.
https://github.com/fmtlib/fmt
Version: 7.1.3
+
+fkYAML (A C++ header-only YAML library)
+ https://github.com/fktn-k/fkYAML
+ Version: 721edb3e1a817e527fd9e1e18a3bea300822522e
diff --git a/deps/acore/bash-lib/src/common/boolean.sh b/deps/acore/bash-lib/src/common/boolean.sh
new file mode 100644
index 0000000000..4f2e365dbb
--- /dev/null
+++ b/deps/acore/bash-lib/src/common/boolean.sh
@@ -0,0 +1,5 @@
+function isTrue() {
+ local val
+ val=$(echo "$1" | tr '[:upper:]' '[:lower:]')
+ [[ "$val" == "1" || "$val" == "true" || "$val" == "yes" || "$val" == "on" ]]
+} \ No newline at end of file
diff --git a/deps/acore/joiner/joiner.sh b/deps/acore/joiner/joiner.sh
index 1b13007162..a67badaa2b 100755
--- a/deps/acore/joiner/joiner.sh
+++ b/deps/acore/joiner/joiner.sh
@@ -116,7 +116,21 @@ function Joiner:add_repo() (
if [ -e "$path/.git/" ]; then
# if exists , update
echo "Updating $name on branch $branch..."
- git --git-dir="$path/.git/" --work-tree="$path" rev-parse && git --git-dir="$path/.git/" --work-tree="$path" pull origin "$branch" | grep 'Already up-to-date.' && changed="no" || true
+ if ! git --git-dir="$path/.git/" --work-tree="$path" rev-parse >/dev/null 2>&1; then
+ echo "Unable to read repository at $path/.git/"
+ return $FALSE
+ fi
+
+ local pull_output
+ if ! pull_output=$(git --git-dir="$path/.git/" --work-tree="$path" pull origin "$branch" 2>&1); then
+ printf "%s\n" "$pull_output"
+ return $FALSE
+ fi
+
+ printf "%s\n" "$pull_output"
+ if echo "$pull_output" | grep -qE 'Already up[- ]to-date.'; then
+ changed="no"
+ fi
else
# otherwise clone
echo "Cloning $name on branch $branch..."
@@ -440,4 +454,3 @@ if [[ "${BASH_SOURCE[0]}" == "${0}" ]]; then
else
Joiner:_checkOptions $@
fi
-
diff --git a/deps/fkYAML/CMakeLists.txt b/deps/fkYAML/CMakeLists.txt
new file mode 100644
index 0000000000..e186f5293e
--- /dev/null
+++ b/deps/fkYAML/CMakeLists.txt
@@ -0,0 +1,17 @@
+#
+# This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
+#
+# This file is free software; as a special exception the author gives
+# unlimited permission to copy and/or distribute it, with or without
+# modifications, as long as this notice is preserved.
+#
+# This program is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY, to the extent permitted by law; without even the
+# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+#
+
+add_library(fkYAML INTERFACE)
+
+target_include_directories(fkYAML INTERFACE ${CMAKE_CURRENT_SOURCE_DIR})
+
+set_target_properties(fkYAML PROPERTIES FOLDER "deps")
diff --git a/deps/fkYAML/fkYAML/node.hpp b/deps/fkYAML/fkYAML/node.hpp
new file mode 100644
index 0000000000..773e852cf7
--- /dev/null
+++ b/deps/fkYAML/fkYAML/node.hpp
@@ -0,0 +1,14730 @@
+// _______ __ __ __ _____ __ __ __
+// | __| |_/ | \_/ |/ _ \ / \/ \| | fkYAML: A C++ header-only YAML library
+// | __| _ < \_ _/| ___ | _ | |___ version 0.4.2
+// |__| |_| \__| |_| |_| |_|___||___|______| https://github.com/fktn-k/fkYAML
+//
+// SPDX-FileCopyrightText: 2023-2025 Kensuke Fukutani <fktn.dev@gmail.com>
+// SPDX-License-Identifier: MIT
+
+#ifndef FK_YAML_NODE_HPP
+#define FK_YAML_NODE_HPP
+
+#include <algorithm>
+#include <cstdint>
+#include <cstring>
+#include <initializer_list>
+#include <map>
+#include <memory>
+#include <string>
+#include <type_traits>
+#include <vector>
+
+// #include <fkYAML/detail/macros/define_macros.hpp>
+// _______ __ __ __ _____ __ __ __
+// | __| |_/ | \_/ |/ _ \ / \/ \| | fkYAML: A C++ header-only YAML library
+// | __| _ < \_ _/| ___ | _ | |___ version 0.4.2
+// |__| |_| \__| |_| |_| |_|___||___|______| https://github.com/fktn-k/fkYAML
+//
+// SPDX-FileCopyrightText: 2023-2025 Kensuke Fukutani <fktn.dev@gmail.com>
+// SPDX-License-Identifier: MIT
+
+#ifndef FK_YAML_DETAIL_MACROS_DEFINE_MACROS_HPP
+#define FK_YAML_DETAIL_MACROS_DEFINE_MACROS_HPP
+
+// #include <fkYAML/detail/macros/version_macros.hpp>
+// _______ __ __ __ _____ __ __ __
+// | __| |_/ | \_/ |/ _ \ / \/ \| | fkYAML: A C++ header-only YAML library
+// | __| _ < \_ _/| ___ | _ | |___ version 0.4.2
+// |__| |_| \__| |_| |_| |_|___||___|______| https://github.com/fktn-k/fkYAML
+//
+// SPDX-FileCopyrightText: 2023-2025 Kensuke Fukutani <fktn.dev@gmail.com>
+// SPDX-License-Identifier: MIT
+
+// Check version definitions if already defined.
+#if defined(FK_YAML_MAJOR_VERSION) && defined(FK_YAML_MINOR_VERSION) && defined(FK_YAML_PATCH_VERSION)
+#if FK_YAML_MAJOR_VERSION != 0 || FK_YAML_MINOR_VERSION != 4 || FK_YAML_PATCH_VERSION != 2
+#warning Already included a different version of the fkYAML library!
+#else
+// define macros to skip defining macros down below.
+#define FK_YAML_VERCHECK_SUCCEEDED
+#endif
+#endif
+
+#ifndef FK_YAML_VERCHECK_SUCCEEDED
+
+#define FK_YAML_MAJOR_VERSION 0
+#define FK_YAML_MINOR_VERSION 4
+#define FK_YAML_PATCH_VERSION 2
+
+#define FK_YAML_NAMESPACE_VERSION_CONCAT_IMPL(major, minor, patch) v##major##_##minor##_##patch
+
+#define FK_YAML_NAMESPACE_VERSION_CONCAT(major, minor, patch) FK_YAML_NAMESPACE_VERSION_CONCAT_IMPL(major, minor, patch)
+
+#define FK_YAML_NAMESPACE_VERSION \
+ FK_YAML_NAMESPACE_VERSION_CONCAT(FK_YAML_MAJOR_VERSION, FK_YAML_MINOR_VERSION, FK_YAML_PATCH_VERSION)
+
+#define FK_YAML_NAMESPACE_BEGIN \
+ namespace fkyaml { \
+ inline namespace FK_YAML_NAMESPACE_VERSION {
+
+#define FK_YAML_NAMESPACE_END \
+ } /* inline namespace FK_YAML_NAMESPACE_VERSION */ \
+ } // namespace fkyaml
+
+#define FK_YAML_DETAIL_NAMESPACE_BEGIN \
+ FK_YAML_NAMESPACE_BEGIN \
+ namespace detail {
+
+#define FK_YAML_DETAIL_NAMESPACE_END \
+ } /* namespace detail */ \
+ FK_YAML_NAMESPACE_END
+
+#endif // !defined(FK_YAML_VERCHECK_SUCCEEDED)
+
+// #include <fkYAML/detail/macros/cpp_config_macros.hpp>
+// _______ __ __ __ _____ __ __ __
+// | __| |_/ | \_/ |/ _ \ / \/ \| | fkYAML: A C++ header-only YAML library
+// | __| _ < \_ _/| ___ | _ | |___ version 0.4.2
+// |__| |_| \__| |_| |_| |_|___||___|______| https://github.com/fktn-k/fkYAML
+//
+// SPDX-FileCopyrightText: 2023-2025 Kensuke Fukutani <fktn.dev@gmail.com>
+// SPDX-License-Identifier: MIT
+
+#ifndef FK_YAML_DETAIL_MACROS_CPP_CONFIG_MACROS_HPP
+#define FK_YAML_DETAIL_MACROS_CPP_CONFIG_MACROS_HPP
+
+// This file is assumed to be included only by version_macros.hpp file.
+// To avoid redundant inclusion, do not include version_macros.hpp file as the other files do.
+
+// With the MSVC compilers, the value of __cplusplus is by default always "199611L"(C++98).
+// To avoid that, the library instead references _MSVC_LANG which is always set a correct value.
+// See https://devblogs.microsoft.com/cppblog/msvc-now-correctly-reports-__cplusplus/ for more details.
+#if defined(_MSVC_LANG) && !defined(__clang__)
+#define FK_YAML_CPLUSPLUS _MSVC_LANG
+#else
+#define FK_YAML_CPLUSPLUS __cplusplus
+#endif
+
+// C++ language standard detection
+// Skip detection if the definitions listed below already exist.
+#if !defined(FK_YAML_HAS_CXX_23) && !defined(FK_YAML_HAS_CXX_20) && !defined(FK_YAML_HAS_CXX_17) && \
+ !defined(FK_YAML_HAS_CXX_14) && !defined(FK_YAML_CXX_11)
+#if FK_YAML_CPLUSPLUS >= 202302L
+#define FK_YAML_HAS_CXX_23
+#define FK_YAML_HAS_CXX_20
+#define FK_YAML_HAS_CXX_17
+#define FK_YAML_HAS_CXX_14
+#elif FK_YAML_CPLUSPLUS >= 202002L
+#define FK_YAML_HAS_CXX_20
+#define FK_YAML_HAS_CXX_17
+#define FK_YAML_HAS_CXX_14
+#elif FK_YAML_CPLUSPLUS >= 201703L
+#define FK_YAML_HAS_CXX_17
+#define FK_YAML_HAS_CXX_14
+#elif FK_YAML_CPLUSPLUS >= 201402L
+#define FK_YAML_HAS_CXX_14
+#endif
+
+// C++11 is the minimum required version of the fkYAML library.
+#define FK_YAML_HAS_CXX_11
+#endif
+
+// switch usage of the deprecated attribute. [[deprecated]] is available since C++14.
+#if defined(FK_YAML_HAS_CXX_14)
+#define FK_YAML_DEPRECATED(msg) [[deprecated(msg)]]
+#else
+#if defined(_MSC_VER)
+#define FK_YAML_DEPRECATED(msg) __declspec(deprecated(msg))
+#elif defined(__GNUC__) || defined(__clang__)
+#define FK_YAML_DEPRECATED(msg) __attribute__((deprecated(msg)))
+#else
+#define FK_YAML_DEPRECATED(msg)
+#endif
+#endif
+
+// switch usage of inline variables which have been available since C++17.
+#if defined(FK_YAML_HAS_CXX_17)
+#define FK_YAML_INLINE_VAR inline
+#else
+#define FK_YAML_INLINE_VAR
+#endif
+
+// switch usage of constexpr keyword depending on active C++ standard.
+#if defined(FK_YAML_HAS_CXX_17)
+#define FK_YAML_CXX17_CONSTEXPR constexpr
+#else
+#define FK_YAML_CXX17_CONSTEXPR
+#endif
+
+// Detect __has_* macros.
+// The following macros replace redundant `defined(__has_*) && __has_*(...)`.
+
+#ifdef __has_include
+#define FK_YAML_HAS_INCLUDE(header) __has_include(header)
+#else
+#define FK_YAML_HAS_INCLUDE(header) (0)
+#endif
+
+#ifdef __has_builtin
+#define FK_YAML_HAS_BUILTIN(builtin) __has_builtin(builtin)
+#else
+#define FK_YAML_HAS_BUILTIN(builtin) (0)
+#endif
+
+#ifdef __has_cpp_attribute
+#define FK_YAML_HAS_CPP_ATTRIBUTE(attr) __has_cpp_attribute(attr)
+#else
+#define FK_YAML_HAS_CPP_ATTRIBUTE(attr) (0)
+#endif
+
+#ifdef __has_feature
+#define FK_YAML_HAS_FEATURE(feat) __has_feature(feat)
+#else
+#define FK_YAML_HAS_FEATURE(feat) (0)
+#endif
+
+// switch usage of the no_sanitize attribute only when Clang sanitizer is active.
+#if defined(__clang__) && FK_YAML_HAS_FEATURE(address_sanitizer)
+#define FK_YAML_NO_SANITIZE(...) __attribute__((no_sanitize(__VA_ARGS__)))
+#else
+#define FK_YAML_NO_SANITIZE(...)
+#endif
+
+#if FK_YAML_HAS_INCLUDE(<version>)
+// <version> is available since C++20
+#include <version>
+#endif
+
+//
+// C++ feature detections
+//
+
+// switch usages of the std::to_chars()/std::from_chars() functions which have been available since C++17.
+#if defined(FK_YAML_HAS_CXX_17) && defined(__cpp_lib_to_chars) && __cpp_lib_to_chars >= 201611L
+#define FK_YAML_HAS_TO_CHARS (1)
+#else
+#define FK_YAML_HAS_TO_CHARS (0)
+#endif
+
+// switch usage of char8_t which has been available since C++20.
+#if defined(FK_YAML_HAS_CXX_20) && defined(__cpp_char8_t) && __cpp_char8_t >= 201811L
+#define FK_YAML_HAS_CHAR8_T (1)
+#else
+#define FK_YAML_HAS_CHAR8_T (0)
+#endif
+
+//
+// utility macros
+//
+
+// switch usage of [[likely]] C++ attribute which has been available since C++20.
+#if defined(FK_YAML_HAS_CXX_20) && FK_YAML_HAS_CPP_ATTRIBUTE(likely) >= 201803L
+#define FK_YAML_LIKELY(expr) (!!(expr)) [[likely]]
+#elif FK_YAML_HAS_BUILTIN(__builtin_expect)
+#define FK_YAML_LIKELY(expr) (__builtin_expect(!!(expr), 1))
+#else
+#define FK_YAML_LIKELY(expr) (!!(expr))
+#endif
+
+// switch usage of [[unlikely]] C++ attribute which has been available since C++20.
+#if defined(FK_YAML_HAS_CXX_20) && FK_YAML_HAS_CPP_ATTRIBUTE(unlikely) >= 201803L
+#define FK_YAML_UNLIKELY(expr) (!!(expr)) [[unlikely]]
+#elif FK_YAML_HAS_BUILTIN(__builtin_expect)
+#define FK_YAML_UNLIKELY(expr) (__builtin_expect(!!(expr), 0))
+#else
+#define FK_YAML_UNLIKELY(expr) (!!(expr))
+#endif
+
+#endif /* FK_YAML_DETAIL_MACROS_CPP_CONFIG_MACROS_HPP */
+
+
+#endif /* FK_YAML_DETAIL_MACROS_DEFINE_MACROS_HPP */
+
+// #include <fkYAML/detail/assert.hpp>
+// _______ __ __ __ _____ __ __ __
+// | __| |_/ | \_/ |/ _ \ / \/ \| | fkYAML: A C++ header-only YAML library
+// | __| _ < \_ _/| ___ | _ | |___ version 0.4.2
+// |__| |_| \__| |_| |_| |_|___||___|______| https://github.com/fktn-k/fkYAML
+//
+// SPDX-FileCopyrightText: 2023-2025 Kensuke Fukutani <fktn.dev@gmail.com>
+// SPDX-License-Identifier: MIT
+
+#ifndef FK_YAML_DETAIL_ASSERT_HPP
+#define FK_YAML_DETAIL_ASSERT_HPP
+
+// if FK_YAML_ASSERT is not user-defined. apply the default assert impl.
+#ifndef FK_YAML_ASSERT
+#ifndef NDEBUG
+#include <cassert>
+#define FK_YAML_ASSERT(x) assert(x)
+#else
+#define FK_YAML_ASSERT(x)
+#endif
+#endif
+
+#endif /* FK_YAML_DETAIL_ASSERT_HPP */
+
+// #include <fkYAML/detail/document_metainfo.hpp>
+// _______ __ __ __ _____ __ __ __
+// | __| |_/ | \_/ |/ _ \ / \/ \| | fkYAML: A C++ header-only YAML library
+// | __| _ < \_ _/| ___ | _ | |___ version 0.4.2
+// |__| |_| \__| |_| |_| |_|___||___|______| https://github.com/fktn-k/fkYAML
+//
+// SPDX-FileCopyrightText: 2023-2025 Kensuke Fukutani <fktn.dev@gmail.com>
+// SPDX-License-Identifier: MIT
+
+#ifndef FK_YAML_DETAIL_DOCUMENT_METAINFO_HPP
+#define FK_YAML_DETAIL_DOCUMENT_METAINFO_HPP
+
+#include <string>
+#include <map>
+
+// #include <fkYAML/detail/macros/define_macros.hpp>
+
+// #include <fkYAML/detail/meta/node_traits.hpp>
+// _______ __ __ __ _____ __ __ __
+// | __| |_/ | \_/ |/ _ \ / \/ \| | fkYAML: A C++ header-only YAML library
+// | __| _ < \_ _/| ___ | _ | |___ version 0.4.2
+// |__| |_| \__| |_| |_| |_|___||___|______| https://github.com/fktn-k/fkYAML
+//
+// SPDX-FileCopyrightText: 2023-2025 Kensuke Fukutani <fktn.dev@gmail.com>
+// SPDX-License-Identifier: MIT
+
+#ifndef FK_YAML_DETAIL_META_NODE_TRAITS_HPP
+#define FK_YAML_DETAIL_META_NODE_TRAITS_HPP
+
+// #include <fkYAML/detail/macros/define_macros.hpp>
+
+// #include <fkYAML/detail/meta/detect.hpp>
+// _______ __ __ __ _____ __ __ __
+// | __| |_/ | \_/ |/ _ \ / \/ \| | fkYAML: A C++ header-only YAML library
+// | __| _ < \_ _/| ___ | _ | |___ version 0.4.2
+// |__| |_| \__| |_| |_| |_|___||___|______| https://github.com/fktn-k/fkYAML
+//
+// SPDX-FileCopyrightText: 2023-2025 Kensuke Fukutani <fktn.dev@gmail.com>
+// SPDX-License-Identifier: MIT
+
+#ifndef FK_YAML_DETAIL_META_DETECT_HPP
+#define FK_YAML_DETAIL_META_DETECT_HPP
+
+#include <iterator>
+#include <type_traits>
+
+// #include <fkYAML/detail/macros/define_macros.hpp>
+
+// #include <fkYAML/detail/meta/stl_supplement.hpp>
+// _______ __ __ __ _____ __ __ __
+// | __| |_/ | \_/ |/ _ \ / \/ \| | fkYAML: A C++ header-only YAML library
+// | __| _ < \_ _/| ___ | _ | |___ version 0.4.2
+// |__| |_| \__| |_| |_| |_|___||___|______| https://github.com/fktn-k/fkYAML
+//
+// SPDX-FileCopyrightText: 2023-2025 Kensuke Fukutani <fktn.dev@gmail.com>
+// SPDX-License-Identifier: MIT
+
+#ifndef FK_YAML_DETAIL_META_STL_SUPPLEMENT_HPP
+#define FK_YAML_DETAIL_META_STL_SUPPLEMENT_HPP
+
+#include <cstddef>
+#include <type_traits>
+
+// #include <fkYAML/detail/macros/define_macros.hpp>
+
+
+#ifdef FK_YAML_HAS_CXX_14
+#include <utility>
+#endif
+
+FK_YAML_DETAIL_NAMESPACE_BEGIN
+
+/////////////////////////////////////////////////////////////////////////////////////////////////////////
+// For contributors:
+// This file is for supplementing future C++ STL implementations to utilize some useful features
+// implemented in C++14 or better.
+// This file is needed to keep the fkYAML library requirement to C++11.
+// **DO NOT** implement features which are not included any version of STL in this file.
+// Such implementations must be in the type_traits.hpp file.
+/////////////////////////////////////////////////////////////////////////////////////////////////////////
+
+#ifndef FK_YAML_HAS_CXX_14
+
+/// @brief An alias template for std::add_pointer::type with C++11.
+/// @note std::add_pointer_t is available since C++14.
+/// @sa https://en.cppreference.com/w/cpp/types/add_pointer
+/// @tparam T A type to be added a pointer.
+template <typename T>
+using add_pointer_t = typename std::add_pointer<T>::type;
+
+/// @brief An alias template for std::enable_if::type with C++11.
+/// @note std::enable_if_t is available since C++14.
+/// @sa https://en.cppreference.com/w/cpp/types/enable_if
+/// @tparam Condition A condition tested at compile time.
+/// @tparam T The type defined only if Condition is true.
+template <bool Condition, typename T = void>
+using enable_if_t = typename std::enable_if<Condition, T>::type;
+
+/// @brief A simple implementation to use std::is_null_pointer with C++11.
+/// @note std::is_null_pointer is available since C++14.
+/// @sa https://en.cppreference.com/w/cpp/types/is_null_pointer
+/// @tparam T The type to be checked if it's equal to std::nullptr_t.
+template <typename T>
+struct is_null_pointer : std::is_same<std::nullptr_t, typename std::remove_cv<T>::type> {};
+
+/// @brief An alias template for std::remove_cv::type with C++11.
+/// @note std::remove_cv_t is available since C++14.
+/// @sa https://en.cppreference.com/w/cpp/types/remove_cv
+/// @tparam T A type from which const-volatile qualifiers are removed.
+template <typename T>
+using remove_cv_t = typename std::remove_cv<T>::type;
+
+/// @brief An alias template for std::remove_pointer::type with C++11.
+/// @note std::remove_pointer_t is available since C++14.
+/// @sa https://en.cppreference.com/w/cpp/types/remove_pointer
+/// @tparam T A type from which a pointer is removed.
+template <typename T>
+using remove_pointer_t = typename std::remove_pointer<T>::type;
+
+/// @brief An alias template for std::remove_reference::type with C++11.
+/// @note std::remove_reference_t is available since C++14.
+/// @sa https://en.cppreference.com/w/cpp/types/remove_reference
+/// @tparam T A type from which a reference is removed.
+template <typename T>
+using remove_reference_t = typename std::remove_reference<T>::type;
+
+template <typename T, T... I>
+struct integer_sequence {
+ using value_type = T;
+ static constexpr std::size_t size() noexcept {
+ return sizeof...(I);
+ }
+};
+
+#if !FK_YAML_HAS_BUILTIN(__make_integer_seq) && !FK_YAML_HAS_BUILTIN(__integer_pack)
+
+namespace make_int_seq_impl {
+
+template <typename IntSeq0, typename IntSeq1>
+struct merger;
+
+template <typename T, T... Ints0, T... Ints1>
+struct merger<integer_sequence<T, Ints0...>, integer_sequence<T, Ints1...>> {
+ using type = integer_sequence<T, Ints0..., (sizeof...(Ints0) + Ints1)...>;
+};
+
+template <typename T, std::size_t Num>
+struct generator {
+ using type =
+ typename merger<typename generator<T, Num / 2>::type, typename generator<T, Num - Num / 2>::type>::type;
+};
+
+template <typename T>
+struct generator<T, 0> {
+ using type = integer_sequence<T>;
+};
+
+template <typename T>
+struct generator<T, 1> {
+ using type = integer_sequence<T, 0>;
+};
+
+} // namespace make_int_seq_impl
+
+#endif
+
+template <typename T, T Num>
+using make_integer_sequence
+#if FK_YAML_HAS_BUILTIN(__make_integer_seq)
+ // clang defines built-in __make_integer_seq to generate an integer sequence.
+ = __make_integer_seq<integer_sequence, T, Num>;
+#elif FK_YAML_HAS_BUILTIN(__integer_pack)
+ // GCC or other compilers may implement built-in __integer_pack to generate an
+ // integer sequence.
+ = integer_sequence<T, __integer_pack(Num)...>;
+#else
+ // fallback to the library implementation of make_integer_sequence.
+ = typename make_int_seq_impl::generator<T, Num>::type;
+#endif
+
+template <std::size_t... Idx>
+using index_sequence = integer_sequence<std::size_t, Idx...>;
+
+template <std::size_t Num>
+using make_index_sequence = make_integer_sequence<std::size_t, Num>;
+
+template <typename... Types>
+using index_sequence_for = make_index_sequence<sizeof...(Types)>;
+
+#else // !defined(FK_YAML_HAS_CXX_14)
+
+using std::add_pointer_t;
+using std::enable_if_t;
+using std::index_sequence;
+using std::index_sequence_for;
+using std::integer_sequence;
+using std::is_null_pointer;
+using std::make_index_sequence;
+using std::make_integer_sequence;
+using std::remove_cv_t;
+using std::remove_pointer_t;
+using std::remove_reference_t;
+
+#endif // !defined(FK_YAML_HAS_CXX_14)
+
+#ifndef FK_YAML_HAS_CXX_17
+
+/// @brief A simple implementation to use std::bool_constant with C++11/C++14.
+/// @tparam Val
+template <bool Val>
+using bool_constant = std::integral_constant<bool, Val>;
+
+/// @brief A simple implementation to use std::void_t with C++11/C++14.
+/// @note
+/// std::conjunction is available since C++17.
+/// This is applied when no traits are specified as inputs.
+/// @sa https://en.cppreference.com/w/cpp/types/conjunction
+/// @tparam Traits Type traits to be checked if their ::value are all true.
+template <typename... Traits>
+struct conjunction : std::true_type {};
+
+/// @brief A partial specialization of conjunction if only one Trait is given.
+/// @tparam Trait Type trait to be checked if its ::value is true.
+template <typename Trait>
+struct conjunction<Trait> : Trait {};
+
+/// @brief A partial specialization of conjunction if more than one traits are given.
+/// @tparam First The first type trait to be checked if its ::value is true.
+/// @tparam Rest The rest of traits passed as another conjunction template arguments if First::value is true.
+template <typename First, typename... Rest>
+struct conjunction<First, Rest...> : std::conditional<First::value, conjunction<Rest...>, First>::type {};
+
+/// @brief A simple implementation to use std::disjunction with C++11/C++14.
+/// @note
+/// std::disjunction is available since C++17.
+/// This is applied when no traits are specified as inputs.
+/// @sa https://en.cppreference.com/w/cpp/types/disjunction
+/// @tparam Traits Type traits to be checked if at least one of their ::value is true.
+template <typename... Traits>
+struct disjunction : std::false_type {};
+
+/// @brief A partial specialization of disjunction if only one Trait is given.
+/// @tparam Trait Type trait to be checked if its ::value is true.
+template <typename Trait>
+struct disjunction<Trait> : Trait {};
+
+/// @brief A partial specialization of disjunction if more than one traits are given.
+/// @tparam First The first type trait to be checked if its ::value is true.
+/// @tparam Rest The rest of traits passed as another conjunction template arguments if First::value is false.
+template <typename First, typename... Rest>
+struct disjunction<First, Rest...> : std::conditional<First::value, First, disjunction<Rest...>>::type {};
+
+/// @brief A simple implementation to use std::negation with C++11/C++14.
+/// @note std::negation is available since C++17.
+/// @sa https://en.cppreference.com/w/cpp/types/negation
+/// @tparam Trait Type trait whose ::value is negated.
+template <typename Trait>
+struct negation : std::integral_constant<bool, !Trait::value> {};
+
+/// @brief A helper for void_t.
+/// @tparam Types Any types to be transformed to void type.
+template <typename... Types>
+struct make_void {
+ using type = void;
+};
+
+/// @brief A simple implementation to use std::void_t with C++11/C++14.
+/// @note std::void_t is available since C++17.
+/// @sa https://en.cppreference.com/w/cpp/types/void_t
+/// @tparam Types Any types to be transformed to void type.
+template <typename... Types>
+using void_t = typename make_void<Types...>::type;
+
+#else // !defined(FK_YAML_HAS_CXX_17)
+
+using std::bool_constant;
+using std::conjunction;
+using std::disjunction;
+using std::negation;
+using std::void_t;
+
+#endif // !defined(FK_YAML_HAS_CXX_17)
+
+#ifndef FK_YAML_HAS_CXX_20
+
+/// @brief A simple implementation to use std::remove_cvref_t with C++11/C++14/C++17.
+/// @note std::remove_cvref & std::remove_cvref_t are available since C++20.
+/// @sa https://en.cppreference.com/w/cpp/types/remove_cvref
+/// @tparam T A type from which cv-qualifiers and reference are removed.
+template <typename T>
+using remove_cvref_t = typename std::remove_cv<typename std::remove_reference<T>::type>::type;
+
+#else
+
+using std::remove_cvref_t;
+
+#endif
+
+/// @brief A wrapper function to call std::unreachable() (since C++23) or similar compiler specific extensions.
+/// @note This function is implemented only for better code optimization against dead code and thus excluded from
+/// coverage report.
+// LCOV_EXCL_START
+[[noreturn]] inline void unreachable() {
+ // use compiler specific extensions if possible.
+ // undefined behavior should be raised by an empty function with noreturn attribute.
+
+#if defined(FK_YAML_HAS_CXX_23) || (defined(__cpp_lib_unreachable) && __cpp_lib_unreachable >= 202202L)
+ std::unreachable();
+#elif defined(_MSC_VER) && !defined(__clang__) // MSVC
+ __assume(false);
+#else
+ __builtin_unreachable();
+#endif
+}
+// LCOV_EXCL_STOP
+
+FK_YAML_DETAIL_NAMESPACE_END
+
+#endif /* FK_YAML_DETAIL_META_STL_SUPPLEMENT_HPP */
+
+
+FK_YAML_DETAIL_NAMESPACE_BEGIN
+
+/// @brief A dummy struct to represent detection failure.
+struct nonesuch {
+ nonesuch() = delete;
+ ~nonesuch() = delete;
+ nonesuch(const nonesuch&) = delete;
+ nonesuch(nonesuch&&) = delete;
+ nonesuch& operator=(const nonesuch&) = delete;
+ nonesuch& operator=(nonesuch&&) = delete;
+};
+
+/// @brief namespace to implement detector type traits
+namespace detector_impl {
+
+/// @brief A helper for general type detection.
+/// @tparam Default A type to represent detection failure.
+/// @tparam AlwaysVoid This must be void type.
+/// @tparam Op A type for desired operation type.
+/// @tparam Args Argument types passed to desired operation.
+template <typename Default, typename AlwaysVoid, template <typename...> class Op, typename... Args>
+struct detector : std::false_type {
+ /// @brief A type which represents detection failure.
+ using type = Default;
+};
+
+/// @brief A partial specialization of detector if desired operation type is found.
+/// @tparam Default A type to represent detection failure.
+/// @tparam Op A type for desired operation type.
+/// @tparam Args Argument types passed to desired operation.
+template <typename Default, template <typename...> class Op, typename... Args>
+struct detector<Default, void_t<Op<Args...>>, Op, Args...> : std::true_type {
+ /// @brief A detected type.
+ using type = Op<Args...>;
+};
+
+} // namespace detector_impl
+
+/// @brief Type traits to detect Op operation with Args argument types
+/// @tparam Op A desired operation type.
+/// @tparam Args Argument types passed to desired operation.
+template <template <typename...> class Op, typename... Args>
+using is_detected = detector_impl::detector<nonesuch, void, Op, Args...>;
+
+/// @brief Type traits to represent a detected type.
+/// @tparam Op A type for desired operation type.
+/// @tparam Args Argument types passed to desired operation.
+template <template <typename...> class Op, typename... Args>
+using detected_t = typename detector_impl::detector<nonesuch, void, Op, Args...>::type;
+
+/// @brief Type traits to check if Expected and a detected type are exactly the same.
+/// @tparam Expected An expected detection result type.
+/// @tparam Op A type for desired operation.
+/// @tparam Args Argument types passed to desired operation.
+template <typename Expected, template <typename...> class Op, typename... Args>
+using is_detected_exact = std::is_same<Expected, detected_t<Op, Args...>>;
+
+/// @brief namespace for member type detections of aliases and functions.
+namespace detect {
+
+/// @brief The type which represents `iterator` member type.
+/// @tparam T A target type.
+template <typename T>
+using iterator_t = typename T::iterator;
+
+/// @brief The type which represents `key_type` member type.
+/// @tparam T A target type.
+template <typename T>
+using key_type_t = typename T::key_type;
+
+/// @brief The type which represents `mapped_type` member type.
+/// @tparam T A target type.
+template <typename T>
+using mapped_type_t = typename T::mapped_type;
+
+/// @brief The type which represents `value_type` member type.
+/// @tparam T A target type.
+template <typename T>
+using value_type_t = typename T::value_type;
+
+/// @brief The type which represents `difference_type` member type.
+/// @tparam T A target type.
+template <typename T>
+using difference_type_t = typename T::difference_type;
+
+/// @brief The type which represents `pointer` member type.
+/// @tparam T A target type.
+template <typename T>
+using pointer_t = typename T::pointer;
+
+/// @brief The type which represents `reference` member type.
+/// @tparam T A target type.
+template <typename T>
+using reference_t = typename T::reference;
+
+/// @brief The type which represents `iterator_category` member type.
+/// @tparam T A target type.
+template <typename T>
+using iterator_category_t = typename T::iterator_category;
+
+/// @brief The type which represents `container_type` member type.
+/// @tparam T A target type.
+template <typename T>
+using container_type_t = typename T::container_type;
+
+/// @brief The type which represents emplace member function.
+/// @tparam T A target type.
+template <typename T, typename... Args>
+using emplace_fn_t = decltype(std::declval<T>().emplace(std::declval<Args>()...));
+
+/// @brief The type which represents reserve member function.
+/// @tparam T A target type.
+template <typename T>
+using reserve_fn_t = decltype(std::declval<T>().reserve(std::declval<typename remove_cvref_t<T>::size_type>()));
+
+/// @brief Type traits to check if T has `iterator` member type.
+/// @tparam T A target type.
+template <typename T>
+using has_iterator = is_detected<iterator_t, remove_cvref_t<T>>;
+
+/// @brief Type traits to check if T has `key_type` member type.
+/// @tparam T A target type.
+template <typename T>
+using has_key_type = is_detected<key_type_t, remove_cvref_t<T>>;
+
+/// @brief Type traits to check if T has `mapped_type` member type.
+/// @tparam T A target type.
+template <typename T>
+using has_mapped_type = is_detected<mapped_type_t, remove_cvref_t<T>>;
+
+/// @brief Type traits to check if T has `value_type` member type.
+/// @tparam T A target type.
+template <typename T>
+using has_value_type = is_detected<value_type_t, remove_cvref_t<T>>;
+
+/// @brief Type traits to check if T is a std::iterator_traits like type.
+/// @tparam T A target type.
+template <typename T>
+struct is_iterator_traits : conjunction<
+ is_detected<difference_type_t, remove_cvref_t<T>>, has_value_type<remove_cvref_t<T>>,
+ is_detected<pointer_t, remove_cvref_t<T>>, is_detected<reference_t, remove_cvref_t<T>>,
+ is_detected<iterator_category_t, remove_cvref_t<T>>> {};
+
+/// @brief Type traits to check if T has `container_type` member type.
+/// @tparam T A target type.
+template <typename T>
+using has_container_type = is_detected<container_type_t, remove_cvref_t<T>>;
+
+/// @brief Type traits to check if T has reserve member function.
+/// @tparam T A target type.
+template <typename T>
+using has_reserve = is_detected<reserve_fn_t, T>;
+
+// fallback to these STL functions.
+using std::begin;
+using std::end;
+
+/// @brief Type traits to check if begin/end functions can be called on a T object.
+/// @tparam T A target type.
+template <typename T, typename = void>
+struct has_begin_end : std::false_type {};
+
+/// @brief Type traits to check if begin/end functions can be called on a T object.
+/// @tparam T A target type.
+template <typename T>
+struct has_begin_end<T, void_t<decltype(begin(std::declval<T>()), end(std::declval<T>()))>> : std::true_type {};
+
+} // namespace detect
+
+FK_YAML_DETAIL_NAMESPACE_END
+
+#endif /* FK_YAML_DETAIL_META_DETECT_HPP */
+
+// #include <fkYAML/detail/meta/stl_supplement.hpp>
+
+// #include <fkYAML/detail/meta/type_traits.hpp>
+// _______ __ __ __ _____ __ __ __
+// | __| |_/ | \_/ |/ _ \ / \/ \| | fkYAML: A C++ header-only YAML library
+// | __| _ < \_ _/| ___ | _ | |___ version 0.4.2
+// |__| |_| \__| |_| |_| |_|___||___|______| https://github.com/fktn-k/fkYAML
+//
+// SPDX-FileCopyrightText: 2023-2025 Kensuke Fukutani <fktn.dev@gmail.com>
+// SPDX-License-Identifier: MIT
+
+#ifndef FK_YAML_DETAIL_META_TYPE_TRAITS_HPP
+#define FK_YAML_DETAIL_META_TYPE_TRAITS_HPP
+
+#include <iterator>
+#include <type_traits>
+
+// #include <fkYAML/detail/macros/define_macros.hpp>
+
+// #include <fkYAML/detail/meta/stl_supplement.hpp>
+
+
+FK_YAML_DETAIL_NAMESPACE_BEGIN
+
+/// @brief Type trait to check if T and U are comparable types.
+/// @tparam Comparator An object type to compare T and U objects.
+/// @tparam T A type for comparison.
+/// @tparam U The other type for comparison.
+/// @tparam typename Placeholder for determining T and U are comparable types.
+template <typename Comparator, typename T, typename U, typename = void>
+struct is_comparable : std::false_type {};
+
+/// @brief A partial specialization of is_comparable if T and U are comparable types.
+/// @tparam Comparator An object type to compare T and U objects.
+/// @tparam T A type for comparison.
+/// @tparam U The other type for comparison.
+template <typename Comparator, typename T, typename U>
+struct is_comparable<
+ Comparator, T, U,
+ void_t<
+ decltype(std::declval<Comparator>()(std::declval<T>(), std::declval<U>())),
+ decltype(std::declval<Comparator>()(std::declval<U>(), std::declval<T>()))>> : std::true_type {};
+
+/// @brief Type trait to check if KeyType can be used as key type.
+/// @tparam Comparator An object type to compare T and U objects.
+/// @tparam ObjectKeyType The original key type.
+/// @tparam KeyType A type to be used as key type.
+template <typename Comparator, typename ObjectKeyType, typename KeyType>
+using is_usable_as_key_type = is_comparable<Comparator, ObjectKeyType, KeyType>;
+
+/// @brief Type trait to check if T is of non-boolean integral types.
+/// @tparam T A type to be checked.
+template <typename T>
+using is_non_bool_integral = conjunction<std::is_integral<T>, negation<std::is_same<bool, T>>>;
+
+/// @brief Type traits to check if T is a complete type.
+/// @tparam T A type to be checked if a complete type.
+/// @tparam typename N/A
+template <typename T, typename = void>
+struct is_complete_type : std::false_type {};
+
+/// @brief A partial specialization of is_complete_type if T is a complete type.
+/// @tparam T
+template <typename T>
+struct is_complete_type<T, decltype(void(sizeof(T)))> : std::true_type {};
+
+/// @brief A utility alias to test if the value type of `ItrType` is `T`.
+/// @tparam ItrType An iterator type.
+/// @tparam T The target iterator value type.
+template <typename ItrType, typename T>
+using is_iterator_of = std::is_same<remove_cv_t<typename std::iterator_traits<ItrType>::value_type>, T>;
+
+/// @brief A utility struct to generate static constant instance.
+/// @tparam T A target type for the resulting static constant instance.
+template <typename T>
+struct static_const {
+ static FK_YAML_INLINE_VAR constexpr T value {}; // NOLINT(readability-identifier-naming)
+};
+
+#ifndef FK_YAML_HAS_CXX_17
+/// @brief A instantiation of static_const::value instance.
+/// @note This is required if inline variables are not available. C++11-14 do not provide such a feature yet.
+/// @tparam T A target type for the resulting static constant instance.
+template <typename T>
+constexpr T static_const<T>::value;
+#endif
+
+/// @brief A helper structure for tag dispatch.
+/// @tparam T A tag type.
+template <typename T>
+struct type_tag {
+ /// @brief A tagged type.
+ using type = T;
+};
+
+FK_YAML_DETAIL_NAMESPACE_END
+
+#endif /* FK_YAML_DETAIL_META_TYPE_TRAITS_HPP */
+
+// #include <fkYAML/fkyaml_fwd.hpp>
+// _______ __ __ __ _____ __ __ __
+// | __| |_/ | \_/ |/ _ \ / \/ \| | fkYAML: A C++ header-only YAML library
+// | __| _ < \_ _/| ___ | _ | |___ version 0.4.2
+// |__| |_| \__| |_| |_| |_|___||___|______| https://github.com/fktn-k/fkYAML
+//
+// SPDX-FileCopyrightText: 2023-2025 Kensuke Fukutani <fktn.dev@gmail.com>
+// SPDX-License-Identifier: MIT
+
+#ifndef FK_YAML_FKYAML_FWD_HPP
+#define FK_YAML_FKYAML_FWD_HPP
+
+#include <cstdint>
+#include <map>
+#include <string>
+#include <vector>
+
+// #include <fkYAML/detail/macros/version_macros.hpp>
+
+
+FK_YAML_NAMESPACE_BEGIN
+
+/// @brief An ADL friendly converter between basic_node objects and native data objects.
+/// @tparam ValueType A target data type.
+/// @sa https://fktn-k.github.io/fkYAML/api/node_value_converter/
+template <typename ValueType, typename = void>
+class node_value_converter;
+
+/// @brief A class to store value of YAML nodes.
+/// @sa https://fktn-k.github.io/fkYAML/api/basic_node/
+template <
+ template <typename, typename...> class SequenceType = std::vector,
+ template <typename, typename, typename...> class MappingType = std::map, typename BooleanType = bool,
+ typename IntegerType = std::int64_t, typename FloatNumberType = double, typename StringType = std::string,
+ template <typename, typename = void> class ConverterType = node_value_converter>
+class basic_node;
+
+/// @brief default YAML node value container.
+/// @sa https://fktn-k.github.io/fkYAML/api/basic_node/node/
+using node = basic_node<>;
+
+/// @brief A minimal map-like container which preserves insertion order.
+/// @tparam Key A type for keys.
+/// @tparam Value A type for values.
+/// @tparam IgnoredCompare A placeholder for key comparison. This will be ignored.
+/// @tparam Allocator A class for allocators.
+/// @sa https://fktn-k.github.io/fkYAML/api/ordered_map/
+template <typename Key, typename Value, typename IgnoredCompare, typename Allocator>
+class ordered_map;
+
+FK_YAML_NAMESPACE_END
+
+#endif /* FK_YAML_FKYAML_FWD_HPP */
+
+
+FK_YAML_DETAIL_NAMESPACE_BEGIN
+
+/////////////////////////////
+// is_basic_node traits
+/////////////////////////////
+
+/// @brief Actual implementation of the is_basic_node type traits struct.
+/// @tparam T A class to be checked if it's a basic_node template class instance type.
+template <typename T>
+struct is_basic_node_impl : std::false_type {};
+
+/// @brief A partial specialization of is_basic_node_impl for basic_node template class.
+/// @tparam SequenceType A type for sequence node value containers.
+/// @tparam MappingType A type for mapping node value containers.
+/// @tparam BooleanType A type for boolean node values.
+/// @tparam IntegerType A type for integer node values.
+/// @tparam FloatNumberType A type for float number node values.
+/// @tparam StringType A type for string node values.
+/// @tparam Converter A type for node-value converter
+template <
+ template <typename, typename...> class SequenceType, template <typename, typename, typename...> class MappingType,
+ typename BooleanType, typename IntegerType, typename FloatNumberType, typename StringType,
+ template <typename, typename> class Converter>
+struct is_basic_node_impl<
+ basic_node<SequenceType, MappingType, BooleanType, IntegerType, FloatNumberType, StringType, Converter>>
+ : std::true_type {};
+
+/// @brief A struct to check the template parameter class is a basic_node template class instance type.
+/// @tparam T A class to be checked if it's a basic_node template class instance type.
+template <typename T>
+struct is_basic_node : is_basic_node_impl<remove_cvref_t<T>> {};
+
+///////////////////////////////////
+// is_node_ref_storage traits
+///////////////////////////////////
+
+// forward declaration for node_ref_storage<...>
+template <typename>
+class node_ref_storage;
+
+/// @brief A struct to check the template parameter class is a kind of node_ref_storage_template class.
+/// @tparam T A type to be checked if it's a kind of node_ref_storage template class.
+template <typename T>
+struct is_node_ref_storage : std::false_type {};
+
+/// @brief A partial specialization for node_ref_storage template class.
+/// @tparam T A template parameter type of node_ref_storage template class.
+template <typename T>
+struct is_node_ref_storage<node_ref_storage<T>> : std::true_type {};
+
+///////////////////////////////////////////////////////
+// basic_node conversion API representative types
+///////////////////////////////////////////////////////
+
+/// @brief A type represent from_node function.
+/// @tparam T A type which provides from_node function.
+/// @tparam Args Argument types passed to from_node function.
+template <typename T, typename... Args>
+using from_node_function_t = decltype(T::from_node(std::declval<Args>()...));
+
+/// @brief A type which represent to_node function.
+/// @tparam T A type which provides to_node function.
+/// @tparam Args Argument types passed to to_node function.
+template <typename T, typename... Args>
+using to_node_function_t = decltype(T::to_node(std::declval<Args>()...));
+
+///////////////////////////////////////////////////
+// basic_node conversion API detection traits
+///////////////////////////////////////////////////
+
+/// @brief Type traits to check if T is a compatible type for BasicNodeType in terms of from_node function.
+/// @tparam BasicNodeType A basic_node template instance type.
+/// @tparam T A target type passed to from_node function.
+/// @tparam typename N/A
+template <typename BasicNodeType, typename T, typename = void>
+struct has_from_node : std::false_type {};
+
+/// @brief A partial specialization of has_from_node if T is not a basic_node template instance type.
+/// @tparam BasicNodeType A basic_node template instance type.
+/// @tparam T A target type passed to from_node function.
+template <typename BasicNodeType, typename T>
+struct has_from_node<BasicNodeType, T, enable_if_t<negation<is_basic_node<T>>::value>> {
+ using converter = typename BasicNodeType::template value_converter_type<T, void>;
+
+ // NOLINTNEXTLINE(readability-identifier-naming)
+ static constexpr bool value =
+ is_detected_exact<void, from_node_function_t, converter, const BasicNodeType&, T&>::value;
+};
+
+/// @brief Type traits to check if T is a compatible type for BasicNodeType in terms of to_node function.
+/// @warning Do not pass basic_node type as BasicNodeType to avoid infinite type instantiation.
+/// @tparam BasicNodeType A basic_node template instance type.
+/// @tparam T A target type passed to to_node function.
+/// @tparam typename N/A
+template <typename BasicNodeType, typename T, typename = void>
+struct has_to_node : std::false_type {};
+
+/// @brief A partial specialization of has_to_node if T is not a basic_node template instance type.
+/// @tparam BasicNodeType A basic_node template instance type.
+/// @tparam T A target type passed to to_node function.
+template <typename BasicNodeType, typename T>
+struct has_to_node<BasicNodeType, T, enable_if_t<negation<is_basic_node<T>>::value>> {
+ using converter = typename BasicNodeType::template value_converter_type<T, void>;
+
+ // NOLINTNEXTLINE(readability-identifier-naming)
+ static constexpr bool value = is_detected_exact<void, to_node_function_t, converter, BasicNodeType&, T>::value;
+};
+
+///////////////////////////////////////
+// is_node_compatible_type traits
+///////////////////////////////////////
+
+/// @brief Type traits implementation of is_node_compatible_type to check if CompatibleType is a compatible type for
+/// BasicNodeType.
+/// @tparam BasicNodeType A basic_node template instance type.
+/// @tparam CompatibleType A target type for compatibility check.
+/// @tparam typename N/A
+template <typename BasicNodeType, typename CompatibleType, typename = void>
+struct is_node_compatible_type_impl : std::false_type {};
+
+/// @brief A partial specialization of is_node_compatible_type_impl if CompatibleType is a complete type and is
+/// compatible for BasicNodeType.
+/// @tparam BasicNodeType A basic_node template instance type.
+/// @tparam CompatibleType A target type for compatibility check.
+template <typename BasicNodeType, typename CompatibleType>
+struct is_node_compatible_type_impl<
+ BasicNodeType, CompatibleType,
+ enable_if_t<conjunction<is_complete_type<CompatibleType>, has_to_node<BasicNodeType, CompatibleType>>::value>>
+ : std::true_type {};
+
+/// @brief Type traits to check if CompatibleType is a compatible type for BasicNodeType.
+/// @tparam BasicNodeType A basic_node template instance type.
+/// @tparam CompatibleType A target type for compatibility check.
+template <typename BasicNodeType, typename CompatibleType>
+struct is_node_compatible_type : is_node_compatible_type_impl<BasicNodeType, CompatibleType> {};
+
+FK_YAML_DETAIL_NAMESPACE_END
+
+#endif /* FK_YAML_DETAIL_META_NODE_TRAITS_HPP */
+
+// #include <fkYAML/yaml_version_type.hpp>
+// _______ __ __ __ _____ __ __ __
+// | __| |_/ | \_/ |/ _ \ / \/ \| | fkYAML: A C++ header-only YAML library
+// | __| _ < \_ _/| ___ | _ | |___ version 0.4.2
+// |__| |_| \__| |_| |_| |_|___||___|______| https://github.com/fktn-k/fkYAML
+//
+// SPDX-FileCopyrightText: 2023-2025 Kensuke Fukutani <fktn.dev@gmail.com>
+// SPDX-License-Identifier: MIT
+
+#ifndef FK_YAML_YAML_VERSION_TYPE_HPP
+#define FK_YAML_YAML_VERSION_TYPE_HPP
+
+#include <cstdint>
+
+// #include <fkYAML/detail/macros/define_macros.hpp>
+
+// #include <fkYAML/detail/meta/stl_supplement.hpp>
+
+
+FK_YAML_NAMESPACE_BEGIN
+
+enum class yaml_version_type : std::uint8_t {
+ VERSION_1_1, //!< YAML version 1.1
+ VERSION_1_2, //!< YAML version 1.2
+};
+
+inline const char* to_string(yaml_version_type t) noexcept {
+ switch (t) {
+ case yaml_version_type::VERSION_1_1:
+ return "VERSION_1_1";
+ case yaml_version_type::VERSION_1_2:
+ return "VERSION_1_2";
+ default: // LCOV_EXCL_LINE
+ detail::unreachable(); // LCOV_EXCL_LINE
+ }
+}
+
+FK_YAML_NAMESPACE_END
+
+#endif /* FK_YAML_YAML_VERSION_TYPE_HPP */
+
+
+FK_YAML_DETAIL_NAMESPACE_BEGIN
+
+/// @brief The set of directives for a YAML document.
+template <typename BasicNodeType, typename = enable_if_t<is_basic_node<BasicNodeType>::value>>
+struct document_metainfo {
+ /// The YAML version used for the YAML document.
+ yaml_version_type version {yaml_version_type::VERSION_1_2};
+ /// Whether the YAML version has been specified.
+ bool is_version_specified {false};
+ /// The prefix of the primary handle.
+ std::string primary_handle_prefix;
+ /// The prefix of the secondary handle.
+ std::string secondary_handle_prefix;
+ /// The map of handle-prefix pairs.
+ std::map<std::string /*handle*/, std::string /*prefix*/> named_handle_map;
+ /// The map of anchor node which allows for key duplication.
+ std::multimap<std::string /*anchor name*/, BasicNodeType> anchor_table {};
+};
+
+FK_YAML_DETAIL_NAMESPACE_END
+
+#endif /* FK_YAML_DETAIL_DOCUMENT_METAINFO_HPP */
+
+// #include <fkYAML/detail/exception_safe_allocation.hpp>
+// _______ __ __ __ _____ __ __ __
+// | __| |_/ | \_/ |/ _ \ / \/ \| | fkYAML: A C++ header-only YAML library
+// | __| _ < \_ _/| ___ | _ | |___ version 0.4.2
+// |__| |_| \__| |_| |_| |_|___||___|______| https://github.com/fktn-k/fkYAML
+//
+// SPDX-FileCopyrightText: 2023-2025 Kensuke Fukutani <fktn.dev@gmail.com>
+// SPDX-License-Identifier: MIT
+
+#ifndef FK_YAML_DETAIL_EXCEPTION_SAFE_ALLOCATION_HPP
+#define FK_YAML_DETAIL_EXCEPTION_SAFE_ALLOCATION_HPP
+
+#include <memory>
+#include <utility>
+
+// #include <fkYAML/detail/macros/define_macros.hpp>
+
+// #include <fkYAML/detail/assert.hpp>
+
+
+FK_YAML_DETAIL_NAMESPACE_BEGIN
+
+/// @brief Helper struct which ensures destruction/deallocation of heap-allocated objects.
+/// @tparam ObjT Object type.
+/// @tparam AllocTraits Allocator traits type for the object.
+template <typename ObjT, typename AllocTraits>
+struct tidy_guard {
+ tidy_guard() = delete;
+
+ /// @brief Construct a tidy_guard with a pointer to the object.
+ /// @param p_obj
+ tidy_guard(ObjT* p_obj) noexcept
+ : p_obj(p_obj) {
+ }
+
+ // move-only
+ tidy_guard(const tidy_guard&) = delete;
+ tidy_guard& operator=(const tidy_guard&) = delete;
+
+ /// @brief Move constructs a tidy_guard object.
+ tidy_guard(tidy_guard&&) = default;
+
+ /// @brief Move assigns a tidy_guard object.
+ /// @return Reference to this tidy_guard object.
+ tidy_guard& operator=(tidy_guard&&) = default;
+
+ /// @brief Destroys this tidy_guard object. Destruction/deallocation happen if the pointer is not null.
+ ~tidy_guard() {
+ if FK_YAML_UNLIKELY (p_obj != nullptr) {
+ typename AllocTraits::allocator_type alloc {};
+ AllocTraits::destroy(alloc, p_obj);
+ AllocTraits::deallocate(alloc, p_obj, 1);
+ p_obj = nullptr;
+ }
+ }
+
+ /// @brief Get the pointer to the object.
+ /// @return The pointer to the object.
+ ObjT* get() const noexcept {
+ return p_obj;
+ }
+
+ /// @brief Checks if the pointer is not null.
+ explicit operator bool() const noexcept {
+ return p_obj != nullptr;
+ }
+
+ /// @brief Releases the pointer to the object. No destruction/deallocation happen after this function gets called.
+ /// @return The pointer to the object.
+ ObjT* release() noexcept {
+ ObjT* ret = p_obj;
+ p_obj = nullptr;
+ return ret;
+ }
+
+ /// @brief The pointer to the object.
+ ObjT* p_obj {nullptr};
+};
+
+/// @brief Allocates and constructs an `ObjT` object with given arguments.
+/// @tparam ObjT The object type.
+/// @tparam ...Args The argument types.
+/// @param ...args The arguments for construction.
+/// @return An address of allocated memory on the heap.
+template <typename ObjT, typename... Args>
+inline ObjT* create_object(Args&&... args) {
+ using alloc_type = std::allocator<ObjT>;
+ using alloc_traits_type = std::allocator_traits<alloc_type>;
+
+ alloc_type alloc {};
+ tidy_guard<ObjT, alloc_traits_type> tg {alloc_traits_type::allocate(alloc, 1)};
+ alloc_traits_type::construct(alloc, tg.get(), std::forward<Args>(args)...);
+
+ FK_YAML_ASSERT(tg);
+ return tg.release();
+}
+
+/// @brief Destroys and deallocates an `ObjT` object.
+/// @tparam ObjT The object type.
+/// @param p_obj A pointer to the object.
+template <typename ObjT>
+inline void destroy_object(ObjT* p_obj) {
+ FK_YAML_ASSERT(p_obj != nullptr);
+ std::allocator<ObjT> alloc;
+ std::allocator_traits<decltype(alloc)>::destroy(alloc, p_obj);
+ std::allocator_traits<decltype(alloc)>::deallocate(alloc, p_obj, 1);
+}
+
+FK_YAML_DETAIL_NAMESPACE_END
+
+#endif /* FK_YAML_DETAIL_EXCEPTION_SAFE_ALLOCATION_HPP */
+
+// #include <fkYAML/detail/input/deserializer.hpp>
+// _______ __ __ __ _____ __ __ __
+// | __| |_/ | \_/ |/ _ \ / \/ \| | fkYAML: A C++ header-only YAML library
+// | __| _ < \_ _/| ___ | _ | |___ version 0.4.2
+// |__| |_| \__| |_| |_| |_|___||___|______| https://github.com/fktn-k/fkYAML
+//
+// SPDX-FileCopyrightText: 2023-2025 Kensuke Fukutani <fktn.dev@gmail.com>
+// SPDX-License-Identifier: MIT
+
+#ifndef FK_YAML_DETAIL_INPUT_DESERIALIZER_HPP
+#define FK_YAML_DETAIL_INPUT_DESERIALIZER_HPP
+
+#include <algorithm>
+#include <deque>
+#include <vector>
+
+// #include <fkYAML/detail/macros/define_macros.hpp>
+
+// #include <fkYAML/detail/document_metainfo.hpp>
+
+// #include <fkYAML/detail/input/lexical_analyzer.hpp>
+// _______ __ __ __ _____ __ __ __
+// | __| |_/ | \_/ |/ _ \ / \/ \| | fkYAML: A C++ header-only YAML library
+// | __| _ < \_ _/| ___ | _ | |___ version 0.4.2
+// |__| |_| \__| |_| |_| |_|___||___|______| https://github.com/fktn-k/fkYAML
+//
+// SPDX-FileCopyrightText: 2023-2025 Kensuke Fukutani <fktn.dev@gmail.com>
+// SPDX-License-Identifier: MIT
+
+#ifndef FK_YAML_DETAIL_INPUT_LEXICAL_ANALYZER_HPP
+#define FK_YAML_DETAIL_INPUT_LEXICAL_ANALYZER_HPP
+
+#include <algorithm>
+#include <cctype>
+#include <cstdlib>
+
+// #include <fkYAML/detail/macros/define_macros.hpp>
+
+// #include <fkYAML/detail/assert.hpp>
+
+// #include <fkYAML/detail/encodings/uri_encoding.hpp>
+// _______ __ __ __ _____ __ __ __
+// | __| |_/ | \_/ |/ _ \ / \/ \| | fkYAML: A C++ header-only YAML library
+// | __| _ < \_ _/| ___ | _ | |___ version 0.4.2
+// |__| |_| \__| |_| |_| |_|___||___|______| https://github.com/fktn-k/fkYAML
+//
+// SPDX-FileCopyrightText: 2023-2025 Kensuke Fukutani <fktn.dev@gmail.com>
+// SPDX-License-Identifier: MIT
+
+#ifndef FK_YAML_DETAIL_ENCODINGS_URI_ENCODING_HPP
+#define FK_YAML_DETAIL_ENCODINGS_URI_ENCODING_HPP
+
+#include <cctype>
+#include <string>
+
+// #include <fkYAML/detail/macros/define_macros.hpp>
+
+
+FK_YAML_DETAIL_NAMESPACE_BEGIN
+
+/// @brief A class which handles URI encodings.
+class uri_encoding {
+public:
+ /// @brief Validates the encoding of the given character sequence.
+ /// @param begin An iterator to the first element of the character sequence.
+ /// @param end An iterator to the past-the-end element of the character sequence.
+ /// @return true if all the characters are valid, false otherwise.
+ static bool validate(const char* begin, const char* end) noexcept {
+ if (begin == end) {
+ return true;
+ }
+
+ const char* current = begin;
+
+ for (; current != end; ++current) {
+ if (*current == '%') {
+ const bool are_valid_octets = validate_octets(++current, end);
+ if (!are_valid_octets) {
+ return false;
+ }
+
+ continue;
+ }
+
+ const bool is_allowed_character = validate_character(*current);
+ if (!is_allowed_character) {
+ return false;
+ }
+ }
+
+ return true;
+ }
+
+private:
+ /// @brief Validates the given octets.
+ /// @param begin An iterator to the first octet.
+ /// @param end An iterator to the past-the-end element of the whole character sequence.
+ /// @return true if the octets are valid, false otherwise.
+ static bool validate_octets(const char*& begin, const char*& end) {
+ for (int i = 0; i < 2; i++, ++begin) {
+ if (begin == end) {
+ return false;
+ }
+
+ // Normalize a character for a-f/A-F comparison
+ const int octet = std::tolower(*begin);
+
+ if ('0' <= octet && octet <= '9') {
+ continue;
+ }
+
+ if ('a' <= octet && octet <= 'f') {
+ continue;
+ }
+
+ return false;
+ }
+
+ return true;
+ }
+
+ /// @brief Verify if the given character is allowed as a URI character.
+ /// @param c The target character.
+ /// @return true if the given character is allowed as a URI character, false otherwise.
+ static bool validate_character(const char c) {
+ // Check if the current character is one of reserved/unreserved characters which are allowed for
+ // use. See the following links for details:
+ // * reserved characters: https://datatracker.ietf.org/doc/html/rfc3986#section-2.2
+ // * unreserved characters: https://datatracker.ietf.org/doc/html/rfc3986#section-2.3
+
+ switch (c) {
+ // reserved characters (gen-delims)
+ case ':':
+ case '/':
+ case '?':
+ case '#':
+ case '[':
+ case ']':
+ case '@':
+ // reserved characters (sub-delims)
+ case '!':
+ case '$':
+ case '&':
+ case '\'':
+ case '(':
+ case ')':
+ case '*':
+ case '+':
+ case ',':
+ case ';':
+ case '=':
+ // unreserved characters
+ case '-':
+ case '.':
+ case '_':
+ case '~':
+ return true;
+ default:
+ // alphabets and numbers are also allowed.
+ return static_cast<bool>(std::isalnum(c));
+ }
+ }
+};
+
+FK_YAML_DETAIL_NAMESPACE_END
+
+#endif /* FK_YAML_DETAIL_ENCODINGS_URI_ENCODING_HPP */
+
+// #include <fkYAML/detail/encodings/utf_encodings.hpp>
+// _______ __ __ __ _____ __ __ __
+// | __| |_/ | \_/ |/ _ \ / \/ \| | fkYAML: A C++ header-only YAML library
+// | __| _ < \_ _/| ___ | _ | |___ version 0.4.2
+// |__| |_| \__| |_| |_| |_|___||___|______| https://github.com/fktn-k/fkYAML
+//
+// SPDX-FileCopyrightText: 2023-2025 Kensuke Fukutani <fktn.dev@gmail.com>
+// SPDX-License-Identifier: MIT
+
+#ifndef FK_YAML_DETAIL_ENCODINGS_UTF_ENCODINGS_HPP
+#define FK_YAML_DETAIL_ENCODINGS_UTF_ENCODINGS_HPP
+
+#include <array>
+#include <cstdint>
+
+// #include <fkYAML/detail/macros/define_macros.hpp>
+
+// #include <fkYAML/exception.hpp>
+// _______ __ __ __ _____ __ __ __
+// | __| |_/ | \_/ |/ _ \ / \/ \| | fkYAML: A C++ header-only YAML library
+// | __| _ < \_ _/| ___ | _ | |___ version 0.4.2
+// |__| |_| \__| |_| |_| |_|___||___|______| https://github.com/fktn-k/fkYAML
+//
+// SPDX-FileCopyrightText: 2023-2025 Kensuke Fukutani <fktn.dev@gmail.com>
+// SPDX-License-Identifier: MIT
+
+#ifndef FK_YAML_EXCEPTION_HPP
+#define FK_YAML_EXCEPTION_HPP
+
+#include <array>
+#include <initializer_list>
+#include <stdexcept>
+#include <string>
+
+// #include <fkYAML/detail/macros/define_macros.hpp>
+
+// #include <fkYAML/detail/string_formatter.hpp>
+// _______ __ __ __ _____ __ __ __
+// | __| |_/ | \_/ |/ _ \ / \/ \| | fkYAML: A C++ header-only YAML library
+// | __| _ < \_ _/| ___ | _ | |___ version 0.4.2
+// |__| |_| \__| |_| |_| |_|___||___|______| https://github.com/fktn-k/fkYAML
+//
+// SPDX-FileCopyrightText: 2023-2025 Kensuke Fukutani <fktn.dev@gmail.com>
+// SPDX-License-Identifier: MIT
+
+#ifndef FK_YAML_DETAIL_STRING_FORMATTER_HPP
+#define FK_YAML_DETAIL_STRING_FORMATTER_HPP
+
+#include <cstdarg>
+#include <cstdio>
+#include <memory>
+#include <string>
+
+// #include <fkYAML/detail/macros/define_macros.hpp>
+
+
+FK_YAML_DETAIL_NAMESPACE_BEGIN
+
+// NOLINTNEXTLINE(cert-dcl50-cpp)
+inline std::string format(const char* fmt, ...) {
+ // NOLINTBEGIN(cppcoreguidelines-pro-bounds-array-to-pointer-decay,hicpp-no-array-decay)
+ va_list vl;
+ va_start(vl, fmt);
+ int size = std::vsnprintf(nullptr, 0, fmt, vl);
+ va_end(vl);
+
+ // LCOV_EXCL_START
+ if (size < 0) {
+ return "";
+ }
+ // LCOV_EXCL_STOP
+
+ const std::unique_ptr<char[]> buffer {new char[size + 1] {}};
+
+ va_start(vl, fmt);
+ size = std::vsnprintf(buffer.get(), size + 1, fmt, vl);
+ va_end(vl);
+ // NOLINTEND(cppcoreguidelines-pro-bounds-array-to-pointer-decay,hicpp-no-array-decay)
+
+ return {buffer.get(), static_cast<std::size_t>(size)};
+}
+
+FK_YAML_DETAIL_NAMESPACE_END
+
+#endif /* FK_YAML_DETAIL_STRING_FORMATTER_HPP */
+
+// #include <fkYAML/detail/types/node_t.hpp>
+// _______ __ __ __ _____ __ __ __
+// | __| |_/ | \_/ |/ _ \ / \/ \| | fkYAML: A C++ header-only YAML library
+// | __| _ < \_ _/| ___ | _ | |___ version 0.4.2
+// |__| |_| \__| |_| |_| |_|___||___|______| https://github.com/fktn-k/fkYAML
+//
+// SPDX-FileCopyrightText: 2023-2025 Kensuke Fukutani <fktn.dev@gmail.com>
+// SPDX-License-Identifier: MIT
+
+#ifndef FK_YAML_DETAIL_TYPES_NODE_T_HPP
+#define FK_YAML_DETAIL_TYPES_NODE_T_HPP
+
+#include <cstdint>
+
+// #include <fkYAML/detail/macros/define_macros.hpp>
+
+// #include <fkYAML/node_type.hpp>
+// _______ __ __ __ _____ __ __ __
+// | __| |_/ | \_/ |/ _ \ / \/ \| | fkYAML: A C++ header-only YAML library
+// | __| _ < \_ _/| ___ | _ | |___ version 0.4.2
+// |__| |_| \__| |_| |_| |_|___||___|______| https://github.com/fktn-k/fkYAML
+//
+// SPDX-FileCopyrightText: 2023-2025 Kensuke Fukutani <fktn.dev@gmail.com>
+// SPDX-License-Identifier: MIT
+
+#ifndef FK_YAML_NODE_TYPE_HPP
+#define FK_YAML_NODE_TYPE_HPP
+
+#include <cstdint>
+
+// #include <fkYAML/detail/macros/define_macros.hpp>
+
+// #include <fkYAML/detail/meta/stl_supplement.hpp>
+
+
+FK_YAML_NAMESPACE_BEGIN
+
+enum class node_type : std::uint8_t {
+ SEQUENCE, //!< sequence value type
+ MAPPING, //!< mapping value type
+ NULL_OBJECT, //!< null value type
+ BOOLEAN, //!< boolean value type
+ INTEGER, //!< integer value type
+ FLOAT, //!< float point value type
+ STRING, //!< string value type
+};
+
+inline const char* to_string(node_type t) noexcept {
+ switch (t) {
+ case node_type::SEQUENCE:
+ return "SEQUENCE";
+ case node_type::MAPPING:
+ return "MAPPING";
+ case node_type::NULL_OBJECT:
+ return "NULL_OBJECT";
+ case node_type::BOOLEAN:
+ return "BOOLEAN";
+ case node_type::INTEGER:
+ return "INTEGER";
+ case node_type::FLOAT:
+ return "FLOAT";
+ case node_type::STRING:
+ return "STRING";
+ default: // LCOV_EXCL_LINE
+ detail::unreachable(); // LCOV_EXCL_LINE
+ }
+}
+
+FK_YAML_NAMESPACE_END
+
+#endif /* FK_YAML_NODE_TYPE_HPP */
+
+
+FK_YAML_DETAIL_NAMESPACE_BEGIN
+
+/// @brief Definition of node value types.
+enum class node_t : std::uint8_t {
+ SEQUENCE, //!< sequence value type
+ MAPPING, //!< mapping value type
+ NULL_OBJECT, //!< null value type
+ BOOLEAN, //!< boolean value type
+ INTEGER, //!< integer value type
+ FLOAT_NUMBER, //!< float number value type
+ STRING, //!< string value type
+};
+
+inline const char* to_string(node_t t) noexcept {
+ switch (t) {
+ case node_t::SEQUENCE:
+ return "sequence";
+ case node_t::MAPPING:
+ return "mapping";
+ case node_t::NULL_OBJECT:
+ return "null";
+ case node_t::BOOLEAN:
+ return "boolean";
+ case node_t::INTEGER:
+ return "integer";
+ case node_t::FLOAT_NUMBER:
+ return "float";
+ case node_t::STRING:
+ return "string";
+ default: // LCOV_EXCL_LINE
+ detail::unreachable(); // LCOV_EXCL_LINE
+ }
+}
+
+inline node_t convert_from_node_type(node_type t) {
+ switch (t) {
+ case node_type::SEQUENCE:
+ return node_t::SEQUENCE;
+ case node_type::MAPPING:
+ return node_t::MAPPING;
+ case node_type::NULL_OBJECT:
+ return node_t::NULL_OBJECT;
+ case node_type::BOOLEAN:
+ return node_t::BOOLEAN;
+ case node_type::INTEGER:
+ return node_t::INTEGER;
+ case node_type::FLOAT:
+ return node_t::FLOAT_NUMBER;
+ case node_type::STRING:
+ return node_t::STRING;
+ default: // LCOV_EXCL_LINE
+ detail::unreachable(); // LCOV_EXCL_LINE
+ }
+}
+
+inline node_type convert_to_node_type(node_t t) {
+ switch (t) {
+ case node_t::SEQUENCE:
+ return node_type::SEQUENCE;
+ case node_t::MAPPING:
+ return node_type::MAPPING;
+ case node_t::NULL_OBJECT:
+ return node_type::NULL_OBJECT;
+ case node_t::BOOLEAN:
+ return node_type::BOOLEAN;
+ case node_t::INTEGER:
+ return node_type::INTEGER;
+ case node_t::FLOAT_NUMBER:
+ return node_type::FLOAT;
+ case node_t::STRING:
+ return node_type::STRING;
+ default: // LCOV_EXCL_LINE
+ detail::unreachable(); // LCOV_EXCL_LINE
+ }
+}
+
+FK_YAML_DETAIL_NAMESPACE_END
+
+#endif /* FK_YAML_DETAIL_TYPES_NODE_T_HPP */
+
+
+FK_YAML_NAMESPACE_BEGIN
+
+/// @brief A base exception class used in fkYAML library.
+/// @sa https://fktn-k.github.io/fkYAML/api/exception/
+class exception : public std::exception {
+public:
+ /// @brief Construct a new exception object without any error messages.
+ /// @sa https://fktn-k.github.io/fkYAML/api/exception/constructor/
+ exception() = default;
+
+ /// @brief Construct a new exception object with an error message.
+ /// @param[in] msg An error message.
+ /// @sa https://fktn-k.github.io/fkYAML/api/exception/constructor/
+ explicit exception(const char* msg) noexcept {
+ if (msg) {
+ m_error_msg = msg;
+ }
+ }
+
+public:
+ /// @brief Returns an error message internally held. If nothing, a non-null, empty string will be returned.
+ /// @return An error message internally held. The message might be empty.
+ /// @sa https://fktn-k.github.io/fkYAML/api/exception/what/
+ const char* what() const noexcept override {
+ return m_error_msg.c_str();
+ }
+
+private:
+ /// An error message holder.
+ std::string m_error_msg;
+};
+
+/// @brief An exception class indicating an encoding error.
+/// @sa https://fktn-k.github.io/fkYAML/api/exception/invalid_encoding/
+class invalid_encoding : public exception {
+public:
+ /// @brief Construct a new invalid_encoding object for UTF-8 related errors.
+ /// @param msg An error message.
+ /// @param u8 The UTF-8 character bytes.
+ explicit invalid_encoding(const char* msg, const std::initializer_list<uint8_t>& u8) noexcept
+ : exception(generate_error_message(msg, u8).c_str()) {
+ }
+
+ /// @brief Construct a new invalid_encoding object for UTF-16 related errors.
+ /// @param msg An error message.
+ /// @param u16_h The first UTF-16 encoded element used for the UTF-8 encoding.
+ /// @param u16_l The second UTF-16 encoded element used for the UTF-8 encoding.
+ explicit invalid_encoding(const char* msg, std::array<char16_t, 2> u16) noexcept
+ : exception(generate_error_message(msg, u16).c_str()) {
+ }
+
+ /// @brief Construct a new invalid_encoding object for UTF-32 related errors.
+ /// @param msg An error message.
+ /// @param u32 The UTF-32 encoded element used for the UTF-8 encoding.
+ explicit invalid_encoding(const char* msg, char32_t u32) noexcept
+ : exception(generate_error_message(msg, u32).c_str()) {
+ }
+
+private:
+ static std::string generate_error_message(const char* msg, const std::initializer_list<uint8_t>& u8) noexcept {
+ const auto* itr = u8.begin();
+ const auto* end_itr = u8.end();
+ std::string formatted = detail::format("invalid_encoding: %s in=[ 0x%02x", msg, *itr++);
+ while (itr != end_itr) {
+ formatted += detail::format(", 0x%02x", *itr++);
+ }
+ formatted += " ]";
+ return formatted;
+ }
+
+ /// @brief Generate an error message from the given parameters for the UTF-16 encoding.
+ /// @param msg An error message.
+ /// @param h The first UTF-16 encoded element used for the UTF-8 encoding.
+ /// @param l The second UTF-16 encoded element used for the UTF-8 encoding.
+ /// @return A generated error message.
+ static std::string generate_error_message(const char* msg, std::array<char16_t, 2> u16) noexcept {
+ // uint16_t is large enough for UTF-16 encoded elements.
+ return detail::format(
+ "invalid_encoding: %s in=[ 0x%04x, 0x%04x ]",
+ msg,
+ static_cast<uint16_t>(u16[0]),
+ static_cast<uint16_t>(u16[1]));
+ }
+
+ /// @brief Generate an error message from the given parameters for the UTF-32 encoding.
+ /// @param msg An error message.
+ /// @param u32 The UTF-32 encoded element used for the UTF-8 encoding.
+ /// @return A generated error message.
+ static std::string generate_error_message(const char* msg, char32_t u32) noexcept {
+ // uint32_t is large enough for UTF-32 encoded elements.
+ return detail::format("invalid_encoding: %s in=0x%08x", msg, static_cast<uint32_t>(u32));
+ }
+};
+
+/// @brief An exception class indicating an error in parsing.
+/// @sa https://fktn-k.github.io/fkYAML/api/exception/parse_error/
+class parse_error : public exception {
+public:
+ /// @brief Constructs a new parse_error object with an error message and counts of lines and columns at the error.
+ /// @param[in] msg An error message.
+ /// @param[in] lines Count of lines.
+ /// @param[in] cols_in_line Count of columns.
+ explicit parse_error(const char* msg, uint32_t lines, uint32_t cols_in_line) noexcept
+ : exception(generate_error_message(msg, lines, cols_in_line).c_str()) {
+ }
+
+private:
+ static std::string generate_error_message(const char* msg, uint32_t lines, uint32_t cols_in_line) noexcept {
+ return detail::format("parse_error: %s (at line %u, column %u)", msg, lines, cols_in_line);
+ }
+};
+
+/// @brief An exception class indicating an invalid type conversion.
+/// @sa https://fktn-k.github.io/fkYAML/api/exception/type_error/
+class type_error : public exception {
+public:
+ /// @brief Construct a new type_error object with an error message and a node type.
+ /// @param[in] msg An error message.
+ /// @param[in] type The type of a source node value.
+ explicit type_error(const char* msg, node_type type) noexcept
+ : exception(generate_error_message(msg, type).c_str()) {
+ }
+
+ /// @brief Construct a new type_error object with an error message and a node type.
+ /// @deprecated Use type_error(const char*, node_type) constructor. (since 0.3.12).
+ /// @param[in] msg An error message.
+ /// @param[in] type The type of a source node value.
+ FK_YAML_DEPRECATED("Since 0.3.12; Use explicit type_error(const char*, node_type)")
+ explicit type_error(const char* msg, detail::node_t type) noexcept
+ : type_error(msg, detail::convert_to_node_type(type)) {
+ }
+
+private:
+ /// @brief Generate an error message from given parameters.
+ /// @param msg An error message.
+ /// @param type The type of a source node value.
+ /// @return A generated error message.
+ static std::string generate_error_message(const char* msg, node_type type) noexcept {
+ return detail::format("type_error: %s type=%s", msg, to_string(type));
+ }
+};
+
+/// @brief An exception class indicating an out-of-range error.
+/// @sa https://fktn-k.github.io/fkYAML/api/exception/out_of_range/
+class out_of_range : public exception {
+public:
+ /// @brief Construct a new out_of_range object with an invalid index value.
+ /// @param[in] index An invalid index value.
+ explicit out_of_range(int index) noexcept
+ : exception(generate_error_message(index).c_str()) {
+ }
+
+ /// @brief Construct a new out_of_range object with invalid key contents.
+ /// @param[in] key Invalid key contents
+ explicit out_of_range(const char* key) noexcept
+ : exception(generate_error_message(key).c_str()) {
+ }
+
+private:
+ static std::string generate_error_message(int index) noexcept {
+ return detail::format("out_of_range: index %d is out of range", index);
+ }
+
+ static std::string generate_error_message(const char* key) noexcept {
+ return detail::format("out_of_range: key \'%s\' is not found.", key);
+ }
+};
+
+/// @brief An exception class indicating an invalid tag.
+/// @sa https://fktn-k.github.io/fkYAML/api/exception/invalid_tag/
+class invalid_tag : public exception {
+public:
+ /// @brief Constructs a new invalid_tag object with an error message and invalid tag contents.
+ /// @param[in] msg An error message.
+ /// @param[in] tag Invalid tag contents.
+ explicit invalid_tag(const char* msg, const char* tag)
+ : exception(generate_error_message(msg, tag).c_str()) {
+ }
+
+private:
+ static std::string generate_error_message(const char* msg, const char* tag) noexcept {
+ return detail::format("invalid_tag: %s tag=%s", msg, tag);
+ }
+};
+
+FK_YAML_NAMESPACE_END
+
+#endif /* FK_YAML_EXCEPTION_HPP */
+
+
+FK_YAML_DETAIL_NAMESPACE_BEGIN
+
+/////////////////////////
+// UTF-8 Encoding ///
+/////////////////////////
+
+/// @brief A class which handles UTF-8 encodings.
+namespace utf8 {
+
+/// @brief Query the number of UTF-8 character bytes with the first byte.
+/// @param first_byte The first byte of a UTF-8 character.
+/// @return The number of UTF-8 character bytes.
+inline uint32_t get_num_bytes(uint8_t first_byte) {
+ // The first byte starts with 0b0XXX'XXXX -> 1-byte character
+ if FK_YAML_LIKELY (first_byte < 0x80) {
+ return 1;
+ }
+ // The first byte starts with 0b110X'XXXX -> 2-byte character
+ if ((first_byte & 0xE0) == 0xC0) {
+ return 2;
+ }
+ // The first byte starts with 0b1110'XXXX -> 3-byte character
+ if ((first_byte & 0xF0) == 0xE0) {
+ return 3;
+ }
+ // The first byte starts with 0b1111'0XXX -> 4-byte character
+ if ((first_byte & 0xF8) == 0xF0) {
+ return 4;
+ }
+
+ // The first byte starts with 0b10XX'XXXX or 0b1111'1XXX -> invalid
+ throw fkyaml::invalid_encoding("Invalid UTF-8 encoding.", {first_byte});
+}
+
+/// @brief Checks if `byte` is a valid 1-byte UTF-8 character.
+/// @param[in] byte The byte value.
+/// @return true if `byte` is a valid 1-byte UTF-8 character, false otherwise.
+inline bool validate(uint8_t byte) noexcept {
+ // U+0000..U+007F
+ return byte <= 0x7Fu;
+}
+
+/// @brief Checks if the given bytes are a valid 2-byte UTF-8 character.
+/// @param[in] byte0 The first byte value.
+/// @param[in] byte1 The second byte value.
+/// @return true if the given bytes a valid 3-byte UTF-8 character, false otherwise.
+inline bool validate(uint8_t byte0, uint8_t byte1) noexcept {
+ // U+0080..U+07FF
+ // 1st Byte: 0xC2..0xDF
+ // 2nd Byte: 0x80..0xBF
+ if FK_YAML_LIKELY (0xC2u <= byte0 && byte0 <= 0xDFu) {
+ if FK_YAML_LIKELY (0x80u <= byte1 && byte1 <= 0xBFu) {
+ return true;
+ }
+ }
+
+ // The rest of byte combinations are invalid.
+ return false;
+}
+
+/// @brief Checks if the given bytes are a valid 3-byte UTF-8 character.
+/// @param[in] byte0 The first byte value.
+/// @param[in] byte1 The second byte value.
+/// @param[in] byte2 The third byte value.
+/// @return true if the given bytes a valid 2-byte UTF-8 character, false otherwise.
+inline bool validate(uint8_t byte0, uint8_t byte1, uint8_t byte2) noexcept {
+ // U+1000..U+CFFF:
+ // 1st Byte: 0xE0..0xEC
+ // 2nd Byte: 0x80..0xBF
+ // 3rd Byte: 0x80..0xBF
+ if (0xE0u <= byte0 && byte0 <= 0xECu) {
+ if FK_YAML_LIKELY (0x80u <= byte1 && byte1 <= 0xBFu) {
+ if FK_YAML_LIKELY (0x80u <= byte2 && byte2 <= 0xBFu) {
+ return true;
+ }
+ }
+ return false;
+ }
+
+ // U+D000..U+D7FF:
+ // 1st Byte: 0xED
+ // 2nd Byte: 0x80..0x9F
+ // 3rd Byte: 0x80..0xBF
+ if (byte0 == 0xEDu) {
+ if FK_YAML_LIKELY (0x80u <= byte1 && byte1 <= 0x9Fu) {
+ if FK_YAML_LIKELY (0x80u <= byte2 && byte2 <= 0xBFu) {
+ return true;
+ }
+ }
+ return false;
+ }
+
+ // U+E000..U+FFFF:
+ // 1st Byte: 0xEE..0xEF
+ // 2nd Byte: 0x80..0xBF
+ // 3rd Byte: 0x80..0xBF
+ if FK_YAML_LIKELY (byte0 == 0xEEu || byte0 == 0xEFu) {
+ if FK_YAML_LIKELY (0x80u <= byte1 && byte1 <= 0xBFu) {
+ if FK_YAML_LIKELY (0x80u <= byte2 && byte2 <= 0xBFu) {
+ return true;
+ }
+ }
+ }
+
+ // The rest of byte combinations are invalid.
+ return false;
+}
+
+/// @brief Checks if the given bytes are a valid 4-byte UTF-8 character.
+/// @param[in] byte0 The first byte value.
+/// @param[in] byte1 The second byte value.
+/// @param[in] byte2 The third byte value.
+/// @param[in] byte3 The fourth byte value.
+/// @return true if the given bytes a valid 4-byte UTF-8 character, false otherwise.
+inline bool validate(uint8_t byte0, uint8_t byte1, uint8_t byte2, uint8_t byte3) noexcept {
+ // U+10000..U+3FFFF:
+ // 1st Byte: 0xF0
+ // 2nd Byte: 0x90..0xBF
+ // 3rd Byte: 0x80..0xBF
+ // 4th Byte: 0x80..0xBF
+ if (byte0 == 0xF0u) {
+ if FK_YAML_LIKELY (0x90u <= byte1 && byte1 <= 0xBFu) {
+ if FK_YAML_LIKELY (0x80u <= byte2 && byte2 <= 0xBFu) {
+ if FK_YAML_LIKELY (0x80u <= byte3 && byte3 <= 0xBFu) {
+ return true;
+ }
+ }
+ }
+ return false;
+ }
+
+ // U+40000..U+FFFFF:
+ // 1st Byte: 0xF1..0xF3
+ // 2nd Byte: 0x80..0xBF
+ // 3rd Byte: 0x80..0xBF
+ // 4th Byte: 0x80..0xBF
+ if (0xF1u <= byte0 && byte0 <= 0xF3u) {
+ if FK_YAML_LIKELY (0x80u <= byte1 && byte1 <= 0xBFu) {
+ if FK_YAML_LIKELY (0x80u <= byte2 && byte2 <= 0xBFu) {
+ if FK_YAML_LIKELY (0x80u <= byte3 && byte3 <= 0xBFu) {
+ return true;
+ }
+ }
+ }
+ return false;
+ }
+
+ // U+100000..U+10FFFF:
+ // 1st Byte: 0xF4
+ // 2nd Byte: 0x80..0x8F
+ // 3rd Byte: 0x80..0xBF
+ // 4th Byte: 0x80..0xBF
+ if FK_YAML_LIKELY (byte0 == 0xF4u) {
+ if FK_YAML_LIKELY (0x80u <= byte1 && byte1 <= 0x8Fu) {
+ if FK_YAML_LIKELY (0x80u <= byte2 && byte2 <= 0xBFu) {
+ if FK_YAML_LIKELY (0x80u <= byte3 && byte3 <= 0xBFu) {
+ return true;
+ }
+ }
+ }
+ }
+
+ // The rest of byte combinations are invalid.
+ return false;
+}
+
+/// @brief Converts UTF-16 encoded characters to UTF-8 encoded bytes.
+/// @param[in] utf16 UTF-16 encoded character(s).
+/// @param[out] utf8 UTF-8 encoded bytes.
+/// @param[out] consumed_size The number of UTF-16 encoded characters used for the conversion.
+/// @param[out] encoded_size The size of UTF-encoded bytes.
+inline void from_utf16(
+ std::array<char16_t, 2> utf16, std::array<uint8_t, 4>& utf8, uint32_t& consumed_size, uint32_t& encoded_size) {
+ const auto first = utf16[0];
+ const auto second = utf16[1];
+ if (first < 0x80u) {
+ utf8[0] = static_cast<uint8_t>(first & 0x7Fu);
+ consumed_size = 1;
+ encoded_size = 1;
+ }
+ else if (first <= 0x7FFu) {
+ const auto utf8_chunk = static_cast<uint16_t>(0xC080u | ((first & 0x07C0u) << 2) | (first & 0x3Fu));
+ utf8[0] = static_cast<uint8_t>(utf8_chunk >> 8);
+ utf8[1] = static_cast<uint8_t>(utf8_chunk);
+ consumed_size = 1;
+ encoded_size = 2;
+ }
+ else if (first < 0xD800u || 0xE000u <= first) {
+ const auto utf8_chunk =
+ static_cast<uint32_t>(0xE08080u | ((first & 0xF000u) << 4) | ((first & 0x0FC0u) << 2) | (first & 0x3Fu));
+ utf8[0] = static_cast<uint8_t>(utf8_chunk >> 16);
+ utf8[1] = static_cast<uint8_t>(utf8_chunk >> 8);
+ utf8[2] = static_cast<uint8_t>(utf8_chunk);
+ consumed_size = 1;
+ encoded_size = 3;
+ }
+ else if (first <= 0xDBFFu && 0xDC00u <= second && second <= 0xDFFFu) {
+ // surrogate pair
+ const uint32_t code_point = 0x10000u + ((first & 0x03FFu) << 10) + (second & 0x03FFu);
+ const auto utf8_chunk = static_cast<uint32_t>(
+ 0xF0808080u | ((code_point & 0x1C0000u) << 6) | ((code_point & 0x03F000u) << 4) |
+ ((code_point & 0x0FC0u) << 2) | (code_point & 0x3Fu));
+ utf8[0] = static_cast<uint8_t>(utf8_chunk >> 24);
+ utf8[1] = static_cast<uint8_t>(utf8_chunk >> 16);
+ utf8[2] = static_cast<uint8_t>(utf8_chunk >> 8);
+ utf8[3] = static_cast<uint8_t>(utf8_chunk);
+ consumed_size = 2;
+ encoded_size = 4;
+ }
+ else {
+ throw invalid_encoding("Invalid UTF-16 encoding detected.", utf16);
+ }
+}
+
+/// @brief Converts a UTF-32 encoded character to UTF-8 encoded bytes.
+/// @param[in] utf32 A UTF-32 encoded character.
+/// @param[out] utf8 UTF-8 encoded bytes.
+/// @param[in] encoded_size The size of UTF-encoded bytes.
+inline void from_utf32(const char32_t utf32, std::array<uint8_t, 4>& utf8, uint32_t& encoded_size) {
+ if (utf32 < 0x80u) {
+ utf8[0] = static_cast<uint8_t>(utf32 & 0x007F);
+ encoded_size = 1;
+ }
+ else if (utf32 <= 0x7FFu) {
+ const auto utf8_chunk = static_cast<uint16_t>(0xC080u | ((utf32 & 0x07C0u) << 2) | (utf32 & 0x3Fu));
+ utf8[0] = static_cast<uint8_t>(utf8_chunk >> 8);
+ utf8[1] = static_cast<uint8_t>(utf8_chunk);
+ encoded_size = 2;
+ }
+ else if (utf32 <= 0xFFFFu) {
+ const auto utf8_chunk =
+ static_cast<uint32_t>(0xE08080u | ((utf32 & 0xF000u) << 4) | ((utf32 & 0x0FC0u) << 2) | (utf32 & 0x3F));
+ utf8[0] = static_cast<uint8_t>(utf8_chunk >> 16);
+ utf8[1] = static_cast<uint8_t>(utf8_chunk >> 8);
+ utf8[2] = static_cast<uint8_t>(utf8_chunk);
+ encoded_size = 3;
+ }
+ else if (utf32 <= 0x10FFFFu) {
+ const auto utf8_chunk = static_cast<uint32_t>(
+ 0xF0808080u | ((utf32 & 0x1C0000u) << 6) | ((utf32 & 0x03F000u) << 4) | ((utf32 & 0x0FC0u) << 2) |
+ (utf32 & 0x3Fu));
+ utf8[0] = static_cast<uint8_t>(utf8_chunk >> 24);
+ utf8[1] = static_cast<uint8_t>(utf8_chunk >> 16);
+ utf8[2] = static_cast<uint8_t>(utf8_chunk >> 8);
+ utf8[3] = static_cast<uint8_t>(utf8_chunk);
+ encoded_size = 4;
+ }
+ else {
+ throw invalid_encoding("Invalid UTF-32 encoding detected.", utf32);
+ }
+}
+
+} // namespace utf8
+
+FK_YAML_DETAIL_NAMESPACE_END
+
+#endif /* FK_YAML_DETAIL_ENCODINGS_UTF_ENCODINGS_HPP */
+
+// #include <fkYAML/detail/input/block_scalar_header.hpp>
+// _______ __ __ __ _____ __ __ __
+// | __| |_/ | \_/ |/ _ \ / \/ \| | fkYAML: A C++ header-only YAML library
+// | __| _ < \_ _/| ___ | _ | |___ version 0.4.2
+// |__| |_| \__| |_| |_| |_|___||___|______| https://github.com/fktn-k/fkYAML
+//
+// SPDX-FileCopyrightText: 2023-2025 Kensuke Fukutani <fktn.dev@gmail.com>
+// SPDX-License-Identifier: MIT
+
+#ifndef FK_YAML_DETAIL_INPUT_BLOCK_SCALAR_HEADER_HPP
+#define FK_YAML_DETAIL_INPUT_BLOCK_SCALAR_HEADER_HPP
+
+#include <cstdint>
+
+// #include <fkYAML/detail/macros/define_macros.hpp>
+
+
+FK_YAML_DETAIL_NAMESPACE_BEGIN
+
+/// @brief Definition of chomping indicator types.
+enum class chomping_indicator_t : std::uint8_t {
+ STRIP, //!< excludes final line breaks and trailing empty lines indicated by `-`.
+ CLIP, //!< preserves final line breaks but excludes trailing empty lines. no indicator means this type.
+ KEEP, //!< preserves final line breaks and trailing empty lines indicated by `+`.
+};
+
+/// @brief Block scalar header information.
+struct block_scalar_header {
+ /// Chomping indicator type.
+ chomping_indicator_t chomp {chomping_indicator_t::CLIP};
+ /// Content indentation level of a block scalar.
+ uint32_t indent {0};
+};
+
+FK_YAML_DETAIL_NAMESPACE_END
+
+#endif /* FK_YAML_DETAIL_INPUT_BLOCK_SCALAR_HEADER_HPP */
+
+// #include <fkYAML/detail/input/position_tracker.hpp>
+// _______ __ __ __ _____ __ __ __
+// | __| |_/ | \_/ |/ _ \ / \/ \| | fkYAML: A C++ header-only YAML library
+// | __| _ < \_ _/| ___ | _ | |___ version 0.4.2
+// |__| |_| \__| |_| |_| |_|___||___|______| https://github.com/fktn-k/fkYAML
+//
+// SPDX-FileCopyrightText: 2023-2025 Kensuke Fukutani <fktn.dev@gmail.com>
+// SPDX-License-Identifier: MIT
+
+#ifndef FK_YAML_DETAIL_INPUT_POSITION_TRACKER_HPP
+#define FK_YAML_DETAIL_INPUT_POSITION_TRACKER_HPP
+
+#include <algorithm>
+
+// #include <fkYAML/detail/macros/define_macros.hpp>
+
+// #include <fkYAML/detail/str_view.hpp>
+// _______ __ __ __ _____ __ __ __
+// | __| |_/ | \_/ |/ _ \ / \/ \| | fkYAML: A C++ header-only YAML library
+// | __| _ < \_ _/| ___ | _ | |___ version 0.4.2
+// |__| |_| \__| |_| |_| |_|___||___|______| https://github.com/fktn-k/fkYAML
+//
+// SPDX-FileCopyrightText: 2023-2025 Kensuke Fukutani <fktn.dev@gmail.com>
+// SPDX-License-Identifier: MIT
+
+#ifndef FK_YAML_DETAIL_STR_VIEW_HPP
+#define FK_YAML_DETAIL_STR_VIEW_HPP
+
+#include <limits>
+#include <string>
+
+// #include <fkYAML/detail/macros/define_macros.hpp>
+
+// #include <fkYAML/detail/meta/stl_supplement.hpp>
+
+// #include <fkYAML/detail/meta/type_traits.hpp>
+
+// #include <fkYAML/exception.hpp>
+
+
+FK_YAML_DETAIL_NAMESPACE_BEGIN
+
+/// @brief Non owning view into constant character sequence.
+/// @note
+/// This class is a minimal implementation of std::basic_string_view which has been available since C++17
+/// but pretty useful and efficient for referencing/investigating character sequences.
+/// @warning
+/// This class intentionally omits a lot of value checks to improve efficiency. Necessary checks should be
+/// made before calling this class' APIs for safety.
+/// @tparam CharT Character type
+/// @tparam Traits Character traits type which defaults to std::char_traits<CharT>.
+template <typename CharT, typename Traits = std::char_traits<CharT>>
+class basic_str_view {
+ static_assert(!std::is_array<CharT>::value, "CharT must not be an array type.");
+ static_assert(
+ std::is_trivial<CharT>::value && std::is_standard_layout<CharT>::value,
+ "CharT must be a trivial, standard layout type.");
+ static_assert(
+ std::is_same<CharT, typename Traits::char_type>::value, "CharT & Traits::char_type must be the same type.");
+
+public:
+ /// Character traits type.
+ using traits_type = Traits;
+ /// Character type.
+ using value_type = CharT;
+ /// Pointer type to a character.
+ using pointer = value_type*;
+ /// Constant pointer type to a character.
+ using const_pointer = const value_type*;
+ /// Reference type to a character.
+ using reference = value_type&;
+ /// Constant reference type to a character.
+ using const_reference = const value_type&;
+ /// Constant iterator type to a character.
+ using const_iterator = const value_type*;
+ /// Iterator type to a character.
+ /// (Always constant since this class isn't meant to provide any mutating features.)
+ using iterator = const_iterator;
+ /// Constant reverse iterator type to a character.
+ using const_reverse_iterator = std::reverse_iterator<const_iterator>;
+ /// Reverse iterator type to a character.
+ /// (Always constant since this class isn't meant to provide any mutating features.)
+ using reverse_iterator = const_reverse_iterator;
+ /// Size type for character sequence sizes.
+ using size_type = std::size_t;
+ /// Difference type for distances between characters.
+ using difference_type = std::ptrdiff_t;
+
+ /// Invalid position value.
+ static constexpr size_type npos = static_cast<size_type>(-1);
+
+ /// Constructs a basic_str_view object.
+ constexpr basic_str_view() noexcept = default;
+
+ /// Destroys a basic_str_view object.
+ ~basic_str_view() noexcept = default;
+
+ /// @brief Copy constructs a basic_str_view object.
+ /// @param _ A basic_str_view object to copy from.
+ constexpr basic_str_view(const basic_str_view&) noexcept = default;
+
+ /// @brief Move constructs a basic_str_view object.
+ /// @param _ A basic_str_view object to move from.
+ constexpr basic_str_view(basic_str_view&&) noexcept = default;
+
+ /// @brief Constructs a basic_str_view object from a pointer to a character sequence.
+ /// @note std::char_traits::length() is constexpr from C++17.
+ /// @param p_str A pointer to a character sequence. (Must be null-terminated, or an undefined behavior.)
+ template <
+ typename CharPtrT,
+ enable_if_t<
+ conjunction<
+ negation<std::is_array<CharPtrT>>, std::is_pointer<CharPtrT>,
+ disjunction<std::is_same<CharPtrT, value_type*>, std::is_same<CharPtrT, const value_type*>>>::value,
+ int> = 0>
+ FK_YAML_CXX17_CONSTEXPR basic_str_view(CharPtrT p_str) noexcept
+ : m_len(traits_type::length(p_str)),
+ mp_str(p_str) {
+ }
+
+ /// @brief Constructs a basic_str_view object from a C-style char array.
+ /// @note
+ /// This constructor assumes the last element is the null character ('\0'). If that's not desirable, consider using
+ /// one of the other overloads.
+ /// @tparam N The size of a C-style char array.
+ /// @param str A C-style char array. (Must be null-terminated)
+ template <std::size_t N>
+ constexpr basic_str_view(const value_type (&str)[N]) noexcept
+ : m_len(N - 1),
+ mp_str(&str[0]) {
+ }
+
+ /// @brief Construction from a null pointer is forbidden.
+ basic_str_view(std::nullptr_t) = delete;
+
+ /// @brief Constructs a basic_str_view object from a pointer to a character sequence and its size.
+ /// @param p_str A pointer to a character sequence. (May or may not be null-terminated.)
+ /// @param len The length of a character sequence.
+ constexpr basic_str_view(const value_type* p_str, size_type len) noexcept
+ : m_len(len),
+ mp_str(p_str) {
+ }
+
+ /// @brief Constructs a basic_str_view object from compatible begin/end iterators
+ /// @tparam ItrType Iterator type to a character.
+ /// @param first The iterator to the first element of a character sequence.
+ /// @param last The iterator to the past-the-end of a character sequence.
+ template <
+ typename ItrType,
+ enable_if_t<
+ conjunction<
+ is_iterator_of<ItrType, CharT>,
+ std::is_base_of<
+ std::random_access_iterator_tag, typename std::iterator_traits<ItrType>::iterator_category>>::value,
+ int> = 0>
+ basic_str_view(ItrType first, ItrType last) noexcept
+ : m_len(last - first),
+ mp_str(&*first) {
+ }
+
+ /// @brief Constructs a basic_str_view object from a compatible std::basic_string object.
+ /// @param str A compatible character sequence container.
+ basic_str_view(const std::basic_string<CharT>& str) noexcept
+ : m_len(str.length()),
+ mp_str(str.data()) {
+ }
+
+ /// @brief Copy assignment operator for this basic_str_view class.
+ /// @param _ A basic_str_view object to copy from.
+ /// @return Reference to this basic_str_view object.
+ basic_str_view& operator=(const basic_str_view&) noexcept = default;
+
+ /// @brief Move assignment operator for this basic_str_view class.
+ /// @param _ A basic_str_view object to move from.
+ /// @return Reference to this basic_str_view object.
+ basic_str_view& operator=(basic_str_view&&) noexcept = default;
+
+ /// @brief Get the iterator to the first element. (Always constant)
+ /// @return The iterator to the first element.
+ const_iterator begin() const noexcept {
+ return mp_str;
+ }
+
+ /// @brief Get the iterator to the past-the-end element. (Always constant)
+ /// @return The iterator to the past-the-end element.
+ const_iterator end() const noexcept {
+ return mp_str + m_len;
+ }
+
+ /// @brief Get the iterator to the first element. (Always constant)
+ /// @return The iterator to the first element.
+ const_iterator cbegin() const noexcept {
+ return mp_str;
+ }
+
+ /// @brief Get the iterator to the past-the-end element. (Always constant)
+ /// @return The iterator to the past-the-end element.
+ const_iterator cend() const noexcept {
+ return mp_str + m_len;
+ }
+
+ /// @brief Get the iterator to the first element in the reverse order. (Always constant)
+ /// @return The iterator to the first element in the reverse order.
+ const_reverse_iterator rbegin() const noexcept {
+ return const_reverse_iterator(end());
+ }
+
+ /// @brief Get the iterator to the past-the-end element in the reverse order. (Always constant)
+ /// @return The iterator to the past-the-end element in the reverse order.
+ const_reverse_iterator rend() const noexcept {
+ return const_reverse_iterator(begin());
+ }
+
+ /// @brief Get the iterator to the first element in the reverse order. (Always constant)
+ /// @return The iterator to the first element in the reverse order.
+ const_reverse_iterator crbegin() const noexcept {
+ return const_reverse_iterator(end());
+ }
+
+ /// @brief Get the iterator to the past-the-end element in the reverse order. (Always constant)
+ /// @return The iterator to the past-the-end element in the reverse order.
+ const_reverse_iterator crend() const noexcept {
+ return const_reverse_iterator(begin());
+ }
+
+ /// @brief Get the size of the referenced character sequence.
+ /// @return The size of the referenced character sequence.
+ size_type size() const noexcept {
+ return m_len;
+ }
+
+ /// @brief Get the size of the referenced character sequence.
+ /// @return The size of the referenced character sequence.
+ size_type length() const noexcept {
+ return m_len;
+ }
+
+ /// @brief Get the maximum number of the character sequence size.
+ /// @return The maximum number of the character sequence size.
+ constexpr size_type max_size() const noexcept {
+ return static_cast<size_type>(std::numeric_limits<difference_type>::max());
+ }
+
+ /// @brief Checks if the referenced character sequence is empty.
+ /// @return true if empty, false otherwise.
+ bool empty() const noexcept {
+ return m_len == 0;
+ }
+
+ /// @brief Get the element at the given position.
+ /// @param pos The position of the target element.
+ /// @return The element at the given position.
+ const_reference operator[](size_type pos) const noexcept {
+ return *(mp_str + pos);
+ }
+
+ /// @brief Get the element at the given position with bounds checks.
+ /// @warning Throws an fkyaml::out_of_range exception if the position exceeds the character sequence size.
+ /// @param pos The position of the target element.
+ /// @return The element at the given position.
+ const_reference at(size_type pos) const {
+ if FK_YAML_UNLIKELY (pos >= m_len) {
+ throw fkyaml::out_of_range(static_cast<int>(pos));
+ }
+ return *(mp_str + pos);
+ }
+
+ /// @brief Get the first element.
+ /// @return The first element.
+ const_reference front() const noexcept {
+ return *mp_str;
+ }
+
+ /// @brief Get the last element.
+ /// @return The last element.
+ const_reference back() const {
+ return *(mp_str + m_len - 1);
+ }
+
+ /// @brief Get the pointer to the raw data of referenced character sequence.
+ /// @return The pointer to the raw data of referenced character sequence.
+ const_pointer data() const noexcept {
+ return mp_str;
+ }
+
+ /// @brief Moves the beginning position by `n` elements.
+ /// @param n The number of elements by which to move the beginning position.
+ void remove_prefix(size_type n) noexcept {
+ mp_str += n;
+ m_len -= n;
+ }
+
+ /// @brief Shrinks the referenced character sequence from the last by `n` elements.
+ /// @param n The number of elements by which to shrink the sequence from the last.
+ void remove_suffix(size_type n) noexcept {
+ m_len -= n;
+ }
+
+ /// @brief Swaps data with the given basic_str_view object.
+ /// @param other A basic_str_view object to swap data with.
+ void swap(basic_str_view& other) noexcept {
+ auto tmp = *this;
+ *this = other;
+ other = tmp;
+ }
+
+ /// @brief Copys the referenced character sequence values from `pos` by `n` size.
+ /// @warning Throws an fkyaml::out_of_range exception if the given `pos` is bigger than the length.
+ /// @param p_str The pointer to a character sequence buffer for output.
+ /// @param n The number of elements to write into `p_str`.
+ /// @param pos The offset of the beginning position to copy values.
+ /// @return The number of elements to be written into `p_str`.
+ size_type copy(CharT* p_str, size_type n, size_type pos = 0) const {
+ if FK_YAML_UNLIKELY (pos > m_len) {
+ throw fkyaml::out_of_range(static_cast<int>(pos));
+ }
+ const size_type rlen = std::min(n, m_len - pos);
+ traits_type::copy(p_str, mp_str + pos, rlen);
+ return rlen;
+ }
+
+ /// @brief Constructs a sub basic_str_view object from `pos` by `n` size.
+ /// @warning Throws an fkyaml::out_of_range exception if the given `pos` is bigger than the length.
+ /// @param pos The offset of the beginning position.
+ /// @param n The number of elements to the end of a new sub basic_str_view object.
+ /// @return A newly created sub basic_str_view object.
+ basic_str_view substr(size_type pos = 0, size_type n = npos) const {
+ if FK_YAML_UNLIKELY (pos > m_len) {
+ throw fkyaml::out_of_range(static_cast<int>(pos));
+ }
+ const size_type rlen = std::min(n, m_len - pos);
+ return basic_str_view(mp_str + pos, rlen);
+ }
+
+ /// @brief Compares the referenced character sequence values with the given basic_str_view object.
+ /// @param sv The basic_str_view object to compare with.
+ /// @return The lexicographical comparison result. The values are same as std::strncmp().
+ int compare(basic_str_view sv) const noexcept {
+ const size_type rlen = std::min(m_len, sv.m_len);
+ int ret = traits_type::compare(mp_str, sv.mp_str, rlen);
+
+ if (ret == 0) {
+ using int_limits = std::numeric_limits<int>;
+ const difference_type diff =
+ m_len > sv.m_len ? m_len - sv.m_len
+ : static_cast<difference_type>(-1) * static_cast<difference_type>(sv.m_len - m_len);
+
+ if (diff > int_limits::max()) {
+ ret = int_limits::max();
+ }
+ else if (diff < int_limits::min()) {
+ ret = int_limits::min();
+ }
+ else {
+ ret = static_cast<int>(diff);
+ }
+ }
+
+ return ret;
+ }
+
+ /// @brief Compares the referenced character sequence values from `pos1` by `n1` characters with `sv`.
+ /// @param pos1 The offset of the beginning element.
+ /// @param n1 The length of character sequence used for comparison.
+ /// @param sv A basic_str_view object to compare with.
+ /// @return The lexicographical comparison result. The values are same as std::strncmp().
+ int compare(size_type pos1, size_type n1, basic_str_view sv) const {
+ return substr(pos1, n1).compare(sv);
+ }
+
+ /// @brief Compares the referenced character sequence value from `pos1` by `n1` characters with `sv` from `pos2` by
+ /// `n2` characters.
+ /// @param pos1 The offset of the beginning element in this character sequence.
+ /// @param n1 The length of this character sequence used for comparison.
+ /// @param sv A basic_str_view object to compare with.
+ /// @param pos2 The offset of the beginning element in `sv`.
+ /// @param n2 The length of `sv` used for comparison.
+ /// @return The lexicographical comparison result. The values are same as std::strncmp().
+ int compare(size_type pos1, size_type n1, basic_str_view sv, size_type pos2, size_type n2) const {
+ return substr(pos1, n1).compare(sv.substr(pos2, n2));
+ }
+
+ /// @brief Compares the referenced character sequence with `s` character sequence.
+ /// @param s The pointer to a character sequence to compare with.
+ /// @return The lexicographical comparison result. The values are same as std::strncmp().
+ int compare(const CharT* s) const {
+ return compare(basic_str_view(s));
+ }
+
+ /// @brief Compares the referenced character sequence from `pos1` by `n1` characters with `s` character sequence.
+ /// @param pos1 The offset of the beginning element in this character sequence.
+ /// @param n1 The length of this character sequence used fo comparison.
+ /// @param s The pointer to a character sequence to compare with.
+ /// @return The lexicographical comparison result. The values are same as std::strncmp().
+ int compare(size_type pos1, size_type n1, const CharT* s) const {
+ return substr(pos1, n1).compare(basic_str_view(s));
+ }
+
+ /// @brief Compares the referenced character sequence from `pos1` by `n1` characters with `s` character sequence by
+ /// `n2` characters.
+ /// @param pos1 The offset of the beginning element in this character sequence.
+ /// @param n1 The length of this character sequence used fo comparison.
+ /// @param s The pointer to a character sequence to compare with.
+ /// @param n2 The length of `s` used fo comparison.
+ /// @return
+ int compare(size_type pos1, size_type n1, const CharT* s, size_type n2) const {
+ return substr(pos1, n1).compare(basic_str_view(s, n2));
+ }
+
+ /// @brief Checks if this character sequence starts with `sv` characters.
+ /// @param sv The character sequence to compare with.
+ /// @return true if the character sequence starts with `sv` characters, false otherwise.
+ bool starts_with(basic_str_view sv) const {
+ return substr(0, sv.size()) == sv;
+ }
+
+ /// @brief Checks if this character sequence starts with `c` character.
+ /// @param c The character to compare with.
+ /// @return true if the character sequence starts with `c` character, false otherwise.
+ bool starts_with(CharT c) const noexcept {
+ return !empty() && traits_type::eq(front(), c);
+ }
+
+ /// @brief Checks if this character sequence starts with `s` characters.
+ /// @param s The character sequence to compare with.
+ /// @return true if the character sequence starts with `s` characters, false otherwise.
+ bool starts_with(const CharT* s) const {
+ return starts_with(basic_str_view(s));
+ }
+
+ /// @brief Checks if this character sequence ends with `sv` characters.
+ /// @param sv The character sequence to compare with.
+ /// @return true if the character sequence ends with `sv` characters, false otherwise.
+ bool ends_with(basic_str_view sv) const noexcept {
+ const size_type size = m_len;
+ const size_type sv_size = sv.size();
+ return size >= sv_size && traits_type::compare(end() - sv_size, sv.data(), sv_size) == 0;
+ }
+
+ /// @brief Checks if this character sequence ends with `c` character.
+ /// @param c The character to compare with.
+ /// @return true if the character sequence ends with `c` character, false otherwise.
+ bool ends_with(CharT c) const noexcept {
+ return !empty() && traits_type::eq(back(), c);
+ }
+
+ /// @brief Checks if this character sequence ends with `s` characters.
+ /// @param s The character sequence to compare with.
+ /// @return true if the character sequence ends with `s` characters, false otherwise.
+ bool ends_with(const CharT* s) const noexcept {
+ return ends_with(basic_str_view(s));
+ }
+
+ /// @brief Checks if this character sequence contains `sv` characters.
+ /// @param sv The character sequence to compare with.
+ /// @return true if the character sequence contains `sv` characters, false otherwise.
+ bool contains(basic_str_view sv) const noexcept {
+ return find(sv) != npos;
+ }
+
+ /// @brief Checks if this character sequence contains `c` character.
+ /// @param c The character to compare with.
+ /// @return true if the character sequence contains `c` character, false otherwise.
+ bool contains(CharT c) const noexcept {
+ return find(c) != npos;
+ }
+
+ /// @brief Checks if this character sequence contains `s` characters.
+ /// @param s The character sequence to compare with.
+ /// @return true if the character sequence contains `s` characters, false otherwise.
+ bool contains(const CharT* s) const noexcept {
+ return find(s) != npos;
+ }
+
+ /// @brief Finds the beginning position of `sv` characters in this referenced character sequence.
+ /// @param sv The character sequence to compare with.
+ /// @param pos The offset of the search beginning position in this referenced character sequence.
+ /// @return The beginning position of `sv` characters, `npos` otherwise.
+ size_type find(basic_str_view sv, size_type pos = 0) const noexcept {
+ return find(sv.mp_str, pos, sv.m_len);
+ }
+
+ /// @brief Finds the beginning position of `c` character in this referenced character sequence.
+ /// @param sv The character to compare with.
+ /// @param pos The offset of the search beginning position in this referenced character sequence.
+ /// @return The beginning position of `c` character, `npos` otherwise.
+ size_type find(CharT c, size_type pos = 0) const noexcept {
+ size_type ret = npos;
+
+ if FK_YAML_LIKELY (pos < m_len) {
+ const size_type n = m_len - pos;
+ const CharT* p_found = traits_type::find(mp_str + pos, n, c);
+ if (p_found) {
+ ret = p_found - mp_str;
+ }
+ }
+
+ return ret;
+ }
+
+ /// @brief Finds the beginning position of `s` character sequence by `n` characters in this referenced character
+ /// sequence.
+ /// @param s The character sequence to compare with.
+ /// @param pos The offset of the search beginning position in this referenced character sequence.
+ /// @param n The length of `s` character sequence used for comparison.
+ /// @return The beginning position of `s` characters, `npos` otherwise.
+ size_type find(const CharT* s, size_type pos, size_type n) const noexcept {
+ if FK_YAML_UNLIKELY (n == 0) {
+ return pos <= m_len ? pos : npos;
+ }
+
+ if FK_YAML_UNLIKELY (pos >= m_len) {
+ return npos;
+ }
+
+ CharT s0 = s[0];
+ const CharT* p_first = mp_str + pos;
+ const CharT* p_last = mp_str + m_len;
+ size_type len = m_len - pos;
+
+ while (len >= n) {
+ // find the first occurrence of s0
+ p_first = traits_type::find(p_first, len - n + 1, s0);
+ if (!p_first) {
+ return npos;
+ }
+
+ // compare the full strings from the first occurrence of s0
+ if (traits_type::compare(p_first, s, n) == 0) {
+ return p_first - mp_str;
+ }
+
+ len = p_last - (++p_first);
+ }
+
+ return npos;
+ }
+
+ /// @brief Finds the beginning position of `s` character sequence in this referenced character sequence.
+ /// @param s The character sequence to compare with.
+ /// @param pos The offset of the search beginning position in this referenced character sequence.
+ /// @return The beginning position of `s` characters, `npos` otherwise.
+ size_type find(const CharT* s, size_type pos = 0) const noexcept {
+ return find(basic_str_view(s), pos);
+ }
+
+ /// @brief Retrospectively finds the beginning position of `sv` characters in this referenced character sequence.
+ /// @param sv The character sequence to compare with.
+ /// @param pos The offset of the search beginning position in this referenced character sequence.
+ /// @return The beginning position of `sv` characters, `npos` otherwise.
+ size_type rfind(basic_str_view sv, size_type pos = npos) const noexcept {
+ return rfind(sv.mp_str, pos, sv.m_len);
+ }
+
+ /// @brief Retrospectively finds the beginning position of `c` character in this referenced character sequence.
+ /// @param sv The character to compare with.
+ /// @param pos The offset of the search beginning position in this referenced character sequence.
+ /// @return The beginning position of `c` character, `npos` otherwise.
+ size_type rfind(CharT c, size_type pos = npos) const noexcept {
+ if FK_YAML_UNLIKELY (m_len == 0) {
+ return npos;
+ }
+
+ const size_type idx = std::min(m_len - 1, pos);
+
+ for (size_type i = 0; i <= idx; i++) {
+ if (traits_type::eq(mp_str[idx - i], c)) {
+ return idx - i;
+ }
+ }
+
+ return npos;
+ }
+
+ /// @brief Retrospectively finds the beginning position of `s` character sequence by `n` characters in this
+ /// referenced character sequence.
+ /// @param s The character sequence to compare with.
+ /// @param pos The offset of the search beginning position in this referenced character sequence.
+ /// @param n The length of `s` character sequence used for comparison.
+ /// @return The beginning position of `s` characters, `npos` otherwise.
+ size_type rfind(const CharT* s, size_type pos, size_type n) const noexcept {
+ if FK_YAML_LIKELY (n <= m_len) {
+ pos = std::min(m_len - n, pos) + 1;
+
+ do {
+ if (traits_type::compare(mp_str + --pos, s, n) == 0) {
+ return pos;
+ }
+ } while (pos > 0);
+ }
+
+ return npos;
+ }
+
+ /// @brief Retrospectively finds the beginning position of `s` character sequence in this referenced character
+ /// sequence.
+ /// @param s The character sequence to compare with.
+ /// @param pos The offset of the search beginning position in this referenced character sequence.
+ /// @return The beginning position of `s` characters, `npos` otherwise.
+ size_type rfind(const CharT* s, size_type pos = npos) const noexcept {
+ return rfind(basic_str_view(s), pos);
+ }
+
+ /// @brief Finds the first occurrence of `sv` character sequence in this referenced character sequence.
+ /// @param sv The character sequence to compare with.
+ /// @param pos The offset of the search beginning position in this referenced character sequence.
+ /// @return The beginning position of `sv` characters, `npos` otherwise.
+ size_type find_first_of(basic_str_view sv, size_type pos = 0) const noexcept {
+ return find_first_of(sv.mp_str, pos, sv.m_len);
+ }
+
+ /// @brief Finds the first occurrence of `c` character in this referenced character sequence.
+ /// @param c The character to compare with.
+ /// @param pos The offset of the search beginning position in this referenced character sequence.
+ /// @return The beginning position of `c` character, `npos` otherwise.
+ size_type find_first_of(CharT c, size_type pos = 0) const noexcept {
+ return find(c, pos);
+ }
+
+ /// @brief Finds the first occurrence of `s` character sequence by `n` characters in this referenced character
+ /// sequence.
+ /// @param s The character sequence to compare with.
+ /// @param pos The offset of the search beginning position in this referenced character sequence.
+ /// @param n The length of `s` character sequence used for comparison.
+ /// @return The beginning position of `s` characters, `npos` otherwise.
+ size_type find_first_of(const CharT* s, size_type pos, size_type n) const noexcept {
+ if FK_YAML_UNLIKELY (n == 0) {
+ return npos;
+ }
+
+ for (size_type idx = pos; idx < m_len; ++idx) {
+ const CharT* p_found = traits_type::find(s, n, mp_str[idx]);
+ if (p_found) {
+ return idx;
+ }
+ }
+
+ return npos;
+ }
+
+ /// @brief Finds the first occurrence of `s` character sequence in this referenced character sequence.
+ /// @param s The character sequence to compare with.
+ /// @param pos The offset of the search beginning position in this referenced character sequence.
+ /// @return The beginning position of `s` characters, `npos` otherwise.
+ size_type find_first_of(const CharT* s, size_type pos = 0) const noexcept {
+ return find_first_of(basic_str_view(s), pos);
+ }
+
+ /// @brief Finds the last occurrence of `sv` character sequence in this referenced character sequence.
+ /// @param sv The character sequence to compare with.
+ /// @param pos The offset of the search beginning position in this referenced character sequence.
+ /// @return The beginning position of `sv` characters, `npos` otherwise.
+ size_type find_last_of(basic_str_view sv, size_type pos = npos) const noexcept {
+ return find_last_of(sv.mp_str, pos, sv.m_len);
+ }
+
+ /// @brief Finds the last occurrence of `c` character in this referenced character sequence.
+ /// @param c The character to compare with.
+ /// @param pos The offset of the search beginning position in this referenced character sequence.
+ /// @return The beginning position of `c` character, `npos` otherwise.
+ size_type find_last_of(CharT c, size_type pos = npos) const noexcept {
+ return rfind(c, pos);
+ }
+
+ /// @brief Finds the last occurrence of `s` character sequence by `n` characters in this referenced character
+ /// sequence.
+ /// @param s The character sequence to compare with.
+ /// @param pos The offset of the search beginning position in this referenced character sequence.
+ /// @param n The length of `s` character sequence used for comparison.
+ /// @return The beginning position of `s` characters, `npos` otherwise.
+ size_type find_last_of(const CharT* s, size_type pos, size_type n) const noexcept {
+ if FK_YAML_LIKELY (n <= m_len) {
+ pos = std::min(m_len - n - 1, pos);
+
+ do {
+ const CharT* p_found = traits_type::find(s, n, mp_str[pos]);
+ if (p_found) {
+ return pos;
+ }
+ } while (pos-- != 0);
+ }
+
+ return npos;
+ }
+
+ /// @brief Finds the last occurrence of `s` character sequence in this referenced character sequence.
+ /// @param s The character sequence to compare with.
+ /// @param pos The offset of the search beginning position in this referenced character sequence.
+ /// @return The beginning position of `s` characters, `npos` otherwise.
+ size_type find_last_of(const CharT* s, size_type pos = npos) const noexcept {
+ return find_last_of(basic_str_view(s), pos);
+ }
+
+ /// @brief Finds the first absence of `sv` character sequence in this referenced character sequence.
+ /// @param sv The character sequence to compare with.
+ /// @param pos The offset of the search beginning position in this referenced character sequence.
+ /// @return The beginning position of non `sv` characters, `npos` otherwise.
+ size_type find_first_not_of(basic_str_view sv, size_type pos = 0) const noexcept {
+ return find_first_not_of(sv.mp_str, pos, sv.m_len);
+ }
+
+ /// @brief Finds the first absence of `c` character in this referenced character sequence.
+ /// @param c The character to compare with.
+ /// @param pos The offset of the search beginning position in this referenced character sequence.
+ /// @return The beginning position of non `c` character, `npos` otherwise.
+ size_type find_first_not_of(CharT c, size_type pos = 0) const noexcept {
+ for (; pos < m_len; ++pos) {
+ if (!traits_type::eq(mp_str[pos], c)) {
+ return pos;
+ }
+ }
+
+ return npos;
+ }
+
+ /// @brief Finds the first absence of `s` character sequence by `n` characters in this referenced character
+ /// sequence.
+ /// @param s The character sequence to compare with.
+ /// @param pos The offset of the search beginning position in this referenced character sequence.
+ /// @param n The length of `s` character sequence used for comparison.
+ /// @return The beginning position of non `s` characters, `npos` otherwise.
+ size_type find_first_not_of(const CharT* s, size_type pos, size_type n) const noexcept {
+ for (; pos < m_len; ++pos) {
+ const CharT* p_found = traits_type::find(s, n, mp_str[pos]);
+ if (!p_found) {
+ return pos;
+ }
+ }
+
+ return npos;
+ }
+
+ /// @brief Finds the first absence of `s` character sequence in this referenced character sequence.
+ /// @param s The character sequence to compare with.
+ /// @param pos The offset of the search beginning position in this referenced character sequence.
+ /// @return The beginning position of non `s` characters, `npos` otherwise.
+ size_type find_first_not_of(const CharT* s, size_type pos = 0) const noexcept {
+ return find_first_not_of(basic_str_view(s), pos);
+ }
+
+ /// @brief Finds the last absence of `sv` character sequence in this referenced character sequence.
+ /// @param sv The character sequence to compare with.
+ /// @param pos The offset of the search beginning position in this referenced character sequence.
+ /// @return The beginning position of non `sv` characters, `npos` otherwise.
+ size_type find_last_not_of(basic_str_view sv, size_type pos = npos) const noexcept {
+ return find_last_not_of(sv.mp_str, pos, sv.m_len);
+ }
+
+ /// @brief Finds the last absence of `c` character in this referenced character sequence.
+ /// @param c The character to compare with.
+ /// @param pos The offset of the search beginning position in this referenced character sequence.
+ /// @return The beginning position of non `c` character, `npos` otherwise.
+ size_type find_last_not_of(CharT c, size_type pos = npos) const noexcept {
+ if FK_YAML_LIKELY (m_len > 0) {
+ pos = std::min(m_len, pos);
+
+ do {
+ if (!traits_type::eq(mp_str[--pos], c)) {
+ return pos;
+ }
+ } while (pos > 0);
+ }
+
+ return npos;
+ }
+
+ /// @brief Finds the last absence of `s` character sequence by `n` characters in this referenced character
+ /// sequence.
+ /// @param s The character sequence to compare with.
+ /// @param pos The offset of the search beginning position in this referenced character sequence.
+ /// @param n The length of `s` character sequence used for comparison.
+ /// @return The beginning position of non `s` characters, `npos` otherwise.
+ size_type find_last_not_of(const CharT* s, size_type pos, size_type n) const noexcept {
+ if FK_YAML_UNLIKELY (n <= m_len) {
+ pos = std::min(m_len - n, pos) + 1;
+
+ do {
+ const CharT* p_found = traits_type::find(s, n, mp_str[--pos]);
+ if (!p_found) {
+ return pos;
+ }
+ } while (pos > 0);
+ }
+
+ return npos;
+ }
+
+ /// @brief Finds the last absence of `s` character sequence in this referenced character sequence.
+ /// @param s The character sequence to compare with.
+ /// @param pos The offset of the search beginning position in this referenced character sequence.
+ /// @return The beginning position of non `s` characters, `npos` otherwise.
+ size_type find_last_not_of(const CharT* s, size_type pos = npos) const noexcept {
+ return find_last_not_of(basic_str_view(s), pos);
+ }
+
+private:
+ size_type m_len {0};
+ const value_type* mp_str {nullptr};
+};
+
+// Prior to C++17, a static constexpr class member needs an out-of-class definition.
+#ifndef FK_YAML_HAS_CXX_17
+
+template <typename CharT, typename Traits>
+constexpr typename basic_str_view<CharT, Traits>::size_type basic_str_view<CharT, Traits>::npos;
+
+#endif // !defined(FK_YAML_HAS_CXX_17)
+
+/// @brief An equal-to operator of the basic_str_view class.
+/// @tparam CharT Character type
+/// @tparam Traits Character traits type.
+/// @param lhs A basic_str_view object for comparison.
+/// @param rhs A basic_str_view object to compare with.
+/// @return true if the two objects are the same, false otherwise.
+template <typename CharT, typename Traits>
+inline bool operator==(basic_str_view<CharT, Traits> lhs, basic_str_view<CharT, Traits> rhs) noexcept {
+ // Comparing the lengths first will omit unnecessary value comparison in compare().
+ return lhs.size() == rhs.size() && lhs.compare(rhs) == 0;
+}
+
+/// @brief An equal-to operator of the basic_str_view class.
+/// @tparam CharT Character type
+/// @tparam Traits Character traits type.
+/// @param lhs A basic_str_view object for comparison.
+/// @param rhs A basic_string object to compare with.
+/// @return true if the two objects are the same, false otherwise.
+template <typename CharT, typename Traits>
+inline bool operator==(basic_str_view<CharT, Traits> lhs, const std::basic_string<CharT, Traits>& rhs) noexcept {
+ return lhs == basic_str_view<CharT, Traits>(rhs);
+}
+
+/// @brief An equal-to operator of the basic_str_view class.
+/// @tparam CharT Character type
+/// @tparam Traits Character traits type.
+/// @param lhs A basic_string object for comparison.
+/// @param rhs A basic_str_view object to compare with.
+/// @return true if the two objects are the same, false otherwise.
+template <typename CharT, typename Traits>
+inline bool operator==(const std::basic_string<CharT, Traits>& lhs, basic_str_view<CharT, Traits> rhs) noexcept {
+ return basic_str_view<CharT, Traits>(lhs) == rhs;
+}
+
+/// @brief An equal-to operator of the basic_str_view class.
+/// @tparam CharT Character type
+/// @tparam Traits Character traits type.
+/// @tparam N The length of the character array.
+/// @param lhs A basic_str_view object for comparison.
+/// @param rhs A character array to compare with.
+/// @return true if the two objects are the same, false otherwise.
+template <typename CharT, typename Traits, std::size_t N>
+inline bool operator==(basic_str_view<CharT, Traits> lhs, const CharT (&rhs)[N]) noexcept {
+ // assume `rhs` is null terminated
+ return lhs == basic_str_view<CharT, Traits>(rhs);
+}
+
+/// @brief An equal-to operator of the basic_str_view class.
+/// @tparam CharT Character type
+/// @tparam Traits Character traits type.
+/// @tparam N The length of the character array.
+/// @param rhs A character array for comparison.
+/// @param lhs A basic_str_view object to compare with.
+/// @return true if the two objects are the same, false otherwise.
+template <typename CharT, typename Traits, std::size_t N>
+inline bool operator==(const CharT (&lhs)[N], basic_str_view<CharT, Traits> rhs) noexcept {
+ // assume `lhs` is null terminated
+ return basic_str_view<CharT, Traits>(lhs) == rhs;
+}
+
+/// @brief An not-equal-to operator of the basic_str_view class.
+/// @tparam CharT Character type
+/// @tparam Traits Character traits type.
+/// @param lhs A basic_str_view object for comparison.
+/// @param rhs A basic_str_view object to compare with.
+/// @return true if the two objects are different, false otherwise.
+template <typename CharT, typename Traits>
+inline bool operator!=(basic_str_view<CharT, Traits> lhs, basic_str_view<CharT, Traits> rhs) noexcept {
+ return !(lhs == rhs);
+}
+
+/// @brief An not-equal-to operator of the basic_str_view class.
+/// @tparam CharT Character type
+/// @tparam Traits Character traits type.
+/// @param lhs A basic_str_view object for comparison.
+/// @param rhs A basic_string object to compare with.
+/// @return true if the two objects are different, false otherwise.
+template <typename CharT, typename Traits>
+inline bool operator!=(basic_str_view<CharT, Traits> lhs, const std::basic_string<CharT, Traits>& rhs) noexcept {
+ return !(lhs == basic_str_view<CharT, Traits>(rhs));
+}
+
+/// @brief An not-equal-to operator of the basic_str_view class.
+/// @tparam CharT Character type
+/// @tparam Traits Character traits type.
+/// @param lhs A basic_string object for comparison.
+/// @param rhs A basic_str_view object to compare with.
+/// @return true if the two objects are different, false otherwise.
+template <typename CharT, typename Traits>
+inline bool operator!=(const std::basic_string<CharT, Traits>& lhs, basic_str_view<CharT, Traits> rhs) noexcept {
+ return !(basic_str_view<CharT, Traits>(lhs) == rhs);
+}
+
+/// @brief An not-equal-to operator of the basic_str_view class.
+/// @tparam CharT Character type
+/// @tparam Traits Character traits type.
+/// @tparam N The length of the character array.
+/// @param lhs A basic_str_view object for comparison.
+/// @param rhs A character array to compare with.
+/// @return true if the two objects are different, false otherwise.
+template <typename CharT, typename Traits, std::size_t N>
+inline bool operator!=(basic_str_view<CharT, Traits> lhs, const CharT (&rhs)[N]) noexcept {
+ // assume `rhs` is null terminated.
+ return !(lhs == basic_str_view<CharT, Traits>(rhs, N - 1));
+}
+
+/// @brief An not-equal-to operator of the basic_str_view class.
+/// @tparam CharT Character type
+/// @tparam Traits Character traits type.
+/// @tparam N The length of the character array.
+/// @param rhs A character array for comparison.
+/// @param lhs A basic_str_view object to compare with.
+/// @return true if the two objects are different, false otherwise.
+template <typename CharT, typename Traits, std::size_t N>
+inline bool operator!=(const CharT (&lhs)[N], basic_str_view<CharT, Traits> rhs) noexcept {
+ // assume `lhs` is null terminate
+ return !(basic_str_view<CharT, Traits>(lhs, N - 1) == rhs);
+}
+
+/// @brief An less-than operator of the basic_str_view class.
+/// @tparam CharT Character type
+/// @tparam Traits Character traits type.
+/// @param lhs A basic_str_view object for comparison.
+/// @param rhs A basic_str_view object to compare with.
+/// @return true if `lhs` is less than `rhs`, false otherwise.
+template <typename CharT, typename Traits>
+inline bool operator<(basic_str_view<CharT, Traits> lhs, basic_str_view<CharT, Traits> rhs) noexcept {
+ return lhs.compare(rhs) < 0;
+}
+
+/// @brief An less-than-or-equal-to operator of the basic_str_view class.
+/// @tparam CharT Character type
+/// @tparam Traits Character traits type.
+/// @param lhs A basic_str_view object for comparison.
+/// @param rhs A basic_str_view object to compare with.
+/// @return true if `lhs` is less than or equal to `rhs`, false otherwise.
+template <typename CharT, typename Traits>
+inline bool operator<=(basic_str_view<CharT, Traits> lhs, basic_str_view<CharT, Traits> rhs) noexcept {
+ return lhs.compare(rhs) <= 0;
+}
+
+/// @brief An greater-than operator of the basic_str_view class.
+/// @tparam CharT Character type
+/// @tparam Traits Character traits type.
+/// @param lhs A basic_str_view object for comparison.
+/// @param rhs A basic_str_view object to compare with.
+/// @return true if `lhs` is greater than `rhs`, false otherwise.
+template <typename CharT, typename Traits>
+inline bool operator>(basic_str_view<CharT, Traits> lhs, basic_str_view<CharT, Traits> rhs) noexcept {
+ return lhs.compare(rhs) > 0;
+}
+
+/// @brief An greater-than-or-equal-to operator of the basic_str_view class.
+/// @tparam CharT Character type
+/// @tparam Traits Character traits type.
+/// @param lhs A basic_str_view object for comparison.
+/// @param rhs A basic_str_view object to compare with.
+/// @return true if `lhs` is greater than or equal to `rhs`, false otherwise.
+template <typename CharT, typename Traits>
+inline bool operator>=(basic_str_view<CharT, Traits> lhs, basic_str_view<CharT, Traits> rhs) noexcept {
+ return lhs.compare(rhs) >= 0;
+}
+
+/// @brief Insertion operator of the basic_str_view class.
+/// @tparam CharT Character type.
+/// @tparam Traits Character traits type.
+/// @param os An output stream object.
+/// @param sv A basic_str_view object.
+/// @return Reference to the output stream object `os`.
+template <typename CharT, typename Traits>
+inline std::basic_ostream<CharT, Traits>& operator<<(
+ std::basic_ostream<CharT, Traits>& os, basic_str_view<CharT, Traits> sv) {
+ return os.write(sv.data(), static_cast<std::streamsize>(sv.size()));
+}
+
+/// @brief view into `char` sequence.
+using str_view = basic_str_view<char>;
+
+#if FK_YAML_HAS_CHAR8_T
+/// @brief view into `char8_t` sequence.
+using u8str_view = basic_str_view<char8_t>;
+#endif
+
+/// @brief view into `char16_t` sequence.
+using u16str_view = basic_str_view<char16_t>;
+
+/// @brief view into `char32_t` sequence.
+using u32str_view = basic_str_view<char32_t>;
+
+FK_YAML_DETAIL_NAMESPACE_END
+
+#endif /* FK_YAML_DETAIL_STR_VIEW_HPP */
+
+
+FK_YAML_DETAIL_NAMESPACE_BEGIN
+
+/// @brief A position tracker of the target buffer.
+class position_tracker {
+public:
+ void set_target_buffer(str_view buffer) noexcept {
+ m_begin = m_last = buffer.begin();
+ m_end = buffer.end();
+ }
+
+ /// @brief Update the set of the current position information.
+ /// @note This function doesn't support cases where cur_pos has moved backward from the last call.
+ /// @param cur_pos The iterator to the current element of the buffer.
+ void update_position(const char* p_current) {
+ const auto diff = static_cast<uint32_t>(p_current - m_last);
+ if (diff == 0) {
+ return;
+ }
+
+ m_cur_pos += diff;
+ const uint32_t prev_lines_read = m_lines_read;
+ m_lines_read += static_cast<uint32_t>(std::count(m_last, p_current, '\n'));
+ m_last = p_current;
+
+ if (prev_lines_read == m_lines_read) {
+ m_cur_pos_in_line += diff;
+ return;
+ }
+
+ uint32_t count = 0;
+ const char* p_begin = m_begin;
+ while (--p_current != p_begin) {
+ if (*p_current == '\n') {
+ break;
+ }
+ count++;
+ }
+ m_cur_pos_in_line = count;
+ }
+
+ uint32_t get_cur_pos() const noexcept {
+ return m_cur_pos;
+ }
+
+ /// @brief Get the current position in the current line.
+ /// @return uint32_t The current position in the current line.
+ uint32_t get_cur_pos_in_line() const noexcept {
+ return m_cur_pos_in_line;
+ }
+
+ /// @brief Get the number of lines which have already been read.
+ /// @return uint32_t The number of lines which have already been read.
+ uint32_t get_lines_read() const noexcept {
+ return m_lines_read;
+ }
+
+private:
+ /// The iterator to the beginning element in the target buffer.
+ const char* m_begin {};
+ /// The iterator to the past-the-end element in the target buffer.
+ const char* m_end {};
+ /// The iterator to the last updated element in the target buffer.
+ const char* m_last {};
+ /// The current position from the beginning of an input buffer.
+ uint32_t m_cur_pos {0};
+ /// The current position in the current line.
+ uint32_t m_cur_pos_in_line {0};
+ /// The number of lines which have already been read.
+ uint32_t m_lines_read {0};
+};
+
+FK_YAML_DETAIL_NAMESPACE_END
+
+#endif /* FK_YAML_DETAIL_INPUT_POSITION_TRACKER_HPP */
+
+// #include <fkYAML/detail/meta/stl_supplement.hpp>
+
+// #include <fkYAML/detail/str_view.hpp>
+
+// #include <fkYAML/detail/types/lexical_token_t.hpp>
+// _______ __ __ __ _____ __ __ __
+// | __| |_/ | \_/ |/ _ \ / \/ \| | fkYAML: A C++ header-only YAML library
+// | __| _ < \_ _/| ___ | _ | |___ version 0.4.2
+// |__| |_| \__| |_| |_| |_|___||___|______| https://github.com/fktn-k/fkYAML
+//
+// SPDX-FileCopyrightText: 2023-2025 Kensuke Fukutani <fktn.dev@gmail.com>
+// SPDX-License-Identifier: MIT
+
+#ifndef FK_YAML_DETAIL_TYPES_LEXICAL_TOKEN_T_HPP
+#define FK_YAML_DETAIL_TYPES_LEXICAL_TOKEN_T_HPP
+
+#include <cstdint>
+
+// #include <fkYAML/detail/macros/define_macros.hpp>
+
+
+FK_YAML_DETAIL_NAMESPACE_BEGIN
+
+/// @brief Definition of lexical token types.
+enum class lexical_token_t : std::uint8_t {
+ END_OF_BUFFER, //!< the end of input buffer.
+ EXPLICIT_KEY_PREFIX, //!< the character for explicit mapping key prefix `?`.
+ KEY_SEPARATOR, //!< the key separator `:`
+ VALUE_SEPARATOR, //!< the value separator `,`
+ ANCHOR_PREFIX, //!< the character for anchor prefix `&`
+ ALIAS_PREFIX, //!< the character for alias prefix `*`
+ YAML_VER_DIRECTIVE, //!< a YAML version directive found. use get_yaml_version() to get a value.
+ TAG_DIRECTIVE, //!< a TAG directive found. use GetTagInfo() to get the tag information.
+ TAG_PREFIX, //!< the character for tag prefix `!`
+ INVALID_DIRECTIVE, //!< an invalid directive found. do not try to get the value.
+ SEQUENCE_BLOCK_PREFIX, //!< the character for sequence block prefix `- `
+ SEQUENCE_FLOW_BEGIN, //!< the character for sequence flow begin `[`
+ SEQUENCE_FLOW_END, //!< the character for sequence flow end `]`
+ MAPPING_FLOW_BEGIN, //!< the character for mapping begin `{`
+ MAPPING_FLOW_END, //!< the character for mapping end `}`
+ PLAIN_SCALAR, //!< plain (unquoted) scalars
+ SINGLE_QUOTED_SCALAR, //!< single-quoted scalars
+ DOUBLE_QUOTED_SCALAR, //!< double-quoted scalars
+ BLOCK_LITERAL_SCALAR, //!< block literal style scalars
+ BLOCK_FOLDED_SCALAR, //!< block folded style scalars
+ END_OF_DIRECTIVES, //!< the end of declaration of directives specified by `---`.
+ END_OF_DOCUMENT, //!< the end of a YAML document specified by `...`.
+};
+
+FK_YAML_DETAIL_NAMESPACE_END
+
+#endif /* FK_YAML_DETAIL_TYPES_LEXICAL_TOKEN_T_HPP */
+
+// #include <fkYAML/exception.hpp>
+
+
+FK_YAML_DETAIL_NAMESPACE_BEGIN
+
+/// @brief Lexical token information
+struct lexical_token {
+ lexical_token() = default;
+
+ lexical_token(lexical_token_t t, str_view s) noexcept
+ : type(t),
+ str(s) {
+ }
+
+ lexical_token(lexical_token_t t) noexcept
+ : type(t) {
+ }
+
+ lexical_token(const lexical_token&) = default;
+ lexical_token& operator=(const lexical_token&) = default;
+ lexical_token(lexical_token&&) = default;
+ lexical_token& operator=(lexical_token&&) = default;
+ ~lexical_token() = default;
+
+ /// Lexical token type.
+ lexical_token_t type {lexical_token_t::END_OF_BUFFER};
+ /// Lexical token contents.
+ str_view str;
+};
+
+/// @brief A class which lexically analyzes YAML formatted inputs.
+class lexical_analyzer {
+ // whether the current context is flow(1) or block(0)
+ static constexpr uint32_t flow_context_bit = 1u << 0u;
+ // whether the current document part is directive(1) or content(0)
+ static constexpr uint32_t document_directive_bit = 1u << 1u;
+
+public:
+ /// @brief Construct a new lexical_analyzer object.
+ /// @param input_buffer An input buffer.
+ explicit lexical_analyzer(str_view input_buffer) noexcept
+ : m_begin_itr(input_buffer.begin()),
+ m_cur_itr(input_buffer.begin()),
+ m_end_itr(input_buffer.end()) {
+ m_pos_tracker.set_target_buffer(input_buffer);
+ }
+
+ /// @brief Get the next lexical token by scanning the left of the input buffer.
+ /// @return lexical_token The next lexical token.
+ lexical_token get_next_token() {
+ skip_white_spaces_and_newline_codes();
+
+ m_token_begin_itr = m_cur_itr;
+ m_pos_tracker.update_position(m_cur_itr);
+ m_last_token_begin_pos = m_pos_tracker.get_cur_pos_in_line();
+ m_last_token_begin_line = m_pos_tracker.get_lines_read();
+
+ if (m_cur_itr == m_end_itr) {
+ return {lexical_token_t::END_OF_BUFFER};
+ }
+
+ switch (*m_cur_itr) {
+ case '?':
+ if (++m_cur_itr == m_end_itr) {
+ return {lexical_token_t::PLAIN_SCALAR, {m_token_begin_itr, 1}};
+ }
+
+ if (*m_cur_itr == ' ') {
+ return {lexical_token_t::EXPLICIT_KEY_PREFIX};
+ }
+ break;
+ case ':': // key separator
+ if (++m_cur_itr == m_end_itr) {
+ return {lexical_token_t::KEY_SEPARATOR};
+ }
+
+ switch (*m_cur_itr) {
+ case ' ':
+ case '\t':
+ case '\n':
+ return {lexical_token_t::KEY_SEPARATOR};
+ default:
+ if ((m_state & flow_context_bit) == 0) {
+ // in a block context
+ break;
+ }
+
+ switch (*m_cur_itr) {
+ case ',':
+ case '[':
+ case ']':
+ case '{':
+ case '}':
+ // Flow indicators are not "safe" to be followed in a flow context.
+ // See https://yaml.org/spec/1.2.2/#733-plain-style for more details.
+ return {lexical_token_t::KEY_SEPARATOR};
+ default:
+ // At least '{' or '[' must precedes this token.
+ FK_YAML_ASSERT(m_token_begin_itr != m_begin_itr);
+
+ // if a key inside a flow mapping is JSON-like (surrounded by indicators, see below), YAML allows
+ // the following value to be specified adjacent to the ":" mapping value indicator.
+ // ```yaml
+ // # the following flow mapping entries are all valid.
+ // {
+ // "foo":true,
+ // 'bar':false, # 'bar' is actually not JSON but allowed in YAML
+ // # since its surrounded by the single quotes.
+ // {[1,2,3]:null}:"baz"
+ // }
+ // ```
+ switch (*(m_token_begin_itr - 1)) {
+ case '\'':
+ case '\"':
+ case ']':
+ case '}':
+ return {lexical_token_t::KEY_SEPARATOR};
+ default:
+ break;
+ }
+ break;
+ }
+ break;
+ }
+ break;
+ case ',': // value separator
+ ++m_cur_itr;
+ return {lexical_token_t::VALUE_SEPARATOR};
+ case '&': // anchor prefix
+ return {lexical_token_t::ANCHOR_PREFIX, extract_anchor_name()};
+ case '*': // alias prefix
+ return {lexical_token_t::ALIAS_PREFIX, extract_anchor_name()};
+ case '!': // tag prefix
+ return {lexical_token_t::TAG_PREFIX, extract_tag_name()};
+ case '#': // comment prefix
+ scan_comment();
+ return get_next_token();
+ case '%': // directive prefix
+ if (m_state & document_directive_bit) {
+ return {scan_directive()};
+ }
+ // The '%' character can be safely used as the first character in document contents.
+ // See https://yaml.org/spec/1.2.2/#912-document-markers for more details.
+ break;
+ case '-': {
+ switch (*(m_cur_itr + 1)) {
+ case ' ':
+ case '\t':
+ case '\n':
+ // Move a cursor to the beginning of the next token.
+ m_cur_itr += 2;
+ return {lexical_token_t::SEQUENCE_BLOCK_PREFIX};
+ default:
+ break;
+ }
+
+ if (m_pos_tracker.get_cur_pos_in_line() == 0) {
+ if ((m_end_itr - m_cur_itr) > 2) {
+ const bool is_dir_end = std::equal(m_token_begin_itr, m_cur_itr + 3, "---");
+ if (is_dir_end) {
+ m_cur_itr += 3;
+ return {lexical_token_t::END_OF_DIRECTIVES};
+ }
+ }
+ }
+
+ break;
+ }
+ case '[': // sequence flow begin
+ ++m_cur_itr;
+ return {lexical_token_t::SEQUENCE_FLOW_BEGIN};
+ case ']': // sequence flow end
+ ++m_cur_itr;
+ return {lexical_token_t::SEQUENCE_FLOW_END};
+ case '{': // mapping flow begin
+ ++m_cur_itr;
+ return {lexical_token_t::MAPPING_FLOW_BEGIN};
+ case '}': // mapping flow end
+ ++m_cur_itr;
+ return {lexical_token_t::MAPPING_FLOW_END};
+ case '@':
+ emit_error("Any token cannot start with at(@). It is a reserved indicator for YAML.");
+ case '`':
+ emit_error("Any token cannot start with grave accent(`). It is a reserved indicator for YAML.");
+ case '\"':
+ ++m_token_begin_itr;
+ return {lexical_token_t::DOUBLE_QUOTED_SCALAR, determine_double_quoted_scalar_range()};
+ case '\'':
+ ++m_token_begin_itr;
+ return {lexical_token_t::SINGLE_QUOTED_SCALAR, determine_single_quoted_scalar_range()};
+ case '.': {
+ if (m_pos_tracker.get_cur_pos_in_line() == 0) {
+ const auto rem_size = m_end_itr - m_cur_itr;
+ if FK_YAML_LIKELY (rem_size > 2) {
+ const bool is_doc_end = std::equal(m_cur_itr, m_cur_itr + 3, "...");
+ if (is_doc_end) {
+ if (rem_size > 3) {
+ switch (*(m_cur_itr + 3)) {
+ case ' ':
+ case '\t':
+ case '\n':
+ m_cur_itr += 4;
+ break;
+ default:
+ // See https://yaml.org/spec/1.2.2/#912-document-markers for more details.
+ emit_error("The document end marker \"...\" must not be followed by non-ws char.");
+ }
+ }
+ else {
+ m_cur_itr += 3;
+ }
+ return {lexical_token_t::END_OF_DOCUMENT};
+ }
+ }
+ }
+ break;
+ }
+ case '|':
+ case '>': {
+ const str_view sv {m_token_begin_itr, m_end_itr};
+ const std::size_t header_end_pos = sv.find('\n');
+ FK_YAML_ASSERT(header_end_pos != str_view::npos);
+ const uint32_t base_indent = get_current_indent_level(&sv[header_end_pos]);
+
+ const lexical_token_t type = *m_token_begin_itr == '|' ? lexical_token_t::BLOCK_LITERAL_SCALAR
+ : lexical_token_t::BLOCK_FOLDED_SCALAR;
+ const str_view header_line = sv.substr(1, header_end_pos - 1);
+ m_block_scalar_header = convert_to_block_scalar_header(header_line);
+
+ m_token_begin_itr = sv.begin() + (header_end_pos + 1);
+
+ return {
+ type,
+ determine_block_scalar_content_range(
+ base_indent, m_block_scalar_header.indent, m_block_scalar_header.indent)};
+ }
+ default:
+ break;
+ }
+
+ return {lexical_token_t::PLAIN_SCALAR, determine_plain_scalar_range()};
+ }
+
+ /// @brief Get the beginning position of a last token.
+ /// @return uint32_t The beginning position of a last token.
+ uint32_t get_last_token_begin_pos() const noexcept {
+ return m_last_token_begin_pos;
+ }
+
+ /// @brief Get the number of lines already processed.
+ /// @return uint32_t The number of lines already processed.
+ uint32_t get_lines_processed() const noexcept {
+ return m_last_token_begin_line;
+ }
+
+ /// @brief Get the YAML version specification.
+ /// @return str_view A YAML version specification.
+ str_view get_yaml_version() const noexcept {
+ return m_yaml_version;
+ }
+
+ /// @brief Get the YAML tag handle defined in the TAG directive.
+ /// @return str_view A tag handle.
+ str_view get_tag_handle() const noexcept {
+ return m_tag_handle;
+ }
+
+ /// @brief Get the YAML tag prefix defined in the TAG directive.
+ /// @return str_view A tag prefix.
+ str_view get_tag_prefix() const noexcept {
+ return m_tag_prefix;
+ }
+
+ /// @brief Get block scalar header information.
+ /// @return block_scalar_header Block scalar header information.
+ block_scalar_header get_block_scalar_header() const noexcept {
+ return m_block_scalar_header;
+ }
+
+ /// @brief Toggles the context state between flow and block.
+ /// @param is_flow_context true: flow context, false: block context
+ void set_context_state(bool is_flow_context) noexcept {
+ m_state &= ~flow_context_bit;
+ if (is_flow_context) {
+ m_state |= flow_context_bit;
+ }
+ }
+
+ /// @brief Toggles the document state between directive and content.
+ /// @param is_directive true: directive, false: content
+ void set_document_state(bool is_directive) noexcept {
+ m_state &= ~document_directive_bit;
+ if (is_directive) {
+ m_state |= document_directive_bit;
+ }
+ }
+
+private:
+ uint32_t get_current_indent_level(const char* p_line_end) {
+ // get the beginning position of the current line.
+ std::size_t line_begin_pos = str_view(m_begin_itr, p_line_end - 1).find_last_of('\n');
+ if (line_begin_pos == str_view::npos) {
+ line_begin_pos = 0;
+ }
+ else {
+ ++line_begin_pos;
+ }
+ const char* p_line_begin = m_begin_itr + line_begin_pos;
+ const char* cur_itr = p_line_begin;
+
+ // get the indentation of the current line.
+ uint32_t indent = 0;
+ bool indent_found = false;
+ // 0: none, 1: block seq item, 2: explicit map key, 3: explicit map value
+ uint32_t context = 0;
+ while (cur_itr != p_line_end && !indent_found) {
+ switch (*cur_itr) {
+ case ' ':
+ ++indent;
+ ++cur_itr;
+ break;
+ case '-':
+ switch (*(cur_itr + 1)) {
+ case ' ':
+ case '\t':
+ indent += 2;
+ cur_itr += 2;
+ context = 1;
+ break;
+ default:
+ indent_found = true;
+ break;
+ }
+ break;
+ case '?':
+ if (*(cur_itr + 1) == ' ') {
+ indent += 2;
+ cur_itr += 2;
+ context = 2;
+ break;
+ }
+
+ indent_found = true;
+ break;
+ case ':':
+ switch (*(cur_itr + 1)) {
+ case ' ':
+ case '\t':
+ indent += 2;
+ cur_itr += 2;
+ context = 3;
+ break;
+ default:
+ indent_found = true;
+ break;
+ }
+ break;
+ default:
+ indent_found = true;
+ break;
+ }
+ }
+
+ // If "- ", "? " and/or ": " occur in the first line of this plain scalar content.
+ if (context > 0) {
+ // Check if the first line contains the key separator ": ".
+ // If so, the indent value remains the current one.
+ // Otherwise, the indent value is changed based on the last ocurrence of the above 3.
+ // In any case, multiline plain scalar content must be indented more than the indent value.
+ const str_view line_content_part {p_line_begin + indent, p_line_end};
+ std::size_t key_sep_pos = line_content_part.find(": ");
+ if (key_sep_pos == str_view::npos) {
+ key_sep_pos = line_content_part.find(":\t");
+ }
+
+ if (key_sep_pos == str_view::npos) {
+ constexpr char targets[] = "-?:";
+ FK_YAML_ASSERT(context - 1 < sizeof(targets));
+ // NOLINTNEXTLINE(cppcoreguidelines-pro-bounds-constant-array-index)
+ const char target_char = targets[context - 1];
+
+ // Find the position of the last ocuurence of "- ", "? " or ": ".
+ const str_view line_indent_part {p_line_begin, indent};
+ const std::size_t block_seq_item_begin_pos = line_indent_part.find_last_of(target_char);
+ FK_YAML_ASSERT(block_seq_item_begin_pos != str_view::npos);
+ indent = static_cast<uint32_t>(block_seq_item_begin_pos);
+ }
+ }
+
+ return indent;
+ }
+
+ /// @brief Skip until a newline code or a null character is found.
+ void scan_comment() {
+ FK_YAML_ASSERT(*m_cur_itr == '#');
+ if FK_YAML_LIKELY (m_cur_itr != m_begin_itr) {
+ switch (*(m_cur_itr - 1)) {
+ case ' ':
+ case '\t':
+ case '\n':
+ break;
+ default:
+ emit_error("Comment must not begin right after non-break characters");
+ }
+ }
+ skip_until_line_end();
+ }
+
+ /// @brief Scan directives starting with the prefix '%'
+ /// @note Currently, only %YAML directive is supported. If not, returns invalid or throws an exception.
+ /// @return lexical_token_t The lexical token type for directives.
+ lexical_token_t scan_directive() {
+ FK_YAML_ASSERT(*m_cur_itr == '%');
+
+ m_token_begin_itr = ++m_cur_itr;
+
+ bool ends_loop = false;
+ while (!ends_loop && m_cur_itr != m_end_itr) {
+ switch (*m_cur_itr) {
+ case ' ':
+ case '\t':
+ ends_loop = true;
+ break;
+ case '\n':
+ skip_until_line_end();
+ return lexical_token_t::INVALID_DIRECTIVE;
+ default:
+ ++m_cur_itr;
+ break;
+ }
+ }
+
+ const str_view dir_name(m_token_begin_itr, m_cur_itr);
+
+ if (dir_name == "TAG") {
+ if FK_YAML_UNLIKELY (!ends_loop) {
+ emit_error("There must be at least one white space between \"%TAG\" and tag info.");
+ }
+ skip_white_spaces();
+ return scan_tag_directive();
+ }
+
+ if (dir_name == "YAML") {
+ if FK_YAML_UNLIKELY (!ends_loop) {
+ emit_error("There must be at least one white space between \"%YAML\" and version.");
+ }
+ skip_white_spaces();
+ return scan_yaml_version_directive();
+ }
+
+ skip_until_line_end();
+ return lexical_token_t::INVALID_DIRECTIVE;
+ }
+
+ /// @brief Scan a YAML tag directive.
+ /// @return lexical_token_t The lexical token type for YAML tag directives.
+ lexical_token_t scan_tag_directive() {
+ m_token_begin_itr = m_cur_itr;
+
+ //
+ // extract a tag handle
+ //
+
+ if FK_YAML_UNLIKELY (*m_cur_itr != '!') {
+ emit_error("Tag handle must start with \'!\'.");
+ }
+
+ if FK_YAML_UNLIKELY (++m_cur_itr == m_end_itr) {
+ emit_error("invalid TAG directive is found.");
+ }
+
+ switch (*m_cur_itr) {
+ case ' ':
+ case '\t':
+ // primary handle (!)
+ break;
+ case '!':
+ if FK_YAML_UNLIKELY (++m_cur_itr == m_end_itr) {
+ emit_error("invalid TAG directive is found.");
+ }
+ if FK_YAML_UNLIKELY (*m_cur_itr != ' ' && *m_cur_itr != '\t') {
+ emit_error("invalid tag handle is found.");
+ }
+ break;
+ default: {
+ bool ends_loop = false;
+ do {
+ switch (*m_cur_itr) {
+ case ' ':
+ case '\t':
+ emit_error("invalid tag handle is found.");
+ case '!': {
+ if (m_cur_itr + 1 == m_end_itr) {
+ ends_loop = true;
+ break;
+ }
+ const char next = *(m_cur_itr + 1);
+ if FK_YAML_UNLIKELY (next != ' ' && next != '\t') {
+ emit_error("invalid tag handle is found.");
+ }
+ ends_loop = true;
+ break;
+ }
+ case '-':
+ break;
+ default:
+ if FK_YAML_UNLIKELY (!isalnum(*m_cur_itr)) {
+ // See https://yaml.org/spec/1.2.2/#rule-c-named-tag-handle for more details.
+ emit_error("named handle can contain only numbers(0-9), alphabets(A-Z,a-z) and hyphens(-).");
+ }
+ break;
+ }
+
+ if FK_YAML_UNLIKELY (++m_cur_itr == m_end_itr) {
+ emit_error("invalid TAG directive is found.");
+ }
+ } while (!ends_loop);
+ break;
+ }
+ }
+
+ m_tag_handle = str_view {m_token_begin_itr, m_cur_itr};
+
+ skip_white_spaces();
+
+ //
+ // extract a tag prefix.
+ //
+
+ m_token_begin_itr = m_cur_itr;
+ const char* p_tag_prefix_begin = m_cur_itr;
+ switch (*m_cur_itr) {
+ // a tag prefix must not start with flow indicators to avoid ambiguity.
+ // See https://yaml.org/spec/1.2.2/#rule-ns-global-tag-prefix for more details.
+ case ',':
+ case '[':
+ case ']':
+ case '{':
+ case '}':
+ emit_error("tag prefix must not start with flow indicators (\',\', [], {}).");
+ default:
+ break;
+ }
+
+ // extract the rest of a tag prefix.
+ bool ends_loop = false;
+ do {
+ switch (*m_cur_itr) {
+ case ' ':
+ case '\t':
+ case '\n':
+ ends_loop = true;
+ break;
+ default:
+ break;
+ }
+ } while (!ends_loop && ++m_cur_itr != m_end_itr);
+
+ const bool is_valid = uri_encoding::validate(p_tag_prefix_begin, m_cur_itr);
+ if FK_YAML_UNLIKELY (!is_valid) {
+ emit_error("invalid URI character is found in a tag prefix.");
+ }
+
+ m_tag_prefix = str_view {p_tag_prefix_begin, m_cur_itr};
+
+ return lexical_token_t::TAG_DIRECTIVE;
+ }
+
+ /// @brief Scan a YAML version directive.
+ /// @note Only 1.1 and 1.2 are supported. If not, throws an exception.
+ /// @return lexical_token_t The lexical token type for YAML version directives.
+ lexical_token_t scan_yaml_version_directive() {
+ m_token_begin_itr = m_cur_itr;
+
+ bool ends_loop = false;
+ while (!ends_loop && m_cur_itr != m_end_itr) {
+ switch (*m_cur_itr) {
+ case ' ':
+ case '\t':
+ case '\n':
+ ends_loop = true;
+ break;
+ default:
+ ++m_cur_itr;
+ break;
+ }
+ }
+
+ m_yaml_version = str_view {m_token_begin_itr, m_cur_itr};
+
+ if FK_YAML_UNLIKELY (m_yaml_version.compare("1.1") != 0 && m_yaml_version.compare("1.2") != 0) {
+ emit_error("Only 1.1 and 1.2 can be specified as the YAML version.");
+ }
+
+ return lexical_token_t::YAML_VER_DIRECTIVE;
+ }
+
+ /// @brief Extracts an anchor name from the input.
+ /// @return The extracted anchor name.
+ str_view extract_anchor_name() {
+ FK_YAML_ASSERT(*m_cur_itr == '&' || *m_cur_itr == '*');
+
+ m_token_begin_itr = ++m_cur_itr;
+
+ bool ends_loop = false;
+ for (; m_cur_itr != m_end_itr; ++m_cur_itr) {
+ switch (*m_cur_itr) {
+ // anchor name must not contain white spaces, newline codes and flow indicators.
+ // See https://yaml.org/spec/1.2.2/#692-node-anchors for more details.
+ case ' ':
+ case '\t':
+ case '\n':
+ case '{':
+ case '}':
+ case '[':
+ case ']':
+ case ',':
+ ends_loop = true;
+ break;
+ default:
+ break;
+ }
+
+ if (ends_loop) {
+ break;
+ }
+ }
+
+ if FK_YAML_UNLIKELY (m_token_begin_itr == m_cur_itr) {
+ emit_error("anchor name must not be empty.");
+ }
+
+ return {m_token_begin_itr, m_cur_itr};
+ }
+
+ /// @brief Extracts a tag name from the input.
+ /// @return A tag name.
+ str_view extract_tag_name() {
+ FK_YAML_ASSERT(*m_cur_itr == '!');
+
+ if (++m_cur_itr == m_end_itr) {
+ // Just "!" is a non-specific tag.
+ return {m_token_begin_itr, m_end_itr};
+ }
+
+ bool is_verbatim = false;
+ bool allows_another_tag_prefix = false;
+
+ switch (*m_cur_itr) {
+ case ' ':
+ case '\n':
+ // Just "!" is a non-specific tag.
+ return {m_token_begin_itr, m_cur_itr};
+ case '!':
+ // Secondary tag handles (!!suffix)
+ break;
+ case '<':
+ // Verbatim tags (!<TAG>)
+ is_verbatim = true;
+ ++m_cur_itr;
+ break;
+ default:
+ // Either local tags (!suffix) or named handles (!tag!suffix)
+ allows_another_tag_prefix = true;
+ break;
+ }
+
+ bool is_named_handle = false;
+ bool ends_loop = false;
+ do {
+ if (++m_cur_itr == m_end_itr) {
+ break;
+ }
+
+ switch (*m_cur_itr) {
+ // Tag names must not contain spaces or newline codes.
+ case ' ':
+ case '\t':
+ case '\n':
+ ends_loop = true;
+ break;
+ case '!':
+ if FK_YAML_UNLIKELY (!allows_another_tag_prefix) {
+ emit_error("invalid tag prefix (!) is found.");
+ }
+
+ is_named_handle = true;
+ // tag prefix must not appear three times.
+ allows_another_tag_prefix = false;
+ break;
+ default:
+ break;
+ }
+ } while (!ends_loop);
+
+ str_view tag_name {m_token_begin_itr, m_cur_itr};
+
+ if (is_verbatim) {
+ const char last = tag_name.back();
+ if FK_YAML_UNLIKELY (last != '>') {
+ emit_error("verbatim tag (!<TAG>) must be ended with \'>\'.");
+ }
+
+ // only the `TAG` part of the `!<TAG>` for URI validation.
+ const str_view tag_body = tag_name.substr(2, tag_name.size() - 3);
+ if FK_YAML_UNLIKELY (tag_body.empty()) {
+ emit_error("verbatim tag(!<TAG>) must not be empty.");
+ }
+
+ const bool is_valid_uri = uri_encoding::validate(tag_body.begin(), tag_body.end());
+ if FK_YAML_UNLIKELY (!is_valid_uri) {
+ emit_error("invalid URI character is found in a verbatim tag.");
+ }
+
+ return tag_name;
+ }
+
+ if (is_named_handle) {
+ const char last = tag_name.back();
+ if FK_YAML_UNLIKELY (last == '!') {
+ // Tag shorthand must be followed by a non-empty suffix.
+ // See the "Tag Shorthands" section in https://yaml.org/spec/1.2.2/#691-node-tags.
+ emit_error("named handle has no suffix.");
+ }
+ }
+
+ // get the position of last tag prefix character (!) to extract body of tag shorthands.
+ // tag shorthand is either primary(!tag), secondary(!!tag) or named(!handle!tag).
+ const std::size_t last_tag_prefix_pos = tag_name.find_last_of('!');
+ FK_YAML_ASSERT(last_tag_prefix_pos != str_view::npos);
+
+ const str_view tag_uri = tag_name.substr(last_tag_prefix_pos + 1);
+ const bool is_valid_uri = uri_encoding::validate(tag_uri.begin(), tag_uri.end());
+ if FK_YAML_UNLIKELY (!is_valid_uri) {
+ emit_error("Invalid URI character is found in a named tag handle.");
+ }
+
+ // Tag shorthands cannot contain flow indicators({}[],).
+ // See the "Tag Shorthands" section in https://yaml.org/spec/1.2.2/#691-node-tags.
+ const std::size_t invalid_char_pos = tag_uri.find_first_of("{}[],");
+ if (invalid_char_pos != str_view::npos) {
+ emit_error("Tag shorthand cannot contain flow indicators({}[],).");
+ }
+
+ return tag_name;
+ }
+
+ /// @brief Determines the range of single quoted scalar by scanning remaining input buffer contents.
+ /// @return A single quoted scalar.
+ str_view determine_single_quoted_scalar_range() {
+ const str_view sv {m_token_begin_itr, m_end_itr};
+
+ std::size_t pos = sv.find('\'');
+ while (pos != str_view::npos) {
+ FK_YAML_ASSERT(pos < sv.size());
+ if FK_YAML_LIKELY (pos == sv.size() - 1 || sv[pos + 1] != '\'') {
+ // closing single quote is found.
+ m_cur_itr = m_token_begin_itr + (pos + 1);
+ str_view single_quoted_scalar {m_token_begin_itr, pos};
+ check_scalar_content(single_quoted_scalar);
+ return single_quoted_scalar;
+ }
+
+ // If single quotation marks are repeated twice in a single quoted scalar, they are considered as an
+ // escaped single quotation mark. Skip the second one which would otherwise be detected as a closing
+ // single quotation mark in the next loop.
+ pos = sv.find('\'', pos + 2);
+ }
+
+ m_cur_itr = m_end_itr; // update for error information
+ emit_error("Invalid end of input buffer in a single-quoted scalar token.");
+ }
+
+ /// @brief Determines the range of double quoted scalar by scanning remaining input buffer contents.
+ /// @return A double quoted scalar.
+ str_view determine_double_quoted_scalar_range() {
+ const str_view sv {m_token_begin_itr, m_end_itr};
+
+ std::size_t pos = sv.find('\"');
+ while (pos != str_view::npos) {
+ FK_YAML_ASSERT(pos < sv.size());
+
+ bool is_closed = true;
+ if FK_YAML_LIKELY (pos > 0) {
+ // Double quotation marks can be escaped by a preceding backslash and the number of backslashes matters
+ // to determine if the found double quotation mark is escaped since the backslash itself can also be
+ // escaped:
+ // * odd number of backslashes -> double quotation mark IS escaped (e.g., "\\\"")
+ // * even number of backslashes -> double quotation mark IS NOT escaped (e.g., "\\"")
+ uint32_t backslash_counts = 0;
+ const char* p = m_token_begin_itr + (pos - 1);
+ do {
+ if (*p-- != '\\') {
+ break;
+ }
+ ++backslash_counts;
+ } while (p != m_token_begin_itr);
+ is_closed = ((backslash_counts & 1u) == 0); // true: even, false: odd
+ }
+
+ if (is_closed) {
+ // closing double quote is found.
+ m_cur_itr = m_token_begin_itr + (pos + 1);
+ str_view double_quoted_scalar {m_token_begin_itr, pos};
+ check_scalar_content(double_quoted_scalar);
+ return double_quoted_scalar;
+ }
+
+ pos = sv.find('\"', pos + 1);
+ }
+
+ m_cur_itr = m_end_itr; // update for error information
+ emit_error("Invalid end of input buffer in a double-quoted scalar token.");
+ }
+
+ /// @brief Determines the range of plain scalar by scanning remaining input buffer contents.
+ /// @return A plain scalar.
+ str_view determine_plain_scalar_range() {
+ const str_view sv {m_token_begin_itr, m_end_itr};
+
+ // flow indicators are checked only within a flow context.
+ const str_view filter = (m_state & flow_context_bit) ? "\t\n :{}[]," : "\t\n :";
+ std::size_t pos = sv.find_first_of(filter);
+ if FK_YAML_UNLIKELY (pos == str_view::npos) {
+ check_scalar_content(sv);
+ m_cur_itr = m_end_itr;
+ return sv;
+ }
+
+ bool ends_loop = false;
+ uint32_t indent = std::numeric_limits<uint32_t>::max();
+ do {
+ FK_YAML_ASSERT(pos < sv.size());
+ switch (sv[pos]) {
+ case '\n': {
+ if (indent == std::numeric_limits<uint32_t>::max()) {
+ indent = get_current_indent_level(&sv[pos]);
+ }
+
+ constexpr str_view space_filter {" \t\n"};
+ const std::size_t non_space_pos = sv.find_first_not_of(space_filter, pos);
+ const std::size_t last_newline_pos = sv.find_last_of('\n', non_space_pos);
+ FK_YAML_ASSERT(last_newline_pos != str_view::npos);
+
+ if (non_space_pos == str_view::npos || non_space_pos - last_newline_pos - 1 <= indent) {
+ ends_loop = true;
+ break;
+ }
+
+ pos = non_space_pos;
+ break;
+ }
+ case ' ':
+ case '\t':
+ if FK_YAML_UNLIKELY (pos == sv.size() - 1) {
+ // trim trailing space.
+ ends_loop = true;
+ break;
+ }
+
+ // Allow a space in a plain scalar only if the space is surrounded by non-space characters, but not
+ // followed by the comment prefix " #".
+ // Also, flow indicators are not allowed to be followed after a space in a flow context.
+ // See https://yaml.org/spec/1.2.2/#733-plain-style for more details.
+ switch (sv[pos + 1]) {
+ case ' ':
+ case '\t':
+ case '\n':
+ case '#':
+ ends_loop = true;
+ break;
+ case ':':
+ // " :" is permitted in a plain style string token, but not when followed by a space.
+ ends_loop = (pos < sv.size() - 2) && (sv[pos + 2] == ' ');
+ break;
+ case '{':
+ case '}':
+ case '[':
+ case ']':
+ case ',':
+ ends_loop = (m_state & flow_context_bit);
+ break;
+ default:
+ break;
+ }
+ break;
+ case ':':
+ if FK_YAML_LIKELY (pos + 1 < sv.size()) {
+ switch (sv[pos + 1]) {
+ case ' ':
+ case '\t':
+ case '\n':
+ ends_loop = true;
+ break;
+ default:
+ break;
+ }
+ }
+ break;
+ case '{':
+ case '}':
+ case '[':
+ case ']':
+ case ',':
+ // This check is enabled only in a flow context.
+ ends_loop = true;
+ break;
+ default: // LCOV_EXCL_LINE
+ detail::unreachable(); // LCOV_EXCL_LINE
+ }
+
+ if (ends_loop) {
+ break;
+ }
+
+ pos = sv.find_first_of(filter, pos + 1);
+ } while (pos != str_view::npos);
+
+ str_view plain_scalar = sv.substr(0, pos);
+ check_scalar_content(plain_scalar);
+ m_cur_itr = plain_scalar.end();
+ return plain_scalar;
+ }
+
+ /// @brief Scan a block style string token either in the literal or folded style.
+ /// @param base_indent The base indent level of the block scalar.
+ /// @param indicated_indent The indicated indent level in the block scalar header. 0 means it's not indicated.
+ /// @param token Storage for the scanned block scalar range.
+ /// @return The content indentation level of the block scalar.
+ str_view determine_block_scalar_content_range(
+ uint32_t base_indent, uint32_t indicated_indent, uint32_t& content_indent) {
+ const str_view sv {m_token_begin_itr, m_end_itr};
+ const std::size_t remain_input_len = sv.size();
+
+ // Handle leading all-space lines.
+ uint32_t cur_indent = 0;
+ uint32_t max_leading_indent = 0;
+ const char* cur_itr = m_token_begin_itr;
+ bool stop_increment = false;
+
+ while (cur_itr != m_end_itr) {
+ switch (*cur_itr++) {
+ case ' ':
+ if FK_YAML_LIKELY (!stop_increment) {
+ ++cur_indent;
+ }
+ continue;
+ case '\t':
+ // Tabs are not counted as an indent character but still part of an empty line.
+ // See https://yaml.org/spec/1.2.2/#rule-s-indent and https://yaml.org/spec/1.2.2/#64-empty-lines.
+ stop_increment = true;
+ continue;
+ case '\n':
+ max_leading_indent = std::max(cur_indent, max_leading_indent);
+ cur_indent = 0;
+ stop_increment = false;
+ continue;
+ default:
+ break;
+ }
+ break;
+ }
+
+ // all the block scalar contents are empty lines, and no subsequent token exists.
+ if FK_YAML_UNLIKELY (cur_itr == m_end_itr) {
+ // Without the following iterator update, lexer cannot reach the end of input buffer and causes infinite
+ // loops from the next loop. (https://github.com/fktn-k/fkYAML/pull/410)
+ m_cur_itr = m_end_itr;
+
+ // If there's no non-empty line, the content indentation level is equal to the number of spaces on the
+ // longest line. https://yaml.org/spec/1.2.2/#8111-block-indentation-indicator
+ content_indent =
+ indicated_indent == 0 ? std::max(cur_indent, max_leading_indent) : base_indent + indicated_indent;
+ return sv;
+ }
+
+ // Any leading empty line must not contain more spaces than the first non-empty line.
+ if FK_YAML_UNLIKELY (cur_indent < max_leading_indent) {
+ emit_error("Any leading empty line must not be more indented than the first non-empty line.");
+ }
+
+ if (indicated_indent == 0) {
+ FK_YAML_ASSERT(base_indent < cur_indent);
+ indicated_indent = cur_indent - base_indent;
+ }
+ else if FK_YAML_UNLIKELY (cur_indent < base_indent + indicated_indent) {
+ emit_error("The first non-empty line in the block scalar is less indented.");
+ }
+
+ std::size_t last_newline_pos = sv.find('\n', cur_itr - m_token_begin_itr + 1);
+ if (last_newline_pos == str_view::npos) {
+ last_newline_pos = remain_input_len;
+ }
+
+ content_indent = base_indent + indicated_indent;
+ while (last_newline_pos < remain_input_len) {
+ std::size_t cur_line_end_pos = sv.find('\n', last_newline_pos + 1);
+ if (cur_line_end_pos == str_view::npos) {
+ cur_line_end_pos = remain_input_len;
+ }
+
+ const std::size_t cur_line_content_begin_pos = sv.find_first_not_of(' ', last_newline_pos + 1);
+ if (cur_line_content_begin_pos == str_view::npos) {
+ last_newline_pos = cur_line_end_pos;
+ continue;
+ }
+
+ FK_YAML_ASSERT(last_newline_pos < cur_line_content_begin_pos);
+ cur_indent = static_cast<uint32_t>(cur_line_content_begin_pos - last_newline_pos - 1);
+ if (cur_indent < content_indent && sv[cur_line_content_begin_pos] != '\n') {
+ if FK_YAML_UNLIKELY (cur_indent > base_indent) {
+ // This path assumes an input like the following:
+ // ```yaml
+ // foo: |
+ // text
+ // invalid # this line is less indented than the content indent level (2)
+ // # but more indented than the base indent level (0)
+ // ```
+ // In such cases, the less indented line cannot be the start of the next token.
+ emit_error("A content line of the block scalar is less indented.");
+ }
+
+ // Interpret less indented non-space characters as the start of the next token.
+ break;
+ }
+
+ last_newline_pos = cur_line_end_pos;
+ }
+
+ // include last newline character if not all characters have been consumed yet.
+ if (last_newline_pos < remain_input_len) {
+ ++last_newline_pos;
+ }
+
+ m_cur_itr = m_token_begin_itr + last_newline_pos;
+ return sv.substr(0, last_newline_pos);
+ }
+
+ /// @brief Checks if the given scalar contains no unescaped control characters.
+ /// @param scalar Scalar contents.
+ void check_scalar_content(const str_view& scalar) const {
+ const char* p_current = scalar.begin();
+ const char* p_end = scalar.end();
+
+ while (p_current != p_end) {
+ const uint32_t num_bytes = utf8::get_num_bytes(static_cast<uint8_t>(*p_current));
+ if (num_bytes > 1) {
+ // Multibyte characters are already checked in the input_adapter module.
+ p_current += num_bytes;
+ continue;
+ }
+
+ switch (*p_current++) {
+ // 0x00(NULL) has already been handled above.
+ case 0x01:
+ emit_error("Control character U+0001 (SOH) must be escaped to \\u0001.");
+ case 0x02:
+ emit_error("Control character U+0002 (STX) must be escaped to \\u0002.");
+ case 0x03:
+ emit_error("Control character U+0003 (ETX) must be escaped to \\u0003.");
+ case 0x04:
+ emit_error("Control character U+0004 (EOT) must be escaped to \\u0004.");
+ case 0x05:
+ emit_error("Control character U+0005 (ENQ) must be escaped to \\u0005.");
+ case 0x06:
+ emit_error("Control character U+0006 (ACK) must be escaped to \\u0006.");
+ case 0x07:
+ emit_error("Control character U+0007 (BEL) must be escaped to \\a or \\u0007.");
+ case 0x08:
+ emit_error("Control character U+0008 (BS) must be escaped to \\b or \\u0008.");
+ case 0x09: // HT
+ // horizontal tabs (\t) are safe to use without escaping.
+ break;
+ // 0x0A(LF) has already been handled above.
+ case 0x0B:
+ emit_error("Control character U+000B (VT) must be escaped to \\v or \\u000B.");
+ case 0x0C:
+ emit_error("Control character U+000C (FF) must be escaped to \\f or \\u000C.");
+ // 0x0D(CR) has already been handled above.
+ case 0x0E:
+ emit_error("Control character U+000E (SO) must be escaped to \\u000E.");
+ case 0x0F:
+ emit_error("Control character U+000F (SI) must be escaped to \\u000F.");
+ case 0x10:
+ emit_error("Control character U+0010 (DLE) must be escaped to \\u0010.");
+ case 0x11:
+ emit_error("Control character U+0011 (DC1) must be escaped to \\u0011.");
+ case 0x12:
+ emit_error("Control character U+0012 (DC2) must be escaped to \\u0012.");
+ case 0x13:
+ emit_error("Control character U+0013 (DC3) must be escaped to \\u0013.");
+ case 0x14:
+ emit_error("Control character U+0014 (DC4) must be escaped to \\u0014.");
+ case 0x15:
+ emit_error("Control character U+0015 (NAK) must be escaped to \\u0015.");
+ case 0x16:
+ emit_error("Control character U+0016 (SYN) must be escaped to \\u0016.");
+ case 0x17:
+ emit_error("Control character U+0017 (ETB) must be escaped to \\u0017.");
+ case 0x18:
+ emit_error("Control character U+0018 (CAN) must be escaped to \\u0018.");
+ case 0x19:
+ emit_error("Control character U+0019 (EM) must be escaped to \\u0019.");
+ case 0x1A:
+ emit_error("Control character U+001A (SUB) must be escaped to \\u001A.");
+ case 0x1B:
+ emit_error("Control character U+001B (ESC) must be escaped to \\e or \\u001B.");
+ case 0x1C:
+ emit_error("Control character U+001C (FS) must be escaped to \\u001C.");
+ case 0x1D:
+ emit_error("Control character U+001D (GS) must be escaped to \\u001D.");
+ case 0x1E:
+ emit_error("Control character U+001E (RS) must be escaped to \\u001E.");
+ case 0x1F:
+ emit_error("Control character U+001F (US) must be escaped to \\u001F.");
+ default:
+ break;
+ }
+ }
+ }
+
+ /// @brief Gets the metadata of a following block style string scalar.
+ /// @param chomp_type A variable to store the retrieved chomping style type.
+ /// @param indent A variable to store the retrieved indent size.
+ /// @return Block scalar header information converted from the header line.
+ block_scalar_header convert_to_block_scalar_header(str_view line) {
+ constexpr str_view comment_prefix {" #"};
+ const std::size_t comment_begin_pos = line.find(comment_prefix);
+ if (comment_begin_pos != str_view::npos) {
+ line = line.substr(0, comment_begin_pos);
+ }
+
+ if (line.empty()) {
+ return {};
+ }
+
+ block_scalar_header header {};
+ for (const char c : line) {
+ switch (c) {
+ case '-':
+ if FK_YAML_UNLIKELY (header.chomp != chomping_indicator_t::CLIP) {
+ emit_error("Too many block chomping indicators specified.");
+ }
+ header.chomp = chomping_indicator_t::STRIP;
+ break;
+ case '+':
+ if FK_YAML_UNLIKELY (header.chomp != chomping_indicator_t::CLIP) {
+ emit_error("Too many block chomping indicators specified.");
+ }
+ header.chomp = chomping_indicator_t::KEEP;
+ break;
+ case '0':
+ emit_error("An indentation level for a block scalar cannot be 0.");
+ case '1':
+ case '2':
+ case '3':
+ case '4':
+ case '5':
+ case '6':
+ case '7':
+ case '8':
+ case '9':
+ if FK_YAML_UNLIKELY (header.indent > 0) {
+ emit_error("Invalid indentation level for a block scalar. It must be between 1 and 9.");
+ }
+ header.indent = static_cast<uint32_t>(c - '0');
+ break;
+ case ' ':
+ case '\t':
+ break;
+ default:
+ emit_error("Invalid character found in a block scalar header.");
+ }
+ }
+
+ return header;
+ }
+
+ /// @brief Skip white spaces (half-width spaces and tabs) from the current position.
+ void skip_white_spaces() {
+ m_cur_itr = std::find_if_not(m_cur_itr, m_end_itr, [](char c) { return (c == ' ' || c == '\t'); });
+ }
+
+ /// @brief Skip white spaces and newline codes (CR/LF) from the current position.
+ void skip_white_spaces_and_newline_codes() {
+ if (m_cur_itr != m_end_itr) {
+ m_cur_itr = std::find_if_not(m_cur_itr, m_end_itr, [](char c) {
+ switch (c) {
+ case ' ':
+ case '\t':
+ case '\n':
+ return true;
+ default:
+ return false;
+ }
+ });
+ }
+ }
+
+ /// @brief Skip the rest in the current line.
+ void skip_until_line_end() {
+ while (m_cur_itr != m_end_itr) {
+ switch (*m_cur_itr) {
+ case '\n':
+ ++m_cur_itr;
+ return;
+ default:
+ ++m_cur_itr;
+ break;
+ }
+ }
+ }
+
+ /// @brief Emits an error with the given message.
+ /// @param msg A message for the resulting error.
+ [[noreturn]] void emit_error(const char* msg) const {
+ m_pos_tracker.update_position(m_cur_itr);
+ throw fkyaml::parse_error(msg, m_pos_tracker.get_lines_read(), m_pos_tracker.get_cur_pos_in_line());
+ }
+
+private:
+ /// The iterator to the first element in the input buffer.
+ const char* m_begin_itr {};
+ /// The iterator to the current character in the input buffer.
+ const char* m_cur_itr {};
+ /// The iterator to the beginning of the current token.
+ const char* m_token_begin_itr {};
+ /// The iterator to the past-the-end element in the input buffer.
+ const char* m_end_itr {};
+ /// The current position tracker of the input buffer.
+ mutable position_tracker m_pos_tracker {};
+ /// The last yaml version.
+ str_view m_yaml_version;
+ /// The last tag handle.
+ str_view m_tag_handle;
+ /// The last tag prefix.
+ str_view m_tag_prefix;
+ /// The last block scalar header.
+ block_scalar_header m_block_scalar_header {};
+ /// The beginning position of the last lexical token. (zero origin)
+ uint32_t m_last_token_begin_pos {0};
+ /// The beginning line of the last lexical token. (zero origin)
+ uint32_t m_last_token_begin_line {0};
+ /// The current depth of flow context.
+ uint32_t m_state {0};
+};
+
+FK_YAML_DETAIL_NAMESPACE_END
+
+#endif /* FK_YAML_DETAIL_INPUT_LEXICAL_ANALYZER_HPP */
+
+// #include <fkYAML/detail/input/scalar_parser.hpp>
+// _______ __ __ __ _____ __ __ __
+// | __| |_/ | \_/ |/ _ \ / \/ \| | fkYAML: A C++ header-only YAML library
+// | __| _ < \_ _/| ___ | _ | |___ version 0.4.2
+// |__| |_| \__| |_| |_| |_|___||___|______| https://github.com/fktn-k/fkYAML
+//
+// SPDX-FileCopyrightText: 2023-2025 Kensuke Fukutani <fktn.dev@gmail.com>
+// SPDX-License-Identifier: MIT
+
+#ifndef FK_YAML_DETAIL_INPUT_SCALAR_PARSER_HPP
+#define FK_YAML_DETAIL_INPUT_SCALAR_PARSER_HPP
+
+// #include <fkYAML/detail/macros/define_macros.hpp>
+
+// #include <fkYAML/detail/assert.hpp>
+
+// #include <fkYAML/detail/conversions/scalar_conv.hpp>
+// _______ __ __ __ _____ __ __ __
+// | __| |_/ | \_/ |/ _ \ / \/ \| | fkYAML: A C++ header-only YAML library
+// | __| _ < \_ _/| ___ | _ | |___ version 0.4.2
+// |__| |_| \__| |_| |_| |_|___||___|______| https://github.com/fktn-k/fkYAML
+//
+// SPDX-FileCopyrightText: 2023-2025 Kensuke Fukutani <fktn.dev@gmail.com>
+// SPDX-License-Identifier: MIT
+
+// **NOTE FOR LIBRARY DEVELOPERS**:
+// Implementations in this header file are intentionally optimized for conversions between YAML scalars and native C++
+// types. So, some implementations don't follow the conversions in the standard C++ functions. For example, octals must
+// begin with "0o" (not "0"), which is specified in the YAML spec 1.2.
+
+#ifndef FK_YAML_CONVERSIONS_SCALAR_CONV_HPP
+#define FK_YAML_CONVERSIONS_SCALAR_CONV_HPP
+
+#include <cmath>
+#include <cstdint>
+#include <cstring>
+#include <limits>
+
+// #include <fkYAML/detail/macros/define_macros.hpp>
+
+// #include <fkYAML/detail/meta/type_traits.hpp>
+
+
+#if FK_YAML_HAS_TO_CHARS
+// Prefer std::to_chars() and std::from_chars() functions if available.
+#include <charconv>
+#else
+// Fallback to legacy string conversion functions otherwise.
+#include <string> // std::stof(), std::stod(), std::stold()
+#endif
+
+FK_YAML_DETAIL_NAMESPACE_BEGIN
+
+//////////////////////////
+// conv_limits_base //
+//////////////////////////
+
+/// @brief A structure which provides limits for conversions between scalars and integers.
+/// @note This structure contains common limits in both signed and unsigned integers.
+/// @tparam NumBytes The number of bytes for the integer type.
+template <std::size_t NumBytes>
+struct conv_limits_base {};
+
+/// @brief The specialization of conv_limits_base for 1 byte integers, e.g., int8_t, uint8_t.
+template <>
+struct conv_limits_base<1u> {
+ /// max characters for octals (0o377) without the prefix part.
+ static constexpr std::size_t max_chars_oct = 3;
+ /// max characters for hexadecimals (0xFF) without the prefix part.
+ static constexpr std::size_t max_chars_hex = 2;
+
+ /// @brief Check if the given octals are safely converted into 1 byte integer.
+ /// @param octs The pointer to octal characters
+ /// @param len The length of octal characters
+ /// @return true is safely convertible, false otherwise.
+ static bool check_if_octs_safe(const char* octs, std::size_t len) noexcept {
+ return (len < max_chars_oct) || (len == max_chars_oct && octs[0] <= '3');
+ }
+
+ /// @brief Check if the given hexadecimals are safely converted into 1 byte integer.
+ /// @param octs The pointer to hexadecimal characters
+ /// @param len The length of hexadecimal characters
+ /// @return true is safely convertible, false otherwise.
+ static bool check_if_hexs_safe(const char* /*unused*/, std::size_t len) noexcept {
+ return len <= max_chars_hex;
+ }
+};
+
+/// @brief The specialization of conv_limits_base for 2 byte integers, e.g., int16_t, uint16_t.
+template <>
+struct conv_limits_base<2u> {
+ /// max characters for octals (0o177777) without the prefix part.
+ static constexpr std::size_t max_chars_oct = 6;
+ /// max characters for hexadecimals (0xFFFF) without the prefix part.
+ static constexpr std::size_t max_chars_hex = 4;
+
+ /// @brief Check if the given octals are safely converted into 2 byte integer.
+ /// @param octs The pointer to octal characters
+ /// @param len The length of octal characters
+ /// @return true is safely convertible, false otherwise.
+ static bool check_if_octs_safe(const char* octs, std::size_t len) noexcept {
+ return (len < max_chars_oct) || (len == max_chars_oct && octs[0] <= '1');
+ }
+
+ /// @brief Check if the given hexadecimals are safely converted into 2 byte integer.
+ /// @param octs The pointer to hexadecimal characters
+ /// @param len The length of hexadecimal characters
+ /// @return true is safely convertible, false otherwise.
+ static bool check_if_hexs_safe(const char* /*unused*/, std::size_t len) noexcept {
+ return len <= max_chars_hex;
+ }
+};
+
+/// @brief The specialization of conv_limits_base for 4 byte integers, e.g., int32_t, uint32_t.
+template <>
+struct conv_limits_base<4u> {
+ /// max characters for octals (0o37777777777) without the prefix part.
+ static constexpr std::size_t max_chars_oct = 11;
+ /// max characters for hexadecimals (0xFFFFFFFF) without the prefix part.
+ static constexpr std::size_t max_chars_hex = 8;
+
+ /// @brief Check if the given octals are safely converted into 4 byte integer.
+ /// @param octs The pointer to octal characters
+ /// @param len The length of octal characters
+ /// @return true is safely convertible, false otherwise.
+ static bool check_if_octs_safe(const char* octs, std::size_t len) noexcept {
+ return (len < max_chars_oct) || (len == max_chars_oct && octs[0] <= '3');
+ }
+
+ /// @brief Check if the given hexadecimals are safely converted into 4 byte integer.
+ /// @param octs The pointer to hexadecimal characters
+ /// @param len The length of hexadecimal characters
+ /// @return true is safely convertible, false otherwise.
+ static bool check_if_hexs_safe(const char* /*unused*/, std::size_t len) noexcept {
+ return len <= max_chars_hex;
+ }
+};
+
+/// @brief The specialization of conv_limits_base for 8 byte integers, e.g., int64_t, uint64_t.
+template <>
+struct conv_limits_base<8u> {
+ /// max characters for octals (0o1777777777777777777777) without the prefix part.
+ static constexpr std::size_t max_chars_oct = 22;
+ /// max characters for hexadecimals (0xFFFFFFFFFFFFFFFF) without the prefix part.
+ static constexpr std::size_t max_chars_hex = 16;
+
+ /// @brief Check if the given octals are safely converted into 8 byte integer.
+ /// @param octs The pointer to octal characters
+ /// @param len The length of octal characters
+ /// @return true is safely convertible, false otherwise.
+ static bool check_if_octs_safe(const char* octs, std::size_t len) noexcept {
+ return (len < max_chars_oct) || (len == max_chars_oct && octs[0] <= '1');
+ }
+
+ /// @brief Check if the given hexadecimals are safely converted into 8 byte integer.
+ /// @param octs The pointer to hexadecimal characters
+ /// @param len The length of hexadecimal characters
+ /// @return true is safely convertible, false otherwise.
+ static bool check_if_hexs_safe(const char* /*unused*/, std::size_t len) noexcept {
+ return len <= max_chars_hex;
+ }
+};
+
+/////////////////////
+// conv_limits //
+/////////////////////
+
+/// @brief A structure which provides limits for conversions between scalars and integers.
+/// @note This structure contains limits which differs based on signedness.
+/// @tparam NumBytes The number of bytes for the integer type.
+/// @tparam IsSigned Whether an integer is signed or unsigned
+template <std::size_t NumBytes, bool IsSigned>
+struct conv_limits {};
+
+/// @brief The specialization of conv_limits for 1 byte signed integers, e.g., int8_t.
+template <>
+struct conv_limits<1u, true> : conv_limits_base<1u> {
+ /// with or without sign.
+ static constexpr bool is_signed = true;
+
+ /// max characters for decimals (-128..127) without sign.
+ static constexpr std::size_t max_chars_dec = 3;
+
+ /// string representation of max decimal value.
+ static const char* max_value_chars_dec() noexcept {
+ // Making this function a static constexpr variable, a link error happens.
+ // Although the issue has been fixed since C++17, this workaround is necessary to let this functionality work
+ // with C++11 (the library's default C++ standard version).
+ // The same thing is applied to similar functions in the other specializations.
+
+ static constexpr char max_value_chars[] = "127";
+ return &max_value_chars[0];
+ }
+
+ /// string representation of min decimal value without sign.
+ static const char* min_value_chars_dec() noexcept {
+ static constexpr char min_value_chars[] = "128";
+ return &min_value_chars[0];
+ }
+};
+
+/// @brief The specialization of conv_limits for 1 byte unsigned integers, e.g., uint8_t.
+template <>
+struct conv_limits<1u, false> : conv_limits_base<1u> {
+ /// with or without sign.
+ static constexpr bool is_signed = false;
+
+ /// max characters for decimals (0..255) without sign.
+ static constexpr std::size_t max_chars_dec = 3;
+
+ /// string representation of max decimal value.
+ static const char* max_value_chars_dec() noexcept {
+ static constexpr char max_value_chars[] = "255";
+ return &max_value_chars[0];
+ }
+
+ /// string representation of min decimal value.
+ static const char* min_value_chars_dec() noexcept {
+ static constexpr char min_value_chars[] = "0";
+ return &min_value_chars[0];
+ }
+};
+
+/// @brief The specialization of conv_limits for 2 byte signed integers, e.g., int16_t.
+template <>
+struct conv_limits<2u, true> : conv_limits_base<2u> {
+ /// with or without sign.
+ static constexpr bool is_signed = true;
+
+ /// max characters for decimals (-32768..32767) without sign.
+ static constexpr std::size_t max_chars_dec = 5;
+
+ /// string representation of max decimal value.
+ static const char* max_value_chars_dec() noexcept {
+ static constexpr char max_value_chars[] = "32767";
+ return &max_value_chars[0];
+ }
+
+ /// string representation of min decimal value without sign.
+ static const char* min_value_chars_dec() noexcept {
+ static constexpr char min_value_chars[] = "32768";
+ return &min_value_chars[0];
+ }
+};
+
+/// @brief The specialization of conv_limits for 2 byte unsigned integers, e.g., uint16_t.
+template <>
+struct conv_limits<2u, false> : conv_limits_base<2u> {
+ /// with or without sign.
+ static constexpr bool is_signed = false;
+
+ /// max characters for decimals (0..65535) without sign.
+ static constexpr std::size_t max_chars_dec = 5;
+
+ /// string representation of max decimal value.
+ static const char* max_value_chars_dec() noexcept {
+ static constexpr char max_value_chars[] = "65535";
+ return &max_value_chars[0];
+ }
+
+ /// string representation of min decimal value.
+ static const char* min_value_chars_dec() noexcept {
+ static constexpr char min_value_chars[] = "0";
+ return &min_value_chars[0];
+ }
+};
+
+/// @brief The specialization of conv_limits for 4 byte signed integers, e.g., int32_t.
+template <>
+struct conv_limits<4u, true> : conv_limits_base<4u> {
+ /// with or without sign.
+ static constexpr bool is_signed = true;
+
+ /// max characters for decimals (-2147483648..2147483647) without sign.
+ static constexpr std::size_t max_chars_dec = 10;
+
+ /// string representation of max decimal value.
+ static const char* max_value_chars_dec() noexcept {
+ static constexpr char max_value_chars[] = "2147483647";
+ return &max_value_chars[0];
+ }
+
+ /// string representation of min decimal value without sign.
+ static const char* min_value_chars_dec() noexcept {
+ static constexpr char min_value_chars[] = "2147483648";
+ return &min_value_chars[0];
+ }
+};
+
+/// @brief The specialization of conv_limits for 4 byte unsigned integers, e.g., uint32_t.
+template <>
+struct conv_limits<4u, false> : conv_limits_base<4u> {
+ /// with or without sign.
+ static constexpr bool is_signed = false;
+
+ /// max characters for decimals (0..4294967295) without sign.
+ static constexpr std::size_t max_chars_dec = 10;
+
+ /// string representation of max decimal value.
+ static const char* max_value_chars_dec() noexcept {
+ static constexpr char max_value_chars[] = "4294967295";
+ return &max_value_chars[0];
+ }
+
+ /// string representation of min decimal value.
+ static const char* min_value_chars_dec() noexcept {
+ static constexpr char min_value_chars[] = "0";
+ return &min_value_chars[0];
+ }
+};
+
+/// @brief The specialization of conv_limits for 8 byte signed integers, e.g., int64_t.
+template <>
+struct conv_limits<8u, true> : conv_limits_base<8u> {
+ /// with or without sign.
+ static constexpr bool is_signed = true;
+
+ /// max characters for decimals (-9223372036854775808..9223372036854775807) without sign.
+ static constexpr std::size_t max_chars_dec = 19;
+
+ /// string representation of max decimal value.
+ static const char* max_value_chars_dec() noexcept {
+ static constexpr char max_value_chars[] = "9223372036854775807";
+ return &max_value_chars[0];
+ }
+
+ /// string representation of min decimal value without sign.
+ static const char* min_value_chars_dec() noexcept {
+ static constexpr char min_value_chars[] = "9223372036854775808";
+ return &min_value_chars[0];
+ }
+};
+
+/// @brief The specialization of conv_limits for 8 byte unsigned integers, e.g., uint64_t.
+template <>
+struct conv_limits<8u, false> : conv_limits_base<8u> {
+ /// with or without sign.
+ static constexpr bool is_signed = false;
+
+ /// max characters for decimals (0..18446744073709551615) without sign.
+ static constexpr std::size_t max_chars_dec = 20;
+
+ /// string representation of max decimal value.
+ static const char* max_value_chars_dec() noexcept {
+ static constexpr char max_value_chars[] = "18446744073709551615";
+ return &max_value_chars[0];
+ }
+
+ /// string representation of min decimal value.
+ static const char* min_value_chars_dec() noexcept {
+ static constexpr char min_value_chars[] = "0";
+ return &min_value_chars[0];
+ }
+};
+
+//////////////////////////
+// scalar <--> null //
+//////////////////////////
+
+/// @brief Converts a scalar into a null value
+/// @tparam CharItr Type of char iterators. Its value type must be `char` (maybe cv-qualified).
+/// @param begin The iterator to the first element of the scalar.
+/// @param end The iterator to the past-the-end element of the scalar.
+/// @param /*unused*/ The null value holder (unused since it can only have `nullptr`)
+/// @return true if the conversion completes successfully, false otherwise.
+template <typename CharItr>
+inline bool aton(CharItr begin, CharItr end, std::nullptr_t& /*unused*/) noexcept {
+ static_assert(is_iterator_of<CharItr, char>::value, "aton() accepts iterators for char type");
+
+ if FK_YAML_UNLIKELY (begin == end) {
+ return false;
+ }
+
+ const auto len = static_cast<uint32_t>(std::distance(begin, end));
+
+ // This path is the most probable case, so check it first.
+ if FK_YAML_LIKELY (len == 4) {
+ const char* p_begin = &*begin;
+ return (std::strncmp(p_begin, "null", 4) == 0) || (std::strncmp(p_begin, "Null", 4) == 0) ||
+ (std::strncmp(p_begin, "NULL", 4) == 0);
+ }
+
+ if (len == 1) {
+ return *begin == '~';
+ }
+
+ return false;
+}
+
+/////////////////////////////
+// scalar <--> boolean //
+/////////////////////////////
+
+/// @brief Converts a scalar into a boolean value
+/// @tparam CharItr The type of char iterators. Its value type must be `char` (maybe cv-qualified).
+/// @tparam BoolType The output boolean type.
+/// @param begin The iterator to the first element of the scalar.
+/// @param end The iterator to the past-the-end element of the scalar.
+/// @param boolean The boolean value holder.
+/// @return true if the conversion completes successfully, false otherwise.
+template <typename CharItr, typename BoolType>
+inline bool atob(CharItr begin, CharItr end, BoolType& boolean) noexcept {
+ static_assert(is_iterator_of<CharItr, char>::value, "atob() accepts iterators for char type");
+
+ if FK_YAML_UNLIKELY (begin == end) {
+ return false;
+ }
+
+ const auto len = static_cast<uint32_t>(std::distance(begin, end));
+ const char* p_begin = &*begin;
+
+ if (len == 4) {
+ const bool is_true = (std::strncmp(p_begin, "true", 4) == 0) || (std::strncmp(p_begin, "True", 4) == 0) ||
+ (std::strncmp(p_begin, "TRUE", 4) == 0);
+
+ if FK_YAML_LIKELY (is_true) {
+ boolean = static_cast<BoolType>(true);
+ }
+ return is_true;
+ }
+
+ if (len == 5) {
+ const bool is_false = (std::strncmp(p_begin, "false", 5) == 0) || (std::strncmp(p_begin, "False", 5) == 0) ||
+ (std::strncmp(p_begin, "FALSE", 5) == 0);
+
+ if FK_YAML_LIKELY (is_false) {
+ boolean = static_cast<BoolType>(false);
+ }
+ return is_false;
+ }
+
+ return false;
+}
+
+/////////////////////////////
+// scalar <--> integer //
+/////////////////////////////
+
+//
+// scalar --> decimals
+//
+
+/// @brief Converts a scalar into decimals. This is common implementation for both signed/unsigned integer types.
+/// @warning
+/// This function does NOT care about overflows if IntType is unsigned. The source string value must be validated
+/// beforehand by calling either atoi_dec_pos() or atoi_dec_neg() functions.
+/// Furthermore, `p_begin` and `p_end` must NOT be null. Validate them before calling this function.
+/// @tparam IntType The output integer type. It can be either signed or unsigned.
+/// @param p_begin The pointer to the first element of the scalar.
+/// @param p_end The pointer to the past-the-end element of the scalar.
+/// @param i The output integer value holder.
+/// @return true if the conversion completes successfully, false otherwise.
+template <typename IntType>
+inline bool atoi_dec_unchecked(const char* p_begin, const char* p_end, IntType& i) noexcept {
+ static_assert(
+ is_non_bool_integral<IntType>::value,
+ "atoi_dec_unchecked() accepts non-boolean integral types as an output type");
+
+ i = 0;
+ do {
+ const char c = *p_begin;
+ if FK_YAML_UNLIKELY (c < '0' || '9' < c) {
+ return false;
+ }
+ // Overflow is intentional when the IntType is signed.
+ i = i * static_cast<IntType>(10) + static_cast<IntType>(c - '0');
+ } while (++p_begin != p_end);
+
+ return true;
+}
+
+/// @brief Converts a scalar into positive decimals. This function executes bounds check to avoid overflow.
+/// @warning `p_begin` and `p_end` must not be null. Validate them before calling this function.
+/// @tparam IntType The output integer type. It can be either signed or unsigned.
+/// @param p_begin The pointer to the first element of the scalar.
+/// @param p_end The pointer to the past-the-end element of the scalar.
+/// @param i The output integer value holder.
+/// @return true if the conversion completes successfully, false otherwise.
+template <typename IntType>
+inline bool atoi_dec_pos(const char* p_begin, const char* p_end, IntType& i) noexcept {
+ static_assert(
+ is_non_bool_integral<IntType>::value, "atoi_dec_pos() accepts non-boolean integral types as an output type");
+
+ if FK_YAML_UNLIKELY (p_begin == p_end) {
+ return false;
+ }
+
+ using conv_limits_type = conv_limits<sizeof(IntType), std::is_signed<IntType>::value>;
+
+ const auto len = static_cast<std::size_t>(p_end - p_begin);
+ if FK_YAML_UNLIKELY (len > conv_limits_type::max_chars_dec) {
+ // Overflow will happen.
+ return false;
+ }
+
+ if (len == conv_limits_type::max_chars_dec) {
+ const char* p_max_value_chars_dec = conv_limits_type::max_value_chars_dec();
+
+ for (std::size_t idx = 0; idx < conv_limits_type::max_chars_dec; idx++) {
+ if (p_begin[idx] < p_max_value_chars_dec[idx]) {
+ // No need to check the lower digits. Overflow will no longer happen.
+ break;
+ }
+
+ if FK_YAML_UNLIKELY (p_begin[idx] > p_max_value_chars_dec[idx]) {
+ // Overflow will happen.
+ return false;
+ }
+ }
+ }
+
+ return atoi_dec_unchecked(p_begin, p_end, i);
+}
+
+/// @brief Converts a scalar into negative decimals. This function executes bounds check to avoid underflow.
+/// @warning `p_begin` and `p_end` must not be null. Validate them before calling this function.
+/// @tparam IntType The output integer type. It must be signed.
+/// @param p_begin The pointer to the first element of the scalar.
+/// @param p_end The pointer to the past-the-end element of the scalar.
+/// @param i The output integer value holder.
+/// @return true if the conversion completes successfully, false otherwise.
+template <typename IntType>
+inline bool atoi_dec_neg(const char* p_begin, const char* p_end, IntType& i) noexcept {
+ static_assert(
+ is_non_bool_integral<IntType>::value, "atoi_dec_neg() accepts non-boolean integral types as an output type");
+
+ if FK_YAML_UNLIKELY (p_begin == p_end) {
+ return false;
+ }
+
+ using conv_limits_type = conv_limits<sizeof(IntType), std::is_signed<IntType>::value>;
+
+ const auto len = static_cast<std::size_t>(p_end - p_begin);
+ if FK_YAML_UNLIKELY (len > conv_limits_type::max_chars_dec) {
+ // Underflow will happen.
+ return false;
+ }
+
+ if (len == conv_limits_type::max_chars_dec) {
+ const char* p_min_value_chars_dec = conv_limits_type::min_value_chars_dec();
+
+ for (std::size_t idx = 0; idx < conv_limits_type::max_chars_dec; idx++) {
+ if (p_begin[idx] < p_min_value_chars_dec[idx]) {
+ // No need to check the lower digits. Underflow will no longer happen.
+ break;
+ }
+
+ if FK_YAML_UNLIKELY (p_begin[idx] > p_min_value_chars_dec[idx]) {
+ // Underflow will happen.
+ return false;
+ }
+ }
+ }
+
+ return atoi_dec_unchecked(p_begin, p_end, i);
+}
+
+//
+// scalar --> octals
+//
+
+/// @brief Converts a scalar into octals. This function executes bounds check to avoid overflow.
+/// @warning `p_begin` and `p_end` must not be null. Validate them before calling this function.
+/// @tparam IntType The output integer type. It can be either signed or unsigned.
+/// @param p_begin The pointer to the first element of the scalar.
+/// @param p_end The pointer to the past-the-end element of the scalar.
+/// @param i The output integer value holder.
+/// @return true if the conversion completes successfully, false otherwise.
+template <typename IntType>
+inline bool atoi_oct(const char* p_begin, const char* p_end, IntType& i) noexcept {
+ static_assert(
+ is_non_bool_integral<IntType>::value, "atoi_oct() accepts non-boolean integral types as an output type");
+
+ if FK_YAML_UNLIKELY (p_begin == p_end) {
+ return false;
+ }
+
+ using conv_limits_type = conv_limits<sizeof(IntType), std::is_signed<IntType>::value>;
+
+ const auto len = static_cast<std::size_t>(p_end - p_begin);
+ if FK_YAML_UNLIKELY (!conv_limits_type::check_if_octs_safe(p_begin, len)) {
+ return false;
+ }
+
+ i = 0;
+ do {
+ const char c = *p_begin;
+ if FK_YAML_UNLIKELY (c < '0' || '7' < c) {
+ return false;
+ }
+ i = i * static_cast<IntType>(8) + static_cast<IntType>(c - '0');
+ } while (++p_begin != p_end);
+
+ return true;
+}
+
+//
+// scalar --> hexadecimals
+//
+
+/// @brief Converts a scalar into hexadecimals. This function executes bounds check to avoid overflow.
+/// @warning `p_begin` and `p_end` must not be null. Validate them before calling this function.
+/// @tparam IntType The output integer type. It can be either signed or unsigned.
+/// @param p_begin The pointer to the first element of the scalar.
+/// @param p_end The pointer to the past-the-end element of the scalar.
+/// @param i The output integer value holder.
+/// @return true if the conversion completes successfully, false otherwise.
+template <typename IntType>
+inline bool atoi_hex(const char* p_begin, const char* p_end, IntType& i) noexcept {
+ static_assert(
+ is_non_bool_integral<IntType>::value, "atoi_hex() accepts non-boolean integral types as an output type");
+
+ if FK_YAML_UNLIKELY (p_begin == p_end) {
+ return false;
+ }
+
+ using conv_limits_type = conv_limits<sizeof(IntType), std::is_signed<IntType>::value>;
+
+ const auto len = static_cast<std::size_t>(p_end - p_begin);
+ if FK_YAML_UNLIKELY (!conv_limits_type::check_if_hexs_safe(p_begin, len)) {
+ return false;
+ }
+
+ i = 0;
+ do {
+ // NOLINTBEGIN(bugprone-misplaced-widening-cast)
+ const char c = *p_begin;
+ IntType ci = 0;
+ if ('0' <= c && c <= '9') {
+ ci = static_cast<IntType>(c - '0');
+ }
+ else if ('A' <= c && c <= 'F') {
+ ci = static_cast<IntType>(c - 'A' + 10);
+ }
+ else if ('a' <= c && c <= 'f') {
+ ci = static_cast<IntType>(c - 'a' + 10);
+ }
+ else {
+ return false;
+ }
+ i = i * static_cast<IntType>(16) + ci;
+ // NOLINTEND(bugprone-misplaced-widening-cast)
+ } while (++p_begin != p_end);
+
+ return true;
+}
+
+//
+// atoi() & itoa()
+//
+
+/// @brief Converts a scalar into integers. This function executes bounds check to avoid overflow/underflow.
+/// @tparam CharItr The type of char iterators. Its value type must be char (maybe cv-qualified).
+/// @tparam IntType The output integer type. It can be either signed or unsigned.
+/// @param begin The iterator to the first element of the scalar.
+/// @param end The iterator to the past-the-end element of the scalar.
+/// @param i The output integer value holder.
+/// @return true if the conversion completes successfully, false otherwise.
+template <typename CharItr, typename IntType>
+inline bool atoi(CharItr begin, CharItr end, IntType& i) noexcept {
+ static_assert(is_iterator_of<CharItr, char>::value, "atoi() accepts iterators for char type");
+ static_assert(is_non_bool_integral<IntType>::value, "atoi() accepts non-boolean integral types as an output type");
+
+ if FK_YAML_UNLIKELY (begin == end) {
+ return false;
+ }
+
+ const auto len = static_cast<uint32_t>(std::distance(begin, end));
+ const char* p_begin = &*begin;
+ const char* p_end = p_begin + len;
+
+ const char first = *begin;
+ if (first == '+') {
+ return atoi_dec_pos(p_begin + 1, p_end, i);
+ }
+
+ if (first == '-') {
+ if (!std::numeric_limits<IntType>::is_signed) {
+ return false;
+ }
+
+ const bool success = atoi_dec_neg(p_begin + 1, p_end, i);
+ if (success) {
+ i *= static_cast<IntType>(-1);
+ }
+
+ return success;
+ }
+
+ if (first != '0') {
+ return atoi_dec_pos(p_begin, p_end, i);
+ }
+
+ if (p_begin + 1 != p_end) {
+ switch (*(p_begin + 1)) {
+ case 'o':
+ return atoi_oct(p_begin + 2, p_end, i);
+ case 'x':
+ return atoi_hex(p_begin + 2, p_end, i);
+ default:
+ // The YAML spec doesn't allow decimals starting with 0.
+ return false;
+ }
+ }
+
+ i = 0;
+ return true;
+}
+
+///////////////////////////
+// scalar <--> float //
+///////////////////////////
+
+/// @brief Set an infinite `float` value based on the given signedness.
+/// @param f The output `float` value holder.
+/// @param sign Whether the infinite value should be positive or negative.
+inline void set_infinity(float& f, const float sign) noexcept {
+ f = std::numeric_limits<float>::infinity() * sign;
+}
+
+/// @brief Set an infinite `double` value based on the given signedness.
+/// @param f The output `double` value holder.
+/// @param sign Whether the infinite value should be positive or negative.
+inline void set_infinity(double& f, const double sign) noexcept {
+ f = std::numeric_limits<double>::infinity() * sign;
+}
+
+/// @brief Set a NaN `float` value.
+/// @param f The output `float` value holder.
+inline void set_nan(float& f) noexcept {
+ f = std::nanf("");
+}
+
+/// @brief Set a NaN `double` value.
+/// @param f The output `double` value holder.
+inline void set_nan(double& f) noexcept {
+ f = std::nan("");
+}
+
+#if FK_YAML_HAS_TO_CHARS
+
+/// @brief Converts a scalar into a floating point value.
+/// @warning `p_begin` and `p_end` must not be null. Validate them before calling this function.
+/// @param p_begin The pointer to the first element of the scalar.
+/// @param p_end The pointer to the past-the-end element of the scalar.
+/// @param f The output floating point value holder.
+/// @return true if the conversion completes successfully, false otherwise.
+template <typename FloatType>
+inline bool atof_impl(const char* p_begin, const char* p_end, FloatType& f) noexcept {
+ static_assert(std::is_floating_point_v<FloatType>, "atof_impl() accepts floating point types as an output type");
+ if (auto [ptr, ec] = std::from_chars(p_begin, p_end, f); ec == std::errc {}) {
+ return ptr == p_end;
+ }
+ return false;
+}
+
+#else
+
+/// @brief Converts a scalar into a `float` value.
+/// @warning `p_begin` and `p_end` must not be null. Validate them before calling this function.
+/// @param p_begin The pointer to the first element of the scalar.
+/// @param p_end The pointer to the past-the-end element of the scalar.
+/// @param f The output `float` value holder.
+/// @return true if the conversion completes successfully, false otherwise.
+inline bool atof_impl(const char* p_begin, const char* p_end, float& f) {
+ std::size_t idx = 0;
+ f = std::stof(std::string(p_begin, p_end), &idx);
+ return idx == static_cast<std::size_t>(p_end - p_begin);
+}
+
+/// @brief Converts a scalar into a `double` value.
+/// @warning `p_begin` and `p_end` must not be null. Validate them before calling this function.
+/// @param p_begin The pointer to the first element of the scalar.
+/// @param p_end The pointer to the past-the-end element of the scalar.
+/// @param f The output `double` value holder.
+/// @return true if the conversion completes successfully, false otherwise.
+inline bool atof_impl(const char* p_begin, const char* p_end, double& f) {
+ std::size_t idx = 0;
+ f = std::stod(std::string(p_begin, p_end), &idx);
+ return idx == static_cast<std::size_t>(p_end - p_begin);
+}
+
+#endif // FK_YAML_HAS_TO_CHARS
+
+/// @brief Converts a scalar into a floating point value.
+/// @tparam CharItr The type of char iterators. Its value type must be char (maybe cv-qualified).
+/// @tparam FloatType The output floating point value type.
+/// @param begin The iterator to the first element of the scalar.
+/// @param end The iterator to the past-the-end element of the scalar.
+/// @param f The output floating point value holder.
+/// @return true if the conversion completes successfully, false otherwise.
+template <typename CharItr, typename FloatType>
+inline bool atof(CharItr begin, CharItr end, FloatType& f) noexcept(noexcept(atof_impl(&*begin, &*begin, f))) {
+ static_assert(is_iterator_of<CharItr, char>::value, "atof() accepts iterators for char type");
+ static_assert(std::is_floating_point<FloatType>::value, "atof() accepts floating point types as an output type");
+
+ if FK_YAML_UNLIKELY (begin == end) {
+ return false;
+ }
+
+ const auto len = static_cast<uint32_t>(std::distance(begin, end));
+ const char* p_begin = &*begin;
+ const char* p_end = p_begin + len;
+
+ if (*p_begin == '-' || *p_begin == '+') {
+ if (len == 5) {
+ const char* p_from_second = p_begin + 1;
+ const bool is_inf = (std::strncmp(p_from_second, ".inf", 4) == 0) ||
+ (std::strncmp(p_from_second, ".Inf", 4) == 0) ||
+ (std::strncmp(p_from_second, ".INF", 4) == 0);
+ if (is_inf) {
+ set_infinity(f, *p_begin == '-' ? static_cast<FloatType>(-1.) : static_cast<FloatType>(1.));
+ return true;
+ }
+ }
+
+ if (*p_begin == '+') {
+ // Skip the positive sign since it's sometimes not recognized as part of float value.
+ ++p_begin;
+ }
+ }
+ else if (len == 4) {
+ const bool is_inf = (std::strncmp(p_begin, ".inf", 4) == 0) || (std::strncmp(p_begin, ".Inf", 4) == 0) ||
+ (std::strncmp(p_begin, ".INF", 4) == 0);
+ if (is_inf) {
+ set_infinity(f, static_cast<FloatType>(1.));
+ return true;
+ }
+
+ const bool is_nan = (std::strncmp(p_begin, ".nan", 4) == 0) || (std::strncmp(p_begin, ".NaN", 4) == 0) ||
+ (std::strncmp(p_begin, ".NAN", 4) == 0);
+ if (is_nan) {
+ set_nan(f);
+ return true;
+ }
+ }
+
+#if FK_YAML_HAS_TO_CHARS
+ return atof_impl(p_begin, p_end, f);
+#else
+ bool success = false;
+ try {
+ success = atof_impl(p_begin, p_end, f);
+ }
+ catch (const std::exception& /*unused*/) {
+ success = false;
+ }
+
+ return success;
+#endif
+}
+
+FK_YAML_DETAIL_NAMESPACE_END
+
+#endif /* FK_YAML_CONVERSIONS_SCALAR_CONV_HPP */
+
+// #include <fkYAML/detail/encodings/yaml_escaper.hpp>
+// _______ __ __ __ _____ __ __ __
+// | __| |_/ | \_/ |/ _ \ / \/ \| | fkYAML: A C++ header-only YAML library
+// | __| _ < \_ _/| ___ | _ | |___ version 0.4.2
+// |__| |_| \__| |_| |_| |_|___||___|______| https://github.com/fktn-k/fkYAML
+//
+// SPDX-FileCopyrightText: 2023-2025 Kensuke Fukutani <fktn.dev@gmail.com>
+// SPDX-License-Identifier: MIT
+
+#ifndef FK_YAML_DETAIL_ENCODINGS_YAML_ESCAPER_HPP
+#define FK_YAML_DETAIL_ENCODINGS_YAML_ESCAPER_HPP
+
+#include <string>
+
+// #include <fkYAML/detail/macros/define_macros.hpp>
+
+// #include <fkYAML/detail/assert.hpp>
+
+// #include <fkYAML/detail/encodings/utf_encodings.hpp>
+
+// #include <fkYAML/exception.hpp>
+
+
+FK_YAML_DETAIL_NAMESPACE_BEGIN
+
+class yaml_escaper {
+ using iterator = ::std::string::const_iterator;
+
+public:
+ static bool unescape(const char*& begin, const char* end, std::string& buff) {
+ FK_YAML_ASSERT(*begin == '\\' && std::distance(begin, end) > 0);
+ bool ret = true;
+
+ switch (*++begin) {
+ case 'a':
+ buff.push_back('\a');
+ break;
+ case 'b':
+ buff.push_back('\b');
+ break;
+ case 't':
+ case '\t':
+ buff.push_back('\t');
+ break;
+ case 'n':
+ buff.push_back('\n');
+ break;
+ case 'v':
+ buff.push_back('\v');
+ break;
+ case 'f':
+ buff.push_back('\f');
+ break;
+ case 'r':
+ buff.push_back('\r');
+ break;
+ case 'e':
+ buff.push_back(static_cast<char>(0x1B));
+ break;
+ case ' ':
+ buff.push_back(' ');
+ break;
+ case '\"':
+ buff.push_back('\"');
+ break;
+ case '/':
+ buff.push_back('/');
+ break;
+ case '\\':
+ buff.push_back('\\');
+ break;
+ case 'N': // next line
+ unescape_escaped_unicode(0x85u, buff);
+ break;
+ case '_': // non-breaking space
+ unescape_escaped_unicode(0xA0u, buff);
+ break;
+ case 'L': // line separator
+ unescape_escaped_unicode(0x2028u, buff);
+ break;
+ case 'P': // paragraph separator
+ unescape_escaped_unicode(0x2029u, buff);
+ break;
+ case 'x': {
+ char32_t codepoint {0};
+ ret = extract_codepoint(begin, end, 1, codepoint);
+ if FK_YAML_LIKELY (ret) {
+ unescape_escaped_unicode(codepoint, buff);
+ }
+ break;
+ }
+ case 'u': {
+ char32_t codepoint {0};
+ ret = extract_codepoint(begin, end, 2, codepoint);
+ if FK_YAML_LIKELY (ret) {
+ unescape_escaped_unicode(codepoint, buff);
+ }
+ break;
+ }
+ case 'U': {
+ char32_t codepoint {0};
+ ret = extract_codepoint(begin, end, 4, codepoint);
+ if FK_YAML_LIKELY (ret) {
+ unescape_escaped_unicode(codepoint, buff);
+ }
+ break;
+ }
+ default:
+ // Unsupported escape sequence is found in a string token.
+ ret = false;
+ break;
+ }
+
+ return ret;
+ }
+
+ static ::std::string escape(const char* begin, const char* end, bool& is_escaped) {
+ ::std::string escaped {};
+ escaped.reserve(std::distance(begin, end));
+ for (; begin != end; ++begin) {
+ switch (*begin) {
+ case 0x01:
+ escaped += "\\u0001";
+ is_escaped = true;
+ break;
+ case 0x02:
+ escaped += "\\u0002";
+ is_escaped = true;
+ break;
+ case 0x03:
+ escaped += "\\u0003";
+ is_escaped = true;
+ break;
+ case 0x04:
+ escaped += "\\u0004";
+ is_escaped = true;
+ break;
+ case 0x05:
+ escaped += "\\u0005";
+ is_escaped = true;
+ break;
+ case 0x06:
+ escaped += "\\u0006";
+ is_escaped = true;
+ break;
+ case '\a':
+ escaped += "\\a";
+ is_escaped = true;
+ break;
+ case '\b':
+ escaped += "\\b";
+ is_escaped = true;
+ break;
+ case '\t':
+ escaped += "\\t";
+ is_escaped = true;
+ break;
+ case '\n':
+ escaped += "\\n";
+ is_escaped = true;
+ break;
+ case '\v':
+ escaped += "\\v";
+ is_escaped = true;
+ break;
+ case '\f':
+ escaped += "\\f";
+ is_escaped = true;
+ break;
+ case '\r':
+ escaped += "\\r";
+ is_escaped = true;
+ break;
+ case 0x0E:
+ escaped += "\\u000E";
+ is_escaped = true;
+ break;
+ case 0x0F:
+ escaped += "\\u000F";
+ is_escaped = true;
+ break;
+ case 0x10:
+ escaped += "\\u0010";
+ is_escaped = true;
+ break;
+ case 0x11:
+ escaped += "\\u0011";
+ is_escaped = true;
+ break;
+ case 0x12:
+ escaped += "\\u0012";
+ is_escaped = true;
+ break;
+ case 0x13:
+ escaped += "\\u0013";
+ is_escaped = true;
+ break;
+ case 0x14:
+ escaped += "\\u0014";
+ is_escaped = true;
+ break;
+ case 0x15:
+ escaped += "\\u0015";
+ is_escaped = true;
+ break;
+ case 0x16:
+ escaped += "\\u0016";
+ is_escaped = true;
+ break;
+ case 0x17:
+ escaped += "\\u0017";
+ is_escaped = true;
+ break;
+ case 0x18:
+ escaped += "\\u0018";
+ is_escaped = true;
+ break;
+ case 0x19:
+ escaped += "\\u0019";
+ is_escaped = true;
+ break;
+ case 0x1A:
+ escaped += "\\u001A";
+ is_escaped = true;
+ break;
+ case 0x1B:
+ escaped += "\\e";
+ is_escaped = true;
+ break;
+ case 0x1C:
+ escaped += "\\u001C";
+ is_escaped = true;
+ break;
+ case 0x1D:
+ escaped += "\\u001D";
+ is_escaped = true;
+ break;
+ case 0x1E:
+ escaped += "\\u001E";
+ is_escaped = true;
+ break;
+ case 0x1F:
+ escaped += "\\u001F";
+ is_escaped = true;
+ break;
+ case '\"':
+ escaped += "\\\"";
+ is_escaped = true;
+ break;
+ case '\\':
+ escaped += "\\\\";
+ is_escaped = true;
+ break;
+ default:
+ const std::ptrdiff_t diff = static_cast<int>(std::distance(begin, end));
+ if (diff > 1) {
+ if (*begin == static_cast<char>(0xC2u) && *(begin + 1) == static_cast<char>(0x85u)) {
+ escaped += "\\N";
+ std::advance(begin, 1);
+ is_escaped = true;
+ break;
+ }
+ if (*begin == static_cast<char>(0xC2u) && *(begin + 1) == static_cast<char>(0xA0u)) {
+ escaped += "\\_";
+ std::advance(begin, 1);
+ is_escaped = true;
+ break;
+ }
+
+ if (diff > 2) {
+ if (*begin == static_cast<char>(0xE2u) && *(begin + 1) == static_cast<char>(0x80u) &&
+ *(begin + 2) == static_cast<char>(0xA8u)) {
+ escaped += "\\L";
+ std::advance(begin, 2);
+ is_escaped = true;
+ break;
+ }
+ if (*begin == static_cast<char>(0xE2u) && *(begin + 1) == static_cast<char>(0x80u) &&
+ *(begin + 2) == static_cast<char>(0xA9u)) {
+ escaped += "\\P";
+ std::advance(begin, 2);
+ is_escaped = true;
+ break;
+ }
+ }
+ }
+ escaped += *begin;
+ break;
+ }
+ }
+ return escaped;
+ } // LCOV_EXCL_LINE
+
+private:
+ static bool convert_hexchar_to_byte(char source, uint8_t& byte) {
+ if ('0' <= source && source <= '9') {
+ // NOLINTNEXTLINE(bugprone-narrowing-conversions,cppcoreguidelines-narrowing-conversions)
+ byte = static_cast<uint8_t>(source - '0');
+ return true;
+ }
+
+ if ('A' <= source && source <= 'F') {
+ // NOLINTNEXTLINE(bugprone-narrowing-conversions,cppcoreguidelines-narrowing-conversions)
+ byte = static_cast<uint8_t>(source - 'A' + 10);
+ return true;
+ }
+
+ if ('a' <= source && source <= 'f') {
+ // NOLINTNEXTLINE(bugprone-narrowing-conversions,cppcoreguidelines-narrowing-conversions)
+ byte = static_cast<uint8_t>(source - 'a' + 10);
+ return true;
+ }
+
+ // The given character is not hexadecimal.
+ return false;
+ }
+
+ static bool extract_codepoint(const char*& begin, const char* end, int bytes_to_read, char32_t& codepoint) {
+ const bool has_enough_room = static_cast<int>(std::distance(begin, end)) >= (bytes_to_read - 1);
+ if (!has_enough_room) {
+ return false;
+ }
+
+ const int read_size = bytes_to_read * 2;
+ uint8_t byte {0};
+ codepoint = 0;
+
+ for (int i = read_size - 1; i >= 0; i--) {
+ const bool is_valid = convert_hexchar_to_byte(*++begin, byte);
+ if (!is_valid) {
+ return false;
+ }
+ // NOLINTNEXTLINE(bugprone-narrowing-conversions,cppcoreguidelines-narrowing-conversions)
+ codepoint |= static_cast<char32_t>(byte << (4 * i));
+ }
+
+ return true;
+ }
+
+ static void unescape_escaped_unicode(char32_t codepoint, std::string& buff) {
+ // the inner curly braces are necessary to build with older compilers.
+ std::array<uint8_t, 4> encode_buff {{}};
+ uint32_t encoded_size {0};
+ utf8::from_utf32(codepoint, encode_buff, encoded_size);
+ buff.append(reinterpret_cast<char*>(encode_buff.data()), encoded_size);
+ }
+};
+
+FK_YAML_DETAIL_NAMESPACE_END
+
+#endif /* FK_YAML_DETAIL_ENCODINGS_YAML_ESCAPER_HPP */
+
+// #include <fkYAML/detail/input/block_scalar_header.hpp>
+
+// #include <fkYAML/detail/input/scalar_scanner.hpp>
+// _______ __ __ __ _____ __ __ __
+// | __| |_/ | \_/ |/ _ \ / \/ \| | fkYAML: A C++ header-only YAML library
+// | __| _ < \_ _/| ___ | _ | |___ version 0.4.2
+// |__| |_| \__| |_| |_| |_|___||___|______| https://github.com/fktn-k/fkYAML
+//
+// SPDX-FileCopyrightText: 2023-2025 Kensuke Fukutani <fktn.dev@gmail.com>
+// SPDX-License-Identifier: MIT
+
+#ifndef FK_YAML_DETAIL_INPUT_SCALAR_SCANNER_HPP
+#define FK_YAML_DETAIL_INPUT_SCALAR_SCANNER_HPP
+
+#include <cstring>
+#include <string>
+
+// #include <fkYAML/detail/macros/define_macros.hpp>
+
+// #include <fkYAML/detail/assert.hpp>
+
+// #include <fkYAML/node_type.hpp>
+
+
+FK_YAML_DETAIL_NAMESPACE_BEGIN
+
+/// @brief The class which detects a scalar value type by scanning contents.
+class scalar_scanner {
+public:
+ /// @brief Detects a scalar value type by scanning the contents ranged by the given iterators.
+ /// @param begin The iterator to the first element of the scalar.
+ /// @param end The iterator to the past-the-end element of the scalar.
+ /// @return A detected scalar value type.
+ static node_type scan(const char* begin, const char* end) noexcept {
+ if (begin == end) {
+ return node_type::STRING;
+ }
+
+ const auto len = static_cast<uint32_t>(std::distance(begin, end));
+ if (len > 5) {
+ return scan_possible_number_token(begin, len);
+ }
+
+ const char* p_begin = &*begin;
+
+ switch (len) {
+ case 1:
+ if (*p_begin == '~') {
+ return node_type::NULL_OBJECT;
+ }
+ break;
+ case 4:
+ switch (*p_begin) {
+ case 'n':
+ // no possible case of begin a number otherwise.
+ return (std::strncmp(p_begin + 1, "ull", 3) == 0) ? node_type::NULL_OBJECT : node_type::STRING;
+ case 'N':
+ // no possible case of begin a number otherwise.
+ return ((std::strncmp(p_begin + 1, "ull", 3) == 0) || (std::strncmp(p_begin + 1, "ULL", 3) == 0))
+ ? node_type::NULL_OBJECT
+ : node_type::STRING;
+ case 't':
+ // no possible case of being a number otherwise.
+ return (std::strncmp(p_begin + 1, "rue", 3) == 0) ? node_type::BOOLEAN : node_type::STRING;
+ case 'T':
+ // no possible case of being a number otherwise.
+ return ((std::strncmp(p_begin + 1, "rue", 3) == 0) || (std::strncmp(p_begin + 1, "RUE", 3) == 0))
+ ? node_type::BOOLEAN
+ : node_type::STRING;
+ case '.': {
+ const char* p_from_second = p_begin + 1;
+ const bool is_inf_or_nan_scalar =
+ (std::strncmp(p_from_second, "inf", 3) == 0) || (std::strncmp(p_from_second, "Inf", 3) == 0) ||
+ (std::strncmp(p_from_second, "INF", 3) == 0) || (std::strncmp(p_from_second, "nan", 3) == 0) ||
+ (std::strncmp(p_from_second, "NaN", 3) == 0) || (std::strncmp(p_from_second, "NAN", 3) == 0);
+ if (is_inf_or_nan_scalar) {
+ return node_type::FLOAT;
+ }
+ // maybe a number.
+ break;
+ }
+ default:
+ break;
+ }
+ break;
+ case 5:
+ switch (*p_begin) {
+ case 'f':
+ // no possible case of being a number otherwise.
+ return (std::strncmp(p_begin + 1, "alse", 4) == 0) ? node_type::BOOLEAN : node_type::STRING;
+ case 'F':
+ // no possible case of being a number otherwise.
+ return ((std::strncmp(p_begin + 1, "alse", 4) == 0) || (std::strncmp(p_begin + 1, "ALSE", 4) == 0))
+ ? node_type::BOOLEAN
+ : node_type::STRING;
+ case '+':
+ case '-':
+ if (*(p_begin + 1) == '.') {
+ const char* p_from_third = p_begin + 2;
+ const bool is_min_inf = (std::strncmp(p_from_third, "inf", 3) == 0) ||
+ (std::strncmp(p_from_third, "Inf", 3) == 0) ||
+ (std::strncmp(p_from_third, "INF", 3) == 0);
+ if (is_min_inf) {
+ return node_type::FLOAT;
+ }
+ }
+ // maybe a number.
+ break;
+ default:
+ break;
+ }
+ break;
+ default:
+ break;
+ }
+
+ return scan_possible_number_token(begin, len);
+ }
+
+private:
+ /// @brief Detects a scalar value type from the contents (possibly an integer or a floating-point value).
+ /// @param itr The iterator to the first element of the scalar.
+ /// @param len The length of the scalar contents.
+ /// @return A detected scalar value type.
+ static node_type scan_possible_number_token(const char* itr, uint32_t len) noexcept {
+ FK_YAML_ASSERT(len > 0);
+
+ switch (*itr) {
+ case '-':
+ return (len > 1) ? scan_negative_number(++itr, --len) : node_type::STRING;
+ case '+':
+ return (len > 1) ? scan_decimal_number(++itr, --len) : node_type::STRING;
+ case '.':
+ // some integer(s) required after the decimal point as a floating point value.
+ return (len > 1) ? scan_after_decimal_point(++itr, --len) : node_type::STRING;
+ case '0':
+ return (len > 1) ? scan_after_zero_at_first(++itr, --len) : node_type::INTEGER;
+ case '1':
+ case '2':
+ case '3':
+ case '4':
+ case '5':
+ case '6':
+ case '7':
+ case '8':
+ case '9':
+ return (len > 1) ? scan_decimal_number(++itr, --len) : node_type::INTEGER;
+ default:
+ return node_type::STRING;
+ }
+ }
+
+ /// @brief Detects a scalar value type by scanning the contents right after the negative sign.
+ /// @param itr The iterator to the past-the-negative-sign element of the scalar.
+ /// @param len The length of the scalar contents left unscanned.
+ /// @return A detected scalar value type.
+ static node_type scan_negative_number(const char* itr, uint32_t len) noexcept {
+ FK_YAML_ASSERT(len > 0);
+
+ if (is_digit(*itr)) {
+ return (len > 1) ? scan_decimal_number(++itr, --len) : node_type::INTEGER;
+ }
+
+ if (*itr == '.') {
+ // some integer(s) required after "-." as a floating point value.
+ return (len > 1) ? scan_after_decimal_point(++itr, --len) : node_type::STRING;
+ }
+
+ return node_type::STRING;
+ }
+
+ /// @brief Detects a scalar value type by scanning the contents right after the beginning 0.
+ /// @param itr The iterator to the past-the-zero element of the scalar.
+ /// @param len The length of the scalar left unscanned.
+ /// @return A detected scalar value type.
+ static node_type scan_after_zero_at_first(const char* itr, uint32_t len) noexcept {
+ FK_YAML_ASSERT(len > 0);
+
+ if (is_digit(*itr)) {
+ // a token consisting of the beginning '0' and some following numbers, e.g., `0123`, is not an integer
+ // according to https://yaml.org/spec/1.2.2/#10213-integer.
+ return node_type::STRING;
+ }
+
+ switch (*itr) {
+ case '.':
+ // 0 can be omitted after `0.`.
+ return (len > 1) ? scan_after_decimal_point(++itr, --len) : node_type::FLOAT;
+ case 'e':
+ case 'E':
+ // some integer(s) required after the exponent sign as a floating point value.
+ return (len > 1) ? scan_after_exponent(++itr, --len) : node_type::STRING;
+ case 'o':
+ return (len > 1) ? scan_octal_number(++itr, --len) : node_type::STRING;
+ case 'x':
+ return (len > 1) ? scan_hexadecimal_number(++itr, --len) : node_type::STRING;
+ default:
+ return node_type::STRING;
+ }
+ }
+
+ /// @brief Detects a scalar value type by scanning the contents part starting with a decimal.
+ /// @param itr The iterator to the beginning decimal element of the scalar.
+ /// @param len The length of the scalar left unscanned.
+ /// @return A detected scalar value type.
+ static node_type scan_decimal_number(const char* itr, uint32_t len) noexcept {
+ FK_YAML_ASSERT(len > 0);
+
+ if (is_digit(*itr)) {
+ return (len > 1) ? scan_decimal_number(++itr, --len) : node_type::INTEGER;
+ }
+
+ switch (*itr) {
+ case '.': {
+ // 0 can be omitted after the decimal point
+ return (len > 1) ? scan_after_decimal_point(++itr, --len) : node_type::FLOAT;
+ }
+ case 'e':
+ case 'E':
+ // some integer(s) required after the exponent
+ return (len > 1) ? scan_after_exponent(++itr, --len) : node_type::STRING;
+ default:
+ return node_type::STRING;
+ }
+ }
+
+ /// @brief Detects a scalar value type by scanning the contents right after a decimal point.
+ /// @param itr The iterator to the past-the-decimal-point element of the scalar.
+ /// @param len The length of the scalar left unscanned.
+ /// @return A detected scalar value type.
+ static node_type scan_after_decimal_point(const char* itr, uint32_t len) noexcept {
+ FK_YAML_ASSERT(len > 0);
+
+ for (uint32_t i = 0; i < len; i++) {
+ const char c = *itr++;
+
+ if (is_digit(c)) {
+ continue;
+ }
+
+ if (c == 'e' || c == 'E') {
+ if (i == len - 1) {
+ // some integer(s) required after the exponent
+ return node_type::STRING;
+ }
+ return scan_after_exponent(itr, len - i - 1);
+ }
+
+ return node_type::STRING;
+ }
+
+ return node_type::FLOAT;
+ }
+
+ /// @brief Detects a scalar value type by scanning the contents right after the exponent prefix ("e" or "E").
+ /// @param itr The iterator to the past-the-exponent-prefix element of the scalar.
+ /// @param len The length of the scalar left unscanned.
+ /// @return A detected scalar value type.
+ static node_type scan_after_exponent(const char* itr, uint32_t len) noexcept {
+ FK_YAML_ASSERT(len > 0);
+
+ const char c = *itr;
+ if (c == '+' || c == '-') {
+ if (len == 1) {
+ // some integer(s) required after the sign.
+ return node_type::STRING;
+ }
+ ++itr;
+ --len;
+ }
+
+ for (uint32_t i = 0; i < len; i++) {
+ if (!is_digit(*itr++)) {
+ return node_type::STRING;
+ }
+ }
+
+ return node_type::FLOAT;
+ }
+
+ /// @brief Detects a scalar value type by scanning the contents assuming octal numbers.
+ /// @param itr The iterator to the octal-number element of the scalar.
+ /// @param len The length of the scalar left unscanned.
+ /// @return A detected scalar value type.
+ static node_type scan_octal_number(const char* itr, uint32_t len) noexcept {
+ FK_YAML_ASSERT(len > 0);
+
+ switch (*itr) {
+ case '0':
+ case '1':
+ case '2':
+ case '3':
+ case '4':
+ case '5':
+ case '6':
+ case '7':
+ return (len > 1) ? scan_octal_number(++itr, --len) : node_type::INTEGER;
+ default:
+ return node_type::STRING;
+ }
+ }
+
+ /// @brief Detects a scalar value type by scanning the contents assuming hexadecimal numbers.
+ /// @param itr The iterator to the hexadecimal-number element of the scalar.
+ /// @param len The length of the scalar left unscanned.
+ /// @return A detected scalar value type.
+ static node_type scan_hexadecimal_number(const char* itr, uint32_t len) noexcept {
+ FK_YAML_ASSERT(len > 0);
+
+ if (is_xdigit(*itr)) {
+ return (len > 1) ? scan_hexadecimal_number(++itr, --len) : node_type::INTEGER;
+ }
+ return node_type::STRING;
+ }
+
+ /// @brief Check if the given character is a digit.
+ /// @note This function is needed to avoid assertion failures in `std::isdigit()` especially when compiled with
+ /// MSVC.
+ /// @param c A character to be checked.
+ /// @return true if the given character is a digit, false otherwise.
+ static bool is_digit(char c) {
+ return ('0' <= c && c <= '9');
+ }
+
+ /// @brief Check if the given character is a hex-digit.
+ /// @note This function is needed to avoid assertion failures in `std::isxdigit()` especially when compiled with
+ /// MSVC.
+ /// @param c A character to be checked.
+ /// @return true if the given character is a hex-digit, false otherwise.
+ static bool is_xdigit(char c) {
+ return (('0' <= c && c <= '9') || ('A' <= c && c <= 'F') || ('a' <= c && c <= 'f'));
+ }
+};
+
+FK_YAML_DETAIL_NAMESPACE_END
+
+#endif /* FK_YAML_DETAIL_INPUT_SCALAR_SCANNER_HPP */
+
+// #include <fkYAML/detail/input/tag_t.hpp>
+// _______ __ __ __ _____ __ __ __
+// | __| |_/ | \_/ |/ _ \ / \/ \| | fkYAML: A C++ header-only YAML library
+// | __| _ < \_ _/| ___ | _ | |___ version 0.4.2
+// |__| |_| \__| |_| |_| |_|___||___|______| https://github.com/fktn-k/fkYAML
+//
+// SPDX-FileCopyrightText: 2023-2025 Kensuke Fukutani <fktn.dev@gmail.com>
+// SPDX-License-Identifier: MIT
+
+#ifndef FK_YAML_DETAIL_INPUT_TAG_T_HPP
+#define FK_YAML_DETAIL_INPUT_TAG_T_HPP
+
+#include <cstdint>
+
+// #include <fkYAML/detail/macros/define_macros.hpp>
+
+
+FK_YAML_DETAIL_NAMESPACE_BEGIN
+
+/// @brief Definition of YAML tag types.
+enum class tag_t : std::uint8_t {
+ NONE, //!< Represents a non-specific tag "?".
+ NON_SPECIFIC, //!< Represents a non-specific tag "!".
+ CUSTOM_TAG, //!< Represents a custom tag
+ SEQUENCE, //!< Represents a sequence tag.
+ MAPPING, //!< Represents a mapping tag.
+ NULL_VALUE, //!< Represents a null value tag.
+ BOOLEAN, //!< Represents a boolean tag.
+ INTEGER, //!< Represents an integer type
+ FLOATING_NUMBER, //!< Represents a floating point number tag.
+ STRING, //!< Represents a string tag.
+};
+
+FK_YAML_DETAIL_NAMESPACE_END
+
+#endif /* FK_YAML_DETAIL_INPUT_TAG_T_HPP */
+
+// #include <fkYAML/detail/meta/node_traits.hpp>
+
+// #include <fkYAML/detail/str_view.hpp>
+
+// #include <fkYAML/detail/types/lexical_token_t.hpp>
+
+// #include <fkYAML/exception.hpp>
+
+// #include <fkYAML/node_type.hpp>
+
+
+FK_YAML_DETAIL_NAMESPACE_BEGIN
+
+/// @brief A parser for YAML scalars.
+/// @tparam BasicNodeType A type of the container for parsed YAML scalars.
+template <typename BasicNodeType>
+class scalar_parser {
+ static_assert(is_basic_node<BasicNodeType>::value, "scalar_parser only accepts basic_node<...>");
+
+public:
+ using basic_node_type = BasicNodeType;
+
+private:
+ /** A type for boolean node values. */
+ using boolean_type = typename basic_node_type::boolean_type;
+ /** A type for integer node values. */
+ using integer_type = typename basic_node_type::integer_type;
+ /** A type for floating point node values. */
+ using float_number_type = typename basic_node_type::float_number_type;
+ /** A type for string node values. */
+ using string_type = typename basic_node_type::string_type;
+
+public:
+ /// @brief Constructs a new scalar_parser object.
+ /// @param line Current line.
+ /// @param indent Current indentation.
+ scalar_parser(uint32_t line, uint32_t indent) noexcept
+ : m_line(line),
+ m_indent(indent) {
+ }
+
+ /// @brief Destroys a scalar_parser object.
+ ~scalar_parser() noexcept = default;
+
+ // std::string's copy constructor/assignment operator may throw a exception.
+ scalar_parser(const scalar_parser&) = default;
+ scalar_parser& operator=(const scalar_parser&) = default;
+
+ scalar_parser(scalar_parser&&) noexcept = default;
+ scalar_parser& operator=(scalar_parser&&) noexcept(std::is_nothrow_move_assignable<std::string>::value) = default;
+
+ /// @brief Parses a token into a flow scalar (either plain, single quoted or double quoted)
+ /// @param lex_type Lexical token type for the scalar.
+ /// @param tag_type Tag type for the scalar.
+ /// @param token Scalar contents.
+ /// @return Parsed YAML flow scalar object.
+ basic_node_type parse_flow(lexical_token_t lex_type, tag_t tag_type, str_view token) {
+ FK_YAML_ASSERT(
+ lex_type == lexical_token_t::PLAIN_SCALAR || lex_type == lexical_token_t::SINGLE_QUOTED_SCALAR ||
+ lex_type == lexical_token_t::DOUBLE_QUOTED_SCALAR);
+ FK_YAML_ASSERT(tag_type != tag_t::SEQUENCE && tag_type != tag_t::MAPPING);
+
+ token = parse_flow_scalar_token(lex_type, token);
+ const node_type value_type = decide_value_type(lex_type, tag_type, token);
+ return create_scalar_node(value_type, tag_type, token);
+ }
+
+ /// @brief Parses a token into a block scalar (either literal or folded)
+ /// @param lex_type Lexical token type for the scalar.
+ /// @param tag_type Tag type for the scalar.
+ /// @param token Scalar contents.
+ /// @param header Block scalar header information.
+ /// @return Parsed YAML block scalar object.
+ basic_node_type parse_block(
+ lexical_token_t lex_type, tag_t tag_type, str_view token, const block_scalar_header& header) {
+ FK_YAML_ASSERT(
+ lex_type == lexical_token_t::BLOCK_LITERAL_SCALAR || lex_type == lexical_token_t::BLOCK_FOLDED_SCALAR);
+ FK_YAML_ASSERT(tag_type != tag_t::SEQUENCE && tag_type != tag_t::MAPPING);
+
+ if (lex_type == lexical_token_t::BLOCK_LITERAL_SCALAR) {
+ token = parse_block_literal_scalar(token, header);
+ }
+ else {
+ token = parse_block_folded_scalar(token, header);
+ }
+
+ const node_type value_type = decide_value_type(lex_type, tag_type, token);
+ return create_scalar_node(value_type, tag_type, token);
+ }
+
+private:
+ /// @brief Parses a token into a flow scalar contents.
+ /// @param lex_type Lexical token type for the scalar.
+ /// @param token Scalar contents.
+ /// @return View into the parsed scalar contents.
+ str_view parse_flow_scalar_token(lexical_token_t lex_type, str_view token) {
+ switch (lex_type) {
+ case lexical_token_t::PLAIN_SCALAR:
+ token = parse_plain_scalar(token);
+ break;
+ case lexical_token_t::SINGLE_QUOTED_SCALAR:
+ token = parse_single_quoted_scalar(token);
+ break;
+ case lexical_token_t::DOUBLE_QUOTED_SCALAR:
+ token = parse_double_quoted_scalar(token);
+ break;
+ default: // LCOV_EXCL_LINE
+ unreachable(); // LCOV_EXCL_LINE
+ }
+
+ return token;
+ }
+
+ /// @brief Parses plain scalar contents.
+ /// @param token Scalar contents.
+ /// @return View into the parsed scalar contents.
+ str_view parse_plain_scalar(str_view token) noexcept {
+ // plain scalars cannot be empty.
+ FK_YAML_ASSERT(!token.empty());
+
+ std::size_t newline_pos = token.find('\n');
+ if (newline_pos == str_view::npos) {
+ return token;
+ }
+
+ m_use_owned_buffer = true;
+
+ if (m_buffer.capacity() < token.size()) {
+ m_buffer.reserve(token.size());
+ }
+
+ do {
+ process_line_folding(token, newline_pos);
+ newline_pos = token.find('\n');
+ } while (newline_pos != str_view::npos);
+
+ m_buffer.append(token.begin(), token.size());
+
+ return {m_buffer};
+ }
+
+ /// @brief Parses single quoted scalar contents.
+ /// @param token Scalar contents.
+ /// @return View into the parsed scalar contents.
+ str_view parse_single_quoted_scalar(str_view token) noexcept {
+ if (token.empty()) {
+ return token;
+ }
+
+ constexpr str_view filter {"\'\n"};
+ std::size_t pos = token.find_first_of(filter);
+ if (pos == str_view::npos) {
+ return token;
+ }
+
+ m_use_owned_buffer = true;
+
+ if (m_buffer.capacity() < token.size()) {
+ m_buffer.reserve(token.size());
+ }
+
+ do {
+ FK_YAML_ASSERT(pos < token.size());
+ FK_YAML_ASSERT(token[pos] == '\'' || token[pos] == '\n');
+
+ if (token[pos] == '\'') {
+ // unescape escaped single quote. ('' -> ')
+ FK_YAML_ASSERT(pos + 1 < token.size());
+ m_buffer.append(token.begin(), token.begin() + (pos + 1));
+ token.remove_prefix(pos + 2); // move next to the escaped single quote.
+ }
+ else {
+ process_line_folding(token, pos);
+ }
+
+ pos = token.find_first_of(filter);
+ } while (pos != str_view::npos);
+
+ if (!token.empty()) {
+ m_buffer.append(token.begin(), token.size());
+ }
+
+ return {m_buffer};
+ }
+
+ /// @brief Parses double quoted scalar contents.
+ /// @param token Scalar contents.
+ /// @return View into the parsed scalar contents.
+ str_view parse_double_quoted_scalar(str_view token) {
+ if (token.empty()) {
+ return token;
+ }
+
+ constexpr str_view filter {"\\\n"};
+ std::size_t pos = token.find_first_of(filter);
+ if (pos == str_view::npos) {
+ return token;
+ }
+
+ m_use_owned_buffer = true;
+
+ if (m_buffer.capacity() < token.size()) {
+ m_buffer.reserve(token.size());
+ }
+
+ do {
+ FK_YAML_ASSERT(pos < token.size());
+ FK_YAML_ASSERT(token[pos] == '\\' || token[pos] == '\n');
+
+ if (token[pos] == '\\') {
+ FK_YAML_ASSERT(pos + 1 < token.size());
+ m_buffer.append(token.begin(), token.begin() + pos);
+
+ if (token[pos + 1] != '\n') {
+ token.remove_prefix(pos);
+ const char* p_escape_begin = token.begin();
+ const bool is_valid_escaping = yaml_escaper::unescape(p_escape_begin, token.end(), m_buffer);
+ if FK_YAML_UNLIKELY (!is_valid_escaping) {
+ throw parse_error(
+ "Unsupported escape sequence is found in a double quoted scalar.", m_line, m_indent);
+ }
+
+ // `p_escape_begin` points to the last element of the escape sequence.
+ token.remove_prefix((p_escape_begin - token.begin()) + 1);
+ }
+ else {
+ std::size_t non_space_pos = token.find_first_not_of(" \t", pos + 2);
+ if (non_space_pos == str_view::npos) {
+ non_space_pos = token.size();
+ }
+ token.remove_prefix(non_space_pos);
+ }
+ }
+ else {
+ process_line_folding(token, pos);
+ }
+
+ pos = token.find_first_of(filter);
+ } while (pos != str_view::npos);
+
+ if (!token.empty()) {
+ m_buffer.append(token.begin(), token.size());
+ }
+
+ return {m_buffer};
+ }
+
+ /// @brief Parses block literal scalar contents.
+ /// @param token Scalar contents.
+ /// @param header Block scalar header information.
+ /// @return View into the parsed scalar contents.
+ str_view parse_block_literal_scalar(str_view token, const block_scalar_header& header) {
+ if FK_YAML_UNLIKELY (token.empty()) {
+ return token;
+ }
+
+ m_use_owned_buffer = true;
+ m_buffer.reserve(token.size());
+
+ std::size_t cur_line_begin_pos = 0;
+ do {
+ bool has_newline_at_end = true;
+ std::size_t cur_line_end_pos = token.find('\n', cur_line_begin_pos);
+ if (cur_line_end_pos == str_view::npos) {
+ has_newline_at_end = false;
+ cur_line_end_pos = token.size();
+ }
+
+ const std::size_t line_size = cur_line_end_pos - cur_line_begin_pos;
+ const str_view line = token.substr(cur_line_begin_pos, line_size);
+
+ if (line.size() > header.indent) {
+ m_buffer.append(line.begin() + header.indent, line.end());
+ }
+
+ if (!has_newline_at_end) {
+ break;
+ }
+
+ m_buffer.push_back('\n');
+ cur_line_begin_pos = cur_line_end_pos + 1;
+ } while (cur_line_begin_pos < token.size());
+
+ process_chomping(header.chomp);
+
+ return {m_buffer};
+ }
+
+ /// @brief Parses block folded scalar contents.
+ /// @param token Scalar contents.
+ /// @param header Block scalar header information.
+ /// @return View into the parsed scalar contents.
+ str_view parse_block_folded_scalar(str_view token, const block_scalar_header& header) {
+ if FK_YAML_UNLIKELY (token.empty()) {
+ return token;
+ }
+
+ m_use_owned_buffer = true;
+ m_buffer.reserve(token.size());
+
+ constexpr str_view white_space_filter {" \t"};
+
+ std::size_t cur_line_begin_pos = 0;
+ bool has_newline_at_end = true;
+ bool can_be_folded = false;
+ do {
+ std::size_t cur_line_end_pos = token.find('\n', cur_line_begin_pos);
+ if (cur_line_end_pos == str_view::npos) {
+ has_newline_at_end = false;
+ cur_line_end_pos = token.size();
+ }
+
+ const std::size_t line_size = cur_line_end_pos - cur_line_begin_pos;
+ const str_view line = token.substr(cur_line_begin_pos, line_size);
+ const bool is_empty = line.find_first_not_of(white_space_filter) == str_view::npos;
+
+ if (line.size() <= header.indent) {
+ // A less-indented line is turned into a newline.
+ m_buffer.push_back('\n');
+ can_be_folded = false;
+ }
+ else if (is_empty) {
+ // more-indented empty lines are not folded.
+ m_buffer.push_back('\n');
+ m_buffer.append(line.begin() + header.indent, line.end());
+ m_buffer.push_back('\n');
+ }
+ else {
+ const std::size_t non_space_pos = line.find_first_not_of(white_space_filter);
+ const bool is_more_indented = (non_space_pos != str_view::npos) && (non_space_pos > header.indent);
+
+ if (can_be_folded) {
+ if (is_more_indented) {
+ // The content line right before more-indented lines is not folded.
+ m_buffer.push_back('\n');
+ }
+ else {
+ m_buffer.push_back(' ');
+ }
+
+ can_be_folded = false;
+ }
+
+ m_buffer.append(line.begin() + header.indent, line.end());
+
+ if (is_more_indented && has_newline_at_end) {
+ // more-indented lines are not folded.
+ m_buffer.push_back('\n');
+ }
+ else {
+ can_be_folded = true;
+ }
+ }
+
+ if (!has_newline_at_end) {
+ break;
+ }
+
+ cur_line_begin_pos = cur_line_end_pos + 1;
+ } while (cur_line_begin_pos < token.size());
+
+ if (has_newline_at_end && can_be_folded) {
+ // The final content line break are not folded.
+ m_buffer.push_back('\n');
+ }
+
+ process_chomping(header.chomp);
+
+ return {m_buffer};
+ }
+
+ /// @brief Discards final content line break and trailing empty lines depending on the given chomping type.
+ /// @param chomp Chomping method type.
+ void process_chomping(chomping_indicator_t chomp) {
+ switch (chomp) {
+ case chomping_indicator_t::STRIP: {
+ const std::size_t content_end_pos = m_buffer.find_last_not_of('\n');
+ if (content_end_pos == std::string::npos) {
+ // if the scalar has no content line, all lines are considered as trailing empty lines.
+ m_buffer.clear();
+ break;
+ }
+
+ if (content_end_pos == m_buffer.size() - 1) {
+ // no last content line break nor trailing empty lines.
+ break;
+ }
+
+ // remove the last content line break and all trailing empty lines.
+ m_buffer.erase(content_end_pos + 1);
+
+ break;
+ }
+ case chomping_indicator_t::CLIP: {
+ const std::size_t content_end_pos = m_buffer.find_last_not_of('\n');
+ if (content_end_pos == std::string::npos) {
+ // if the scalar has no content line, all lines are considered as trailing empty lines.
+ m_buffer.clear();
+ break;
+ }
+
+ if (content_end_pos == m_buffer.size() - 1) {
+ // no trailing empty lines
+ break;
+ }
+
+ // remove all trailing empty lines.
+ m_buffer.erase(content_end_pos + 2);
+
+ break;
+ }
+ case chomping_indicator_t::KEEP:
+ break;
+ }
+ }
+
+ /// @brief Applies line folding to flow scalar contents.
+ /// @param token Flow scalar contents.
+ /// @param newline_pos Position of the target newline code.
+ void process_line_folding(str_view& token, std::size_t newline_pos) noexcept {
+ // discard trailing white spaces which precedes the line break in the current line.
+ const std::size_t last_non_space_pos = token.substr(0, newline_pos + 1).find_last_not_of(" \t");
+ if (last_non_space_pos == str_view::npos) {
+ m_buffer.append(token.begin(), newline_pos);
+ }
+ else {
+ m_buffer.append(token.begin(), last_non_space_pos + 1);
+ }
+ token.remove_prefix(newline_pos + 1); // move next to the LF
+
+ uint32_t empty_line_counts = 0;
+ do {
+ const std::size_t non_space_pos = token.find_first_not_of(" \t");
+ if (non_space_pos == str_view::npos) {
+ // Line folding ignores trailing spaces.
+ token.remove_prefix(token.size());
+ break;
+ }
+ if (token[non_space_pos] != '\n') {
+ token.remove_prefix(non_space_pos);
+ break;
+ }
+
+ token.remove_prefix(non_space_pos + 1);
+ ++empty_line_counts;
+ } while (true);
+
+ if (empty_line_counts > 0) {
+ m_buffer.append(empty_line_counts, '\n');
+ }
+ else {
+ m_buffer.push_back(' ');
+ }
+ }
+
+ /// @brief Decides scalar value type based on the lexical/tag types and scalar contents.
+ /// @param lex_type Lexical token type for the scalar.
+ /// @param tag_type Tag type for the scalar.
+ /// @param token Scalar contents.
+ /// @return Scalar value type.
+ node_type decide_value_type(lexical_token_t lex_type, tag_t tag_type, str_view token) const noexcept {
+ node_type value_type {node_type::STRING};
+ if (lex_type == lexical_token_t::PLAIN_SCALAR) {
+ value_type = scalar_scanner::scan(token.begin(), token.end());
+ }
+
+ switch (tag_type) {
+ case tag_t::NULL_VALUE:
+ value_type = node_type::NULL_OBJECT;
+ break;
+ case tag_t::BOOLEAN:
+ value_type = node_type::BOOLEAN;
+ break;
+ case tag_t::INTEGER:
+ value_type = node_type::INTEGER;
+ break;
+ case tag_t::FLOATING_NUMBER:
+ value_type = node_type::FLOAT;
+ break;
+ case tag_t::STRING:
+ case tag_t::NON_SPECIFIC:
+ // scalars with the non-specific tag is resolved to a string tag.
+ // See the "Non-Specific Tags" section in https://yaml.org/spec/1.2.2/#691-node-tags.
+ value_type = node_type::STRING;
+ break;
+ case tag_t::NONE:
+ case tag_t::CUSTOM_TAG:
+ default:
+ break;
+ }
+
+ return value_type;
+ }
+
+ /// @brief Creates YAML scalar object based on the value type and contents.
+ /// @param type Scalar value type.
+ /// @param token Scalar contents.
+ /// @return A YAML scalar object.
+ basic_node_type create_scalar_node(node_type val_type, tag_t tag_type, str_view token) {
+ switch (val_type) {
+ case node_type::NULL_OBJECT: {
+ std::nullptr_t null = nullptr;
+ const bool converted = detail::aton(token.begin(), token.end(), null);
+ if FK_YAML_UNLIKELY (!converted) {
+ throw parse_error("Failed to convert a scalar to a null.", m_line, m_indent);
+ }
+ // The default basic_node object is a null scalar node.
+ return basic_node_type {};
+ }
+ case node_type::BOOLEAN: {
+ auto boolean = static_cast<boolean_type>(false);
+ const bool converted = detail::atob(token.begin(), token.end(), boolean);
+ if FK_YAML_UNLIKELY (!converted) {
+ throw parse_error("Failed to convert a scalar to a boolean.", m_line, m_indent);
+ }
+ return basic_node_type(boolean);
+ }
+ case node_type::INTEGER: {
+ integer_type integer = 0;
+ const bool converted = detail::atoi(token.begin(), token.end(), integer);
+ if FK_YAML_LIKELY (converted) {
+ return basic_node_type(integer);
+ }
+ if FK_YAML_UNLIKELY (tag_type == tag_t::INTEGER) {
+ throw parse_error("Failed to convert a scalar to an integer.", m_line, m_indent);
+ }
+
+ // conversion error from a scalar which is not tagged with !!int is recovered by treating it as a string
+ // scalar. See https://github.com/fktn-k/fkYAML/issues/428.
+ return basic_node_type(string_type(token.begin(), token.end()));
+ }
+ case node_type::FLOAT: {
+ float_number_type float_val = 0;
+ const bool converted = detail::atof(token.begin(), token.end(), float_val);
+ if FK_YAML_LIKELY (converted) {
+ return basic_node_type(float_val);
+ }
+ if FK_YAML_UNLIKELY (tag_type == tag_t::FLOATING_NUMBER) {
+ throw parse_error("Failed to convert a scalar to a floating point value", m_line, m_indent);
+ }
+
+ // conversion error from a scalar which is not tagged with !!float is recovered by treating it as a string
+ // scalar. See https://github.com/fktn-k/fkYAML/issues/428.
+ return basic_node_type(string_type(token.begin(), token.end()));
+ }
+ case node_type::STRING:
+ if (!m_use_owned_buffer) {
+ return basic_node_type(string_type(token.begin(), token.end()));
+ }
+ m_use_owned_buffer = false;
+ return basic_node_type(std::move(m_buffer));
+ default: // LCOV_EXCL_LINE
+ detail::unreachable(); // LCOV_EXCL_LINE
+ }
+ }
+
+ /// Current line
+ uint32_t m_line {0};
+ /// Current indentation for the scalar
+ uint32_t m_indent {0};
+ /// Whether the parsed contents are stored in an owned buffer.
+ bool m_use_owned_buffer {false};
+ /// Owned buffer storage for parsing. This buffer is used when scalar contents need mutation.
+ std::string m_buffer;
+};
+
+FK_YAML_DETAIL_NAMESPACE_END
+
+#endif /* FK_YAML_DETAIL_INPUT_SCALAR_PARSER_HPP */
+
+// #include <fkYAML/detail/input/tag_resolver.hpp>
+// _______ __ __ __ _____ __ __ __
+// | __| |_/ | \_/ |/ _ \ / \/ \| | fkYAML: A C++ header-only YAML library
+// | __| _ < \_ _/| ___ | _ | |___ version 0.4.2
+// |__| |_| \__| |_| |_| |_|___||___|______| https://github.com/fktn-k/fkYAML
+//
+// SPDX-FileCopyrightText: 2023-2025 Kensuke Fukutani <fktn.dev@gmail.com>
+// SPDX-License-Identifier: MIT
+
+#ifndef FK_YAML_DETAIL_INPUT_TAG_RESOLVER_HPP
+#define FK_YAML_DETAIL_INPUT_TAG_RESOLVER_HPP
+
+#include <memory>
+#include <string>
+
+// #include <fkYAML/detail/macros/define_macros.hpp>
+
+// #include <fkYAML/detail/assert.hpp>
+
+// #include <fkYAML/detail/document_metainfo.hpp>
+
+// #include <fkYAML/detail/input/tag_t.hpp>
+
+// #include <fkYAML/detail/meta/node_traits.hpp>
+
+// #include <fkYAML/detail/str_view.hpp>
+
+// #include <fkYAML/exception.hpp>
+
+
+FK_YAML_DETAIL_NAMESPACE_BEGIN
+
+static constexpr str_view default_primary_handle_prefix {"!"};
+static constexpr str_view default_secondary_handle_prefix {"tag:yaml.org,2002:"};
+
+template <typename BasicNodeType>
+class tag_resolver {
+ static_assert(is_basic_node<BasicNodeType>::value, "tag_resolver only accepts basic_node<...>.");
+ using doc_metainfo_type = document_metainfo<BasicNodeType>;
+
+public:
+ /// @brief Resolve the input tag name into an expanded tag name prepended with a registered prefix.
+ /// @param tag The input tag name.
+ /// @return The type of a node deduced from the given tag name.
+ static tag_t resolve_tag(const str_view tag, const std::shared_ptr<doc_metainfo_type>& directives) {
+ const std::string normalized = normalize_tag_name(tag, directives);
+ return convert_to_tag_type(normalized);
+ }
+
+private:
+ static std::string normalize_tag_name(const str_view tag, const std::shared_ptr<doc_metainfo_type>& directives) {
+ if FK_YAML_UNLIKELY (tag.empty()) {
+ throw invalid_tag("tag must not be empty.", "");
+ }
+ if FK_YAML_UNLIKELY (tag[0] != '!') {
+ throw invalid_tag("tag must start with \'!\'", std::string(tag.begin(), tag.end()).c_str());
+ }
+
+ if (tag.size() == 1) {
+ // Non-specific tag ("!") will be interpreted as one of the following:
+ // * tag:yaml.org,2002:seq
+ // * tag:yaml.org,2002:map
+ // * tag:yaml.org,2002:str
+ // See the "Non-Specific Tags" section in https://yaml.org/spec/1.2.2/#691-node-tags.
+ // The interpretation cannot take place here because the input lacks the corresponding value.
+ return {tag.begin(), tag.end()};
+ }
+
+ std::string normalized {"!<"};
+ switch (tag[1]) {
+ case '!': {
+ // handle a secondary tag handle (!!suffix -> !<[secondary][suffix]>)
+ const bool is_null_or_empty = !directives || directives->secondary_handle_prefix.empty();
+ if (is_null_or_empty) {
+ normalized.append(default_secondary_handle_prefix.begin(), default_secondary_handle_prefix.end());
+ }
+ else {
+ normalized += directives->secondary_handle_prefix;
+ }
+
+ const str_view body = tag.substr(2);
+ normalized.append(body.begin(), body.end());
+ break;
+ }
+ case '<':
+ if (tag[2] == '!') {
+ const bool is_null_or_empty = !directives || directives->primary_handle_prefix.empty();
+ if (is_null_or_empty) {
+ normalized.append(default_primary_handle_prefix.begin(), default_primary_handle_prefix.end());
+ }
+ else {
+ normalized += directives->primary_handle_prefix;
+ }
+
+ const str_view body = tag.substr(3);
+ return normalized.append(body.begin(), body.end());
+ }
+
+ // verbatim tags must be delivered as-is to the application.
+ // See https://yaml.org/spec/1.2.2/#691-node-tags for more details.
+ return {tag.begin(), tag.end()};
+ default: {
+ const std::size_t tag_end_pos = tag.find_first_of('!', 1);
+
+ // handle a named handle (!tag!suffix -> !<[tag][suffix]>)
+ if (tag_end_pos != std::string::npos) {
+ // there must be a non-empty suffix. (already checked by the lexer.)
+ FK_YAML_ASSERT(tag_end_pos < tag.size() - 1);
+
+ const bool is_null_or_empty = !directives || directives->named_handle_map.empty();
+ if FK_YAML_UNLIKELY (is_null_or_empty) {
+ throw invalid_tag(
+ "named handle has not been registered.", std::string(tag.begin(), tag.end()).c_str());
+ }
+
+ // find the extracted named handle in the map.
+ const str_view named_handle = tag.substr(0, tag_end_pos + 1);
+ auto named_handle_itr = directives->named_handle_map.find({named_handle.begin(), named_handle.end()});
+ auto end_itr = directives->named_handle_map.end();
+ if FK_YAML_UNLIKELY (named_handle_itr == end_itr) {
+ throw invalid_tag(
+ "named handle has not been registered.", std::string(tag.begin(), tag.end()).c_str());
+ }
+
+ // The YAML spec prohibits expanding the percent-encoded characters (%xx -> a UTF-8 byte).
+ // So no conversion takes place.
+ // See https://yaml.org/spec/1.2.2/#56-miscellaneous-characters for more details.
+
+ normalized += named_handle_itr->second;
+ const str_view body = tag.substr(tag_end_pos + 1);
+ normalized.append(body.begin(), body.end());
+ break;
+ }
+
+ // handle a primary tag handle (!suffix -> !<[primary][suffix]>)
+ const bool is_null_or_empty = !directives || directives->primary_handle_prefix.empty();
+ if (is_null_or_empty) {
+ normalized.append(default_primary_handle_prefix.begin(), default_primary_handle_prefix.end());
+ }
+ else {
+ normalized += directives->primary_handle_prefix;
+ }
+
+ const str_view body = tag.substr(1);
+ normalized.append(body.begin(), body.end());
+ break;
+ }
+ }
+
+ normalized += ">";
+ return normalized;
+ }
+
+ static tag_t convert_to_tag_type(const std::string& normalized) {
+ if (normalized == "!") {
+ return tag_t::NON_SPECIFIC;
+ }
+
+ if (normalized.size() < 24 /* size of !<tag:yaml.org,2002:xxx */) {
+ return tag_t::CUSTOM_TAG;
+ }
+ if (normalized.rfind("!<tag:yaml.org,2002:", 0) == std::string::npos) {
+ return tag_t::CUSTOM_TAG;
+ }
+
+ if (normalized == "!<tag:yaml.org,2002:seq>") {
+ return tag_t::SEQUENCE;
+ }
+ if (normalized == "!<tag:yaml.org,2002:map>") {
+ return tag_t::MAPPING;
+ }
+ if (normalized == "!<tag:yaml.org,2002:null>") {
+ return tag_t::NULL_VALUE;
+ }
+ if (normalized == "!<tag:yaml.org,2002:bool>") {
+ return tag_t::BOOLEAN;
+ }
+ if (normalized == "!<tag:yaml.org,2002:int>") {
+ return tag_t::INTEGER;
+ }
+ if (normalized == "!<tag:yaml.org,2002:float>") {
+ return tag_t::FLOATING_NUMBER;
+ }
+ if (normalized == "!<tag:yaml.org,2002:str>") {
+ return tag_t::STRING;
+ }
+
+ return tag_t::CUSTOM_TAG;
+ }
+};
+
+FK_YAML_DETAIL_NAMESPACE_END
+
+#endif /* FK_YAML_DETAIL_INPUT_TAG_RESOLVER_HPP */
+
+// #include <fkYAML/detail/meta/input_adapter_traits.hpp>
+// _______ __ __ __ _____ __ __ __
+// | __| |_/ | \_/ |/ _ \ / \/ \| | fkYAML: A C++ header-only YAML library
+// | __| _ < \_ _/| ___ | _ | |___ version 0.4.2
+// |__| |_| \__| |_| |_| |_|___||___|______| https://github.com/fktn-k/fkYAML
+//
+// SPDX-FileCopyrightText: 2023-2025 Kensuke Fukutani <fktn.dev@gmail.com>
+// SPDX-License-Identifier: MIT
+
+#ifndef FK_YAML_DETAIL_META_INPUT_ADAPTER_TRAITS_HPP
+#define FK_YAML_DETAIL_META_INPUT_ADAPTER_TRAITS_HPP
+
+#include <type_traits>
+
+// #include <fkYAML/detail/macros/define_macros.hpp>
+
+// #include <fkYAML/detail/meta/detect.hpp>
+
+// #include <fkYAML/detail/meta/stl_supplement.hpp>
+
+
+FK_YAML_DETAIL_NAMESPACE_BEGIN
+
+///////////////////////////////////////////
+// Input Adapter API detection traits
+///////////////////////////////////////////
+
+/// @brief A type which represents get_buffer_view function.
+/// @tparam T A target type.
+template <typename T>
+using get_buffer_view_fn_t = decltype(std::declval<T>().get_buffer_view());
+
+/// @brief Type traits to check if InputAdapterType has get_buffer_view member function.
+/// @tparam InputAdapterType An input adapter type to check if it has get_buffer_view function.
+/// @tparam typename N/A
+template <typename InputAdapterType>
+using has_get_buffer_view = is_detected<get_buffer_view_fn_t, InputAdapterType>;
+
+////////////////////////////////
+// is_input_adapter traits
+////////////////////////////////
+
+/// @brief Type traits to check if T is an input adapter type.
+/// @tparam T A target type.
+/// @tparam typename N/A
+template <typename T, typename = void>
+struct is_input_adapter : std::false_type {};
+
+/// @brief A partial specialization of is_input_adapter if T is an input adapter type.
+/// @tparam InputAdapterType
+template <typename InputAdapterType>
+struct is_input_adapter<InputAdapterType, enable_if_t<has_get_buffer_view<InputAdapterType>::value>> : std::true_type {
+};
+
+FK_YAML_DETAIL_NAMESPACE_END
+
+#endif /* FK_YAML_DETAIL_META_INPUT_ADAPTER_TRAITS_HPP */
+
+// #include <fkYAML/detail/meta/node_traits.hpp>
+
+// #include <fkYAML/detail/meta/stl_supplement.hpp>
+
+// #include <fkYAML/detail/node_attrs.hpp>
+// _______ __ __ __ _____ __ __ __
+// | __| |_/ | \_/ |/ _ \ / \/ \| | fkYAML: A C++ header-only YAML library
+// | __| _ < \_ _/| ___ | _ | |___ version 0.4.2
+// |__| |_| \__| |_| |_| |_|___||___|______| https://github.com/fktn-k/fkYAML
+//
+// SPDX-FileCopyrightText: 2023-2025 Kensuke Fukutani <fktn.dev@gmail.com>
+// SPDX-License-Identifier: MIT
+
+#ifndef FK_YAML_DETAIL_NODE_ATTRS_HPP
+#define FK_YAML_DETAIL_NODE_ATTRS_HPP
+
+#include <cstdint>
+#include <limits>
+
+// #include <fkYAML/detail/macros/define_macros.hpp>
+
+// #include <fkYAML/node_type.hpp>
+
+
+FK_YAML_DETAIL_NAMESPACE_BEGIN
+
+/// @brief The type for node attribute bits.
+using node_attr_t = uint32_t;
+
+/// @brief The namespace to define bit masks for node attribute bits.
+namespace node_attr_mask {
+
+/// The bit mask for node value type bits.
+constexpr node_attr_t value = 0x0000FFFFu;
+/// The bit mask for node style type bits. (bits are not yet defined.)
+constexpr node_attr_t style = 0x00FF0000u;
+/// The bit mask for node property related bits.
+constexpr node_attr_t props = 0xFF000000u;
+/// The bit mask for anchor/alias node type bits.
+constexpr node_attr_t anchoring = 0x03000000u;
+/// The bit mask for anchor offset value bits.
+constexpr node_attr_t anchor_offset = 0xFC000000u;
+/// The bit mask for all the bits for node attributes.
+constexpr node_attr_t all = std::numeric_limits<node_attr_t>::max();
+
+} // namespace node_attr_mask
+
+/// @brief The namespace to define bits for node attributes.
+namespace node_attr_bits {
+
+/// The sequence node bit.
+constexpr node_attr_t seq_bit = 1u << 0;
+/// The mapping node bit.
+constexpr node_attr_t map_bit = 1u << 1;
+/// The null scalar node bit.
+constexpr node_attr_t null_bit = 1u << 2;
+/// The boolean scalar node bit.
+constexpr node_attr_t bool_bit = 1u << 3;
+/// The integer scalar node bit.
+constexpr node_attr_t int_bit = 1u << 4;
+/// The floating point scalar node bit.
+constexpr node_attr_t float_bit = 1u << 5;
+/// The string scalar node bit.
+constexpr node_attr_t string_bit = 1u << 6;
+
+/// A utility bit set to filter scalar node bits.
+constexpr node_attr_t scalar_bits = null_bit | bool_bit | int_bit | float_bit | string_bit;
+
+/// The anchor node bit.
+constexpr node_attr_t anchor_bit = 0x01000000u;
+/// The alias node bit.
+constexpr node_attr_t alias_bit = 0x02000000u;
+
+/// A utility bit set for initialization.
+constexpr node_attr_t default_bits = null_bit;
+
+/// @brief Converts a node_type value to a node_attr_t value.
+/// @param t A type of node value.
+/// @return The associated node value bit.
+inline node_attr_t from_node_type(node_type t) noexcept {
+ switch (t) {
+ case node_type::SEQUENCE:
+ return seq_bit;
+ case node_type::MAPPING:
+ return map_bit;
+ case node_type::NULL_OBJECT:
+ return null_bit;
+ case node_type::BOOLEAN:
+ return bool_bit;
+ case node_type::INTEGER:
+ return int_bit;
+ case node_type::FLOAT:
+ return float_bit;
+ case node_type::STRING:
+ return string_bit;
+ default: // LCOV_EXCL_LINE
+ return node_attr_mask::all; // LCOV_EXCL_LINE
+ }
+}
+
+/// @brief Converts a node_attr_t value to a node_type value.
+/// @param bits node attribute bits
+/// @return An associated node value type with the given node value bit.
+inline node_type to_node_type(node_attr_t bits) noexcept {
+ switch (bits & node_attr_mask::value) {
+ case seq_bit:
+ return node_type::SEQUENCE;
+ case map_bit:
+ return node_type::MAPPING;
+ case null_bit:
+ return node_type::NULL_OBJECT;
+ case bool_bit:
+ return node_type::BOOLEAN;
+ case int_bit:
+ return node_type::INTEGER;
+ case float_bit:
+ return node_type::FLOAT;
+ case string_bit:
+ return node_type::STRING;
+ default: // LCOV_EXCL_LINE
+ detail::unreachable(); // LCOV_EXCL_LINE
+ }
+}
+
+/// @brief Get an anchor offset used to reference an anchor node from the given attribute bits.
+/// @param attrs node attribute bits
+/// @return An anchor offset value.
+inline uint32_t get_anchor_offset(node_attr_t attrs) noexcept {
+ return (attrs & node_attr_mask::anchor_offset) >> 26;
+}
+
+/// @brief Set an anchor offset value to the appropriate bits.
+/// @param offset An anchor offset value.
+/// @param attrs node attribute bit set into which the offset value is written.
+inline void set_anchor_offset(uint32_t offset, node_attr_t& attrs) noexcept {
+ attrs &= ~node_attr_mask::anchor_offset;
+ attrs |= (offset & 0x3Fu) << 26;
+}
+
+} // namespace node_attr_bits
+
+FK_YAML_DETAIL_NAMESPACE_END
+
+#endif /* FK_YAML_DETAIL_NODE_ATTRS_HPP */
+
+// #include <fkYAML/detail/node_property.hpp>
+// _______ __ __ __ _____ __ __ __
+// | __| |_/ | \_/ |/ _ \ / \/ \| | fkYAML: A C++ header-only YAML library
+// | __| _ < \_ _/| ___ | _ | |___ version 0.4.2
+// |__| |_| \__| |_| |_| |_|___||___|______| https://github.com/fktn-k/fkYAML
+//
+// SPDX-FileCopyrightText: 2023-2025 Kensuke Fukutani <fktn.dev@gmail.com>
+// SPDX-License-Identifier: MIT
+
+#ifndef FK_YAML_DETAIL_NODE_PROPERTY_HPP
+#define FK_YAML_DETAIL_NODE_PROPERTY_HPP
+
+#include <string>
+
+// #include <fkYAML/detail/macros/define_macros.hpp>
+
+
+FK_YAML_DETAIL_NAMESPACE_BEGIN
+
+struct node_property {
+ /// The tag name property.
+ std::string tag {}; // NOLINT(readability-redundant-member-init) necessary for older compilers
+ /// The anchor name property.
+ std::string anchor {}; // NOLINT(readability-redundant-member-init) necessary for older compilers
+};
+
+FK_YAML_DETAIL_NAMESPACE_END
+
+#endif /* FK_YAML_DETAIL_NODE_PROPERTY_HPP */
+
+// #include <fkYAML/detail/types/lexical_token_t.hpp>
+
+// #include <fkYAML/exception.hpp>
+
+
+FK_YAML_DETAIL_NAMESPACE_BEGIN
+
+/// @brief A class which provides the feature of deserializing YAML documents.
+/// @tparam BasicNodeType A type of the container for deserialized YAML values.
+template <typename BasicNodeType>
+class basic_deserializer {
+ static_assert(is_basic_node<BasicNodeType>::value, "basic_deserializer only accepts basic_node<...>");
+
+ /** A type for the target basic_node. */
+ using basic_node_type = BasicNodeType;
+ /** A type for the lexical analyzer. */
+ using lexer_type = lexical_analyzer;
+ /** A type for the document metainfo. */
+ using doc_metainfo_type = document_metainfo<basic_node_type>;
+ /** A type for the tag resolver. */
+ using tag_resolver_type = tag_resolver<basic_node_type>;
+ /** A type for the scalar parser. */
+ using scalar_parser_type = scalar_parser<basic_node_type>;
+ /** A type for sequence node value containers. */
+ using sequence_type = typename basic_node_type::sequence_type;
+ /** A type for mapping node value containers. */
+ using mapping_type = typename basic_node_type::mapping_type;
+
+ /// @brief Definition of state types of parse contexts.
+ enum class context_state_t : std::uint8_t {
+ BLOCK_MAPPING, //!< The underlying node is a block mapping.
+ BLOCK_MAPPING_EXPLICIT_KEY, //!< The underlying node is an explicit block mapping key.
+ BLOCK_MAPPING_EXPLICIT_VALUE, //!< The underlying node is an explicit block mapping value.
+ MAPPING_VALUE, //!< The underlying node is a block mapping value.
+ BLOCK_SEQUENCE, //!< The underlying node is a block sequence.
+ BLOCK_SEQUENCE_ENTRY, //!< The underlying node is a block sequence entry.
+ FLOW_SEQUENCE, //!< The underlying node is a flow sequence.
+ FLOW_SEQUENCE_KEY, //!< The underlying node is a flow sequence as a key.
+ FLOW_MAPPING, //!< The underlying node is a flow mapping.
+ FLOW_MAPPING_KEY, //!< The underlying node is a flow mapping as a key.
+ };
+
+ /// @brief Context information set for parsing.
+ struct parse_context {
+ /// @brief Construct a new parse_context object.
+ parse_context() = default;
+
+ /// @brief Construct a new parse_context object with non-default values for each parameter.
+ /// @param line The current line. (count from zero)
+ /// @param indent The indentation width in the current line. (count from zero)
+ /// @param state The parse context type.
+ /// @param p_node The underlying node associated to this context.
+ parse_context(uint32_t line, uint32_t indent, context_state_t state, basic_node_type* p_node) noexcept
+ : line(line),
+ indent(indent),
+ state(state),
+ p_node(p_node) {
+ }
+
+ parse_context(const parse_context&) noexcept = default;
+ parse_context& operator=(const parse_context&) noexcept = default;
+ parse_context(parse_context&&) noexcept = default;
+ parse_context& operator=(parse_context&&) noexcept = default;
+
+ ~parse_context() {
+ switch (state) {
+ case context_state_t::BLOCK_MAPPING_EXPLICIT_KEY:
+ case context_state_t::FLOW_SEQUENCE_KEY:
+ case context_state_t::FLOW_MAPPING_KEY:
+ delete p_node;
+ p_node = nullptr;
+ break;
+ default:
+ break;
+ }
+ }
+
+ /// The current line. (count from zero)
+ uint32_t line {0};
+ /// The indentation width in the current line. (count from zero)
+ uint32_t indent {0};
+ /// The parse context type.
+ context_state_t state {context_state_t::BLOCK_MAPPING};
+ /// The pointer to the associated node to this context.
+ basic_node_type* p_node {nullptr};
+ };
+
+ /// @brief Definitions of state types for expected flow token hints.
+ enum class flow_token_state_t : std::uint8_t {
+ NEEDS_VALUE_OR_SUFFIX, //!< Either value or flow suffix (`]` or `}`)
+ NEEDS_SEPARATOR_OR_SUFFIX, //!< Either separator (`,`) or flow suffix (`]` or `}`)
+ };
+
+public:
+ /// @brief Construct a new basic_deserializer object.
+ basic_deserializer() = default;
+
+public:
+ /// @brief Deserialize a single YAML document into a YAML node.
+ /// @note
+ /// If the input consists of multiple YAML documents, this function only parses the first.
+ /// If the input may have multiple YAML documents all of which must be parsed into nodes,
+ /// prefer the `deserialize_docs()` function.
+ /// @tparam InputAdapterType The type of an input adapter object.
+ /// @param input_adapter An input adapter object for the input source buffer.
+ /// @return basic_node_type A root YAML node deserialized from the source string.
+ template <typename InputAdapterType, enable_if_t<is_input_adapter<InputAdapterType>::value, int> = 0>
+ basic_node_type deserialize(InputAdapterType&& input_adapter) { // NOLINT(cppcoreguidelines-missing-std-forward)
+ const str_view input_view = input_adapter.get_buffer_view();
+ lexer_type lexer(input_view);
+
+ lexical_token_t type {lexical_token_t::END_OF_BUFFER};
+ return deserialize_document(lexer, type);
+ }
+
+ /// @brief Deserialize multiple YAML documents into YAML nodes.
+ /// @tparam InputAdapterType The type of an adapter object.
+ /// @param input_adapter An input adapter object for the input source buffer.
+ /// @return std::vector<basic_node_type> Root YAML nodes for deserialized YAML documents.
+ template <typename InputAdapterType, enable_if_t<is_input_adapter<InputAdapterType>::value, int> = 0>
+ // NOLINTNEXTLINE(cppcoreguidelines-missing-std-forward)
+ std::vector<basic_node_type> deserialize_docs(InputAdapterType&& input_adapter) {
+ const str_view input_view = input_adapter.get_buffer_view();
+ lexer_type lexer(input_view);
+
+ std::vector<basic_node_type> nodes {};
+ lexical_token_t type {lexical_token_t::END_OF_BUFFER};
+
+ do {
+ nodes.emplace_back(deserialize_document(lexer, type));
+ } while (type != lexical_token_t::END_OF_BUFFER);
+
+ return nodes;
+ } // LCOV_EXCL_LINE
+
+private:
+ /// @brief Deserialize a YAML document into a YAML node.
+ /// @param lexer The lexical analyzer to be used.
+ /// @param last_type The variable to store the last lexical token type.
+ /// @return basic_node_type A root YAML node deserialized from the YAML document.
+ basic_node_type deserialize_document(lexer_type& lexer, lexical_token_t& last_type) {
+ lexical_token token {};
+
+ basic_node_type root;
+ mp_current_node = &root;
+ mp_meta = root.mp_meta;
+
+ // parse directives first.
+ deserialize_directives(lexer, token);
+
+ // parse node properties for root node if any
+ uint32_t line = lexer.get_lines_processed();
+ uint32_t indent = lexer.get_last_token_begin_pos();
+ const bool found_props = deserialize_node_properties(lexer, token, line, indent);
+
+ switch (token.type) {
+ case lexical_token_t::SEQUENCE_BLOCK_PREFIX: {
+ root = basic_node_type::sequence({basic_node_type()});
+ apply_directive_set(root);
+ if (found_props) {
+ // If node properties are found before the block sequence entry prefix, the properties belong to the
+ // root sequence node.
+ apply_node_properties(root);
+ }
+
+ parse_context context(
+ lexer.get_lines_processed(), lexer.get_last_token_begin_pos(), context_state_t::BLOCK_SEQUENCE, &root);
+ m_context_stack.emplace_back(context);
+
+ mp_current_node = &(root.as_seq().back());
+ apply_directive_set(*mp_current_node);
+ context.state = context_state_t::BLOCK_SEQUENCE_ENTRY;
+ context.p_node = mp_current_node;
+ m_context_stack.emplace_back(std::move(context));
+
+ token = lexer.get_next_token();
+ line = lexer.get_lines_processed();
+ indent = lexer.get_last_token_begin_pos();
+ break;
+ }
+ case lexical_token_t::SEQUENCE_FLOW_BEGIN:
+ ++m_flow_context_depth;
+ lexer.set_context_state(true);
+ root = basic_node_type::sequence();
+ apply_directive_set(root);
+ apply_node_properties(root);
+ m_context_stack.emplace_back(
+ lexer.get_lines_processed(), lexer.get_last_token_begin_pos(), context_state_t::FLOW_SEQUENCE, &root);
+ token = lexer.get_next_token();
+ line = lexer.get_lines_processed();
+ indent = lexer.get_last_token_begin_pos();
+ break;
+ case lexical_token_t::MAPPING_FLOW_BEGIN:
+ ++m_flow_context_depth;
+ lexer.set_context_state(true);
+ root = basic_node_type::mapping();
+ apply_directive_set(root);
+ apply_node_properties(root);
+ m_context_stack.emplace_back(
+ lexer.get_lines_processed(), lexer.get_last_token_begin_pos(), context_state_t::FLOW_MAPPING, &root);
+ token = lexer.get_next_token();
+ line = lexer.get_lines_processed();
+ indent = lexer.get_last_token_begin_pos();
+ break;
+ case lexical_token_t::EXPLICIT_KEY_PREFIX: {
+ // If the explicit key prefix (? ) is detected here, the root node of current document must be a mapping.
+ // Also, tag and anchor if any are associated to the root mapping node.
+ // No get_next_token() call here to handle the token event in the deserialize_node() function.
+ root = basic_node_type::mapping();
+ apply_directive_set(root);
+ apply_node_properties(root);
+ parse_context context(
+ lexer.get_lines_processed(), lexer.get_last_token_begin_pos(), context_state_t::BLOCK_MAPPING, &root);
+ m_context_stack.emplace_back(std::move(context));
+ line = lexer.get_lines_processed();
+ indent = lexer.get_last_token_begin_pos();
+ break;
+ }
+ case lexical_token_t::BLOCK_LITERAL_SCALAR:
+ case lexical_token_t::BLOCK_FOLDED_SCALAR:
+ // If a block scalar token is detected here, current document contains single scalar.
+ // Do nothing here since the token is handled in the deserialize_node() function.
+ break;
+ case lexical_token_t::PLAIN_SCALAR:
+ case lexical_token_t::SINGLE_QUOTED_SCALAR:
+ case lexical_token_t::DOUBLE_QUOTED_SCALAR:
+ case lexical_token_t::ALIAS_PREFIX:
+ // Defer handling the above token events until the next call on the deserialize_scalar() function since the
+ // meaning depends on subsequent events.
+ if (found_props && line < lexer.get_lines_processed()) {
+ // If node properties and a followed node are on the different line, the properties belong to the root
+ // node.
+ if (m_needs_anchor_impl) {
+ m_root_anchor_name = m_anchor_name;
+ m_needs_anchor_impl = false;
+ m_anchor_name = {};
+ }
+
+ if (m_needs_tag_impl) {
+ m_root_tag_name = m_tag_name;
+ m_needs_tag_impl = false;
+ m_tag_name = {};
+ }
+
+ line = lexer.get_lines_processed();
+ indent = lexer.get_last_token_begin_pos();
+ }
+ break;
+ default:
+ // Do nothing since current document has no contents.
+ break;
+ }
+
+ // parse YAML nodes recursively
+ deserialize_node(lexer, token, line, indent, last_type);
+ FK_YAML_ASSERT(
+ last_type == lexical_token_t::END_OF_BUFFER || last_type == lexical_token_t::END_OF_DIRECTIVES ||
+ last_type == lexical_token_t::END_OF_DOCUMENT);
+
+ // reset parameters for the next call.
+ mp_current_node = nullptr;
+ mp_meta.reset();
+ m_needs_tag_impl = false;
+ m_needs_anchor_impl = false;
+ m_flow_context_depth = 0;
+ m_flow_token_state = flow_token_state_t::NEEDS_VALUE_OR_SUFFIX;
+ m_context_stack.clear();
+
+ return root;
+ }
+
+ /// @brief Deserializes the YAML directives if specified.
+ /// @param lexer The lexical analyzer to be used.
+ /// @param last_token Storage for last lexical token type.
+ void deserialize_directives(lexer_type& lexer, lexical_token& last_token) {
+ bool lacks_end_of_directives_marker = false;
+ lexer.set_document_state(true);
+
+ for (;;) {
+ const lexical_token token = lexer.get_next_token();
+
+ switch (token.type) {
+ case lexical_token_t::YAML_VER_DIRECTIVE:
+ if FK_YAML_UNLIKELY (mp_meta->is_version_specified) {
+ throw parse_error(
+ "YAML version cannot be specified more than once.",
+ lexer.get_lines_processed(),
+ lexer.get_last_token_begin_pos());
+ }
+
+ mp_meta->version = convert_yaml_version(lexer.get_yaml_version());
+ mp_meta->is_version_specified = true;
+ lacks_end_of_directives_marker = true;
+ break;
+ case lexical_token_t::TAG_DIRECTIVE: {
+ const str_view tag_handle_view = lexer.get_tag_handle();
+ switch (tag_handle_view.size()) {
+ case 1 /* ! */: {
+ const bool is_already_specified = !mp_meta->primary_handle_prefix.empty();
+ if FK_YAML_UNLIKELY (is_already_specified) {
+ throw parse_error(
+ "Primary handle cannot be specified more than once.",
+ lexer.get_lines_processed(),
+ lexer.get_last_token_begin_pos());
+ }
+ const str_view tag_prefix = lexer.get_tag_prefix();
+ mp_meta->primary_handle_prefix.assign(tag_prefix.begin(), tag_prefix.end());
+ lacks_end_of_directives_marker = true;
+ break;
+ }
+ case 2 /* !! */: {
+ const bool is_already_specified = !mp_meta->secondary_handle_prefix.empty();
+ if FK_YAML_UNLIKELY (is_already_specified) {
+ throw parse_error(
+ "Secondary handle cannot be specified more than once.",
+ lexer.get_lines_processed(),
+ lexer.get_last_token_begin_pos());
+ }
+ const str_view tag_prefix = lexer.get_tag_prefix();
+ mp_meta->secondary_handle_prefix.assign(tag_prefix.begin(), tag_prefix.end());
+ lacks_end_of_directives_marker = true;
+ break;
+ }
+ default /* !<handle>! */: {
+ std::string tag_handle(tag_handle_view.begin(), tag_handle_view.end());
+ const str_view tag_prefix_view = lexer.get_tag_prefix();
+ std::string tag_prefix(tag_prefix_view.begin(), tag_prefix_view.end());
+ const bool is_already_specified =
+ !(mp_meta->named_handle_map.emplace(std::move(tag_handle), std::move(tag_prefix)).second);
+ if FK_YAML_UNLIKELY (is_already_specified) {
+ throw parse_error(
+ "The same named handle cannot be specified more than once.",
+ lexer.get_lines_processed(),
+ lexer.get_last_token_begin_pos());
+ }
+ lacks_end_of_directives_marker = true;
+ break;
+ }
+ }
+ break;
+ }
+ case lexical_token_t::INVALID_DIRECTIVE:
+ // TODO: should output a warning log. Currently just ignore this case.
+ break;
+ case lexical_token_t::END_OF_DIRECTIVES:
+ lacks_end_of_directives_marker = false;
+ break;
+ default:
+ if FK_YAML_UNLIKELY (lacks_end_of_directives_marker) {
+ throw parse_error(
+ "The end of directives marker (---) is missing after directives.",
+ lexer.get_lines_processed(),
+ lexer.get_last_token_begin_pos());
+ }
+ // end the parsing of directives if the other tokens are found.
+ last_token = token;
+ lexer.set_document_state(false);
+ return;
+ }
+ }
+ }
+
+ /// @brief Deserializes the YAML nodes recursively.
+ /// @param lexer The lexical analyzer to be used.
+ /// @param first_type The first lexical token.
+ /// @param last_type Storage for last lexical token type.
+ void deserialize_node(
+ lexer_type& lexer, const lexical_token& first_token, uint32_t first_line, uint32_t first_indent,
+ lexical_token_t& last_type) {
+ lexical_token token = first_token;
+ uint32_t line = first_line;
+ uint32_t indent = first_indent;
+
+ do {
+ switch (token.type) {
+ case lexical_token_t::EXPLICIT_KEY_PREFIX: {
+ const bool needs_to_move_back = indent == 0 || indent < m_context_stack.back().indent;
+ if (needs_to_move_back) {
+ pop_to_parent_node(line, indent, [indent](const parse_context& c) {
+ return c.state == context_state_t::BLOCK_MAPPING && indent == c.indent;
+ });
+ }
+
+ switch (m_context_stack.back().state) {
+ case context_state_t::MAPPING_VALUE:
+ case context_state_t::BLOCK_MAPPING_EXPLICIT_KEY:
+ case context_state_t::BLOCK_MAPPING_EXPLICIT_VALUE:
+ case context_state_t::BLOCK_SEQUENCE_ENTRY:
+ // This path is needed in case the input contains nested explicit keys.
+ // ```yaml
+ // foo:
+ // ? ? foo
+ // : bar
+ // : ? baz
+ // : - ? qux
+ // : 123
+ // ```
+ *mp_current_node = basic_node_type::mapping();
+ apply_directive_set(*mp_current_node);
+ m_context_stack.emplace_back(line, indent, context_state_t::BLOCK_MAPPING, mp_current_node);
+ break;
+ default:
+ break;
+ }
+
+ token = lexer.get_next_token();
+ if (token.type == lexical_token_t::SEQUENCE_BLOCK_PREFIX) {
+ // heap-allocated node will be freed in handling the corresponding KEY_SEPARATOR event
+ auto* p_node = new basic_node_type(node_type::SEQUENCE);
+ m_context_stack.emplace_back(line, indent, context_state_t::BLOCK_MAPPING_EXPLICIT_KEY, p_node);
+
+ apply_directive_set(*p_node);
+ parse_context context(
+ lexer.get_lines_processed(),
+ lexer.get_last_token_begin_pos(),
+ context_state_t::BLOCK_SEQUENCE,
+ p_node);
+ m_context_stack.emplace_back(context);
+
+ p_node->as_seq().emplace_back(basic_node_type());
+ mp_current_node = &(p_node->as_seq().back());
+ apply_directive_set(*mp_current_node);
+ context.state = context_state_t::BLOCK_SEQUENCE_ENTRY;
+ context.p_node = mp_current_node;
+ m_context_stack.emplace_back(std::move(context));
+
+ break;
+ }
+
+ // heap-allocated node will be freed in handling the corresponding KEY_SEPARATOR event
+ m_context_stack.emplace_back(
+ line, indent, context_state_t::BLOCK_MAPPING_EXPLICIT_KEY, new basic_node_type());
+ mp_current_node = m_context_stack.back().p_node;
+ apply_directive_set(*mp_current_node);
+ indent = lexer.get_last_token_begin_pos();
+ line = lexer.get_lines_processed();
+
+ continue;
+ }
+ case lexical_token_t::KEY_SEPARATOR: {
+ FK_YAML_ASSERT(!m_context_stack.empty());
+ if FK_YAML_UNLIKELY (m_context_stack.back().state == context_state_t::BLOCK_SEQUENCE_ENTRY) {
+ // empty mapping keys are not supported.
+ // ```yaml
+ // - : foo
+ // ```
+ throw parse_error("sequence key should not be empty.", line, indent);
+ }
+
+ if (m_flow_context_depth > 0) {
+ break;
+ }
+
+ // hold the line count of the key separator for later use.
+ const uint32_t old_indent = indent;
+ const uint32_t old_line = line;
+
+ token = lexer.get_next_token();
+ line = lexer.get_lines_processed();
+ indent = lexer.get_last_token_begin_pos();
+
+ const bool found_props = deserialize_node_properties(lexer, token, line, indent);
+ if (found_props && line == lexer.get_lines_processed()) {
+ // defer applying node properties for the subsequent node on the same line.
+ continue;
+ }
+
+ line = lexer.get_lines_processed();
+ indent = lexer.get_last_token_begin_pos();
+
+ const bool is_implicit_same_line =
+ (line == old_line) && (m_context_stack.empty() || old_indent > m_context_stack.back().indent);
+ if (is_implicit_same_line) {
+ // a key separator for an implicit key with its value on the same line.
+ continue;
+ }
+
+ if (line > old_line) {
+ if (m_needs_tag_impl) {
+ const tag_t tag_type = tag_resolver_type::resolve_tag(m_tag_name, mp_meta);
+ if (tag_type == tag_t::MAPPING || tag_type == tag_t::CUSTOM_TAG) {
+ // set YAML node properties here to distinguish them from those for the first key node
+ // as shown in the following snippet:
+ //
+ // ```yaml
+ // foo: !!map
+ // !!str 123: true
+ // ^
+ // this !!str tag overwrites the preceding !!map tag.
+ // ```
+ *mp_current_node = basic_node_type::mapping();
+ apply_directive_set(*mp_current_node);
+ apply_node_properties(*mp_current_node);
+ m_context_stack.emplace_back(line, indent, context_state_t::BLOCK_MAPPING, mp_current_node);
+ continue;
+ }
+ }
+
+ if (token.type == lexical_token_t::SEQUENCE_BLOCK_PREFIX) {
+ // a key separator preceding block sequence entries
+ *mp_current_node = basic_node_type::sequence({basic_node_type()});
+ apply_directive_set(*mp_current_node);
+ apply_node_properties(*mp_current_node);
+ auto& cur_context = m_context_stack.back();
+ cur_context.line = line;
+ cur_context.indent = indent;
+ cur_context.state = context_state_t::BLOCK_SEQUENCE;
+
+ mp_current_node = &(mp_current_node->as_seq().back());
+ apply_directive_set(*mp_current_node);
+ parse_context entry_context = cur_context;
+ entry_context.state = context_state_t::BLOCK_SEQUENCE_ENTRY;
+ entry_context.p_node = mp_current_node;
+ m_context_stack.emplace_back(std::move(entry_context));
+
+ token = lexer.get_next_token();
+ line = lexer.get_lines_processed();
+ indent = lexer.get_last_token_begin_pos();
+
+ const bool has_props = deserialize_node_properties(lexer, token, line, indent);
+ if (has_props) {
+ const uint32_t line_after_props = lexer.get_lines_processed();
+ if (line == line_after_props) {
+ // Skip updating the current indent to avoid stacking a wrong indentation.
+ //
+ // ```yaml
+ // &foo bar: baz
+ // ^
+ // the correct indent width for the "bar" node key.
+ // ```
+ continue;
+ }
+
+ // if node properties and the followed node are on different lines (i.e., the properties are
+ // for a container node), the application and the line advancement must happen here.
+ // Otherwise, a false indent error will be emitted. See
+ // https://github.com/fktn-k/fkYAML/issues/368 for more details.
+ line = line_after_props;
+ indent = lexer.get_last_token_begin_pos();
+ *mp_current_node = basic_node_type::mapping();
+ m_context_stack.emplace_back(
+ line_after_props, indent, context_state_t::BLOCK_MAPPING, mp_current_node);
+ apply_directive_set(*mp_current_node);
+ apply_node_properties(*mp_current_node);
+ }
+
+ continue;
+ }
+
+ if (indent <= m_context_stack.back().indent) {
+ FK_YAML_ASSERT(m_context_stack.back().state == context_state_t::MAPPING_VALUE);
+
+ // Mapping values can be omitted and are considered to be null.
+ // ```yaml
+ // foo:
+ // bar:
+ // baz:
+ // qux:
+ // # -> {foo: null, bar: {baz: null}, qux: null}
+ // ```
+ pop_to_parent_node(line, indent, [indent](const parse_context& c) {
+ return (c.state == context_state_t::BLOCK_MAPPING) && (indent == c.indent);
+ });
+ }
+
+ // defer checking the existence of a key separator after the following scalar until the next
+ // deserialize_scalar() call.
+ continue;
+ }
+
+ // handle explicit mapping key separators.
+ FK_YAML_ASSERT(m_context_stack.back().state == context_state_t::BLOCK_MAPPING_EXPLICIT_KEY);
+
+ basic_node_type key_node = std::move(*m_context_stack.back().p_node);
+ m_context_stack.pop_back();
+ m_context_stack.back().p_node->as_map().emplace(key_node, basic_node_type());
+ mp_current_node = &(m_context_stack.back().p_node->operator[](std::move(key_node)));
+ m_context_stack.emplace_back(
+ old_line, old_indent, context_state_t::BLOCK_MAPPING_EXPLICIT_VALUE, mp_current_node);
+
+ if (token.type == lexical_token_t::SEQUENCE_BLOCK_PREFIX) {
+ *mp_current_node = basic_node_type::sequence({basic_node_type()});
+ apply_directive_set(*mp_current_node);
+ apply_node_properties(*mp_current_node);
+ m_context_stack.emplace_back(line, indent, context_state_t::BLOCK_SEQUENCE, mp_current_node);
+
+ mp_current_node = &(mp_current_node->as_seq().back());
+ parse_context entry_context = m_context_stack.back();
+ entry_context.state = context_state_t::BLOCK_SEQUENCE_ENTRY;
+ entry_context.p_node = mp_current_node;
+ m_context_stack.emplace_back(std::move(entry_context));
+ break;
+ }
+
+ continue;
+ }
+ case lexical_token_t::ANCHOR_PREFIX:
+ case lexical_token_t::TAG_PREFIX:
+ deserialize_node_properties(lexer, token, line, indent);
+ // Skip updating the current indent to avoid stacking a wrong indentation.
+ // Note that node properties for block sequences as a mapping value are processed when a
+ // `lexical_token_t::KEY_SEPARATOR` token is processed.
+ //
+ // ```yaml
+ // &foo bar: baz
+ // ^
+ // the correct indent width for the "bar" node key.
+ // ```
+ continue;
+ case lexical_token_t::SEQUENCE_BLOCK_PREFIX: {
+ FK_YAML_ASSERT(!m_context_stack.empty());
+ const uint32_t parent_indent = m_context_stack.back().indent;
+ if (indent == parent_indent) {
+ // If the previous block sequence entry is empty, just move to the parent context.
+ // ```yaml
+ // foo:
+ // -
+ // - bar
+ // # ^ (here)
+ // # -> {foo: [null, bar]}
+ // ```
+ pop_to_parent_node(line, indent, [](const parse_context& c) {
+ return c.state == context_state_t::BLOCK_SEQUENCE;
+ });
+ }
+ else if (indent < parent_indent) {
+ pop_to_parent_node(line, indent, [indent](const parse_context& c) {
+ return c.state == context_state_t::BLOCK_SEQUENCE && indent == c.indent;
+ });
+ }
+ else /*parent_indent < indent*/ {
+ if FK_YAML_UNLIKELY (m_context_stack.back().state == context_state_t::BLOCK_SEQUENCE) {
+ // bad indentation like the following YAML:
+ // ```yaml
+ // - "foo"
+ // - bar
+ // # ^
+ // ```
+ throw parse_error("bad indentation of a mapping entry.", line, indent);
+ }
+
+ *mp_current_node = basic_node_type::sequence();
+ m_context_stack.emplace_back(line, indent, context_state_t::BLOCK_SEQUENCE, mp_current_node);
+ apply_directive_set(*mp_current_node);
+ apply_node_properties(*mp_current_node);
+ }
+
+ auto& seq = mp_current_node->as_seq();
+ seq.emplace_back(basic_node_type());
+ mp_current_node = &(seq.back());
+ apply_directive_set(*mp_current_node);
+ m_context_stack.emplace_back(line, indent, context_state_t::BLOCK_SEQUENCE_ENTRY, mp_current_node);
+ break;
+ }
+ case lexical_token_t::SEQUENCE_FLOW_BEGIN:
+ if (m_flow_context_depth == 0) {
+ lexer.set_context_state(true);
+
+ if (indent <= m_context_stack.back().indent) {
+ pop_to_parent_node(line, indent, [indent](const parse_context& c) {
+ switch (c.state) {
+ case context_state_t::BLOCK_MAPPING:
+ case context_state_t::MAPPING_VALUE:
+ return indent == c.indent;
+ default:
+ return false;
+ }
+ });
+ }
+ }
+ else if FK_YAML_UNLIKELY (m_flow_token_state == flow_token_state_t::NEEDS_SEPARATOR_OR_SUFFIX) {
+ throw parse_error("Flow sequence beginning is found without separated with a comma.", line, indent);
+ }
+
+ ++m_flow_context_depth;
+
+ switch (m_context_stack.back().state) {
+ case context_state_t::BLOCK_SEQUENCE:
+ case context_state_t::FLOW_SEQUENCE:
+ mp_current_node->as_seq().emplace_back(basic_node_type::sequence());
+ mp_current_node = &(mp_current_node->as_seq().back());
+ m_context_stack.emplace_back(line, indent, context_state_t::FLOW_SEQUENCE, mp_current_node);
+ break;
+ case context_state_t::BLOCK_MAPPING:
+ case context_state_t::FLOW_MAPPING:
+ // heap-allocated node will be freed in handling the corresponding SEQUENCE_FLOW_END event.
+ m_context_stack.emplace_back(
+ line, indent, context_state_t::FLOW_SEQUENCE_KEY, new basic_node_type(node_type::SEQUENCE));
+ mp_current_node = m_context_stack.back().p_node;
+ break;
+ default: {
+ *mp_current_node = basic_node_type::sequence();
+ parse_context& last_context = m_context_stack.back();
+ last_context.line = line;
+ last_context.indent = indent;
+ last_context.state = context_state_t::FLOW_SEQUENCE;
+ break;
+ }
+ }
+
+ apply_directive_set(*mp_current_node);
+ apply_node_properties(*mp_current_node);
+
+ m_flow_token_state = flow_token_state_t::NEEDS_VALUE_OR_SUFFIX;
+ break;
+ case lexical_token_t::SEQUENCE_FLOW_END: {
+ if FK_YAML_UNLIKELY (m_flow_context_depth == 0) {
+ throw parse_error("Flow sequence ending is found outside the flow context.", line, indent);
+ }
+
+ if (--m_flow_context_depth == 0) {
+ lexer.set_context_state(false);
+ }
+
+ // find the corresponding flow sequence beginning.
+ auto itr = std::find_if( // LCOV_EXCL_LINE
+ m_context_stack.rbegin(),
+ m_context_stack.rend(),
+ [](const parse_context& c) {
+ switch (c.state) {
+ case context_state_t::FLOW_SEQUENCE_KEY:
+ case context_state_t::FLOW_SEQUENCE:
+ return true;
+ default:
+ return false;
+ }
+ });
+
+ const bool is_valid = itr != m_context_stack.rend();
+ if FK_YAML_UNLIKELY (!is_valid) {
+ throw parse_error("No corresponding flow sequence beginning is found.", line, indent);
+ }
+
+ // keep the last state for later processing.
+ parse_context& last_context = m_context_stack.back();
+ mp_current_node = last_context.p_node;
+ last_context.p_node = nullptr;
+ indent = last_context.indent;
+ const context_state_t state = last_context.state;
+ m_context_stack.pop_back();
+
+ // handle cases where the flow sequence is a mapping key node.
+
+ if (!m_context_stack.empty() && state == context_state_t::FLOW_SEQUENCE_KEY) {
+ basic_node_type key_node = std::move(*mp_current_node);
+ delete mp_current_node;
+ mp_current_node = m_context_stack.back().p_node;
+ m_flow_token_state = flow_token_state_t::NEEDS_VALUE_OR_SUFFIX;
+
+ add_new_key(std::move(key_node), line, indent);
+ break;
+ }
+
+ token = lexer.get_next_token();
+ if (token.type == lexical_token_t::KEY_SEPARATOR) {
+ basic_node_type key_node = basic_node_type::mapping();
+ apply_directive_set(key_node);
+ mp_current_node->swap(key_node);
+
+ m_context_stack.emplace_back(line, indent, context_state_t::BLOCK_MAPPING, mp_current_node);
+ m_flow_token_state = flow_token_state_t::NEEDS_VALUE_OR_SUFFIX;
+
+ add_new_key(std::move(key_node), line, indent);
+ }
+ else {
+ if (!m_context_stack.empty()) {
+ mp_current_node = m_context_stack.back().p_node;
+ }
+ if (m_flow_context_depth > 0) {
+ m_flow_token_state = flow_token_state_t::NEEDS_SEPARATOR_OR_SUFFIX;
+ }
+ }
+
+ indent = lexer.get_last_token_begin_pos();
+ line = lexer.get_lines_processed();
+ continue;
+ }
+ case lexical_token_t::MAPPING_FLOW_BEGIN:
+ if (m_flow_context_depth == 0) {
+ lexer.set_context_state(true);
+
+ if (indent <= m_context_stack.back().indent) {
+ pop_to_parent_node(line, indent, [indent](const parse_context& c) {
+ switch (c.state) {
+ case context_state_t::BLOCK_MAPPING:
+ case context_state_t::MAPPING_VALUE:
+ return indent == c.indent;
+ default:
+ return false;
+ }
+ });
+ }
+ }
+ else if FK_YAML_UNLIKELY (m_flow_token_state == flow_token_state_t::NEEDS_SEPARATOR_OR_SUFFIX) {
+ throw parse_error("Flow mapping beginning is found without separated with a comma.", line, indent);
+ }
+
+ ++m_flow_context_depth;
+
+ switch (m_context_stack.back().state) {
+ case context_state_t::BLOCK_SEQUENCE:
+ case context_state_t::FLOW_SEQUENCE:
+ mp_current_node->as_seq().emplace_back(basic_node_type::mapping());
+ mp_current_node = &(mp_current_node->as_seq().back());
+ m_context_stack.emplace_back(line, indent, context_state_t::FLOW_MAPPING, mp_current_node);
+ break;
+ case context_state_t::BLOCK_MAPPING:
+ case context_state_t::FLOW_MAPPING:
+ // heap-allocated node will be freed in handling the corresponding MAPPING_FLOW_END event.
+ m_context_stack.emplace_back(
+ line, indent, context_state_t::FLOW_MAPPING_KEY, new basic_node_type(node_type::MAPPING));
+ mp_current_node = m_context_stack.back().p_node;
+ break;
+ default: {
+ *mp_current_node = basic_node_type::mapping();
+ parse_context& last_context = m_context_stack.back();
+ last_context.line = line;
+ last_context.indent = indent;
+ last_context.state = context_state_t::FLOW_MAPPING;
+ break;
+ }
+ }
+
+ apply_directive_set(*mp_current_node);
+ apply_node_properties(*mp_current_node);
+
+ line = lexer.get_lines_processed();
+ indent = lexer.get_last_token_begin_pos();
+
+ m_flow_token_state = flow_token_state_t::NEEDS_VALUE_OR_SUFFIX;
+ break;
+ case lexical_token_t::MAPPING_FLOW_END: {
+ if FK_YAML_UNLIKELY (m_flow_context_depth == 0) {
+ throw parse_error("Flow mapping ending is found outside the flow context.", line, indent);
+ }
+
+ if (--m_flow_context_depth == 0) {
+ lexer.set_context_state(false);
+ }
+
+ // find the corresponding flow mapping beginning.
+ auto itr = std::find_if( // LCOV_EXCL_LINE
+ m_context_stack.rbegin(),
+ m_context_stack.rend(),
+ [](const parse_context& c) {
+ switch (c.state) {
+ case context_state_t::FLOW_MAPPING_KEY:
+ case context_state_t::FLOW_MAPPING:
+ return true;
+ default:
+ return false;
+ }
+ });
+
+ const bool is_valid = itr != m_context_stack.rend();
+ if FK_YAML_UNLIKELY (!is_valid) {
+ throw parse_error("No corresponding flow mapping beginning is found.", line, indent);
+ }
+
+ // keep the last state for later processing.
+ parse_context& last_context = m_context_stack.back();
+ mp_current_node = last_context.p_node;
+ last_context.p_node = nullptr;
+ indent = last_context.indent;
+ const context_state_t state = last_context.state;
+ m_context_stack.pop_back();
+
+ // handle cases where the flow mapping is a mapping key node.
+
+ if (!m_context_stack.empty() && state == context_state_t::FLOW_MAPPING_KEY) {
+ basic_node_type key_node = std::move(*mp_current_node);
+ delete mp_current_node;
+ mp_current_node = m_context_stack.back().p_node;
+ m_flow_token_state = flow_token_state_t::NEEDS_VALUE_OR_SUFFIX;
+
+ add_new_key(std::move(key_node), line, indent);
+ break;
+ }
+
+ token = lexer.get_next_token();
+ if (token.type == lexical_token_t::KEY_SEPARATOR) {
+ basic_node_type key_node = basic_node_type::mapping();
+ apply_directive_set(key_node);
+ mp_current_node->swap(key_node);
+
+ m_context_stack.emplace_back(line, indent, context_state_t::BLOCK_MAPPING, mp_current_node);
+ m_flow_token_state = flow_token_state_t::NEEDS_VALUE_OR_SUFFIX;
+
+ add_new_key(std::move(key_node), line, indent);
+ }
+ else {
+ if (!m_context_stack.empty()) {
+ mp_current_node = m_context_stack.back().p_node;
+ }
+ if (m_flow_context_depth > 0) {
+ m_flow_token_state = flow_token_state_t::NEEDS_SEPARATOR_OR_SUFFIX;
+ }
+ }
+
+ indent = lexer.get_last_token_begin_pos();
+ line = lexer.get_lines_processed();
+ continue;
+ }
+ case lexical_token_t::VALUE_SEPARATOR:
+ FK_YAML_ASSERT(m_flow_context_depth > 0);
+ if FK_YAML_UNLIKELY (m_flow_token_state != flow_token_state_t::NEEDS_SEPARATOR_OR_SUFFIX) {
+ throw parse_error("invalid value separator is found.", line, indent);
+ }
+ m_flow_token_state = flow_token_state_t::NEEDS_VALUE_OR_SUFFIX;
+ break;
+ case lexical_token_t::ALIAS_PREFIX: {
+ // An alias node must not specify any properties (tag, anchor).
+ // https://yaml.org/spec/1.2.2/#71-alias-nodes
+ if FK_YAML_UNLIKELY (m_needs_tag_impl) {
+ throw parse_error("Tag cannot be specified to an alias node", line, indent);
+ }
+ if FK_YAML_UNLIKELY (m_needs_anchor_impl) {
+ throw parse_error("Anchor cannot be specified to an alias node.", line, indent);
+ }
+
+ std::string token_str = std::string(token.str.begin(), token.str.end());
+
+ const auto anchor_counts = static_cast<uint32_t>(mp_meta->anchor_table.count(token_str));
+ if FK_YAML_UNLIKELY (anchor_counts == 0) {
+ throw parse_error("The given anchor name must appear prior to the alias node.", line, indent);
+ }
+
+ basic_node_type node {};
+ node.m_attrs |= detail::node_attr_bits::alias_bit;
+ node.m_prop.anchor = std::move(token_str);
+ detail::node_attr_bits::set_anchor_offset(anchor_counts - 1, node.m_attrs);
+
+ apply_directive_set(node);
+ apply_node_properties(node);
+
+ deserialize_scalar(lexer, std::move(node), indent, line, token);
+ continue;
+ }
+ case lexical_token_t::PLAIN_SCALAR:
+ case lexical_token_t::SINGLE_QUOTED_SCALAR:
+ case lexical_token_t::DOUBLE_QUOTED_SCALAR: {
+ tag_t tag_type {tag_t::NONE};
+ if (m_needs_tag_impl) {
+ tag_type = tag_resolver_type::resolve_tag(m_tag_name, mp_meta);
+ }
+
+ basic_node_type node = scalar_parser_type(line, indent).parse_flow(token.type, tag_type, token.str);
+ apply_directive_set(node);
+ apply_node_properties(node);
+
+ deserialize_scalar(lexer, std::move(node), indent, line, token);
+ continue;
+ }
+ case lexical_token_t::BLOCK_LITERAL_SCALAR:
+ case lexical_token_t::BLOCK_FOLDED_SCALAR: {
+ tag_t tag_type {tag_t::NONE};
+ if (m_needs_tag_impl) {
+ tag_type = tag_resolver_type::resolve_tag(m_tag_name, mp_meta);
+ }
+
+ basic_node_type node =
+ scalar_parser_type(line, indent)
+ .parse_block(token.type, tag_type, token.str, lexer.get_block_scalar_header());
+ apply_directive_set(node);
+ apply_node_properties(node);
+
+ deserialize_scalar(lexer, std::move(node), indent, line, token);
+ continue;
+ }
+ // these tokens end parsing the current YAML document.
+ case lexical_token_t::END_OF_BUFFER:
+ // This handles an empty input.
+ last_type = token.type;
+ return;
+ case lexical_token_t::END_OF_DIRECTIVES:
+ case lexical_token_t::END_OF_DOCUMENT:
+ if FK_YAML_UNLIKELY (m_flow_context_depth > 0) {
+ throw parse_error("An invalid document marker found in a flow collection", line, indent);
+ }
+ last_type = token.type;
+ return;
+ // no way to come here while lexically analyzing document contents.
+ case lexical_token_t::YAML_VER_DIRECTIVE: // LCOV_EXCL_LINE
+ case lexical_token_t::TAG_DIRECTIVE: // LCOV_EXCL_LINE
+ case lexical_token_t::INVALID_DIRECTIVE: // LCOV_EXCL_LINE
+ detail::unreachable(); // LCOV_EXCL_LINE
+ }
+
+ token = lexer.get_next_token();
+ indent = lexer.get_last_token_begin_pos();
+ line = lexer.get_lines_processed();
+ } while (token.type != lexical_token_t::END_OF_BUFFER);
+
+ last_type = token.type;
+ }
+
+ /// @brief Deserializes YAML node properties (anchor and/or tag names) if they exist
+ /// @param lexer The lexical analyzer to be used.
+ /// @param last_type The variable to store the last lexical token type.
+ /// @param line The variable to store the line of either the first property or the last non-property token.
+ /// @param indent The variable to store the indent of either the first property or the last non-property token.
+ /// @return true if any property is found, false otherwise.
+ bool deserialize_node_properties(lexer_type& lexer, lexical_token& last_token, uint32_t& line, uint32_t& indent) {
+ m_needs_anchor_impl = m_needs_tag_impl = false;
+
+ lexical_token token = last_token;
+ bool ends_loop {false};
+ do {
+ if (line < lexer.get_lines_processed()) {
+ break;
+ }
+
+ switch (token.type) {
+ case lexical_token_t::ANCHOR_PREFIX:
+ if FK_YAML_UNLIKELY (m_needs_anchor_impl) {
+ throw parse_error(
+ "anchor name cannot be specified more than once to the same node.",
+ lexer.get_lines_processed(),
+ lexer.get_last_token_begin_pos());
+ }
+
+ m_anchor_name = token.str;
+ m_needs_anchor_impl = true;
+
+ if (!m_needs_tag_impl) {
+ line = lexer.get_lines_processed();
+ indent = lexer.get_last_token_begin_pos();
+ }
+
+ token = lexer.get_next_token();
+ break;
+ case lexical_token_t::TAG_PREFIX: {
+ if FK_YAML_UNLIKELY (m_needs_tag_impl) {
+ throw parse_error(
+ "tag name cannot be specified more than once to the same node.",
+ lexer.get_lines_processed(),
+ lexer.get_last_token_begin_pos());
+ }
+
+ m_tag_name = token.str;
+ m_needs_tag_impl = true;
+
+ if (!m_needs_anchor_impl) {
+ line = lexer.get_lines_processed();
+ indent = lexer.get_last_token_begin_pos();
+ }
+
+ token = lexer.get_next_token();
+ break;
+ }
+ default:
+ ends_loop = true;
+ break;
+ }
+ } while (!ends_loop);
+
+ last_token = token;
+ const bool prop_specified = m_needs_anchor_impl || m_needs_tag_impl;
+ if (!prop_specified) {
+ line = lexer.get_lines_processed();
+ indent = lexer.get_last_token_begin_pos();
+ }
+
+ return prop_specified;
+ }
+
+ /// @brief Add new key string to the current YAML node.
+ /// @param key a key string to be added to the current YAML node.
+ /// @param line The line where the key is found.
+ /// @param indent The indentation width in the current line where the key is found.
+ void add_new_key(basic_node_type&& key, const uint32_t line, const uint32_t indent) {
+ if (m_flow_context_depth == 0) {
+ if FK_YAML_UNLIKELY (m_context_stack.back().indent < indent) {
+ // bad indentation like the following YAML:
+ // ```yaml
+ // foo: true
+ // baz: 123
+ // # ^
+ // ```
+ throw parse_error("bad indentation of a mapping entry.", line, indent);
+ }
+
+ pop_to_parent_node(line, indent, [indent](const parse_context& c) {
+ return (c.state == context_state_t::BLOCK_MAPPING) && (indent == c.indent);
+ });
+ }
+ else {
+ if FK_YAML_UNLIKELY (m_flow_token_state != flow_token_state_t::NEEDS_VALUE_OR_SUFFIX) {
+ throw parse_error("Flow mapping entry is found without separated with a comma.", line, indent);
+ }
+
+ if (mp_current_node->is_sequence()) {
+ mp_current_node->as_seq().emplace_back(basic_node_type::mapping());
+ mp_current_node = &(mp_current_node->operator[](mp_current_node->size() - 1));
+ m_context_stack.emplace_back(line, indent, context_state_t::BLOCK_MAPPING, mp_current_node);
+ }
+ }
+
+ auto itr = mp_current_node->as_map().emplace(std::move(key), basic_node_type());
+ if FK_YAML_UNLIKELY (!itr.second) {
+ throw parse_error("Detected duplication in mapping keys.", line, indent);
+ }
+
+ mp_current_node = &(itr.first->second);
+ const parse_context& key_context = m_context_stack.back();
+ m_context_stack.emplace_back(
+ key_context.line, key_context.indent, context_state_t::MAPPING_VALUE, mp_current_node);
+ }
+
+ /// @brief Assign node value to the current node.
+ /// @param node_value A rvalue basic_node_type object to be assigned to the current node.
+ void assign_node_value(basic_node_type&& node_value, const uint32_t line, const uint32_t indent) {
+ if (mp_current_node->is_sequence()) {
+ FK_YAML_ASSERT(m_flow_context_depth > 0);
+
+ if FK_YAML_UNLIKELY (m_flow_token_state != flow_token_state_t::NEEDS_VALUE_OR_SUFFIX) {
+ // Flow sequence entries are not allowed to be empty.
+ // ```yaml
+ // [foo,,bar]
+ // ```
+ throw parse_error("flow sequence entry is found without separated with a comma.", line, indent);
+ }
+
+ mp_current_node->as_seq().emplace_back(std::move(node_value));
+ m_flow_token_state = flow_token_state_t::NEEDS_SEPARATOR_OR_SUFFIX;
+ return;
+ }
+
+ // a scalar node
+ *mp_current_node = std::move(node_value);
+ if FK_YAML_UNLIKELY (m_context_stack.empty()) {
+ // single scalar document.
+ return;
+ }
+
+ if FK_YAML_LIKELY (m_context_stack.back().state != context_state_t::BLOCK_MAPPING_EXPLICIT_KEY) {
+ m_context_stack.pop_back();
+ mp_current_node = m_context_stack.back().p_node;
+
+ if (m_flow_context_depth > 0) {
+ m_flow_token_state = flow_token_state_t::NEEDS_SEPARATOR_OR_SUFFIX;
+ }
+ }
+ }
+
+ /// @brief Deserialize a detected scalar node.
+ /// @param lexer The lexical analyzer to be used.
+ /// @param node A scalar node.
+ /// @param indent The current indentation width. Can be updated in this function.
+ /// @param line The number of processed lines. Can be updated in this function.
+ /// @param token The storage for last lexical token.
+ /// @return true if next token has already been got, false otherwise.
+ void deserialize_scalar(
+ lexer_type& lexer, basic_node_type&& node, uint32_t& indent, uint32_t& line, lexical_token& token) {
+ token = lexer.get_next_token();
+ if (mp_current_node->is_mapping()) {
+ const bool is_key_sep_followed =
+ (token.type == lexical_token_t::KEY_SEPARATOR) && (line == lexer.get_lines_processed());
+ if FK_YAML_UNLIKELY (!is_key_sep_followed) {
+ throw parse_error(
+ "The \":\" mapping value indicator must be followed after a mapping key.",
+ lexer.get_lines_processed(),
+ lexer.get_last_token_begin_pos());
+ }
+ add_new_key(std::move(node), line, indent);
+ }
+ else if (token.type == lexical_token_t::KEY_SEPARATOR) {
+ if FK_YAML_UNLIKELY (line != lexer.get_lines_processed()) {
+ // This path is for explicit mapping key separator like:
+ // ```yaml
+ // ? foo
+ // : bar
+ // # ^ this separator
+ // ```
+ assign_node_value(std::move(node), line, indent);
+ indent = lexer.get_last_token_begin_pos();
+ line = lexer.get_lines_processed();
+
+ if (m_context_stack.back().state != context_state_t::BLOCK_MAPPING_EXPLICIT_KEY) {
+ pop_to_parent_node(line, indent, [indent](const parse_context& c) {
+ return c.state == context_state_t::BLOCK_MAPPING_EXPLICIT_KEY && indent == c.indent;
+ });
+ }
+ return;
+ }
+
+ if (mp_current_node->is_scalar()) {
+ if FK_YAML_LIKELY (!m_context_stack.empty()) {
+ parse_context& cur_context = m_context_stack.back();
+ switch (cur_context.state) {
+ case context_state_t::BLOCK_MAPPING_EXPLICIT_KEY:
+ case context_state_t::BLOCK_MAPPING_EXPLICIT_VALUE:
+ m_context_stack.emplace_back(line, indent, context_state_t::BLOCK_MAPPING, mp_current_node);
+ break;
+ case context_state_t::BLOCK_SEQUENCE_ENTRY:
+ if FK_YAML_UNLIKELY (cur_context.indent >= indent) {
+ // This handles combination of empty block sequence entry and block mapping entry with the
+ // same indentation level, for examples:
+ // ```yaml
+ // foo:
+ // bar:
+ // - # These entries are indented
+ // baz: 123 # with the same width.
+ // # ^^^
+ // ```
+ pop_to_parent_node(line, indent, [indent](const parse_context& c) {
+ return c.state == context_state_t::BLOCK_MAPPING && indent == c.indent;
+ });
+ add_new_key(std::move(node), line, indent);
+ indent = lexer.get_last_token_begin_pos();
+ line = lexer.get_lines_processed();
+ return;
+ }
+
+ m_context_stack.emplace_back(line, indent, context_state_t::BLOCK_MAPPING, mp_current_node);
+ break;
+ default:
+ if FK_YAML_UNLIKELY (cur_context.line == line) {
+ throw parse_error("Multiple mapping keys are specified on the same line.", line, indent);
+ }
+ cur_context.line = line;
+ cur_context.indent = indent;
+ cur_context.state = context_state_t::BLOCK_MAPPING;
+ break;
+ }
+
+ *mp_current_node = basic_node_type::mapping();
+ apply_directive_set(*mp_current_node);
+ }
+ else {
+ // root mapping node
+
+ m_context_stack.emplace_back(line, indent, context_state_t::BLOCK_MAPPING, mp_current_node);
+ *mp_current_node = basic_node_type::mapping();
+ apply_directive_set(*mp_current_node);
+
+ // apply node properties if any to the root mapping node.
+ if (!m_root_anchor_name.empty()) {
+ mp_current_node->add_anchor_name(
+ std::string(m_root_anchor_name.begin(), m_root_anchor_name.end()));
+ m_root_anchor_name = {};
+ }
+ if (!m_root_tag_name.empty()) {
+ mp_current_node->add_tag_name(std::string(m_root_tag_name.begin(), m_root_tag_name.end()));
+ m_root_tag_name = {};
+ }
+ }
+ }
+ add_new_key(std::move(node), line, indent);
+ }
+ else {
+ assign_node_value(std::move(node), line, indent);
+ }
+
+ indent = lexer.get_last_token_begin_pos();
+ line = lexer.get_lines_processed();
+ }
+
+ /// @brief Pops parent contexts to a block mapping with the given indentation.
+ /// @tparam Pred Functor type to test parent contexts.
+ /// @param line The current line count.
+ /// @param indent The indentation level of the target parent block mapping.
+ template <typename Pred>
+ void pop_to_parent_node(uint32_t line, uint32_t indent, Pred&& pred) {
+ FK_YAML_ASSERT(!m_context_stack.empty());
+
+ // LCOV_EXCL_START
+ auto itr = std::find_if(m_context_stack.rbegin(), m_context_stack.rend(), std::forward<Pred>(pred));
+ // LCOV_EXCL_STOP
+ const bool is_indent_valid = (itr != m_context_stack.rend());
+ if FK_YAML_UNLIKELY (!is_indent_valid) {
+ throw parse_error("Detected invalid indentation.", line, indent);
+ }
+
+ const auto pop_num = static_cast<uint32_t>(std::distance(m_context_stack.rbegin(), itr));
+
+ // move back to the parent block mapping.
+ for (uint32_t i = 0; i < pop_num; i++) {
+ m_context_stack.pop_back();
+ }
+ mp_current_node = m_context_stack.back().p_node;
+ }
+
+ /// @brief Set YAML directive properties to the given node.
+ /// @param node A basic_node_type object to be set YAML directive properties.
+ void apply_directive_set(basic_node_type& node) noexcept {
+ node.mp_meta = mp_meta;
+ }
+
+ /// @brief Set YAML node properties (anchor and/or tag names) to the given node.
+ /// @param node A node type object to be set YAML node properties.
+ void apply_node_properties(basic_node_type& node) {
+ if (m_needs_anchor_impl) {
+ node.add_anchor_name(std::string(m_anchor_name.begin(), m_anchor_name.end()));
+ m_needs_anchor_impl = false;
+ m_anchor_name = {};
+ }
+
+ if (m_needs_tag_impl) {
+ node.add_tag_name(std::string(m_tag_name.begin(), m_tag_name.end()));
+ m_needs_tag_impl = false;
+ m_tag_name = {};
+ }
+ }
+
+ /// @brief Update the target YAML version with an input string.
+ /// @param version_str A YAML version string.
+ yaml_version_type convert_yaml_version(str_view version_str) noexcept {
+ return (version_str.compare("1.1") == 0) ? yaml_version_type::VERSION_1_1 : yaml_version_type::VERSION_1_2;
+ }
+
+private:
+ /// The currently focused YAML node.
+ basic_node_type* mp_current_node {nullptr};
+ /// The stack of parse contexts.
+ std::deque<parse_context> m_context_stack {};
+ /// The current depth of flow contexts.
+ uint32_t m_flow_context_depth {0};
+ /// The set of YAML directives.
+ std::shared_ptr<doc_metainfo_type> mp_meta {};
+ /// A flag to determine the need for YAML anchor node implementation.
+ bool m_needs_anchor_impl {false};
+ /// A flag to determine the need for a corresponding node with the last YAML tag.
+ bool m_needs_tag_impl {false};
+ /// A flag to determine the need for a value separator or a flow suffix to follow.
+ flow_token_state_t m_flow_token_state {flow_token_state_t::NEEDS_VALUE_OR_SUFFIX};
+ /// The last YAML anchor name.
+ str_view m_anchor_name;
+ /// The last tag name.
+ str_view m_tag_name;
+ /// The root YAML anchor name. (maybe empty and unused)
+ str_view m_root_anchor_name;
+ /// The root tag name. (maybe empty and unused)
+ str_view m_root_tag_name;
+};
+
+FK_YAML_DETAIL_NAMESPACE_END
+
+#endif /* FK_YAML_DETAIL_INPUT_DESERIALIZER_HPP */
+
+// #include <fkYAML/detail/input/input_adapter.hpp>
+// _______ __ __ __ _____ __ __ __
+// | __| |_/ | \_/ |/ _ \ / \/ \| | fkYAML: A C++ header-only YAML library
+// | __| _ < \_ _/| ___ | _ | |___ version 0.4.2
+// |__| |_| \__| |_| |_| |_|___||___|______| https://github.com/fktn-k/fkYAML
+//
+// SPDX-FileCopyrightText: 2023-2025 Kensuke Fukutani <fktn.dev@gmail.com>
+// SPDX-License-Identifier: MIT
+
+#ifndef FK_YAML_DETAIL_INPUT_INPUT_ADAPTER_HPP
+#define FK_YAML_DETAIL_INPUT_INPUT_ADAPTER_HPP
+
+#include <array>
+#include <cstdio>
+#include <cstring>
+#include <deque>
+#include <istream>
+#include <iterator>
+#include <string>
+
+// #include <fkYAML/detail/macros/define_macros.hpp>
+
+// #include <fkYAML/detail/assert.hpp>
+
+// #include <fkYAML/detail/encodings/utf_encode_detector.hpp>
+// _______ __ __ __ _____ __ __ __
+// | __| |_/ | \_/ |/ _ \ / \/ \| | fkYAML: A C++ header-only YAML library
+// | __| _ < \_ _/| ___ | _ | |___ version 0.4.2
+// |__| |_| \__| |_| |_| |_|___||___|______| https://github.com/fktn-k/fkYAML
+//
+// SPDX-FileCopyrightText: 2023-2025 Kensuke Fukutani <fktn.dev@gmail.com>
+// SPDX-License-Identifier: MIT
+
+#ifndef FK_YAML_DETAIL_ENCODINGS_UTF_ENCODE_DETECTOR_HPP
+#define FK_YAML_DETAIL_ENCODINGS_UTF_ENCODE_DETECTOR_HPP
+
+#include <cstdint>
+#include <istream>
+
+// #include <fkYAML/detail/macros/define_macros.hpp>
+
+// #include <fkYAML/detail/encodings/utf_encode_t.hpp>
+// _______ __ __ __ _____ __ __ __
+// | __| |_/ | \_/ |/ _ \ / \/ \| | fkYAML: A C++ header-only YAML library
+// | __| _ < \_ _/| ___ | _ | |___ version 0.4.2
+// |__| |_| \__| |_| |_| |_|___||___|______| https://github.com/fktn-k/fkYAML
+//
+// SPDX-FileCopyrightText: 2023-2025 Kensuke Fukutani <fktn.dev@gmail.com>
+// SPDX-License-Identifier: MIT
+
+#ifndef FK_YAML_DETAIL_ENCODINGS_UTF_ENCODE_T_HPP
+#define FK_YAML_DETAIL_ENCODINGS_UTF_ENCODE_T_HPP
+
+#include <cstdint>
+
+// #include <fkYAML/detail/macros/define_macros.hpp>
+
+
+FK_YAML_DETAIL_NAMESPACE_BEGIN
+
+/// @brief Definition of Unicode encoding types
+/// @note Since fkYAML doesn't treat UTF-16/UTF-32 encoded characters per byte, endians do not matter.
+enum class utf_encode_t : std::uint8_t {
+ UTF_8, //!< UTF-8
+ UTF_16BE, //!< UTF-16 Big Endian
+ UTF_16LE, //!< UTF-16 Little Endian
+ UTF_32BE, //!< UTF-32 Big Endian
+ UTF_32LE, //!< UTF-32 Little Endian
+};
+
+FK_YAML_DETAIL_NAMESPACE_END
+
+#endif /* FK_YAML_DETAIL_ENCODINGS_UTF_ENCODE_T_HPP */
+
+// #include <fkYAML/detail/meta/stl_supplement.hpp>
+
+// #include <fkYAML/detail/meta/type_traits.hpp>
+
+// #include <fkYAML/exception.hpp>
+
+
+FK_YAML_DETAIL_NAMESPACE_BEGIN
+
+/// @brief Detect an encoding type for UTF-8 expected inputs.
+/// @note This function doesn't support the case where the first character is null.
+/// @param[in] bytes 4 bytes of an input character sequence.
+/// @param[out] has_bom Whether the input contains a BOM.
+/// @return A detected encoding type.
+inline utf_encode_t detect_encoding_type(const std::array<uint8_t, 4>& bytes, bool& has_bom) noexcept {
+ has_bom = false;
+
+ const uint8_t byte0 = bytes[0];
+ const uint8_t byte1 = bytes[1];
+ const uint8_t byte2 = bytes[2];
+ const uint8_t byte3 = bytes[3];
+
+ // Check if a BOM exists.
+
+ if (byte0 == static_cast<uint8_t>(0xEFu) && byte1 == static_cast<uint8_t>(0xBBu) &&
+ byte2 == static_cast<uint8_t>(0xBFu)) {
+ has_bom = true;
+ return utf_encode_t::UTF_8;
+ }
+
+ if (byte0 == 0 && byte1 == 0 && byte2 == static_cast<uint8_t>(0xFEu) && byte3 == static_cast<uint8_t>(0xFFu)) {
+ has_bom = true;
+ return utf_encode_t::UTF_32BE;
+ }
+
+ if (byte0 == static_cast<uint8_t>(0xFFu) && byte1 == static_cast<uint8_t>(0xFEu) && byte2 == 0 && byte3 == 0) {
+ has_bom = true;
+ return utf_encode_t::UTF_32LE;
+ }
+
+ if (byte0 == static_cast<uint8_t>(0xFEu) && byte1 == static_cast<uint8_t>(0xFFu)) {
+ has_bom = true;
+ return utf_encode_t::UTF_16BE;
+ }
+
+ if (byte0 == static_cast<uint8_t>(0xFFu) && byte1 == static_cast<uint8_t>(0xFEu)) {
+ has_bom = true;
+ return utf_encode_t::UTF_16LE;
+ }
+
+ // Test the first character assuming it's an ASCII character.
+
+ if (byte0 == 0 && byte1 == 0 && byte2 == 0 && 0 < byte3 && byte3 < static_cast<uint8_t>(0x80u)) {
+ return utf_encode_t::UTF_32BE;
+ }
+
+ if (0 < byte0 && byte0 < static_cast<uint8_t>(0x80u) && byte1 == 0 && byte2 == 0 && byte3 == 0) {
+ return utf_encode_t::UTF_32LE;
+ }
+
+ if (byte0 == 0 && 0 < byte1 && byte1 < static_cast<uint8_t>(0x80u)) {
+ return utf_encode_t::UTF_16BE;
+ }
+
+ if (0 < byte0 && byte0 < static_cast<uint8_t>(0x80u) && byte1 == 0) {
+ return utf_encode_t::UTF_16LE;
+ }
+
+ return utf_encode_t::UTF_8;
+}
+
+/// @brief A class which detects UTF encoding type and the existence of a BOM at the beginning.
+/// @tparam ItrType Type of iterators for the input.
+template <typename ItrType, typename = void>
+struct utf_encode_detector {};
+
+/// @brief The partial specialization of utf_encode_detector for char iterators.
+/// @tparam ItrType An iterator type.
+template <typename ItrType>
+struct utf_encode_detector<ItrType, enable_if_t<is_iterator_of<ItrType, char>::value>> {
+ /// @brief Detects the encoding type of the input, and consumes a BOM if it exists.
+ /// @param begin The iterator to the first element of an input.
+ /// @param end The iterator to the past-the end element of an input.
+ /// @return A detected encoding type.
+ static utf_encode_t detect(ItrType& begin, const ItrType& end) noexcept {
+ if FK_YAML_UNLIKELY (begin == end) {
+ return utf_encode_t::UTF_8;
+ }
+
+ // the inner curly braces are necessary for older compilers
+ std::array<uint8_t, 4> bytes {{}};
+ bytes.fill(0xFFu);
+ auto current = begin;
+ for (int i = 0; i < 4 && current != end; i++, ++current) {
+ bytes[i] = static_cast<uint8_t>(*current); // NOLINT(cppcoreguidelines-pro-bounds-constant-array-index)
+ }
+
+ bool has_bom = false;
+ const utf_encode_t encode_type = detect_encoding_type(bytes, has_bom);
+
+ if (has_bom) {
+ // skip reading the BOM.
+ switch (encode_type) {
+ case utf_encode_t::UTF_8:
+ std::advance(begin, 3);
+ break;
+ case utf_encode_t::UTF_16BE:
+ case utf_encode_t::UTF_16LE:
+ std::advance(begin, 2);
+ break;
+ case utf_encode_t::UTF_32BE:
+ case utf_encode_t::UTF_32LE:
+ std::advance(begin, 4);
+ break;
+ }
+ }
+
+ return encode_type;
+ }
+};
+
+#if FK_YAML_HAS_CHAR8_T
+
+/// @brief The partial specialization of utf_encode_detector for char8_t iterators.
+/// @tparam ItrType An iterator type.
+template <typename ItrType>
+struct utf_encode_detector<ItrType, enable_if_t<is_iterator_of<ItrType, char8_t>::value>> {
+ /// @brief Detects the encoding type of the input, and consumes a BOM if it exists.
+ /// @param begin The iterator to the first element of an input.
+ /// @param end The iterator to the past-the end element of an input.
+ /// @return A detected encoding type.
+ static utf_encode_t detect(ItrType& begin, const ItrType& end) {
+ if FK_YAML_UNLIKELY (begin == end) {
+ return utf_encode_t::UTF_8;
+ }
+
+ std::array<uint8_t, 4> bytes {};
+ bytes.fill(0xFFu);
+ auto current = begin;
+ for (int i = 0; i < 4 && current != end; i++, ++current) {
+ bytes[i] = uint8_t(*current); // NOLINT(cppcoreguidelines-pro-bounds-constant-array-index)
+ }
+
+ bool has_bom = false;
+ const utf_encode_t encode_type = detect_encoding_type(bytes, has_bom);
+
+ if FK_YAML_UNLIKELY (encode_type != utf_encode_t::UTF_8) {
+ throw exception("char8_t characters must be encoded in the UTF-8 format.");
+ }
+
+ if (has_bom) {
+ // skip reading the BOM.
+ std::advance(begin, 3);
+ }
+
+ return encode_type;
+ }
+};
+
+#endif // FK_YAML_HAS_CHAR8_T
+
+/// @brief The partial specialization of utf_encode_detector for char16_t iterators.
+/// @tparam ItrType An iterator type.
+template <typename ItrType>
+struct utf_encode_detector<ItrType, enable_if_t<is_iterator_of<ItrType, char16_t>::value>> {
+ /// @brief Detects the encoding type of the input, and consumes a BOM if it exists.
+ /// @param begin The iterator to the first element of an input.
+ /// @param end The iterator to the past-the end element of an input.
+ /// @return A detected encoding type.
+ static utf_encode_t detect(ItrType& begin, const ItrType& end) {
+ if FK_YAML_UNLIKELY (begin == end) {
+ return utf_encode_t::UTF_16BE;
+ }
+
+ // the inner curly braces are necessary for older compilers
+ std::array<uint8_t, 4> bytes {{}};
+ bytes.fill(0xFFu);
+ auto current = begin;
+ for (int i = 0; i < 2 && current != end; i++, ++current) {
+ // NOLINTBEGIN(cppcoreguidelines-pro-bounds-constant-array-index)
+ const char16_t elem = *current;
+ const int idx_base = i * 2;
+ bytes[idx_base] = static_cast<uint8_t>(elem >> 8);
+ bytes[idx_base + 1] = static_cast<uint8_t>(elem);
+ // NOLINTEND(cppcoreguidelines-pro-bounds-constant-array-index)
+ }
+
+ bool has_bom = false;
+ const utf_encode_t encode_type = detect_encoding_type(bytes, has_bom);
+
+ if FK_YAML_UNLIKELY (encode_type != utf_encode_t::UTF_16BE && encode_type != utf_encode_t::UTF_16LE) {
+ throw exception("char16_t characters must be encoded in the UTF-16 format.");
+ }
+
+ if (has_bom) {
+ // skip reading the BOM.
+ std::advance(begin, 1);
+ }
+
+ return encode_type;
+ }
+};
+
+/// @brief The partial specialization of utf_encode_detector for char32_t iterators.
+/// @tparam ItrType An iterator type.
+template <typename ItrType>
+struct utf_encode_detector<ItrType, enable_if_t<is_iterator_of<ItrType, char32_t>::value>> {
+ /// @brief Detects the encoding type of the input, and consumes a BOM if it exists.
+ /// @param begin The iterator to the first element of an input.
+ /// @param end The iterator to the past-the end element of an input.
+ /// @return A detected encoding type.
+ static utf_encode_t detect(ItrType& begin, const ItrType& end) {
+ if FK_YAML_UNLIKELY (begin == end) {
+ return utf_encode_t::UTF_32BE;
+ }
+
+ // the inner curly braces are necessary for older compilers
+ std::array<uint8_t, 4> bytes {{}};
+ const char32_t elem = *begin;
+ bytes[0] = static_cast<uint8_t>(elem >> 24);
+ bytes[1] = static_cast<uint8_t>(elem >> 16);
+ bytes[2] = static_cast<uint8_t>(elem >> 8);
+ bytes[3] = static_cast<uint8_t>(elem);
+
+ bool has_bom = false;
+ const utf_encode_t encode_type = detect_encoding_type(bytes, has_bom);
+
+ if FK_YAML_UNLIKELY (encode_type != utf_encode_t::UTF_32BE && encode_type != utf_encode_t::UTF_32LE) {
+ throw exception("char32_t characters must be encoded in the UTF-32 format.");
+ }
+
+ if (has_bom) {
+ // skip reading the BOM.
+ std::advance(begin, 1);
+ }
+
+ return encode_type;
+ }
+};
+
+/// @brief A class which detects UTF encoding type and the existence of a BOM from the input file.
+struct file_utf_encode_detector {
+ /// @brief Detects the encoding type of the input, and consumes a BOM if it exists.
+ /// @param p_file The input file handle.
+ /// @return A detected encoding type.
+ static utf_encode_t detect(std::FILE* p_file) noexcept {
+ // the inner curly braces are necessary for older compilers
+ std::array<uint8_t, 4> bytes {{}};
+ bytes.fill(0xFFu);
+ for (int i = 0; i < 4; i++) {
+ char byte = 0;
+ const std::size_t size = std::fread(&byte, sizeof(char), 1, p_file);
+ if (size != sizeof(char)) {
+ break;
+ }
+ bytes[i] = static_cast<uint8_t>(byte & 0xFF); // NOLINT(cppcoreguidelines-pro-bounds-constant-array-index)
+ }
+
+ bool has_bom = false;
+ const utf_encode_t encode_type = detect_encoding_type(bytes, has_bom);
+
+ // move back to the beginning if a BOM doesn't exist.
+ long offset = 0; // NOLINT(google-runtime-int)
+ if (has_bom) {
+ switch (encode_type) {
+ case utf_encode_t::UTF_8:
+ offset = 3;
+ break;
+ case utf_encode_t::UTF_16BE:
+ case utf_encode_t::UTF_16LE:
+ offset = 2;
+ break;
+ case utf_encode_t::UTF_32BE:
+ case utf_encode_t::UTF_32LE:
+ offset = 4;
+ break;
+ }
+ }
+ std::fseek(p_file, offset, SEEK_SET); // NOLINT(cert-err33-c)
+
+ return encode_type;
+ }
+};
+
+/// @brief A class which detects UTF encoding type and the existence of a BOM from the input file.
+struct stream_utf_encode_detector {
+ /// @brief Detects the encoding type of the input, and consumes a BOM if it exists.
+ /// @param p_file The input file handle.
+ /// @return A detected encoding type.
+ static utf_encode_t detect(std::istream& is) noexcept {
+ // the inner curly braces are necessary for older compilers
+ std::array<uint8_t, 4> bytes {{}};
+ bytes.fill(0xFFu);
+ for (int i = 0; i < 4; i++) {
+ char ch = 0;
+ is.read(&ch, 1);
+ const std::streamsize size = is.gcount();
+ if (size != 1) {
+ // without this, seekg() will fail.
+ is.clear();
+ break;
+ }
+ bytes[i] = static_cast<uint8_t>(ch & 0xFF); // NOLINT(cppcoreguidelines-pro-bounds-constant-array-index)
+ }
+
+ bool has_bom = false;
+ const utf_encode_t encode_type = detect_encoding_type(bytes, has_bom);
+
+ // move back to the beginning if a BOM doesn't exist.
+ std::streamoff offset = 0;
+ if (has_bom) {
+ switch (encode_type) {
+ case utf_encode_t::UTF_8:
+ offset = 3;
+ break;
+ case utf_encode_t::UTF_16BE:
+ case utf_encode_t::UTF_16LE:
+ offset = 2;
+ break;
+ case utf_encode_t::UTF_32BE:
+ case utf_encode_t::UTF_32LE:
+ offset = 4;
+ break;
+ }
+ }
+ is.seekg(offset, std::ios_base::beg);
+
+ return encode_type;
+ }
+};
+
+FK_YAML_DETAIL_NAMESPACE_END
+
+#endif /* FK_YAML_DETAIL_ENCODINGS_UTF_ENCODE_DETECTOR_HPP */
+
+// #include <fkYAML/detail/encodings/utf_encode_t.hpp>
+
+// #include <fkYAML/detail/encodings/utf_encodings.hpp>
+
+// #include <fkYAML/detail/meta/input_adapter_traits.hpp>
+
+// #include <fkYAML/detail/meta/stl_supplement.hpp>
+
+// #include <fkYAML/detail/str_view.hpp>
+
+// #include <fkYAML/exception.hpp>
+
+
+FK_YAML_DETAIL_NAMESPACE_BEGIN
+
+///////////////////////
+// input_adapter //
+///////////////////////
+
+template <typename IterType, typename = void>
+class iterator_input_adapter;
+
+/// @brief An input adapter for iterators of type char.
+/// @tparam IterType An iterator type.
+template <typename IterType>
+class iterator_input_adapter<IterType, enable_if_t<is_iterator_of<IterType, char>::value>> {
+public:
+ /// @brief Construct a new iterator_input_adapter object.
+ iterator_input_adapter() = default;
+
+ /// @brief Construct a new iterator_input_adapter object.
+ /// @param begin The beginning of iterators.
+ /// @param end The end of iterators.
+ /// @param encode_type The encoding type for this input adapter.
+ /// @param is_contiguous Whether iterators are contiguous or not.
+ iterator_input_adapter(IterType begin, IterType end, utf_encode_t encode_type, bool is_contiguous) noexcept
+ : m_begin(begin),
+ m_end(end),
+ m_encode_type(encode_type),
+ m_is_contiguous(is_contiguous) {
+ }
+
+ // allow only move construct/assignment like other input adapters.
+ iterator_input_adapter(const iterator_input_adapter&) = delete;
+ iterator_input_adapter(iterator_input_adapter&& rhs) = default;
+ iterator_input_adapter& operator=(const iterator_input_adapter&) = delete;
+ iterator_input_adapter& operator=(iterator_input_adapter&&) = default;
+ ~iterator_input_adapter() = default;
+
+ /// @brief Get view into the input buffer contents.
+ /// @return View into the input buffer contents.
+ str_view get_buffer_view() {
+ if FK_YAML_UNLIKELY (m_begin == m_end) {
+ return {};
+ }
+
+ m_buffer.clear();
+
+ switch (m_encode_type) {
+ case utf_encode_t::UTF_8:
+ return get_buffer_view_utf8();
+ case utf_encode_t::UTF_16BE:
+ case utf_encode_t::UTF_16LE:
+ return get_buffer_view_utf16();
+ case utf_encode_t::UTF_32BE:
+ case utf_encode_t::UTF_32LE:
+ return get_buffer_view_utf32();
+ default: // LCOV_EXCL_LINE
+ detail::unreachable(); // LCOV_EXCL_LINE
+ }
+ }
+
+private:
+ /// @brief The concrete implementation of get_buffer_view() for UTF-8 encoded inputs.
+ /// @return View into the UTF-8 encoded input buffer contents.
+ str_view get_buffer_view_utf8() {
+ FK_YAML_ASSERT(m_encode_type == utf_encode_t::UTF_8);
+
+ IterType current = m_begin;
+ std::deque<IterType> cr_itrs {};
+ while (current != m_end) {
+ const auto first = static_cast<uint8_t>(*current);
+ const uint32_t num_bytes = utf8::get_num_bytes(first);
+
+ switch (num_bytes) {
+ case 1:
+ if FK_YAML_UNLIKELY (first == 0x0D /*CR*/) {
+ cr_itrs.emplace_back(current);
+ }
+ break;
+ case 2: {
+ const auto second = static_cast<uint8_t>(*++current);
+ const bool is_valid = utf8::validate(first, second);
+ if FK_YAML_UNLIKELY (!is_valid) {
+ throw fkyaml::invalid_encoding("Invalid UTF-8 encoding.", {first, second});
+ }
+ break;
+ }
+ case 3: {
+ const auto second = static_cast<uint8_t>(*++current);
+ const auto third = static_cast<uint8_t>(*++current);
+ const bool is_valid = utf8::validate(first, second, third);
+ if FK_YAML_UNLIKELY (!is_valid) {
+ throw fkyaml::invalid_encoding("Invalid UTF-8 encoding.", {first, second, third});
+ }
+ break;
+ }
+ case 4: {
+ const auto second = static_cast<uint8_t>(*++current);
+ const auto third = static_cast<uint8_t>(*++current);
+ const auto fourth = static_cast<uint8_t>(*++current);
+ const bool is_valid = utf8::validate(first, second, third, fourth);
+ if FK_YAML_UNLIKELY (!is_valid) {
+ throw fkyaml::invalid_encoding("Invalid UTF-8 encoding.", {first, second, third, fourth});
+ }
+ break;
+ }
+ default: // LCOV_EXCL_LINE
+ unreachable(); // LCOV_EXCL_LINE
+ }
+
+ ++current;
+ }
+
+ const bool is_contiguous_no_cr = cr_itrs.empty() && m_is_contiguous;
+ if FK_YAML_LIKELY (is_contiguous_no_cr) {
+ // The input iterators (begin, end) can be used as-is during parsing.
+ FK_YAML_ASSERT(m_begin != m_end);
+ return str_view {&*m_begin, static_cast<std::size_t>(std::distance(m_begin, m_end))};
+ }
+
+ m_buffer.reserve(std::distance(m_begin, m_end) - cr_itrs.size());
+
+ current = m_begin;
+ for (const auto& cr_itr : cr_itrs) {
+ m_buffer.append(current, cr_itr);
+ current = std::next(cr_itr);
+ }
+ m_buffer.append(current, m_end);
+
+ return str_view {m_buffer.begin(), m_buffer.end()};
+ }
+
+ /// @brief The concrete implementation of get_buffer_view() for UTF-16 encoded inputs.
+ /// @return View into the UTF-8 encoded input buffer contents.
+ str_view get_buffer_view_utf16() {
+ FK_YAML_ASSERT(m_encode_type == utf_encode_t::UTF_16BE || m_encode_type == utf_encode_t::UTF_16LE);
+
+ // Assume the input characters are all ASCII characters.
+ // That's the most probably the case.
+ m_buffer.reserve(std::distance(m_begin, m_end) / 2);
+
+ int shift_bits[2] {0, 0};
+ if (m_encode_type == utf_encode_t::UTF_16BE) {
+ shift_bits[0] = 8;
+ }
+ else // m_encode_type == utf_encode_t::UTF_16LE
+ {
+ shift_bits[1] = 8;
+ }
+
+ std::array<char16_t, 2> encoded_buffer {{0, 0}};
+ uint32_t encoded_buf_size {0};
+ std::array<uint8_t, 4> utf8_buffer {{0, 0, 0, 0}};
+ uint32_t utf8_buf_size {0};
+
+ IterType current = m_begin;
+ while (current != m_end || encoded_buf_size != 0) {
+ while (current != m_end && encoded_buf_size < 2) {
+ auto utf16 = static_cast<char16_t>(static_cast<uint8_t>(*current) << shift_bits[0]);
+ utf16 |= static_cast<char16_t>(static_cast<uint8_t>(*++current) << shift_bits[1]);
+ ++current;
+
+ // skip appending CRs.
+ if FK_YAML_LIKELY (utf16 != char16_t(0x000Du)) {
+ // NOLINTNEXTLINE(cppcoreguidelines-pro-bounds-constant-array-index)
+ encoded_buffer[encoded_buf_size++] = utf16;
+ }
+ }
+
+ uint32_t consumed_size = 0;
+ utf8::from_utf16(encoded_buffer, utf8_buffer, consumed_size, utf8_buf_size);
+
+ if FK_YAML_LIKELY (consumed_size == 1) {
+ encoded_buffer[0] = encoded_buffer[1];
+ }
+ encoded_buf_size -= consumed_size;
+
+ m_buffer.append(reinterpret_cast<const char*>(utf8_buffer.data()), utf8_buf_size);
+ }
+
+ return str_view {m_buffer.begin(), m_buffer.end()};
+ }
+
+ /// @brief The concrete implementation of get_buffer_view() for UTF-32 encoded inputs.
+ /// @return View into the UTF-8 encoded input buffer contents.
+ str_view get_buffer_view_utf32() {
+ FK_YAML_ASSERT(m_encode_type == utf_encode_t::UTF_32BE || m_encode_type == utf_encode_t::UTF_32LE);
+
+ // Assume the input characters are all ASCII characters.
+ // That's the most probably the case.
+ m_buffer.reserve(std::distance(m_begin, m_end) / 4);
+
+ int shift_bits[4] {0, 0, 0, 0};
+ if (m_encode_type == utf_encode_t::UTF_32BE) {
+ shift_bits[0] = 24;
+ shift_bits[1] = 16;
+ shift_bits[2] = 8;
+ }
+ else // m_encode_type == utf_encode_t::UTF_32LE
+ {
+ shift_bits[1] = 8;
+ shift_bits[2] = 16;
+ shift_bits[3] = 24;
+ }
+
+ std::array<uint8_t, 4> utf8_buffer {{0, 0, 0, 0}};
+ uint32_t utf8_buf_size {0};
+
+ IterType current = m_begin;
+ while (current != m_end) {
+ auto utf32 = static_cast<char32_t>(*current << shift_bits[0]);
+ ++current;
+ utf32 |= static_cast<char32_t>(*current << shift_bits[1]);
+ ++current;
+ utf32 |= static_cast<char32_t>(*current << shift_bits[2]);
+ ++current;
+ utf32 |= static_cast<char32_t>(*current << shift_bits[3]);
+ ++current;
+
+ if FK_YAML_LIKELY (utf32 != char32_t(0x0000000Du)) {
+ utf8::from_utf32(utf32, utf8_buffer, utf8_buf_size);
+ m_buffer.append(reinterpret_cast<const char*>(utf8_buffer.data()), utf8_buf_size);
+ }
+ }
+
+ return str_view {m_buffer.begin(), m_buffer.end()};
+ }
+
+private:
+ /// The iterator at the beginning of input.
+ IterType m_begin {};
+ /// The iterator at the end of input.
+ IterType m_end {};
+ /// The encoding type for this input adapter.
+ utf_encode_t m_encode_type {utf_encode_t::UTF_8};
+ /// The normalized owned buffer.
+ std::string m_buffer;
+ /// Whether ItrType is a contiguous iterator.
+ bool m_is_contiguous {false};
+};
+
+#if FK_YAML_HAS_CHAR8_T
+
+/// @brief An input adapter for iterators of type char8_t.
+/// @tparam IterType An iterator type.
+template <typename IterType>
+class iterator_input_adapter<IterType, enable_if_t<is_iterator_of<IterType, char8_t>::value>> {
+public:
+ /// @brief Construct a new iterator_input_adapter object.
+ iterator_input_adapter() = default;
+
+ /// @brief Construct a new iterator_input_adapter object.
+ /// @param begin The beginning of iterators.
+ /// @param end The end of iterators.
+ /// @param encode_type The encoding type for this input adapter.
+ /// @param is_contiguous Whether iterators are contiguous or not.
+ iterator_input_adapter(IterType begin, IterType end, utf_encode_t encode_type, bool is_contiguous) noexcept
+ : m_begin(begin),
+ m_end(end),
+ m_encode_type(encode_type),
+ m_is_contiguous(is_contiguous) {
+ // char8_t characters must be encoded in the UTF-8 format.
+ // See https://www.open-std.org/jtc1/sc22/wg21/docs/papers/2018/p0482r6.html.
+ FK_YAML_ASSERT(m_encode_type == utf_encode_t::UTF_8);
+ }
+
+ // allow only move construct/assignment like other input adapters.
+ iterator_input_adapter(const iterator_input_adapter&) = delete;
+ iterator_input_adapter(iterator_input_adapter&& rhs) = default;
+ iterator_input_adapter& operator=(const iterator_input_adapter&) = delete;
+ iterator_input_adapter& operator=(iterator_input_adapter&&) = default;
+ ~iterator_input_adapter() = default;
+
+ /// @brief Get view into the input buffer contents.
+ /// @return View into the input buffer contents.
+ str_view get_buffer_view() {
+ if FK_YAML_UNLIKELY (m_begin == m_end) {
+ return {};
+ }
+
+ IterType current = m_begin;
+ std::deque<IterType> cr_itrs {};
+ while (current != m_end) {
+ const auto first = static_cast<uint8_t>(*current);
+ const uint32_t num_bytes = utf8::get_num_bytes(first);
+
+ switch (num_bytes) {
+ case 1:
+ if FK_YAML_UNLIKELY (first == 0x0D /*CR*/) {
+ cr_itrs.emplace_back(current);
+ }
+ break;
+ case 2: {
+ const auto second = static_cast<uint8_t>(*++current);
+ const bool is_valid = utf8::validate(first, second);
+ if FK_YAML_UNLIKELY (!is_valid) {
+ throw fkyaml::invalid_encoding("Invalid UTF-8 encoding.", {first, second});
+ }
+ break;
+ }
+ case 3: {
+ const auto second = static_cast<uint8_t>(*++current);
+ const auto third = static_cast<uint8_t>(*++current);
+ const bool is_valid = utf8::validate(first, second, third);
+ if FK_YAML_UNLIKELY (!is_valid) {
+ throw fkyaml::invalid_encoding("Invalid UTF-8 encoding.", {first, second, third});
+ }
+ break;
+ }
+ case 4: {
+ const auto second = static_cast<uint8_t>(*++current);
+ const auto third = static_cast<uint8_t>(*++current);
+ const auto fourth = static_cast<uint8_t>(*++current);
+ const bool is_valid = utf8::validate(first, second, third, fourth);
+ if FK_YAML_UNLIKELY (!is_valid) {
+ throw fkyaml::invalid_encoding("Invalid UTF-8 encoding.", {first, second, third, fourth});
+ }
+ break;
+ }
+ default: // LCOV_EXCL_LINE
+ unreachable(); // LCOV_EXCL_LINE
+ }
+
+ ++current;
+ }
+
+ m_buffer.reserve(std::distance(m_begin, m_end) - cr_itrs.size());
+ current = m_begin;
+ for (const auto& cr_itr : cr_itrs) {
+ std::transform(
+ current, cr_itr, std::back_inserter(m_buffer), [](char8_t c) { return static_cast<char>(c); });
+ current = std::next(cr_itr);
+ }
+ std::transform(current, m_end, std::back_inserter(m_buffer), [](char8_t c) { return static_cast<char>(c); });
+
+ return str_view {m_buffer.begin(), m_buffer.end()};
+ }
+
+private:
+ /// The iterator at the beginning of input.
+ IterType m_begin {};
+ /// The iterator at the end of input.
+ IterType m_end {};
+ /// The encoding type for this input adapter.
+ utf_encode_t m_encode_type {utf_encode_t::UTF_8};
+ /// The normalized owned buffer.
+ std::string m_buffer;
+ /// Whether ItrType is a contiguous iterator.
+ bool m_is_contiguous {false};
+};
+
+#endif // FK_YAML_HAS_CHAR8_T
+
+/// @brief An input adapter for iterators of type char16_t.
+/// @tparam IterType An iterator type.
+template <typename IterType>
+class iterator_input_adapter<IterType, enable_if_t<is_iterator_of<IterType, char16_t>::value>> {
+public:
+ /// @brief Construct a new iterator_input_adapter object.
+ iterator_input_adapter() = default;
+
+ /// @brief Construct a new iterator_input_adapter object.
+ /// @param begin The beginning of iterators.
+ /// @param end The end of iterators.
+ /// @param encode_type The encoding type for this input adapter.
+ /// @param is_contiguous Whether iterators are contiguous or not.
+ iterator_input_adapter(IterType begin, IterType end, utf_encode_t encode_type, bool is_contiguous) noexcept
+ : m_begin(begin),
+ m_end(end),
+ m_encode_type(encode_type),
+ m_is_contiguous(is_contiguous) {
+ FK_YAML_ASSERT(m_encode_type == utf_encode_t::UTF_16BE || m_encode_type == utf_encode_t::UTF_16LE);
+ }
+
+ // allow only move construct/assignment like other input adapters.
+ iterator_input_adapter(const iterator_input_adapter&) = delete;
+ iterator_input_adapter(iterator_input_adapter&& rhs) = default;
+ iterator_input_adapter& operator=(const iterator_input_adapter&) = delete;
+ iterator_input_adapter& operator=(iterator_input_adapter&&) = default;
+ ~iterator_input_adapter() = default;
+
+ /// @brief Get view into the input buffer contents.
+ /// @return View into the input buffer contents.
+ str_view get_buffer_view() {
+ if FK_YAML_UNLIKELY (m_begin == m_end) {
+ return {};
+ }
+
+ const int shift_bits = (m_encode_type == utf_encode_t::UTF_16BE) ? 0 : 8;
+
+ std::array<char16_t, 2> encoded_buffer {{0, 0}};
+ uint32_t encoded_buf_size {0};
+ std::array<uint8_t, 4> utf8_buffer {{0, 0, 0, 0}};
+ uint32_t utf8_buf_size {0};
+
+ // Assume the input characters are all ASCII characters.
+ // That's the most probably the case.
+ m_buffer.reserve(std::distance(m_begin, m_end));
+
+ IterType current = m_begin;
+ while (current != m_end || encoded_buf_size != 0) {
+ while (current != m_end && encoded_buf_size < 2) {
+ char16_t utf16 = *current;
+ ++current;
+ utf16 = static_cast<char16_t>(((utf16 & 0x00FFu) << shift_bits) | ((utf16 & 0xFF00u) >> shift_bits));
+
+ if FK_YAML_LIKELY (utf16 != char16_t(0x000Du)) {
+ // NOLINTNEXTLINE(cppcoreguidelines-pro-bounds-constant-array-index)
+ encoded_buffer[encoded_buf_size++] = utf16;
+ }
+ }
+
+ uint32_t consumed_size = 0;
+ utf8::from_utf16(encoded_buffer, utf8_buffer, consumed_size, utf8_buf_size);
+
+ if FK_YAML_LIKELY (consumed_size == 1) {
+ encoded_buffer[0] = encoded_buffer[1];
+ encoded_buffer[1] = 0;
+ }
+ encoded_buf_size -= consumed_size;
+
+ m_buffer.append(reinterpret_cast<const char*>(utf8_buffer.data()), utf8_buf_size);
+ }
+
+ return str_view {m_buffer.begin(), m_buffer.end()};
+ }
+
+private:
+ /// The iterator at the beginning of input.
+ IterType m_begin {};
+ /// The iterator at the end of input.
+ IterType m_end {};
+ /// The encoding type for this input adapter.
+ utf_encode_t m_encode_type {utf_encode_t::UTF_16BE};
+ /// The normalized owned buffer.
+ std::string m_buffer;
+ /// Whether ItrType is a contiguous iterator.
+ bool m_is_contiguous {false};
+};
+
+/// @brief An input adapter for iterators of type char32_t.
+/// @tparam IterType An iterator type.
+template <typename IterType>
+class iterator_input_adapter<IterType, enable_if_t<is_iterator_of<IterType, char32_t>::value>> {
+public:
+ /// @brief Construct a new iterator_input_adapter object.
+ iterator_input_adapter() = default;
+
+ /// @brief Construct a new iterator_input_adapter object.
+ /// @param begin The beginning of iterators.
+ /// @param end The end of iterators.
+ /// @param encode_type The encoding type for this input adapter.
+ /// @param is_contiguous Whether iterators are contiguous or not.
+ iterator_input_adapter(IterType begin, IterType end, utf_encode_t encode_type, bool is_contiguous) noexcept
+ : m_begin(begin),
+ m_end(end),
+ m_encode_type(encode_type),
+ m_is_contiguous(is_contiguous) {
+ FK_YAML_ASSERT(m_encode_type == utf_encode_t::UTF_32BE || m_encode_type == utf_encode_t::UTF_32LE);
+ }
+
+ // allow only move construct/assignment like other input adapters.
+ iterator_input_adapter(const iterator_input_adapter&) = delete;
+ iterator_input_adapter(iterator_input_adapter&& rhs) = default;
+ iterator_input_adapter& operator=(const iterator_input_adapter&) = delete;
+ iterator_input_adapter& operator=(iterator_input_adapter&&) = default;
+ ~iterator_input_adapter() = default;
+
+ /// @brief Get view into the input buffer contents.
+ /// @return View into the input buffer contents.
+ str_view get_buffer_view() {
+ if FK_YAML_UNLIKELY (m_begin == m_end) {
+ return {};
+ }
+
+ int shift_bits[4] {0, 0, 0, 0};
+ if (m_encode_type == utf_encode_t::UTF_32LE) {
+ shift_bits[0] = 24;
+ shift_bits[1] = 8;
+ shift_bits[2] = 8;
+ shift_bits[3] = 24;
+ }
+
+ std::array<uint8_t, 4> utf8_buffer {{0, 0, 0, 0}};
+ uint32_t utf8_buf_size {0};
+
+ // Assume the input characters are all ASCII characters.
+ // That's the most probably the case.
+ m_buffer.reserve(std::distance(m_begin, m_end));
+
+ IterType current = m_begin;
+ while (current != m_end) {
+ const char32_t tmp = *current;
+ ++current;
+ const auto utf32 = static_cast<char32_t>(
+ ((tmp & 0xFF000000u) >> shift_bits[0]) | ((tmp & 0x00FF0000u) >> shift_bits[1]) |
+ ((tmp & 0x0000FF00u) << shift_bits[2]) | ((tmp & 0x000000FFu) << shift_bits[3]));
+
+ if FK_YAML_UNLIKELY (utf32 != static_cast<char32_t>(0x0000000Du)) {
+ utf8::from_utf32(utf32, utf8_buffer, utf8_buf_size);
+ m_buffer.append(reinterpret_cast<const char*>(utf8_buffer.data()), utf8_buf_size);
+ }
+ }
+
+ return str_view {m_buffer.begin(), m_buffer.end()};
+ }
+
+private:
+ /// The iterator at the beginning of input.
+ IterType m_begin {};
+ /// The iterator at the end of input.
+ IterType m_end {};
+ /// The encoding type for this input adapter.
+ utf_encode_t m_encode_type {utf_encode_t::UTF_32BE};
+ /// The normalized owned buffer.
+ std::string m_buffer;
+ /// Whether ItrType is a contiguous iterator.
+ bool m_is_contiguous {false};
+};
+
+/// @brief An input adapter for C-style file handles.
+class file_input_adapter {
+public:
+ /// @brief Construct a new file_input_adapter object.
+ file_input_adapter() = default;
+
+ /// @brief Construct a new file_input_adapter object.
+ /// @note
+ /// This class doesn't call fopen() nor fclose().
+ /// It's user's responsibility to call those functions.
+ /// @param file A file handle for this adapter. (A non-null pointer is assumed.)
+ /// @param encode_type The encoding type for this input adapter.
+ explicit file_input_adapter(std::FILE* file, utf_encode_t encode_type) noexcept
+ : m_file(file),
+ m_encode_type(encode_type) {
+ }
+
+ // allow only move construct/assignment
+ file_input_adapter(const file_input_adapter&) = delete;
+ file_input_adapter(file_input_adapter&& rhs) = default;
+ file_input_adapter& operator=(const file_input_adapter&) = delete;
+ file_input_adapter& operator=(file_input_adapter&&) = default;
+ ~file_input_adapter() = default;
+
+ /// @brief Get view into the input buffer contents.
+ /// @return View into the input buffer contents.
+ str_view get_buffer_view() {
+ switch (m_encode_type) {
+ case utf_encode_t::UTF_8:
+ return get_buffer_view_utf8();
+ case utf_encode_t::UTF_16BE:
+ case utf_encode_t::UTF_16LE:
+ return get_buffer_view_utf16();
+ case utf_encode_t::UTF_32BE:
+ case utf_encode_t::UTF_32LE:
+ return get_buffer_view_utf32();
+ default: // LCOV_EXCL_LINE
+ detail::unreachable(); // LCOV_EXCL_LINE
+ }
+ }
+
+private:
+ /// @brief The concrete implementation of get_buffer_view() for UTF-8 encoded inputs.
+ /// @return View into the UTF-8 encoded input buffer contents.
+ str_view get_buffer_view_utf8() {
+ FK_YAML_ASSERT(m_encode_type == utf_encode_t::UTF_8);
+
+ m_buffer.clear();
+ char tmp_buf[256] {};
+ constexpr std::size_t buf_size = sizeof(tmp_buf) / sizeof(tmp_buf[0]);
+ std::size_t read_size = 0;
+ while ((read_size = std::fread(&tmp_buf[0], sizeof(char), buf_size, m_file)) > 0) {
+ char* p_current = &tmp_buf[0];
+ char* p_end = p_current + read_size;
+
+ // copy tmp_buf to m_buffer, dropping CRs.
+ char* p_cr = p_current;
+ do {
+ if FK_YAML_UNLIKELY (*p_cr == '\r') {
+ m_buffer.append(p_current, p_cr);
+ p_current = p_cr + 1;
+ }
+ ++p_cr;
+ } while (p_cr != p_end);
+
+ m_buffer.append(p_current, p_end);
+ }
+
+ if FK_YAML_UNLIKELY (m_buffer.empty()) {
+ return {};
+ }
+
+ auto current = m_buffer.begin();
+ auto end = m_buffer.end();
+ while (current != end) {
+ const auto first = static_cast<uint8_t>(*current++);
+ const uint32_t num_bytes = utf8::get_num_bytes(first);
+
+ switch (num_bytes) {
+ case 1:
+ break;
+ case 2: {
+ const auto second = static_cast<uint8_t>(*current++);
+ const bool is_valid = utf8::validate(first, second);
+ if FK_YAML_UNLIKELY (!is_valid) {
+ throw fkyaml::invalid_encoding("Invalid UTF-8 encoding.", {first, second});
+ }
+ break;
+ }
+ case 3: {
+ const auto second = static_cast<uint8_t>(*current++);
+ const auto third = static_cast<uint8_t>(*current++);
+ const bool is_valid = utf8::validate(first, second, third);
+ if FK_YAML_UNLIKELY (!is_valid) {
+ throw fkyaml::invalid_encoding("Invalid UTF-8 encoding.", {first, second, third});
+ }
+ break;
+ }
+ case 4: {
+ const auto second = static_cast<uint8_t>(*current++);
+ const auto third = static_cast<uint8_t>(*current++);
+ const auto fourth = static_cast<uint8_t>(*current++);
+ const bool is_valid = utf8::validate(first, second, third, fourth);
+ if FK_YAML_UNLIKELY (!is_valid) {
+ throw fkyaml::invalid_encoding("Invalid UTF-8 encoding.", {first, second, third, fourth});
+ }
+ break;
+ }
+ default: // LCOV_EXCL_LINE
+ unreachable(); // LCOV_EXCL_LINE
+ }
+ }
+
+ return str_view {m_buffer.begin(), m_buffer.end()};
+ }
+
+ /// @brief The concrete implementation of get_buffer_view() for UTF-16 encoded inputs.
+ /// @return View into the UTF-8 encoded input buffer contents.
+ str_view get_buffer_view_utf16() {
+ FK_YAML_ASSERT(m_encode_type == utf_encode_t::UTF_16BE || m_encode_type == utf_encode_t::UTF_16LE);
+
+ int shift_bits[2] {0, 0};
+ if (m_encode_type == utf_encode_t::UTF_16BE) {
+ shift_bits[0] = 8;
+ }
+ else { // m_encode_type == utf_encode_t::UTF_16LE
+ shift_bits[1] = 8;
+ }
+
+ char chars[2] = {0, 0};
+ std::array<char16_t, 2> encoded_buffer {{0, 0}};
+ uint32_t encoded_buf_size {0};
+ std::array<uint8_t, 4> utf8_buffer {{0, 0, 0, 0}};
+ uint32_t utf8_buf_size {0};
+
+ while (std::feof(m_file) == 0) {
+ while (encoded_buf_size < 2 && std::fread(&chars[0], sizeof(char), 2, m_file) == 2) {
+ const auto utf16 = static_cast<char16_t>(
+ (static_cast<uint8_t>(chars[0]) << shift_bits[0]) |
+ (static_cast<uint8_t>(chars[1]) << shift_bits[1]));
+ if FK_YAML_LIKELY (utf16 != static_cast<char16_t>(0x000Du)) {
+ // NOLINTNEXTLINE(cppcoreguidelines-pro-bounds-constant-array-index)
+ encoded_buffer[encoded_buf_size++] = utf16;
+ }
+ }
+
+ uint32_t consumed_size = 0;
+ utf8::from_utf16(encoded_buffer, utf8_buffer, consumed_size, utf8_buf_size);
+
+ if FK_YAML_LIKELY (consumed_size == 1) {
+ encoded_buffer[0] = encoded_buffer[1];
+ }
+ encoded_buf_size -= consumed_size;
+
+ m_buffer.append(reinterpret_cast<const char*>(utf8_buffer.data()), utf8_buf_size);
+ }
+
+ return str_view {m_buffer.begin(), m_buffer.end()};
+ }
+
+ /// @brief The concrete implementation of get_buffer_view() for UTF-32 encoded inputs.
+ /// @return View into the UTF-8 encoded input buffer contents.
+ str_view get_buffer_view_utf32() {
+ FK_YAML_ASSERT(m_encode_type == utf_encode_t::UTF_32BE || m_encode_type == utf_encode_t::UTF_32LE);
+
+ int shift_bits[4] {0, 0, 0, 0};
+ if (m_encode_type == utf_encode_t::UTF_32BE) {
+ shift_bits[0] = 24;
+ shift_bits[1] = 16;
+ shift_bits[2] = 8;
+ }
+ else { // m_encode_type == utf_encode_t::UTF_32LE
+ shift_bits[1] = 8;
+ shift_bits[2] = 16;
+ shift_bits[3] = 24;
+ }
+
+ char chars[4] = {0, 0, 0, 0};
+ std::array<uint8_t, 4> utf8_buffer {{0, 0, 0, 0}};
+ uint32_t utf8_buf_size {0};
+
+ while (std::feof(m_file) == 0) {
+ const std::size_t size = std::fread(&chars[0], sizeof(char), 4, m_file);
+ if (size != 4) {
+ break;
+ }
+
+ const auto utf32 = static_cast<char32_t>(
+ (static_cast<uint8_t>(chars[0]) << shift_bits[0]) | (static_cast<uint8_t>(chars[1]) << shift_bits[1]) |
+ (static_cast<uint8_t>(chars[2]) << shift_bits[2]) | (static_cast<uint8_t>(chars[3]) << shift_bits[3]));
+
+ if FK_YAML_LIKELY (utf32 != char32_t(0x0000000Du)) {
+ utf8::from_utf32(utf32, utf8_buffer, utf8_buf_size);
+ m_buffer.append(reinterpret_cast<const char*>(utf8_buffer.data()), utf8_buf_size);
+ }
+ }
+
+ return str_view {m_buffer.begin(), m_buffer.end()};
+ }
+
+private:
+ /// A pointer to the input file handle.
+ std::FILE* m_file {nullptr};
+ /// The encoding type for this input adapter.
+ utf_encode_t m_encode_type {utf_encode_t::UTF_8};
+ /// The normalized owned buffer.
+ std::string m_buffer;
+};
+
+/// @brief An input adapter for streams
+class stream_input_adapter {
+public:
+ /// @brief Construct a new stream_input_adapter object.
+ stream_input_adapter() = default;
+
+ /// @brief Construct a new stream_input_adapter object.
+ /// @param is A reference to the target input stream.
+ /// @param encode_type The encoding type for this input adapter.
+ explicit stream_input_adapter(std::istream& is, utf_encode_t encode_type) noexcept
+ : m_istream(&is),
+ m_encode_type(encode_type) {
+ }
+
+ // allow only move construct/assignment
+ stream_input_adapter(const stream_input_adapter&) = delete;
+ stream_input_adapter& operator=(const stream_input_adapter&) = delete;
+ stream_input_adapter(stream_input_adapter&&) = default;
+ stream_input_adapter& operator=(stream_input_adapter&&) = default;
+ ~stream_input_adapter() = default;
+
+ /// @brief Get view into the input buffer contents.
+ /// @return View into the input buffer contents.
+ str_view get_buffer_view() {
+ switch (m_encode_type) {
+ case utf_encode_t::UTF_8:
+ return get_buffer_view_utf8();
+ case utf_encode_t::UTF_16BE:
+ case utf_encode_t::UTF_16LE:
+ return get_buffer_view_utf16();
+ case utf_encode_t::UTF_32BE:
+ case utf_encode_t::UTF_32LE:
+ return get_buffer_view_utf32();
+ default: // LCOV_EXCL_LINE
+ detail::unreachable(); // LCOV_EXCL_LINE
+ }
+ }
+
+private:
+ /// @brief The concrete implementation of get_buffer_view() for UTF-8 encoded inputs.
+ /// @return View into the UTF-8 encoded input buffer contents.
+ str_view get_buffer_view_utf8() {
+ FK_YAML_ASSERT(m_encode_type == utf_encode_t::UTF_8);
+
+ m_buffer.clear();
+ char tmp_buf[256] {};
+ do {
+ m_istream->read(&tmp_buf[0], 256);
+ const auto read_size = static_cast<std::size_t>(m_istream->gcount());
+ if FK_YAML_UNLIKELY (read_size == 0) {
+ break;
+ }
+
+ char* p_current = &tmp_buf[0];
+ char* p_end = p_current + read_size;
+
+ // copy tmp_buf to m_buffer, dropping CRs.
+ char* p_cr = p_current;
+ do {
+ if FK_YAML_UNLIKELY (*p_cr == '\r') {
+ m_buffer.append(p_current, p_cr);
+ p_current = p_cr + 1;
+ }
+ ++p_cr;
+ } while (p_cr != p_end);
+
+ m_buffer.append(p_current, p_end);
+ } while (!m_istream->eof());
+
+ if FK_YAML_UNLIKELY (m_buffer.empty()) {
+ return {};
+ }
+
+ auto current = m_buffer.begin();
+ auto end = m_buffer.end();
+ while (current != end) {
+ const auto first = static_cast<uint8_t>(*current++);
+ const uint32_t num_bytes = utf8::get_num_bytes(first);
+
+ switch (num_bytes) {
+ case 1:
+ break;
+ case 2: {
+ const auto second = static_cast<uint8_t>(*current++);
+ const bool is_valid = utf8::validate(first, second);
+ if FK_YAML_UNLIKELY (!is_valid) {
+ throw fkyaml::invalid_encoding("Invalid UTF-8 encoding.", {first, second});
+ }
+ break;
+ }
+ case 3: {
+ const auto second = static_cast<uint8_t>(*current++);
+ const auto third = static_cast<uint8_t>(*current++);
+ const bool is_valid = utf8::validate(first, second, third);
+ if FK_YAML_UNLIKELY (!is_valid) {
+ throw fkyaml::invalid_encoding("Invalid UTF-8 encoding.", {first, second, third});
+ }
+ break;
+ }
+ case 4: {
+ const auto second = static_cast<uint8_t>(*current++);
+ const auto third = static_cast<uint8_t>(*current++);
+ const auto fourth = static_cast<uint8_t>(*current++);
+ const bool is_valid = utf8::validate(first, second, third, fourth);
+ if FK_YAML_UNLIKELY (!is_valid) {
+ throw fkyaml::invalid_encoding("Invalid UTF-8 encoding.", {first, second, third, fourth});
+ }
+ break;
+ }
+ default: // LCOV_EXCL_LINE
+ unreachable(); // LCOV_EXCL_LINE
+ }
+ }
+
+ return str_view {m_buffer.begin(), m_buffer.end()};
+ }
+
+ /// @brief The concrete implementation of get_buffer_view() for UTF-16 encoded inputs.
+ /// @return View into the UTF-8 encoded input buffer contents.
+ str_view get_buffer_view_utf16() {
+ FK_YAML_ASSERT(m_encode_type == utf_encode_t::UTF_16BE || m_encode_type == utf_encode_t::UTF_16LE);
+
+ int shift_bits[2] {0, 0};
+ if (m_encode_type == utf_encode_t::UTF_16BE) {
+ shift_bits[0] = 8;
+ }
+ else { // m_encode_type == utf_encode_t::UTF_16LE
+ shift_bits[1] = 8;
+ }
+
+ char chars[2] = {0, 0};
+ std::array<char16_t, 2> encoded_buffer {{0, 0}};
+ uint32_t encoded_buf_size {0};
+ std::array<uint8_t, 4> utf8_buffer {{0, 0, 0, 0}};
+ uint32_t utf8_buf_size {0};
+
+ do {
+ while (encoded_buf_size < 2) {
+ m_istream->read(&chars[0], 2);
+ const std::streamsize size = m_istream->gcount();
+ if FK_YAML_UNLIKELY (size != 2) {
+ break;
+ }
+
+ const auto utf16 = static_cast<char16_t>(
+ (static_cast<uint8_t>(chars[0]) << shift_bits[0]) |
+ (static_cast<uint8_t>(chars[1]) << shift_bits[1]));
+
+ if FK_YAML_LIKELY (utf16 != static_cast<char16_t>(0x000Du)) {
+ // NOLINTNEXTLINE(cppcoreguidelines-pro-bounds-constant-array-index)
+ encoded_buffer[encoded_buf_size++] = utf16;
+ }
+ }
+
+ uint32_t consumed_size = 0;
+ utf8::from_utf16(encoded_buffer, utf8_buffer, consumed_size, utf8_buf_size);
+
+ if FK_YAML_LIKELY (consumed_size == 1) {
+ encoded_buffer[0] = encoded_buffer[1];
+ }
+ encoded_buf_size -= consumed_size;
+
+ m_buffer.append(reinterpret_cast<const char*>(utf8_buffer.data()), utf8_buf_size);
+ } while (!m_istream->eof());
+
+ return str_view {m_buffer.begin(), m_buffer.end()};
+ }
+
+ /// @brief The concrete implementation of get_buffer_view() for UTF-32 encoded inputs.
+ /// @return View into the UTF-8 encoded input buffer contents.
+ str_view get_buffer_view_utf32() {
+ FK_YAML_ASSERT(m_encode_type == utf_encode_t::UTF_32BE || m_encode_type == utf_encode_t::UTF_32LE);
+
+ int shift_bits[4] {0, 0, 0, 0};
+ if (m_encode_type == utf_encode_t::UTF_32BE) {
+ shift_bits[0] = 24;
+ shift_bits[1] = 16;
+ shift_bits[2] = 8;
+ }
+ else { // m_encode_type == utf_encode_t::UTF_32LE
+ shift_bits[1] = 8;
+ shift_bits[2] = 16;
+ shift_bits[3] = 24;
+ }
+
+ char chars[4] = {0, 0, 0, 0};
+ std::array<uint8_t, 4> utf8_buffer {{0, 0, 0, 0}};
+ uint32_t utf8_buf_size {0};
+
+ do {
+ m_istream->read(&chars[0], 4);
+ const std::streamsize size = m_istream->gcount();
+ if FK_YAML_UNLIKELY (size != 4) {
+ break;
+ }
+
+ const auto utf32 = static_cast<char32_t>(
+ (static_cast<uint8_t>(chars[0]) << shift_bits[0]) | (static_cast<uint8_t>(chars[1]) << shift_bits[1]) |
+ (static_cast<uint8_t>(chars[2]) << shift_bits[2]) | (static_cast<uint8_t>(chars[3]) << shift_bits[3]));
+
+ if FK_YAML_LIKELY (utf32 != char32_t(0x0000000Du)) {
+ utf8::from_utf32(utf32, utf8_buffer, utf8_buf_size);
+ m_buffer.append(reinterpret_cast<const char*>(utf8_buffer.data()), utf8_buf_size);
+ }
+ } while (!m_istream->eof());
+
+ return str_view {m_buffer.begin(), m_buffer.end()};
+ }
+
+private:
+ /// A pointer to the input stream object.
+ std::istream* m_istream {nullptr};
+ /// The encoding type for this input adapter.
+ utf_encode_t m_encode_type {utf_encode_t::UTF_8};
+ /// The normalized owned buffer.
+ std::string m_buffer;
+};
+
+/////////////////////////////////
+// input_adapter providers //
+/////////////////////////////////
+
+/// @brief A concrete factory method for iterator_input_adapter objects with iterators.
+/// @tparam ItrType An iterator type.
+/// @param begin The beginning of iterators.
+/// @param end The end of iterators.
+/// @param is_contiguous Whether iterators refer to a contiguous byte array.
+/// @return An iterator_input_adapter object for the target iterator type.
+template <typename ItrType>
+inline iterator_input_adapter<ItrType> create_iterator_input_adapter(ItrType begin, ItrType end, bool is_contiguous) {
+ const utf_encode_t encode_type = utf_encode_detector<ItrType>::detect(begin, end);
+ return iterator_input_adapter<ItrType>(begin, end, encode_type, is_contiguous);
+}
+
+/// @brief A factory method for iterator_input_adapter objects with iterator values.
+/// @tparam ItrType An iterator type.
+/// @param begin The beginning of iterators.
+/// @param end The end of iterators.
+/// @return iterator_input_adapter<ItrType> An iterator_input_adapter object for the target iterator type.
+template <typename ItrType>
+inline iterator_input_adapter<ItrType> input_adapter(ItrType begin, ItrType end) {
+ bool is_contiguous = true;
+ const auto size = std::distance(begin, end);
+
+ // Check if `begin` & `end` are contiguous iterators.
+ // Getting distance between begin and (end - 1) avoids dereferencing an invalid sentinel.
+ if FK_YAML_LIKELY (size > 0) {
+ using char_ptr_t = remove_cvref_t<typename std::iterator_traits<ItrType>::pointer>;
+ char_ptr_t p_begin = &*begin;
+ char_ptr_t p_second_last = &*std::next(begin, size - 1);
+ is_contiguous = (p_second_last - p_begin == size);
+ }
+ return create_iterator_input_adapter(begin, end, is_contiguous);
+}
+
+/// @brief A factory method for iterator_input_adapter objects with C-style arrays.
+/// @tparam T A type of arrayed objects.
+/// @tparam N A size of an array.
+/// @return decltype(input_adapter(array, array + N)) An iterator_input_adapter object for the target array.
+template <typename T, std::size_t N>
+inline auto input_adapter(T (&array)[N]) -> decltype(create_iterator_input_adapter(array, array + (N - 1), true)) {
+ return create_iterator_input_adapter(array, array + (N - 1), true);
+}
+
+/// @brief A namespace to implement container_input_adapter_factory for internal use.
+namespace input_adapter_factory {
+
+using std::begin;
+using std::end;
+
+/// @brief A factory of input adapters for containers.
+/// @tparam ContainerType A container type.
+/// @tparam typename N/A
+template <typename ContainerType, typename = void>
+struct container_input_adapter_factory {};
+
+/// @brief A partial specialization of container_input_adapter_factory if begin()/end() are available for ContainerType.
+/// @tparam ContainerType A container type.
+template <typename ContainerType>
+struct container_input_adapter_factory<
+ ContainerType, void_t<decltype(begin(std::declval<ContainerType>()), end(std::declval<ContainerType>()))>> {
+ /// A type for resulting input adapter object.
+ using adapter_type =
+ decltype(input_adapter(begin(std::declval<ContainerType>()), end(std::declval<ContainerType>())));
+
+ /// @brief A factory method of input adapter objects for the target container objects.
+ /// @param container A container-like input object.
+ /// @return adapter_type An iterator_input_adapter object.
+ static adapter_type create(const ContainerType& container) {
+ return input_adapter(begin(container), end(container));
+ }
+};
+
+} // namespace input_adapter_factory
+
+/// @brief A factory method for iterator_input_adapter objects with containers.
+/// @tparam ContainerType A container type.
+/// @param container A container object.
+/// @return input_adapter_factory::container_input_adapter_factory<ContainerType>::adapter_type
+template <typename ContainerType>
+inline typename input_adapter_factory::container_input_adapter_factory<ContainerType>::adapter_type input_adapter(
+ const ContainerType& container) {
+ return input_adapter_factory::container_input_adapter_factory<ContainerType>::create(container);
+}
+
+/// @brief A factory method for file_input_adapter objects with C-style file handles.
+/// @param file A file handle.
+/// @return file_input_adapter A file_input_adapter object.
+inline file_input_adapter input_adapter(std::FILE* file) {
+ if FK_YAML_UNLIKELY (!file) {
+ throw fkyaml::exception("Invalid FILE object pointer.");
+ }
+
+ const utf_encode_t encode_type = file_utf_encode_detector::detect(file);
+ return file_input_adapter(file, encode_type);
+}
+
+/// @brief A factory method for stream_input_adapter objects with std::istream objects.
+/// @param stream An input stream.
+/// @return stream_input_adapter A stream_input_adapter object.
+inline stream_input_adapter input_adapter(std::istream& stream) {
+ if FK_YAML_UNLIKELY (!stream.good()) {
+ throw fkyaml::exception("Invalid stream.");
+ }
+
+ const utf_encode_t encode_type = stream_utf_encode_detector::detect(stream);
+ return stream_input_adapter(stream, encode_type);
+}
+
+FK_YAML_DETAIL_NAMESPACE_END
+
+#endif /* FK_YAML_DETAIL_INPUT_INPUT_ADAPTER_HPP */
+
+// #include <fkYAML/detail/iterator.hpp>
+// _______ __ __ __ _____ __ __ __
+// | __| |_/ | \_/ |/ _ \ / \/ \| | fkYAML: A C++ header-only YAML library
+// | __| _ < \_ _/| ___ | _ | |___ version 0.4.2
+// |__| |_| \__| |_| |_| |_|___||___|______| https://github.com/fktn-k/fkYAML
+//
+// SPDX-FileCopyrightText: 2023-2025 Kensuke Fukutani <fktn.dev@gmail.com>
+// SPDX-License-Identifier: MIT
+
+#ifndef FK_YAML_DETAIL_ITERATOR_HPP
+#define FK_YAML_DETAIL_ITERATOR_HPP
+
+#include <cstddef>
+#include <iterator>
+
+// #include <fkYAML/detail/macros/define_macros.hpp>
+
+// #include <fkYAML/detail/meta/node_traits.hpp>
+
+// #include <fkYAML/exception.hpp>
+
+
+FK_YAML_DETAIL_NAMESPACE_BEGIN
+
+/// @brief The template definitions of type information used in @ref Iterator class
+/// @tparam ValueType The type of iterated elements.
+template <typename ValueType>
+struct iterator_traits {
+ /// A type of iterated elements.
+ using value_type = typename ValueType::value_type;
+ /// A type to represent difference between iterators.
+ using difference_type = typename ValueType::difference_type;
+ /// A type of an element pointer.
+ using pointer = typename ValueType::pointer;
+ /// A type of reference to an element.
+ using reference = typename ValueType::reference;
+};
+
+/// @brief A specialization of @ref iterator_traits for constant value types.
+/// @tparam ValueType The type of iterated elements.
+template <typename ValueType>
+struct iterator_traits<const ValueType> {
+ /// A type of iterated elements.
+ using value_type = typename ValueType::value_type;
+ /// A type to represent difference between iterators.
+ using difference_type = typename ValueType::difference_type;
+ /// A type of a constant element pointer.
+ using pointer = typename ValueType::const_pointer;
+ /// A type of constant reference to an element.
+ using reference = typename ValueType::const_reference;
+};
+
+/// @brief Definitions of iterator types for iterators internally held.
+enum class iterator_t : std::uint8_t {
+ SEQUENCE, //!< sequence iterator type.
+ MAPPING, //!< mapping iterator type.
+};
+
+/// @brief The actual storage for iterators internally held in iterator.
+template <typename BasicNodeType>
+struct iterator_holder {
+ static_assert(
+ is_basic_node<BasicNodeType>::value,
+ "iterator_holder class only accepts a basic_node as its template parameter.");
+
+ /// A sequence iterator object.
+ typename BasicNodeType::sequence_type::iterator sequence_iterator {};
+ /// A mapping iterator object.
+ typename BasicNodeType::mapping_type::iterator mapping_iterator {};
+};
+
+/// @brief A class which holds iterators either of sequence or mapping type
+/// @tparam ValueType The type of iterated elements.
+template <typename ValueType>
+class iterator {
+ /// @brief The iterator type with ValueType of different const-ness.
+ using other_iterator_type = typename std::conditional<
+ std::is_const<ValueType>::value, iterator<typename std::remove_const<ValueType>::type>,
+ iterator<const ValueType>>::type;
+
+ friend other_iterator_type;
+
+public:
+ /// A type for iterator traits of instantiated @Iterator template class.
+ using iterator_traits_type = iterator_traits<ValueType>;
+
+ /// A type for iterator category tag.
+ using iterator_category = std::bidirectional_iterator_tag;
+ /// A type of iterated element.
+ using value_type = typename iterator_traits_type::value_type;
+ /// A type to represent differences between iterators.
+ using difference_type = typename iterator_traits_type::difference_type;
+ /// A type of an element pointer.
+ using pointer = typename iterator_traits_type::pointer;
+ /// A type of reference to an element.
+ using reference = typename iterator_traits_type::reference;
+
+ static_assert(is_basic_node<value_type>::value, "iterator class only accepts a basic_node as its value type.");
+
+ /// @brief Constructs an iterator object.
+ iterator() = default;
+
+ /// @brief Construct a new iterator object with sequence iterator object.
+ /// @param[in] itr An sequence iterator object.
+ iterator(const typename value_type::sequence_type::iterator& itr) noexcept {
+ m_iterator_holder.sequence_iterator = itr;
+ }
+
+ /// @brief Construct a new iterator object with mapping iterator object.
+ /// @param[in] itr An mapping iterator object.
+ iterator(const typename value_type::mapping_type::iterator& itr) noexcept
+ : m_inner_iterator_type(iterator_t::MAPPING) {
+ m_iterator_holder.mapping_iterator = itr;
+ }
+
+ /// @brief Copy constructs an iterator.
+ iterator(const iterator&) = default;
+
+ /// @brief Copy constructs an iterator from another iterator with different const-ness in ValueType.
+ /// @note This copy constructor is not defined if ValueType is not const to avoid const removal from ValueType.
+ /// @tparam OtherIterator The iterator type to copy from.
+ /// @param other An iterator to copy from with different const-ness in ValueType.
+ template <
+ typename OtherIterator,
+ enable_if_t<
+ conjunction<std::is_same<OtherIterator, other_iterator_type>, std::is_const<ValueType>>::value, int> = 0>
+ iterator(const OtherIterator& other) noexcept
+ : m_inner_iterator_type(other.m_inner_iterator_type),
+ m_iterator_holder(other.m_iterator_holder) {
+ }
+
+ /// @brief A copy assignment operator of the iterator class.
+ iterator& operator=(const iterator&) = default;
+
+ template <
+ typename OtherIterator,
+ enable_if_t<
+ conjunction<std::is_same<OtherIterator, other_iterator_type>, std::is_const<ValueType>>::value, int> = 0>
+ iterator& operator=(const OtherIterator& other) noexcept {
+ m_inner_iterator_type = other.m_inner_iterator_type;
+ m_iterator_holder = other.m_iterator_holder;
+ return *this;
+ }
+
+ /// @brief Move constructs an iterator.
+ iterator(iterator&&) = default;
+
+ /// @brief A move assignment operator of the iterator class.
+ iterator& operator=(iterator&&) = default;
+
+ /// @brief Destroys an iterator.
+ ~iterator() = default;
+
+ /// @brief An arrow operator of the iterator class.
+ /// @return pointer A pointer to the BasicNodeType object internally referenced by the actual iterator object.
+ pointer operator->() noexcept {
+ if (m_inner_iterator_type == iterator_t::SEQUENCE) {
+ return &(*(m_iterator_holder.sequence_iterator));
+ }
+
+ // m_inner_iterator_type == iterator_t::MAPPING:
+ return &(m_iterator_holder.mapping_iterator->second);
+ }
+
+ /// @brief A dereference operator of the iterator class.
+ /// @return reference Reference to the Node object internally referenced by the actual iterator object.
+ reference operator*() const noexcept {
+ if (m_inner_iterator_type == iterator_t::SEQUENCE) {
+ return *(m_iterator_holder.sequence_iterator);
+ }
+
+ // m_inner_iterator_type == iterator_t::MAPPING:
+ return m_iterator_holder.mapping_iterator->second;
+ }
+
+ /// @brief A compound assignment operator by sum of the Iterator class.
+ /// @param i The difference from this Iterator object with which it moves forward.
+ /// @return Iterator& Reference to this Iterator object.
+ iterator& operator+=(difference_type i) noexcept {
+ switch (m_inner_iterator_type) {
+ case iterator_t::SEQUENCE:
+ std::advance(m_iterator_holder.sequence_iterator, i);
+ break;
+ case iterator_t::MAPPING:
+ std::advance(m_iterator_holder.mapping_iterator, i);
+ break;
+ }
+ return *this;
+ }
+
+ /// @brief A plus operator of the iterator class.
+ /// @param i The difference from this iterator object.
+ /// @return iterator An iterator object which has been added @a i.
+ iterator operator+(difference_type i) const noexcept {
+ auto result = *this;
+ result += i;
+ return result;
+ }
+
+ /// @brief An pre-increment operator of the iterator class.
+ /// @return iterator& Reference to this iterator object.
+ iterator& operator++() noexcept {
+ switch (m_inner_iterator_type) {
+ case iterator_t::SEQUENCE:
+ std::advance(m_iterator_holder.sequence_iterator, 1);
+ break;
+ case iterator_t::MAPPING:
+ std::advance(m_iterator_holder.mapping_iterator, 1);
+ break;
+ }
+ return *this;
+ }
+
+ /// @brief A post-increment operator of the iterator class.
+ /// @return iterator An iterator object which has been incremented.
+ iterator operator++(int) & noexcept {
+ auto result = *this;
+ ++(*this);
+ return result;
+ }
+
+ /// @brief A compound assignment operator by difference of the iterator class.
+ /// @param i The difference from this iterator object with which it moves backward.
+ /// @return iterator& Reference to this iterator object.
+ iterator& operator-=(difference_type i) noexcept {
+ return operator+=(-i);
+ }
+
+ /// @brief A minus operator of the iterator class.
+ /// @param i The difference from this iterator object.
+ /// @return iterator An iterator object from which has been subtracted @ i.
+ iterator operator-(difference_type i) const noexcept {
+ auto result = *this;
+ result -= i;
+ return result;
+ }
+
+ /// @brief A pre-decrement operator of the iterator class.
+ /// @return iterator& Reference to this iterator object.
+ iterator& operator--() noexcept {
+ switch (m_inner_iterator_type) {
+ case iterator_t::SEQUENCE:
+ std::advance(m_iterator_holder.sequence_iterator, -1);
+ break;
+ case iterator_t::MAPPING:
+ std::advance(m_iterator_holder.mapping_iterator, -1);
+ break;
+ }
+ return *this;
+ }
+
+ /// @brief A post-decrement operator of the iterator class
+ /// @return iterator An iterator object which has been decremented.
+ iterator operator--(int) & noexcept {
+ auto result = *this;
+ --(*this);
+ return result;
+ }
+
+ /// @brief An equal-to operator of the iterator class.
+ /// @param rhs An iterator object to be compared with this iterator object.
+ /// @return true This iterator object is equal to the other.
+ /// @return false This iterator object is not equal to the other.
+ template <
+ typename Iterator,
+ enable_if_t<
+ disjunction<std::is_same<Iterator, iterator>, std::is_same<Iterator, other_iterator_type>>::value, int> = 0>
+ bool operator==(const Iterator& rhs) const {
+ if FK_YAML_UNLIKELY (m_inner_iterator_type != rhs.m_inner_iterator_type) {
+ throw fkyaml::exception("Cannot compare iterators of different container types.");
+ }
+
+ if (m_inner_iterator_type == iterator_t::SEQUENCE) {
+ return (m_iterator_holder.sequence_iterator == rhs.m_iterator_holder.sequence_iterator);
+ }
+
+ // m_inner_iterator_type == iterator_t::MAPPING
+ return (m_iterator_holder.mapping_iterator == rhs.m_iterator_holder.mapping_iterator);
+ }
+
+ /// @brief An not-equal-to operator of the iterator class.
+ /// @param rhs An iterator object to be compared with this iterator object.
+ /// @return true This iterator object is not equal to the other.
+ /// @return false This iterator object is equal to the other.
+ template <
+ typename Iterator,
+ enable_if_t<
+ disjunction<std::is_same<Iterator, iterator>, std::is_same<Iterator, other_iterator_type>>::value, int> = 0>
+ bool operator!=(const Iterator& rhs) const {
+ return !operator==(rhs);
+ }
+
+ /// @brief A less-than operator of the iterator class.
+ /// @param rhs An iterator object to be compared with this iterator object.
+ /// @return true This iterator object is less than the other.
+ /// @return false This iterator object is not less than the other.
+ template <
+ typename Iterator,
+ enable_if_t<
+ disjunction<std::is_same<Iterator, iterator>, std::is_same<Iterator, other_iterator_type>>::value, int> = 0>
+ bool operator<(const Iterator& rhs) const {
+ if FK_YAML_UNLIKELY (m_inner_iterator_type != rhs.m_inner_iterator_type) {
+ throw fkyaml::exception("Cannot compare iterators of different container types.");
+ }
+
+ if FK_YAML_UNLIKELY (m_inner_iterator_type == iterator_t::MAPPING) {
+ throw fkyaml::exception("Cannot compare order of iterators of the mapping container type");
+ }
+
+ return (m_iterator_holder.sequence_iterator < rhs.m_iterator_holder.sequence_iterator);
+ }
+
+ /// @brief A less-than-or-equal-to operator of the iterator class.
+ /// @param rhs An iterator object to be compared with this iterator object.
+ /// @return true This iterator object is either less than or equal to the other.
+ /// @return false This iterator object is neither less than nor equal to the other.
+ template <
+ typename Iterator,
+ enable_if_t<
+ disjunction<std::is_same<Iterator, iterator>, std::is_same<Iterator, other_iterator_type>>::value, int> = 0>
+ bool operator<=(const Iterator& rhs) const {
+ return !rhs.operator<(*this);
+ }
+
+ /// @brief A greater-than operator of the iterator class.
+ /// @param rhs An iterator object to be compared with this iterator object.
+ /// @return true This iterator object is greater than the other.
+ /// @return false This iterator object is not greater than the other.
+ template <
+ typename Iterator,
+ enable_if_t<
+ disjunction<std::is_same<Iterator, iterator>, std::is_same<Iterator, other_iterator_type>>::value, int> = 0>
+ bool operator>(const Iterator& rhs) const {
+ return !operator<=(rhs);
+ }
+
+ /// @brief A greater-than-or-equal-to operator of the iterator class.
+ /// @param rhs An iterator object to be compared with this iterator object.
+ /// @return true This iterator object is either greater than or equal to the other.
+ /// @return false This iterator object is neither greater than nor equal to the other.
+ template <
+ typename Iterator,
+ enable_if_t<
+ disjunction<std::is_same<Iterator, iterator>, std::is_same<Iterator, other_iterator_type>>::value, int> = 0>
+ bool operator>=(const Iterator& rhs) const {
+ return !operator<(rhs);
+ }
+
+public:
+ /// @brief Get the type of the internal iterator implementation.
+ /// @return iterator_t The type of the internal iterator implementation.
+ iterator_t type() const noexcept {
+ return m_inner_iterator_type;
+ }
+
+ /// @brief Get the mapping key node of the current iterator.
+ /// @return The mapping key node of the current iterator.
+ const typename value_type::mapping_type::key_type& key() const {
+ if FK_YAML_UNLIKELY (m_inner_iterator_type == iterator_t::SEQUENCE) {
+ throw fkyaml::exception("Cannot retrieve key from non-mapping iterators.");
+ }
+
+ return m_iterator_holder.mapping_iterator->first;
+ }
+
+ /// @brief Get reference to the YAML node of the current iterator.
+ /// @return Reference to the YAML node of the current iterator.
+ reference value() const noexcept {
+ return operator*();
+ }
+
+private:
+ /// A type of the internally-held iterator.
+ iterator_t m_inner_iterator_type {iterator_t::SEQUENCE};
+ /// A holder of actual iterators.
+ iterator_holder<value_type> m_iterator_holder {};
+};
+
+/// @brief Get reference to a mapping key node.
+/// @tparam ValueType The iterator value type.
+/// @tparam I The element index.
+/// @param i An iterator object.
+/// @return Reference to a mapping key node.
+template <std::size_t I, typename ValueType, enable_if_t<I == 0, int> = 0>
+inline auto get(const iterator<ValueType>& i) -> decltype(i.key()) {
+ return i.key();
+}
+
+/// @brief Get reference to a mapping value node.
+/// @tparam ValueType The iterator value type.
+/// @tparam I The element index
+/// @param i An iterator object.
+/// @return Reference to a mapping value node.
+template <std::size_t I, typename ValueType, enable_if_t<I == 1, int> = 0>
+inline auto get(const iterator<ValueType>& i) -> decltype(i.value()) {
+ return i.value();
+}
+
+FK_YAML_DETAIL_NAMESPACE_END
+
+namespace std {
+
+#ifdef __clang__
+// clang emits warnings against mixed usage of class/struct for tuple_size/tuple_element.
+// see also: https://groups.google.com/a/isocpp.org/g/std-discussion/c/QC-AMb5oO1w
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Wmismatched-tags"
+#endif
+
+/// @brief Partial specialization of std::tuple_size for iterator class.
+/// @tparam ValueType The iterator value type.
+template <typename ValueType>
+// NOLINTNEXTLINE(cert-dcl58-cpp)
+struct tuple_size<::fkyaml::detail::iterator<ValueType>> : integral_constant<size_t, 2> {};
+
+/// @brief Partial specialization of std::tuple_element for iterator class.
+/// @tparam ValueType The iterator value type.
+/// @tparam I The element index.
+template <size_t I, typename ValueType>
+// NOLINTNEXTLINE(cert-dcl58-cpp)
+struct tuple_element<I, ::fkyaml::detail::iterator<ValueType>> {
+ using type = decltype(get<I>(std::declval<::fkyaml::detail::iterator<ValueType>>()));
+};
+
+#ifdef __clang__
+#pragma clang diagnostic pop
+#endif
+
+} // namespace std
+
+#endif /* FK_YAML_DETAIL_ITERATOR_HPP */
+
+// #include <fkYAML/detail/map_range_proxy.hpp>
+// _______ __ __ __ _____ __ __ __
+// | __| |_/ | \_/ |/ _ \ / \/ \| | fkYAML: A C++ header-only YAML library
+// | __| _ < \_ _/| ___ | _ | |___ version 0.4.2
+// |__| |_| \__| |_| |_| |_|___||___|______| https://github.com/fktn-k/fkYAML
+//
+// SPDX-FileCopyrightText: 2023-2025 Kensuke Fukutani <fktn.dev@gmail.com>
+// SPDX-License-Identifier: MIT
+
+#ifndef FK_YAML_DETAIL_MAP_RANGE_PROXY_HPP
+#define FK_YAML_DETAIL_MAP_RANGE_PROXY_HPP
+
+// #include <fkYAML/detail/macros/define_macros.hpp>
+
+// #include <fkYAML/detail/meta/node_traits.hpp>
+
+
+FK_YAML_DETAIL_NAMESPACE_BEGIN
+
+/// @brief A helper iterator class which wraps a mapping iterator object.
+/// @tparam Iterator The base iterator type.
+template <typename Iterator>
+class map_iterator_proxy {
+public:
+ /// @brief The type of the pointed-to elements by base iterators.
+ using value_type = Iterator;
+
+ /// @brief The type to represent difference between the pointed-to elements by base iterators.
+ using difference_type = std::ptrdiff_t;
+
+ /// @brief The type of the pointed-to element references by base iterators.
+ using reference = value_type&;
+
+ /// @brief The type of the pointed-to element pointers by base iterators.
+ using pointer = value_type*;
+
+ /// @brief The iterator category.
+ using iterator_category = std::forward_iterator_tag;
+
+ /// @brief Constructs a map_iterator_proxy object.
+ map_iterator_proxy() = default;
+
+ /// @brief Constructs a map_iterator_proxy object with an Iterator object.
+ /// @param i A base iterator object.
+ map_iterator_proxy(const Iterator& i) noexcept
+ : m_base_iterator(i) {
+ }
+
+ /// @brief Copy constructs a map_iterator_proxy object.
+ map_iterator_proxy(const map_iterator_proxy&) = default;
+
+ /// @brief Copy assigns a map_iterator_proxy object.
+ map_iterator_proxy& operator=(const map_iterator_proxy&) = default;
+
+ /// @brief Move constructs a map_iterator_proxy object.
+ map_iterator_proxy(map_iterator_proxy&&) = default;
+
+ /// @brief Move assigns a map_iterator_proxy object.
+ map_iterator_proxy& operator=(map_iterator_proxy&&) = default;
+
+ /// @brief Destructs a map_iterator_proxy object.
+ ~map_iterator_proxy() = default;
+
+ /// @brief Get reference to the base iterator object.
+ /// @return Reference to the base iterator object.
+ reference operator*() noexcept {
+ return m_base_iterator;
+ }
+
+ /// @brief Get pointer to the base iterator object.
+ /// @return Pointer to the base iterator object.
+ pointer operator->() noexcept {
+ return &m_base_iterator;
+ }
+
+ /// @brief Pre-increments the base iterator object.
+ /// @return Reference to this map_iterator_proxy object.
+ map_iterator_proxy& operator++() noexcept {
+ ++m_base_iterator;
+ return *this;
+ }
+
+ /// @brief Post-increments the base iterator object.
+ /// @return A map_iterator_proxy object with its base iterator incremented.
+ map_iterator_proxy operator++(int) & noexcept {
+ auto result = *this;
+ ++(*this);
+ return result;
+ }
+
+ /// @brief Check equality between map_iterator_proxy objects.
+ /// @param rhs A map_iterator_proxy object to compare with.
+ /// @return true if this map_iterator_proxy object is equal to `rhs`, false otherwise.
+ bool operator==(const map_iterator_proxy& rhs) const noexcept {
+ return m_base_iterator == rhs.m_base_iterator;
+ }
+
+ /// @brief Check inequality between map_iterator_proxy objects.
+ /// @param rhs A map_iterator_proxy object to compare with.
+ /// @return true if this map_iterator_proxy object is not equal to `rhs`, false otherwise.
+ bool operator!=(const map_iterator_proxy& rhs) const noexcept {
+ return m_base_iterator != rhs.m_base_iterator;
+ }
+
+ /// @brief Get the mapping key node pointed by the base iterator.
+ /// @return Reference to the mapping key node.
+ typename Iterator::reference key() const {
+ return m_base_iterator.key();
+ }
+
+ /// @brief Get the mapping value node pointed by the base iterator.
+ /// @return Reference to the mapping value node.
+ typename Iterator::reference value() const noexcept {
+ return m_base_iterator.value();
+ }
+
+private:
+ /// The base iterator object.
+ Iterator m_base_iterator {};
+};
+
+/// @brief A helper struct which allows accessing node iterator member functions in range-based for loops.
+/// @tparam BasicNodeType A basic_node template instance type.
+template <typename BasicNodeType>
+class map_range_proxy {
+ static_assert(
+ is_basic_node<BasicNodeType>::value,
+ "map_range_proxy only accepts a basic_node type as its template parameter.");
+
+public:
+ /// @brief The type of non-const iterators.
+ using iterator = map_iterator_proxy<typename std::conditional<
+ std::is_const<BasicNodeType>::value, typename BasicNodeType::const_iterator,
+ typename BasicNodeType::iterator>::type>;
+
+ /// @brief The type of const iterators.
+ using const_iterator = map_iterator_proxy<typename BasicNodeType::const_iterator>;
+
+ /// @brief Constructs a map_range_proxy object with a BasicNodeType object.
+ /// @param map A mapping node object.
+ map_range_proxy(BasicNodeType& map) noexcept
+ : mp_map(&map) {
+ }
+
+ /// @brief Copy constructs a map_range_proxy object.
+ map_range_proxy(const map_range_proxy&) = default;
+
+ /// @brief Copy assigns a map_range_proxy object.
+ /// @return Reference to this map_range_proxy object.
+ map_range_proxy& operator=(const map_range_proxy&) = default;
+
+ /// @brief Move constructs a map_range_proxy object.
+ map_range_proxy(map_range_proxy&&) = default;
+
+ /// @brief Move assigns a map_range_proxy object.
+ /// @return Reference to this map_range_proxy object.
+ map_range_proxy& operator=(map_range_proxy&&) = default;
+
+ /// @brief Destructs a map_range_proxy object.
+ ~map_range_proxy() = default;
+
+ /// @brief Get an iterator to the first element.
+ /// @return An iterator to the first element.
+ iterator begin() noexcept {
+ return {mp_map->begin()};
+ }
+
+ /// @brief Get a const iterator to the first element.
+ /// @return A const iterator to the first element.
+ const_iterator begin() const noexcept {
+ return {mp_map->cbegin()};
+ }
+
+ /// @brief Get an iterator to the past-the-last element.
+ /// @return An iterator to the past-the-last element.
+ iterator end() noexcept {
+ return {mp_map->end()};
+ }
+
+ /// @brief Get a const iterator to the past-the-last element.
+ /// @return A const iterator to the past-the-last element.
+ const_iterator end() const noexcept {
+ return {mp_map->cend()};
+ }
+
+private:
+ /// Pointer to the mapping node object. (non-null)
+ BasicNodeType* mp_map {nullptr};
+};
+
+FK_YAML_DETAIL_NAMESPACE_END
+
+#endif /* FK_YAML_DETAIL_MAP_RANGE_PROXY_HPP */
+
+// #include <fkYAML/detail/meta/node_traits.hpp>
+
+// #include <fkYAML/detail/meta/stl_supplement.hpp>
+
+// #include <fkYAML/detail/meta/type_traits.hpp>
+
+// #include <fkYAML/detail/node_attrs.hpp>
+
+// #include <fkYAML/detail/node_property.hpp>
+
+// #include <fkYAML/detail/node_ref_storage.hpp>
+// _______ __ __ __ _____ __ __ __
+// | __| |_/ | \_/ |/ _ \ / \/ \| | fkYAML: A C++ header-only YAML library
+// | __| _ < \_ _/| ___ | _ | |___ version 0.4.2
+// |__| |_| \__| |_| |_| |_|___||___|______| https://github.com/fktn-k/fkYAML
+//
+// SPDX-FileCopyrightText: 2023-2025 Kensuke Fukutani <fktn.dev@gmail.com>
+// SPDX-License-Identifier: MIT
+
+#ifndef FK_YAML_DETAIL_NODE_REF_STORAGE_HPP
+#define FK_YAML_DETAIL_NODE_REF_STORAGE_HPP
+
+#include <initializer_list>
+#include <type_traits>
+#include <utility>
+
+// #include <fkYAML/detail/macros/define_macros.hpp>
+
+// #include <fkYAML/detail/meta/node_traits.hpp>
+
+// #include <fkYAML/detail/meta/stl_supplement.hpp>
+
+
+FK_YAML_DETAIL_NAMESPACE_BEGIN
+
+/// @brief A temporal storage for basic_node class objects.
+/// @note This class makes it easier to handle lvalue basic_node objects in basic_node ctor with std::initializer_list.
+/// @tparam BasicNodeType A basic_node template instance type.
+template <typename BasicNodeType>
+class node_ref_storage {
+ static_assert(is_basic_node<BasicNodeType>::value, "node_ref_storage only accepts basic_node<...>");
+
+ using node_type = BasicNodeType;
+
+public:
+ /// @brief Construct a new node ref storage object with an rvalue basic_node object.
+ /// @param n An rvalue basic_node object.
+ explicit node_ref_storage(node_type&& n) noexcept(std::is_nothrow_move_constructible<node_type>::value)
+ : m_owned_value(std::move(n)) {
+ }
+
+ /// @brief Construct a new node ref storage object with an lvalue basic_node object.
+ /// @param n An lvalue basic_node object.
+ explicit node_ref_storage(const node_type& n) noexcept
+ : m_value_ref(&n) {
+ }
+
+ /// @brief Construct a new node ref storage object with a std::initializer_list object.
+ /// @param init A std::initializer_list object.
+ node_ref_storage(std::initializer_list<node_ref_storage> init)
+ : m_owned_value(init) {
+ }
+
+ /// @brief Construct a new node ref storage object with variadic template arguments
+ /// @tparam Args Types of arguments to construct a basic_node object.
+ /// @param args Arguments to construct a basic_node object.
+ template <typename... Args, enable_if_t<std::is_constructible<node_type, Args...>::value, int> = 0>
+ node_ref_storage(Args&&... args)
+ : m_owned_value(std::forward<Args>(args)...) {
+ }
+
+ // allow only move construct/assignment
+ node_ref_storage(const node_ref_storage&) = delete;
+ node_ref_storage(node_ref_storage&&) = default;
+ node_ref_storage& operator=(const node_ref_storage&) = delete;
+ node_ref_storage& operator=(node_ref_storage&&) = default;
+
+ ~node_ref_storage() = default;
+
+public:
+ /// @brief An arrow operator for node_ref_storage objects.
+ /// @return const node_type* A constant pointer to a basic_node object.
+ const node_type* operator->() const noexcept {
+ return m_value_ref ? m_value_ref : &m_owned_value;
+ }
+
+ /// @brief Releases a basic_node object internally held.
+ /// @return node_type A basic_node object internally held.
+ node_type release() const noexcept {
+ return m_value_ref ? *m_value_ref : std::move(m_owned_value);
+ }
+
+private:
+ /// A storage for a basic_node object given with rvalue reference.
+ mutable node_type m_owned_value = nullptr;
+ /// A pointer to a basic_node object given with lvalue reference.
+ const node_type* m_value_ref = nullptr;
+};
+
+FK_YAML_DETAIL_NAMESPACE_END
+
+#endif /* FK_YAML_DETAIL_NODE_REF_STORAGE_HPP */
+
+// #include <fkYAML/detail/output/serializer.hpp>
+// _______ __ __ __ _____ __ __ __
+// | __| |_/ | \_/ |/ _ \ / \/ \| | fkYAML: A C++ header-only YAML library
+// | __| _ < \_ _/| ___ | _ | |___ version 0.4.2
+// |__| |_| \__| |_| |_| |_|___||___|______| https://github.com/fktn-k/fkYAML
+//
+// SPDX-FileCopyrightText: 2023-2025 Kensuke Fukutani <fktn.dev@gmail.com>
+// SPDX-License-Identifier: MIT
+
+#ifndef FK_YAML_DETAIL_OUTPUT_SERIALIZER_HPP
+#define FK_YAML_DETAIL_OUTPUT_SERIALIZER_HPP
+
+#include <cmath>
+#include <sstream>
+#include <string>
+#include <vector>
+
+// #include <fkYAML/detail/macros/define_macros.hpp>
+
+// #include <fkYAML/detail/conversions/to_string.hpp>
+// _______ __ __ __ _____ __ __ __
+// | __| |_/ | \_/ |/ _ \ / \/ \| | fkYAML: A C++ header-only YAML library
+// | __| _ < \_ _/| ___ | _ | |___ version 0.4.2
+// |__| |_| \__| |_| |_| |_|___||___|______| https://github.com/fktn-k/fkYAML
+//
+// SPDX-FileCopyrightText: 2023-2025 Kensuke Fukutani <fktn.dev@gmail.com>
+// SPDX-License-Identifier: MIT
+
+#ifndef FK_YAML_DETAIL_CONVERSIONS_TO_STRING_HPP
+#define FK_YAML_DETAIL_CONVERSIONS_TO_STRING_HPP
+
+#include <cmath>
+#include <limits>
+#include <string>
+#include <sstream>
+#include <type_traits>
+
+// #include <fkYAML/detail/macros/define_macros.hpp>
+
+// #include <fkYAML/detail/meta/stl_supplement.hpp>
+
+// #include <fkYAML/detail/meta/type_traits.hpp>
+
+
+FK_YAML_DETAIL_NAMESPACE_BEGIN
+
+/// @brief Converts a ValueType object to a string YAML token.
+/// @tparam ValueType A source value type.
+/// @tparam CharType The type of characters for the conversion result.
+/// @param s A resulting output string.
+/// @param v A source value.
+template <typename ValueType, typename CharType>
+inline void to_string(ValueType v, std::basic_string<CharType>& s) noexcept;
+
+/// @brief Specialization of to_string() for null values.
+/// @param s A resulting string YAML token.
+/// @param (unused) nullptr
+template <>
+inline void to_string(std::nullptr_t /*unused*/, std::string& s) noexcept {
+ s = "null";
+}
+
+/// @brief Specialization of to_string() for booleans.
+/// @param s A resulting string YAML token.
+/// @param v A boolean source value.
+template <>
+inline void to_string(bool v, std::string& s) noexcept {
+ s = v ? "true" : "false";
+}
+
+/// @brief Specialization of to_string() for integers.
+/// @tparam IntegerType An integer type.
+/// @param s A resulting string YAML token.
+/// @param i An integer source value.
+template <typename IntegerType>
+inline enable_if_t<is_non_bool_integral<IntegerType>::value> to_string(IntegerType v, std::string& s) noexcept {
+ s = std::to_string(v);
+}
+
+/// @brief Specialization of to_string() for floating point numbers.
+/// @tparam FloatType A floating point number type.
+/// @param s A resulting string YAML token.
+/// @param f A floating point number source value.
+template <typename FloatType>
+inline enable_if_t<std::is_floating_point<FloatType>::value> to_string(FloatType v, std::string& s) noexcept {
+ if (std::isnan(v)) {
+ s = ".nan";
+ return;
+ }
+
+ if (std::isinf(v)) {
+ if (v == std::numeric_limits<FloatType>::infinity()) {
+ s = ".inf";
+ }
+ else {
+ s = "-.inf";
+ }
+ return;
+ }
+
+ std::ostringstream oss;
+ oss << v;
+ s = oss.str();
+
+ // If `v` is actually an integer and no scientific notation is used for serialization, ".0" must be appended.
+ // The result would cause a roundtrip issue otherwise. https://github.com/fktn-k/fkYAML/issues/405
+ const std::size_t pos = s.find_first_of(".e");
+ if (pos == std::string::npos) {
+ s += ".0";
+ }
+}
+
+FK_YAML_DETAIL_NAMESPACE_END
+
+#endif /* FK_YAML_DETAIL_CONVERSIONS_TO_STRING_HPP */
+
+// #include <fkYAML/detail/encodings/yaml_escaper.hpp>
+
+// #include <fkYAML/detail/input/scalar_scanner.hpp>
+
+// #include <fkYAML/detail/meta/node_traits.hpp>
+
+// #include <fkYAML/exception.hpp>
+
+// #include <fkYAML/node_type.hpp>
+
+// #include <fkYAML/yaml_version_type.hpp>
+
+
+FK_YAML_DETAIL_NAMESPACE_BEGIN
+
+/// @brief A basic implementation of serialization feature for YAML nodes.
+/// @tparam BasicNodeType A BasicNode template class instantiation.
+template <typename BasicNodeType>
+class basic_serializer {
+ static_assert(detail::is_basic_node<BasicNodeType>::value, "basic_serializer only accepts basic_node<...>");
+
+public:
+ /// @brief Construct a new basic_serializer object.
+ basic_serializer() = default;
+
+ /// @brief Serialize the given Node value.
+ /// @param node A Node object to be serialized.
+ /// @return std::string A serialization result of the given Node value.
+ std::string serialize(const BasicNodeType& node) {
+ std::string str {};
+ serialize_document(node, str);
+ return str;
+ } // LCOV_EXCL_LINE
+
+ std::string serialize_docs(const std::vector<BasicNodeType>& docs) {
+ std::string str {};
+
+ const auto size = static_cast<uint32_t>(docs.size());
+ for (uint32_t i = 0; i < size; i++) {
+ serialize_document(docs[i], str);
+ if (i + 1 < size) {
+ // Append the end-of-document marker for the next document.
+ str += "...\n";
+ }
+ }
+
+ return str;
+ } // LCOV_EXCL_LINE
+
+private:
+ void serialize_document(const BasicNodeType& node, std::string& str) {
+ const bool dirs_serialized = serialize_directives(node, str);
+
+ // the root node cannot be an alias node.
+ const bool root_has_props = node.is_anchor() || node.has_tag_name();
+
+ if (root_has_props) {
+ if (dirs_serialized) {
+ str.back() = ' '; // replace the last LF with a white space
+ }
+ bool is_anchor_appended = try_append_anchor(node, false, str);
+ try_append_tag(node, is_anchor_appended, str);
+ str += "\n";
+ }
+ serialize_node(node, 0, str);
+ }
+
+ /// @brief Serialize the directives if any is applied to the node.
+ /// @param node The target node.
+ /// @param str A string to hold serialization result.
+ /// @return bool true if any directive is serialized, false otherwise.
+ bool serialize_directives(const BasicNodeType& node, std::string& str) {
+ const auto& p_meta = node.mp_meta;
+ bool needs_directive_end = false;
+
+ if (p_meta->is_version_specified) {
+ str += "%YAML ";
+ switch (p_meta->version) {
+ case yaml_version_type::VERSION_1_1:
+ str += "1.1\n";
+ break;
+ case yaml_version_type::VERSION_1_2:
+ str += "1.2\n";
+ break;
+ }
+ needs_directive_end = true;
+ }
+
+ if (!p_meta->primary_handle_prefix.empty()) {
+ str += "%TAG ! ";
+ str += p_meta->primary_handle_prefix;
+ str += "\n";
+ needs_directive_end = true;
+ }
+
+ if (!p_meta->secondary_handle_prefix.empty()) {
+ str += "%TAG !! ";
+ str += p_meta->secondary_handle_prefix;
+ str += "\n";
+ needs_directive_end = true;
+ }
+
+ if (!p_meta->named_handle_map.empty()) {
+ for (const auto& itr : p_meta->named_handle_map) {
+ str += "%TAG ";
+ str += itr.first;
+ str += " ";
+ str += itr.second;
+ str += "\n";
+ }
+ needs_directive_end = true;
+ }
+
+ if (needs_directive_end) {
+ str += "---\n";
+ }
+
+ return needs_directive_end;
+ }
+
+ /// @brief Recursively serialize each Node object.
+ /// @param node A Node object to be serialized.
+ /// @param cur_indent The current indent width
+ /// @param str A string to hold serialization result.
+ void serialize_node(const BasicNodeType& node, const uint32_t cur_indent, std::string& str) {
+ switch (node.get_type()) {
+ case node_type::SEQUENCE:
+ if (node.size() == 0) {
+ str += "[]\n";
+ return;
+ }
+ for (const auto& seq_item : node) {
+ insert_indentation(cur_indent, str);
+ str += "-";
+
+ const bool is_appended = try_append_alias(seq_item, true, str);
+ if (is_appended) {
+ str += "\n";
+ continue;
+ }
+
+ try_append_anchor(seq_item, true, str);
+ try_append_tag(seq_item, true, str);
+
+ const bool is_scalar = seq_item.is_scalar();
+ if (is_scalar) {
+ str += " ";
+ serialize_node(seq_item, cur_indent, str);
+ str += "\n";
+ continue;
+ }
+
+ const bool is_empty = seq_item.empty();
+ if (!is_empty) {
+ str += "\n";
+ serialize_node(seq_item, cur_indent + 2, str);
+ continue;
+ }
+
+ // an empty sequence or mapping
+ if (seq_item.is_sequence()) {
+ str += " []\n";
+ }
+ else /*seq_item.is_mapping()*/ {
+ str += " {}\n";
+ }
+ }
+ break;
+ case node_type::MAPPING:
+ if (node.size() == 0) {
+ str += "{}\n";
+ return;
+ }
+ for (auto itr : node.map_items()) {
+ insert_indentation(cur_indent, str);
+
+ // serialize a mapping key node.
+ const auto& key_node = itr.key();
+
+ bool is_appended = try_append_alias(key_node, false, str);
+ if (is_appended) {
+ // The trailing white space is necessary since anchor names can contain a colon (:) at its end.
+ str += " ";
+ }
+ else {
+ const bool is_anchor_appended = try_append_anchor(key_node, false, str);
+ const bool is_tag_appended = try_append_tag(key_node, is_anchor_appended, str);
+ if (is_anchor_appended || is_tag_appended) {
+ str += " ";
+ }
+
+ const bool is_container = !key_node.is_scalar();
+ if (is_container) {
+ str += "? ";
+ }
+ const auto indent = static_cast<uint32_t>(get_cur_indent(str));
+ serialize_node(key_node, indent, str);
+ if (is_container) {
+ // a newline code is already inserted in the above serialize_node() call.
+ insert_indentation(indent - 2, str);
+ }
+ }
+
+ str += ":";
+
+ // serialize a mapping value node.
+ const auto& value_node = itr.value();
+
+ is_appended = try_append_alias(value_node, true, str);
+ if (is_appended) {
+ str += "\n";
+ continue;
+ }
+
+ try_append_anchor(value_node, true, str);
+ try_append_tag(value_node, true, str);
+
+ const bool is_scalar = itr->is_scalar();
+ if (is_scalar) {
+ str += " ";
+ serialize_node(value_node, cur_indent, str);
+ str += "\n";
+ continue;
+ }
+
+ const bool is_empty = itr->empty();
+ if (is_empty) {
+ str += " ";
+ }
+ else {
+ str += "\n";
+ }
+ serialize_node(value_node, cur_indent + 2, str);
+ }
+ break;
+ case node_type::NULL_OBJECT:
+ to_string(nullptr, m_tmp_str_buff);
+ str += m_tmp_str_buff;
+ break;
+ case node_type::BOOLEAN:
+ to_string(node.template get_value<typename BasicNodeType::boolean_type>(), m_tmp_str_buff);
+ str += m_tmp_str_buff;
+ break;
+ case node_type::INTEGER:
+ to_string(node.template get_value<typename BasicNodeType::integer_type>(), m_tmp_str_buff);
+ str += m_tmp_str_buff;
+ break;
+ case node_type::FLOAT:
+ to_string(node.template get_value<typename BasicNodeType::float_number_type>(), m_tmp_str_buff);
+ str += m_tmp_str_buff;
+ break;
+ case node_type::STRING: {
+ bool is_escaped = false;
+ auto str_val = get_string_node_value(node, is_escaped);
+
+ if (is_escaped) {
+ // There's no other token type with escapes than strings.
+ // Also, escapes must be in double-quoted strings.
+ str += '\"';
+ str += str_val;
+ str += '\"';
+ break;
+ }
+
+ // The next line is intentionally excluded from the LCOV coverage target since the next line is somehow
+ // misrecognized as it has a binary branch. Possibly begin() or end() has some conditional branch(es)
+ // internally. Confirmed with LCOV 1.14 on Ubuntu22.04.
+ const node_type type_if_plain =
+ scalar_scanner::scan(str_val.c_str(), str_val.c_str() + str_val.size()); // LCOV_EXCL_LINE
+
+ if (type_if_plain != node_type::STRING) {
+ // Surround a string value with double quotes to keep semantic equality.
+ // Without them, serialized values will become non-string. (e.g., "1" -> 1)
+ str += '\"';
+ str += str_val;
+ str += '\"';
+ }
+ else {
+ str += str_val;
+ }
+ break;
+ }
+ }
+ }
+
+ /// @brief Get the current indentation width.
+ /// @param s The target string object.
+ /// @return The current indentation width.
+ std::size_t get_cur_indent(const std::string& s) const noexcept {
+ const bool is_empty = s.empty();
+ if (is_empty) {
+ return 0;
+ }
+
+ const std::size_t last_lf_pos = s.rfind('\n');
+ return (last_lf_pos != std::string::npos) ? s.size() - last_lf_pos - 1 : s.size();
+ }
+
+ /// @brief Insert indentation to the serialization result.
+ /// @param indent The indent width to be inserted.
+ /// @param str A string to hold serialization result.
+ void insert_indentation(const uint32_t indent, std::string& str) const noexcept {
+ if (indent == 0) {
+ return;
+ }
+
+ str.append(indent - get_cur_indent(str), ' ');
+ }
+
+ /// @brief Append an anchor property if it's available. Do nothing otherwise.
+ /// @param node The target node which is possibly an anchor node.
+ /// @param prepends_space Whether to prepend a space before an anchor property.
+ /// @param str A string to hold serialization result.
+ /// @return true if an anchor property has been appended, false otherwise.
+ bool try_append_anchor(const BasicNodeType& node, bool prepends_space, std::string& str) const {
+ if (node.is_anchor()) {
+ if (prepends_space) {
+ str += " ";
+ }
+ str += "&" + node.get_anchor_name();
+ return true;
+ }
+ return false;
+ }
+
+ /// @brief Append an alias property if it's available. Do nothing otherwise.
+ /// @param node The target node which is possibly an alias node.
+ /// @param prepends_space Whether to prepend a space before an alias property.
+ /// @param str A string to hold serialization result.
+ /// @return true if an alias property has been appended, false otherwise.
+ bool try_append_alias(const BasicNodeType& node, bool prepends_space, std::string& str) const {
+ if (node.is_alias()) {
+ if (prepends_space) {
+ str += " ";
+ }
+ str += "*" + node.get_anchor_name();
+ return true;
+ }
+ return false;
+ }
+
+ /// @brief Append a tag name if it's available. Do nothing otherwise.
+ /// @param[in] node The target node which possibly has a tag name.
+ /// @param[out] str A string to hold serialization result.
+ /// @return true if a tag name has been appended, false otherwise.
+ bool try_append_tag(const BasicNodeType& node, bool prepends_space, std::string& str) const {
+ if (node.has_tag_name()) {
+ if (prepends_space) {
+ str += " ";
+ }
+ str += node.get_tag_name();
+ return true;
+ }
+ return false;
+ }
+
+ /// @brief Get a string value from the given node and, if necessary, escape its contents.
+ /// @param[in] node The target string YAML node.
+ /// @param[out] is_escaped Whether the contents of an output string has been escaped.
+ /// @return The (escaped) string node value.
+ typename BasicNodeType::string_type get_string_node_value(const BasicNodeType& node, bool& is_escaped) {
+ FK_YAML_ASSERT(node.is_string());
+
+ const auto& s = node.as_str();
+ return yaml_escaper::escape(s.c_str(), s.c_str() + s.size(), is_escaped);
+ } // LCOV_EXCL_LINE
+
+private:
+ /// A temporal buffer for conversion from a scalar to a string.
+ std::string m_tmp_str_buff;
+};
+
+FK_YAML_DETAIL_NAMESPACE_END
+
+#endif /* FK_YAML_DETAIL_OUTPUT_SERIALIZER_HPP */
+
+// #include <fkYAML/detail/reverse_iterator.hpp>
+// _______ __ __ __ _____ __ __ __
+// | __| |_/ | \_/ |/ _ \ / \/ \| | fkYAML: A C++ header-only YAML library
+// | __| _ < \_ _/| ___ | _ | |___ version 0.4.2
+// |__| |_| \__| |_| |_| |_|___||___|______| https://github.com/fktn-k/fkYAML
+//
+// SPDX-FileCopyrightText: 2023-2025 Kensuke Fukutani <fktn.dev@gmail.com>
+// SPDX-License-Identifier: MIT
+
+#ifndef FK_YAML_DETAIL_REVERSE_ITERATOR_HPP
+#define FK_YAML_DETAIL_REVERSE_ITERATOR_HPP
+
+#include <iterator>
+
+// #include <fkYAML/detail/macros/define_macros.hpp>
+
+// #include <fkYAML/detail/meta/node_traits.hpp>
+
+
+FK_YAML_DETAIL_NAMESPACE_BEGIN
+
+/// @brief An iterator adapter class that reverses the direction of a given node iterator.
+/// @tparam Iterator The base iterator type.
+template <typename Iterator>
+class reverse_iterator {
+ static_assert(
+ is_basic_node<typename Iterator::value_type>::value,
+ "reverse_iterator only accepts a basic_node type as the underlying iterator's value type");
+
+public:
+ /// @brief The base iterator type.
+ using iterator_type = Iterator;
+
+ /// @brief The base iterator category.
+ using iterator_category = typename Iterator::iterator_category;
+
+ /// @brief The type of the pointed-to elements by base iterators.
+ using value_type = typename Iterator::value_type;
+
+ /// @brief The type to represent differences between the pointed-to elements by the base iterators.
+ using difference_type = typename Iterator::difference_type;
+
+ /// @brief The type of the pointed-to element pointers by base iterators.
+ using pointer = typename Iterator::pointer;
+
+ /// @brief The type of the pointed-to element references by base iterators.
+ using reference = typename Iterator::reference;
+
+ /// @brief Constructs a reverse_iterator object.
+ reverse_iterator() = default;
+
+ /// @brief Copy constructs a reverse_iterator object.
+ reverse_iterator(const reverse_iterator&) = default;
+
+ /// @brief Copy assignments a reverse_iterator object.
+ reverse_iterator& operator=(const reverse_iterator&) = default;
+
+ /// @brief Move constructs a reverse_iterator object.
+ reverse_iterator(reverse_iterator&&) = default;
+
+ /// @brief Move assignments a reverse_iterator object.
+ reverse_iterator& operator=(reverse_iterator&&) = default;
+
+ /// @brief Constructs a reverse_iterator object with an underlying iterator object.
+ /// @param i A base iterator object.
+ reverse_iterator(const Iterator& i) noexcept
+ : m_current(i) {
+ }
+
+ /// @brief Copy constructs a reverse_iterator object with a compatible reverse_iterator object.
+ /// @tparam U A compatible iterator type with Iterator.
+ /// @param other A compatible reverse_iterator object.
+ template <typename U, enable_if_t<negation<std::is_same<U, Iterator>>::value, int> = 0>
+ reverse_iterator(const reverse_iterator<U>& other) noexcept
+ : m_current(other.base()) {
+ }
+
+ /// @brief Copy assigns a reverse_iterator object with a compatible reverse_iterator object.
+ /// @tparam U A compatible iterator type with Iterator.
+ /// @param other A compatible reverse_iterator object.
+ /// @return Reference to this reverse_iterator object.
+ template <typename U, enable_if_t<negation<std::is_same<U, Iterator>>::value, int> = 0>
+ reverse_iterator& operator=(const reverse_iterator<U>& other) noexcept {
+ m_current = other.base();
+ return *this;
+ }
+
+ /// @brief Destructs a reverse_iterator object.
+ ~reverse_iterator() = default;
+
+ /// @brief Accesses the underlying iterator object.
+ /// @return The underlying iterator object.
+ Iterator base() const noexcept {
+ return m_current;
+ }
+
+ /// @brief Get reference to the pointed-to element.
+ /// @return Reference to the pointed-to element.
+ reference operator*() const noexcept {
+ Iterator tmp = m_current;
+ return *--tmp;
+ }
+
+ /// @brief Get pointer to the pointed-to element.
+ /// @return Pointer to the pointed-to element.
+ pointer operator->() const noexcept {
+ return &(operator*());
+ }
+
+ /// @brief Pre-increments the underlying iterator object.
+ /// @return Reference to this reverse_iterator object with its underlying iterator incremented.
+ reverse_iterator& operator++() noexcept {
+ --m_current;
+ return *this;
+ }
+
+ /// @brief Post-increments the underlying iterator object.
+ /// @return A reverse_iterator object with the underlying iterator as-is.
+ reverse_iterator operator++(int) & noexcept {
+ auto result = *this;
+ --m_current;
+ return result;
+ }
+
+ /// @brief Pre-decrements the underlying iterator object.
+ /// @return Reference to this reverse_iterator with its underlying iterator decremented.
+ reverse_iterator& operator--() noexcept {
+ ++m_current;
+ return *this;
+ }
+
+ /// @brief Post-decrements the underlying iterator object.
+ /// @return A reverse_iterator object with the underlying iterator as-is.
+ reverse_iterator operator--(int) & noexcept {
+ auto result = *this;
+ ++m_current;
+ return result;
+ }
+
+ /// @brief Advances the underlying iterator object by `n`.
+ /// @param n The distance by which the underlying iterator is advanced.
+ /// @return A reverse_iterator object with the underlying iterator advanced by `n`.
+ reverse_iterator operator+(difference_type n) const noexcept {
+ return reverse_iterator(m_current - n);
+ }
+
+ /// @brief Advances the underlying iterator object by `n`.
+ /// @param n The distance by which the underlying iterator is advanced.
+ /// @return Reference to this reverse_iterator object with the underlying iterator advanced by `n`.
+ reverse_iterator& operator+=(difference_type n) noexcept {
+ m_current -= n;
+ return *this;
+ }
+
+ /// @brief Decrements the underlying iterator object by `n`.
+ /// @param n The distance by which the underlying iterator is decremented.
+ /// @return A reverse_iterator object with the underlying iterator decremented by `n`.
+ reverse_iterator operator-(difference_type n) const noexcept {
+ return reverse_iterator(m_current + n);
+ }
+
+ /// @brief Decrements the underlying iterator object by `n`.
+ /// @param n The distance by which the underlying iterator is decremented.
+ /// @return Reference to this reverse_iterator object with the underlying iterator decremented by `n`.
+ reverse_iterator& operator-=(difference_type n) noexcept {
+ m_current += n;
+ return *this;
+ }
+
+ /// @brief Get the mapping key node of the underlying iterator.
+ /// @return The mapping key node of the underlying iterator.
+ auto key() const -> decltype(std::declval<Iterator>().key()) {
+ Iterator itr = --(base());
+ return itr.key();
+ }
+
+ /// @brief Get reference to the underlying iterator's value.
+ /// @return Reference to the underlying iterator's value.
+ reference value() noexcept {
+ Iterator itr = --(base());
+ return *itr;
+ }
+
+private:
+ ///
+ Iterator m_current;
+};
+
+/// @brief Check equality between reverse_iterator objects.
+/// @tparam IteratorL Base iterator type for `lhs`.
+/// @tparam IteratorR Base iterator type for `rhs`.
+/// @param lhs A reverse_iterator object.
+/// @param rhs A reverse_iterator object.
+/// @return true if the two reverse_iterator objects are equal, false otherwise.
+template <typename IteratorL, typename IteratorR>
+inline bool operator==(const reverse_iterator<IteratorL>& lhs, const reverse_iterator<IteratorR>& rhs) {
+ return lhs.base() == rhs.base();
+}
+
+/// @brief Check inequality between reverse_iterator objects.
+/// @tparam IteratorL Base iterator type for `lhs`.
+/// @tparam IteratorR Base iterator type for `rhs`.
+/// @param lhs A reverse_iterator object.
+/// @param rhs A reverse_iterator object.
+/// @return true if the two reverse_iterator objects are not equal, false otherwise.
+template <typename IteratorL, typename IteratorR>
+inline bool operator!=(const reverse_iterator<IteratorL>& lhs, const reverse_iterator<IteratorR>& rhs) {
+ return lhs.base() != rhs.base();
+}
+
+/// @brief Check if `lhs` is less than `rhs`.
+/// @tparam IteratorL Base iterator type for `lhs`.
+/// @tparam IteratorR Base iterator type for `rhs`.
+/// @param lhs A reverse_iterator object.
+/// @param rhs A reverse_iterator object.
+/// @return true if `lhs` is less than `rhs`, false otherwise.
+template <typename IteratorL, typename IteratorR>
+inline bool operator<(const reverse_iterator<IteratorL>& lhs, const reverse_iterator<IteratorR>& rhs) {
+ return lhs.base() > rhs.base();
+}
+
+/// @brief Check if `lhs` is less than or equal to `rhs`.
+/// @tparam IteratorL Base iterator type for `lhs`.
+/// @tparam IteratorR Base iterator type for `rhs`.
+/// @param lhs A reverse_iterator object.
+/// @param rhs A reverse_iterator object.
+/// @return true if `lhs` is less than or equal to `rhs`, false otherwise.
+template <typename IteratorL, typename IteratorR>
+inline bool operator<=(const reverse_iterator<IteratorL>& lhs, const reverse_iterator<IteratorR>& rhs) {
+ return lhs.base() >= rhs.base();
+}
+
+/// @brief Check if `lhs` is greater than `rhs`.
+/// @tparam IteratorL Base iterator type for `lhs`.
+/// @tparam IteratorR Base iterator type for `rhs`.
+/// @param lhs A reverse_iterator object.
+/// @param rhs A reverse_iterator object.
+/// @return true if `lhs` is greater than `rhs`, false otherwise.
+template <typename IteratorL, typename IteratorR>
+inline bool operator>(const reverse_iterator<IteratorL>& lhs, const reverse_iterator<IteratorR>& rhs) {
+ return lhs.base() < rhs.base();
+}
+
+/// @brief Check if `lhs` is greater than or equal to `rhs`.
+/// @tparam IteratorL Base iterator type for `lhs`.
+/// @tparam IteratorR Base iterator type for `rhs`.
+/// @param lhs A reverse_iterator object.
+/// @param rhs A reverse_iterator object.
+/// @return true if `lhs` is greater than or equal to `rhs`, false otherwise.
+template <typename IteratorL, typename IteratorR>
+inline bool operator>=(const reverse_iterator<IteratorL>& lhs, const reverse_iterator<IteratorR>& rhs) {
+ return lhs.base() <= rhs.base();
+}
+
+FK_YAML_DETAIL_NAMESPACE_END
+
+#endif /* FK_YAML_DETAIL_REVERSE_ITERATOR_HPP */
+
+// #include <fkYAML/detail/types/node_t.hpp>
+
+// #include <fkYAML/detail/types/yaml_version_t.hpp>
+// _______ __ __ __ _____ __ __ __
+// | __| |_/ | \_/ |/ _ \ / \/ \| | fkYAML: A C++ header-only YAML library
+// | __| _ < \_ _/| ___ | _ | |___ version 0.4.2
+// |__| |_| \__| |_| |_| |_|___||___|______| https://github.com/fktn-k/fkYAML
+//
+// SPDX-FileCopyrightText: 2023-2025 Kensuke Fukutani <fktn.dev@gmail.com>
+// SPDX-License-Identifier: MIT
+
+#ifndef FK_YAML_DETAIL_TYPES_YAML_VERSION_T_HPP
+#define FK_YAML_DETAIL_TYPES_YAML_VERSION_T_HPP
+
+#include <cstdint>
+
+// #include <fkYAML/detail/macros/define_macros.hpp>
+
+// #include <fkYAML/yaml_version_type.hpp>
+
+
+FK_YAML_DETAIL_NAMESPACE_BEGIN
+
+/// @brief Definition of YAML version types.
+enum class yaml_version_t : std::uint8_t {
+ VER_1_1, //!< YAML version 1.1
+ VER_1_2, //!< YAML version 1.2
+};
+
+inline yaml_version_t convert_from_yaml_version_type(yaml_version_type t) noexcept {
+ switch (t) {
+ case yaml_version_type::VERSION_1_1:
+ return yaml_version_t::VER_1_1;
+ case yaml_version_type::VERSION_1_2:
+ default:
+ return yaml_version_t::VER_1_2;
+ }
+}
+
+inline yaml_version_type convert_to_yaml_version_type(yaml_version_t t) noexcept {
+ switch (t) {
+ case yaml_version_t::VER_1_1:
+ return yaml_version_type::VERSION_1_1;
+ case yaml_version_t::VER_1_2:
+ default:
+ return yaml_version_type::VERSION_1_2;
+ }
+}
+
+FK_YAML_DETAIL_NAMESPACE_END
+
+#endif /* FK_YAML_DETAIL_TYPES_YAML_VERSION_T_HPP */
+
+// #include <fkYAML/exception.hpp>
+
+// #include <fkYAML/node_type.hpp>
+
+// #include <fkYAML/node_value_converter.hpp>
+// _______ __ __ __ _____ __ __ __
+// | __| |_/ | \_/ |/ _ \ / \/ \| | fkYAML: A C++ header-only YAML library
+// | __| _ < \_ _/| ___ | _ | |___ version 0.4.2
+// |__| |_| \__| |_| |_| |_|___||___|______| https://github.com/fktn-k/fkYAML
+//
+// SPDX-FileCopyrightText: 2023-2025 Kensuke Fukutani <fktn.dev@gmail.com>
+// SPDX-License-Identifier: MIT
+
+#ifndef FK_YAML_NODE_VALUE_CONVERTER_HPP
+#define FK_YAML_NODE_VALUE_CONVERTER_HPP
+
+#include <utility>
+
+// #include <fkYAML/detail/macros/define_macros.hpp>
+
+// #include <fkYAML/detail/conversions/from_node.hpp>
+// _______ __ __ __ _____ __ __ __
+// | __| |_/ | \_/ |/ _ \ / \/ \| | fkYAML: A C++ header-only YAML library
+// | __| _ < \_ _/| ___ | _ | |___ version 0.4.2
+// |__| |_| \__| |_| |_| |_|___||___|______| https://github.com/fktn-k/fkYAML
+//
+// SPDX-FileCopyrightText: 2023-2025 Kensuke Fukutani <fktn.dev@gmail.com>
+// SPDX-License-Identifier: MIT
+
+#ifndef FK_YAML_DETAIL_CONVERSIONS_FROM_NODE_HPP
+#define FK_YAML_DETAIL_CONVERSIONS_FROM_NODE_HPP
+
+#include <array>
+#include <cmath>
+#include <forward_list>
+#include <limits>
+#include <utility>
+#include <valarray>
+
+// #include <fkYAML/detail/macros/define_macros.hpp>
+
+// #include <fkYAML/detail/meta/node_traits.hpp>
+
+// #include <fkYAML/detail/meta/stl_supplement.hpp>
+
+// #include <fkYAML/detail/meta/type_traits.hpp>
+
+// #include <fkYAML/detail/types/node_t.hpp>
+
+// #include <fkYAML/exception.hpp>
+
+
+#ifdef FK_YAML_HAS_CXX_17
+#include <optional>
+#endif
+
+FK_YAML_DETAIL_NAMESPACE_BEGIN
+
+///////////////////
+// from_node //
+///////////////////
+
+// utility type traits and functors
+
+/// @brief Utility traits type alias to detect constructible associative container types from a mapping node, e.g.,
+/// std::map or std::unordered_map.
+/// @tparam T A target type for detection.
+template <typename T>
+using is_constructible_mapping_type =
+ conjunction<detect::has_key_type<T>, detect::has_mapped_type<T>, detect::has_value_type<T>>;
+
+/// @brief Utility traits type alias to detect constructible container types from a sequence node, e.g., std::vector or
+/// std::list.
+/// @tparam BasicNodeType A basic_node template instance type.
+/// @tparam T A target type for detection.
+template <typename BasicNodeType, typename T>
+using is_constructible_sequence_type = conjunction<
+ negation<is_basic_node<T>>, detect::has_iterator<T>, detect::is_iterator_traits<typename T::iterator>,
+ detect::has_begin_end<T>, negation<std::is_same<T, typename BasicNodeType::mapping_type>>,
+ negation<is_constructible_mapping_type<T>>>;
+
+/// @brief Utility traits type alias to detect a sequence container adapter type, e.g., std::stack or std::queue.
+/// @tparam T A target type for detection.
+template <typename T>
+using is_sequence_container_adapter = conjunction<
+ negation<is_basic_node<T>>, detect::has_container_type<T>, detect::has_value_type<T>,
+ negation<detect::has_key_type<T>>>;
+
+/// @brief Helper struct for reserve() member function call switch for types which do not have reserve function.
+/// @tparam ContainerType A container type.
+template <typename ContainerType, typename = void>
+struct call_reserve_if_available {
+ /// @brief Do nothing since ContainerType does not have reserve function.
+ static void call(ContainerType& /*unused*/, typename ContainerType::size_type /*unused*/) {
+ }
+};
+
+/// @brief Helper struct for reserve() member function call switch for types which have reserve function.
+/// @tparam ContainerType A container type.
+template <typename ContainerType>
+struct call_reserve_if_available<ContainerType, enable_if_t<detect::has_reserve<ContainerType>::value>> {
+ /// @brief Call reserve function on the ContainerType object with a given size.
+ /// @param c A container object.
+ /// @param n A size to reserve.
+ static void call(ContainerType& c, typename ContainerType::size_type n) {
+ c.reserve(n);
+ }
+};
+
+// from_node() implementations
+
+/// @brief from_node function for C-style 1D arrays whose element type must be a basic_node template instance type or a
+/// compatible type.
+/// @tparam BasicNodeType A basic_node template instance type.
+/// @tparam T Element type of C-style 1D array.
+/// @tparam N Size of the array.
+/// @param n A basic_node object.
+/// @param array An array object.
+template <typename BasicNodeType, typename T, std::size_t N>
+inline auto from_node(const BasicNodeType& n, T (&array)[N])
+ -> decltype(n.get_value_inplace(std::declval<T&>()), void()) {
+ if FK_YAML_UNLIKELY (!n.is_sequence()) {
+ throw type_error("The target node value type is not sequence type.", n.get_type());
+ }
+
+ // call get_value_inplace(), not get_value(), since the storage to fill the result into is already created.
+ for (std::size_t i = 0; i < N; i++) {
+ n.at(i).get_value_inplace(array[i]);
+ }
+}
+
+/// @brief from_node function for C-style 2D arrays whose element type must be a basic_node template instance type or a
+/// compatible type.
+/// @tparam BasicNodeType A basic_node template instance type.
+/// @tparam T Element type of C-style 2D array.
+/// @tparam N0 Size of the outer dimension.
+/// @tparam N1 Size of the inner dimension.
+/// @param n A basic_node object.
+/// @param array An array object.
+template <typename BasicNodeType, typename T, std::size_t N0, std::size_t N1>
+inline auto from_node(const BasicNodeType& n, T (&array)[N0][N1])
+ -> decltype(n.get_value_inplace(std::declval<T&>()), void()) {
+ if FK_YAML_UNLIKELY (!n.is_sequence()) {
+ throw type_error("The target node value type is not sequence type.", n.get_type());
+ }
+
+ // call get_value_inplace(), not get_value(), since the storage to fill the result into is already created.
+ for (std::size_t i0 = 0; i0 < N0; i0++) {
+ for (std::size_t i1 = 0; i1 < N1; i1++) {
+ n.at(i0).at(i1).get_value_inplace(array[i0][i1]);
+ }
+ }
+}
+
+/// @brief from_node function for C-style 2D arrays whose element type must be a basic_node template instance type or a
+/// compatible type.
+/// @tparam BasicNodeType A basic_node template instance type.
+/// @tparam T Element type of C-style 2D array.
+/// @tparam N0 Size of the outermost dimension.
+/// @tparam N1 Size of the middle dimension.
+/// @tparam N2 Size of the innermost dimension.
+/// @param n A basic_node object.
+/// @param array An array object.
+template <typename BasicNodeType, typename T, std::size_t N0, std::size_t N1, std::size_t N2>
+inline auto from_node(const BasicNodeType& n, T (&array)[N0][N1][N2])
+ -> decltype(n.get_value_inplace(std::declval<T&>()), void()) {
+ if FK_YAML_UNLIKELY (!n.is_sequence()) {
+ throw type_error("The target node value type is not sequence type.", n.get_type());
+ }
+
+ // call get_value_inplace(), not get_value(), since the storage to fill the result into is already created.
+ for (std::size_t i0 = 0; i0 < N0; i0++) {
+ for (std::size_t i1 = 0; i1 < N1; i1++) {
+ for (std::size_t i2 = 0; i2 < N2; i2++) {
+ n.at(i0).at(i1).at(i2).get_value_inplace(array[i0][i1][i2]);
+ }
+ }
+ }
+}
+
+/// @brief from_node function for std::array objects whose element type must be a basic_node template instance type or a
+/// compatible type. This function is necessary since insert function is not implemented for std::array.
+/// @tparam BasicNodeType A basic_node template instance type.
+/// @tparam T Element type of std::array.
+/// @tparam N Size of std::array.
+/// @param n A basic_node object.
+/// @param arr A std::array object.
+template <typename BasicNodeType, typename T, std::size_t N>
+inline auto from_node(const BasicNodeType& n, std::array<T, N>& arr)
+ -> decltype(n.get_value_inplace(std::declval<T&>()), void()) {
+ if FK_YAML_UNLIKELY (!n.is_sequence()) {
+ throw type_error("The target node value type is not sequence type.", n.get_type());
+ }
+
+ for (std::size_t i = 0; i < N; i++) {
+ // call get_value_inplace(), not get_value(), since the storage to fill the result into is already created.
+ n.at(i).get_value_inplace(arr.at(i));
+ }
+}
+
+/// @brief from_node function for std::valarray objects whose element type must be a basic_node template instance type
+/// or a compatible type. This function is necessary since insert function is not implemented for std::valarray.
+/// @tparam BasicNodeType A basic_node template instance type.
+/// @tparam T Element type of std::valarray.
+/// @param n A basic_node object.
+/// @param va A std::valarray object.
+template <typename BasicNodeType, typename T>
+inline auto from_node(const BasicNodeType& n, std::valarray<T>& va)
+ -> decltype(n.get_value_inplace(std::declval<T&>()), void()) {
+ if FK_YAML_UNLIKELY (!n.is_sequence()) {
+ throw type_error("The target node value type is not sequence type.", n.get_type());
+ }
+
+ std::size_t count = n.size();
+ va.resize(count);
+ for (std::size_t i = 0; i < count; i++) {
+ // call get_value_inplace(), not get_value(), since the storage to fill the result into is already created.
+ n.at(i).get_value_inplace(va[i]);
+ }
+}
+
+/// @brief from_node function for std::forward_list objects whose element type must be a basic_node template instance
+/// type or a compatible type. This function is necessary since insert function is not implemented for
+/// std::forward_list.
+/// @tparam BasicNodeType A basic_node template instance type.
+/// @tparam T Element type of std::forward_list.
+/// @tparam Alloc Allocator type of std::forward_list.
+/// @param n A basic_node object.
+/// @param fl A std::forward_list object.
+template <typename BasicNodeType, typename T, typename Alloc>
+inline auto from_node(const BasicNodeType& n, std::forward_list<T, Alloc>& fl)
+ -> decltype(n.template get_value<T>(), void()) {
+ if FK_YAML_UNLIKELY (!n.is_sequence()) {
+ throw type_error("The target node value is not sequence type.", n.get_type());
+ }
+
+ fl.clear();
+
+ // std::forward_list does not have insert function.
+ auto insert_pos_itr = fl.before_begin();
+ for (const auto& elem : n) {
+ insert_pos_itr = fl.emplace_after(insert_pos_itr, elem.template get_value<T>());
+ }
+}
+
+/// @brief from_node function for container objects of only keys or values, e.g., std::vector or std::set, whose element
+/// type must be a basic_node template instance type or a compatible type.
+/// @tparam BasicNodeType A basic_node template instance type.
+/// @tparam CompatSeqType A container type.
+/// @param n A basic_node object.
+/// @param s A container object.
+template <
+ typename BasicNodeType, typename CompatSeqType,
+ enable_if_t<
+ conjunction<
+ is_basic_node<BasicNodeType>, is_constructible_sequence_type<BasicNodeType, CompatSeqType>,
+ negation<std::is_constructible<typename BasicNodeType::string_type, CompatSeqType>>>::value,
+ int> = 0>
+inline auto from_node(const BasicNodeType& n, CompatSeqType& s)
+ -> decltype(n.template get_value<typename CompatSeqType::value_type>(), void()) {
+ if FK_YAML_UNLIKELY (!n.is_sequence()) {
+ throw type_error("The target node value is not sequence type.", n.get_type());
+ }
+
+ s.clear();
+
+ // call reserve function first if it's available (like std::vector).
+ call_reserve_if_available<CompatSeqType>::call(s, n.size());
+
+ // transform a sequence node into a destination type object by calling insert function.
+ using std::end;
+ std::transform(n.begin(), n.end(), std::inserter(s, end(s)), [](const BasicNodeType& elem) {
+ return elem.template get_value<typename CompatSeqType::value_type>();
+ });
+}
+
+/// @brief from_node function for sequence container adapter objects, e.g., std::stack or std::queue, whose element type
+/// must be either a basic_node template instance type or a compatible type.
+/// @tparam BasicNodeType A basic_node template instance type.
+/// @tparam SeqContainerAdapter A sequence container adapter type.
+/// @param n A node object.
+/// @param ca A sequence container adapter object.
+template <
+ typename BasicNodeType, typename SeqContainerAdapter,
+ enable_if_t<
+ conjunction<is_basic_node<BasicNodeType>, is_sequence_container_adapter<SeqContainerAdapter>>::value, int> = 0>
+inline auto from_node(const BasicNodeType& n, SeqContainerAdapter& ca)
+ -> decltype(n.template get_value<typename SeqContainerAdapter::value_type>(), ca.push(std::declval<typename SeqContainerAdapter::value_type>()), void()) {
+ if FK_YAML_UNLIKELY (!n.is_sequence()) {
+ throw type_error("The target node value is not sequence type.", n.get_type());
+ }
+
+ // clear existing elements manually since clear function is not implemented for container adapter classes.
+ while (!ca.empty()) {
+ ca.pop();
+ }
+
+ for (const auto& elem : n) {
+ // container adapter classes commonly have push function.
+ // emplace function cannot be used in case SeqContainerAdapter::container_type is std::vector<bool> in C++11.
+ ca.push(elem.template get_value<typename SeqContainerAdapter::value_type>());
+ }
+}
+
+/// @brief from_node function for mappings whose key and value are of both compatible types.
+/// @tparam BasicNodeType A basic_node template instance type.
+/// @tparam CompatibleKeyType Mapping key type compatible with BasicNodeType.
+/// @tparam CompatibleValueType Mapping value type compatible with BasicNodeType.
+/// @tparam Compare Comparator type for mapping keys.
+/// @tparam Allocator Allocator type for destination mapping object.
+/// @param n A node object.
+/// @param m Mapping container object to store converted key/value objects.
+template <typename BasicNodeType, typename CompatMapType, enable_if_t<is_constructible_mapping_type<CompatMapType>::value, int> = 0>
+inline auto from_node(const BasicNodeType& n, CompatMapType& m)
+ -> decltype(
+ std::declval<const BasicNodeType&>().template get_value<typename CompatMapType::key_type>(),
+ std::declval<const BasicNodeType&>().template get_value<typename CompatMapType::mapped_type>(),
+ m.emplace(std::declval<typename CompatMapType::key_type>(), std::declval<typename CompatMapType::mapped_type>()),
+ void()) {
+ if FK_YAML_UNLIKELY (!n.is_mapping()) {
+ throw type_error("The target node value type is not mapping type.", n.get_type());
+ }
+
+ m.clear();
+ call_reserve_if_available<CompatMapType>::call(m, n.size());
+
+ for (const auto& pair : n.as_map()) {
+ m.emplace(
+ pair.first.template get_value<typename CompatMapType::key_type>(),
+ pair.second.template get_value<typename CompatMapType::mapped_type>());
+ }
+}
+
+/// @brief from_node function for nullptr.
+/// @tparam BasicNodeType A basic_node template instance type.
+/// @param n A node object.
+/// @param null Storage for a null value.
+template <typename BasicNodeType, enable_if_t<is_basic_node<BasicNodeType>::value, int> = 0>
+inline void from_node(const BasicNodeType& n, std::nullptr_t& null) {
+ // to ensure the target node value type is null.
+ if FK_YAML_UNLIKELY (!n.is_null()) {
+ throw type_error("The target node value type is not null type.", n.get_type());
+ }
+ null = nullptr;
+}
+
+/// @brief from_node function for booleans.
+/// @tparam BasicNodeType A basic_node template instance type.
+/// @param n A node object.
+/// @param b Storage for a boolean value.
+template <typename BasicNodeType, enable_if_t<is_basic_node<BasicNodeType>::value, int> = 0>
+inline void from_node(const BasicNodeType& n, bool& b) {
+ switch (n.get_type()) {
+ case node_type::NULL_OBJECT:
+ // nullptr is converted to false just as C++ implicitly does.
+ b = false;
+ break;
+ case node_type::BOOLEAN:
+ b = static_cast<bool>(n.as_bool());
+ break;
+ case node_type::INTEGER:
+ // true: non-zero, false: zero
+ b = (n.as_int() != 0);
+ break;
+ case node_type::FLOAT:
+ // true: non-zero, false: zero
+ using float_type = typename BasicNodeType::float_number_type;
+ b = (n.as_float() != static_cast<float_type>(0.));
+ break;
+ case node_type::SEQUENCE:
+ case node_type::MAPPING:
+ case node_type::STRING:
+ default:
+ throw type_error("The target node value type is not compatible with boolean type.", n.get_type());
+ }
+}
+
+/// @brief Helper struct for node-to-int conversion.
+/// @tparam BasicNodeType A basic_node template instance type.
+/// @tparam IntType Target integer value type (same as BasicNodeType::integer_type)
+template <
+ typename BasicNodeType, typename IntType, bool = std::is_same<typename BasicNodeType::integer_type, IntType>::value>
+struct from_node_int_helper {
+ /// @brief Convert node's integer value to the target integer type.
+ /// @param n A node object.
+ /// @return An integer value converted from the node's integer value.
+ static IntType convert(const BasicNodeType& n) {
+ return n.as_int();
+ }
+};
+
+/// @brief Helper struct for node-to-int conversion if IntType is not the node's integer value type.
+/// @tparam BasicNodeType A basic_node template instance type.
+/// @tparam IntType Target integer value type (different from BasicNodeType::integer_type)
+template <typename BasicNodeType, typename IntType>
+struct from_node_int_helper<BasicNodeType, IntType, false> {
+ /// @brief Convert node's integer value to non-uint64_t integer types.
+ /// @param n A node object.
+ /// @return An integer value converted from the node's integer value.
+ static IntType convert(const BasicNodeType& n) {
+ using node_int_type = typename BasicNodeType::integer_type;
+ const node_int_type tmp_int = n.as_int();
+
+ // under/overflow check.
+ if (std::is_same<IntType, uint64_t>::value) {
+ if FK_YAML_UNLIKELY (tmp_int < 0) {
+ throw exception("Integer value underflow detected.");
+ }
+ }
+ else {
+ if FK_YAML_UNLIKELY (tmp_int < static_cast<node_int_type>(std::numeric_limits<IntType>::min())) {
+ throw exception("Integer value underflow detected.");
+ }
+ if FK_YAML_UNLIKELY (static_cast<node_int_type>(std::numeric_limits<IntType>::max()) < tmp_int) {
+ throw exception("Integer value overflow detected.");
+ }
+ }
+
+ return static_cast<IntType>(tmp_int);
+ }
+};
+
+/// @brief from_node function for integers.
+/// @note If node's value is null, boolean, or float, such a value is converted into an integer internally.
+/// @tparam BasicNodeType A basic_node template instance type.
+/// @tparam IntegerType An integer value type.
+/// @param n A node object.
+/// @param i Storage for an integer value.
+template <
+ typename BasicNodeType, typename IntegerType,
+ enable_if_t<conjunction<is_basic_node<BasicNodeType>, is_non_bool_integral<IntegerType>>::value, int> = 0>
+inline void from_node(const BasicNodeType& n, IntegerType& i) {
+ switch (n.get_type()) {
+ case node_type::NULL_OBJECT:
+ // nullptr is interpreted as 0
+ i = static_cast<IntegerType>(0);
+ break;
+ case node_type::BOOLEAN:
+ i = static_cast<bool>(n.as_bool()) ? static_cast<IntegerType>(1) : static_cast<IntegerType>(0);
+ break;
+ case node_type::INTEGER:
+ i = from_node_int_helper<BasicNodeType, IntegerType>::convert(n);
+ break;
+ case node_type::FLOAT: {
+ // int64_t should be safe to express the integer part of possible floating point types.
+ const auto tmp_int = static_cast<int64_t>(n.as_float());
+
+ // under/overflow check.
+ if (std::is_same<IntegerType, uint64_t>::value) {
+ if FK_YAML_UNLIKELY (tmp_int < 0) {
+ throw exception("Integer value underflow detected.");
+ }
+ }
+ else {
+ if FK_YAML_UNLIKELY (tmp_int < static_cast<int64_t>(std::numeric_limits<IntegerType>::min())) {
+ throw exception("Integer value underflow detected.");
+ }
+ if FK_YAML_UNLIKELY (static_cast<int64_t>(std::numeric_limits<IntegerType>::max()) < tmp_int) {
+ throw exception("Integer value overflow detected.");
+ }
+ }
+
+ i = static_cast<IntegerType>(tmp_int);
+ break;
+ }
+ case node_type::SEQUENCE:
+ case node_type::MAPPING:
+ case node_type::STRING:
+ default:
+ throw type_error("The target node value type is not compatible with integer type.", n.get_type());
+ }
+}
+
+/// @brief Helper struct for node-to-float conversion if FloatType is the node's floating point value type.
+/// @tparam BasicNodeType A basic_node template instance type.
+/// @tparam FloatType Target floating point value type (same as the BasicNodeType::float_number_type)
+template <
+ typename BasicNodeType, typename FloatType,
+ bool = std::is_same<typename BasicNodeType::float_number_type, FloatType>::value>
+struct from_node_float_helper {
+ /// @brief Convert node's floating point value to the target floating point type.
+ /// @param n A node object.
+ /// @return A floating point value converted from the node's floating point value.
+ static FloatType convert(const BasicNodeType& n) {
+ return n.as_float();
+ }
+};
+
+/// @brief Helper struct for node-to-float conversion if IntType is not the node's floating point value type.
+/// @tparam BasicNodeType A basic_node template instance type.
+/// @tparam FloatType Target floating point value type (different from BasicNodeType::float_number_type)
+template <typename BasicNodeType, typename FloatType>
+struct from_node_float_helper<BasicNodeType, FloatType, false> {
+ /// @brief Convert node's floating point value to the target floating point type.
+ /// @param n A node object.
+ /// @return A floating point value converted from the node's floating point value.
+ static FloatType convert(const BasicNodeType& n) {
+ using node_float_type = typename BasicNodeType::float_number_type;
+ auto tmp_float = n.as_float();
+
+ // check if the value is an infinite number (either positive or negative)
+ if (std::isinf(tmp_float)) {
+ if (tmp_float == std::numeric_limits<node_float_type>::infinity()) {
+ return std::numeric_limits<FloatType>::infinity();
+ }
+
+ return static_cast<FloatType>(-1.) * std::numeric_limits<FloatType>::infinity();
+ }
+
+ // check if the value is not a number
+ if (std::isnan(tmp_float)) {
+ return std::numeric_limits<FloatType>::quiet_NaN();
+ }
+
+ // check if the value is expressible as FloatType.
+ if FK_YAML_UNLIKELY (tmp_float < std::numeric_limits<FloatType>::lowest()) {
+ throw exception("Floating point value underflow detected.");
+ }
+ if FK_YAML_UNLIKELY (std::numeric_limits<FloatType>::max() < tmp_float) {
+ throw exception("Floating point value overflow detected.");
+ }
+
+ return static_cast<FloatType>(tmp_float);
+ }
+};
+
+/// @brief from_node function for floating point values.
+/// @note If node's value is null, boolean, or integer, such a value is converted into a floating point internally.
+/// @tparam BasicNodeType A basic_node template instance type.
+/// @tparam FloatType A floating point value type.
+/// @param n A node object.
+/// @param f Storage for a float point value.
+template <
+ typename BasicNodeType, typename FloatType,
+ enable_if_t<conjunction<is_basic_node<BasicNodeType>, std::is_floating_point<FloatType>>::value, int> = 0>
+inline void from_node(const BasicNodeType& n, FloatType& f) {
+ switch (n.get_type()) {
+ case node_type::NULL_OBJECT:
+ // nullptr is interpreted as 0.0
+ f = static_cast<FloatType>(0.);
+ break;
+ case node_type::BOOLEAN:
+ f = static_cast<bool>(n.as_bool()) ? static_cast<FloatType>(1.) : static_cast<FloatType>(0.);
+ break;
+ case node_type::INTEGER:
+ f = static_cast<FloatType>(n.as_int());
+ break;
+ case node_type::FLOAT:
+ f = from_node_float_helper<BasicNodeType, FloatType>::convert(n);
+ break;
+ case node_type::SEQUENCE:
+ case node_type::MAPPING:
+ case node_type::STRING:
+ default:
+ throw type_error("The target node value type is not compatible with float number type.", n.get_type());
+ }
+}
+
+/// @brief from_node function for BasicNodeType::string_type objects.
+/// @tparam BasicNodeType A basic_node template instance type.
+/// @param n A basic_node object.
+/// @param s A string node value object.
+template <typename BasicNodeType, enable_if_t<is_basic_node<BasicNodeType>::value, int> = 0>
+inline void from_node(const BasicNodeType& n, typename BasicNodeType::string_type& s) {
+ if FK_YAML_UNLIKELY (!n.is_string()) {
+ throw type_error("The target node value type is not string type.", n.get_type());
+ }
+ s = n.as_str();
+}
+
+/// @brief from_node function for compatible string type.
+/// @tparam BasicNodeType A basic_node template instance type.
+/// @tparam CompatibleStringType A compatible string type.
+/// @param n A basic_node object.
+/// @param s A compatible string object.
+template <
+ typename BasicNodeType, typename CompatibleStringType,
+ enable_if_t<
+ conjunction<
+ is_basic_node<BasicNodeType>,
+ negation<std::is_same<CompatibleStringType, typename BasicNodeType::string_type>>,
+ disjunction<
+ std::is_constructible<CompatibleStringType, const typename BasicNodeType::string_type&>,
+ std::is_assignable<CompatibleStringType, const typename BasicNodeType::string_type&>>>::value,
+ int> = 0>
+inline void from_node(const BasicNodeType& n, CompatibleStringType& s) {
+ if FK_YAML_UNLIKELY (!n.is_string()) {
+ throw type_error("The target node value type is not string type.", n.get_type());
+ }
+ s = n.as_str();
+}
+
+/// @brief from_node function for std::pair objects whose element types must be either a basic_node template instance
+/// type or a compatible type.
+/// @tparam BasicNodeType A basic_node template instance type.
+/// @tparam T The first type of the std::pair.
+/// @tparam U The second type of the std::pair.
+/// @param n A basic_node object.
+/// @param p A std::pair object.
+template <typename BasicNodeType, typename T, typename U, enable_if_t<is_basic_node<BasicNodeType>::value, int> = 0>
+inline auto from_node(const BasicNodeType& n, std::pair<T, U>& p)
+ -> decltype(std::declval<const BasicNodeType&>().template get_value<T>(), std::declval<const BasicNodeType&>().template get_value<U>(), void()) {
+ if FK_YAML_UNLIKELY (!n.is_sequence()) {
+ throw type_error("The target node value type is not sequence type.", n.get_type());
+ }
+
+ // call get_value_inplace(), not get_value(), since the storage to fill the result into is already created.
+ n.at(0).get_value_inplace(p.first);
+ n.at(1).get_value_inplace(p.second);
+}
+
+/// @brief concrete implementation of from_node function for std::tuple objects.
+/// @tparam BasicNodeType A basic_node template instance type.
+/// @tparam ...Types The value types of std::tuple.
+/// @tparam ...Idx Index sequence values for std::tuples value types.
+/// @param n A basic_node object
+/// @param _ Index sequence values (unused).
+/// @return A std::tuple object converted from the sequence node values.
+template <typename BasicNodeType, typename... Types, std::size_t... Idx>
+inline std::tuple<Types...> from_node_tuple_impl(const BasicNodeType& n, index_sequence<Idx...> /*unused*/) {
+ return std::make_tuple(n.at(Idx).template get_value<Types>()...);
+}
+
+/// @brief from_node function for std::tuple objects whose value types must all be either a basic_node template instance
+/// type or a compatible type
+/// @tparam BasicNodeType A basic_node template instance type.
+/// @tparam ...Types Value types of std::tuple.
+/// @param n A basic_node object.
+/// @param t A std::tuple object.
+template <typename BasicNodeType, typename... Types, enable_if_t<is_basic_node<BasicNodeType>::value, int> = 0>
+inline void from_node(const BasicNodeType& n, std::tuple<Types...>& t) {
+ if FK_YAML_UNLIKELY (!n.is_sequence()) {
+ throw type_error("The target node value type is not sequence type.", n.get_type());
+ }
+
+ // Types... must be explicitly specified; the return type would otherwise be std::tuple with no value types.
+ t = from_node_tuple_impl<BasicNodeType, Types...>(n, index_sequence_for<Types...> {});
+}
+
+#ifdef FK_YAML_HAS_CXX_17
+
+/// @brief from_node function for std::optional objects whose value type must be either a basic_node template instance
+/// type or a compatible type.
+/// @tparam BasicNodeType A basic_node template instance type.
+/// @tparam T A value type of the std::optional.
+/// @param n A basic_node object.
+/// @param o A std::optional object.
+template <typename BasicNodeType, typename T, enable_if_t<is_basic_node<BasicNodeType>::value, int> = 0>
+inline auto from_node(const BasicNodeType& n, std::optional<T>& o) -> decltype(n.template get_value<T>(), void()) {
+ try {
+ o.emplace(n.template get_value<T>());
+ }
+ catch (const std::exception& /*unused*/) {
+ // Any exception derived from std::exception is interpreted as a conversion failure in some way
+ // since user-defined from_node function may throw a different object from a fkyaml::type_error.
+ // and std::exception is usually the base class of user-defined exception types.
+ o = std::nullopt;
+ }
+}
+
+#endif // defined(FK_YAML_HAS_CXX_17)
+
+/// @brief A function object to call from_node functions.
+/// @note User-defined specialization is available by providing implementation **OUTSIDE** fkyaml namespace.
+struct from_node_fn {
+ /// @brief Call from_node function suitable for the given T type.
+ /// @tparam BasicNodeType A basic_node template instance type.
+ /// @tparam T A target value type assigned from the basic_node object.
+ /// @param n A basic_node object.
+ /// @param val A target object assigned from the basic_node object.
+ /// @return decltype(from_node(n, std::forward<T>(val))) void by default. User can set it to some other type.
+ template <typename BasicNodeType, typename T>
+ auto operator()(const BasicNodeType& n, T&& val) const
+ noexcept(noexcept(from_node(n, std::forward<T>(val)))) -> decltype(from_node(n, std::forward<T>(val))) {
+ return from_node(n, std::forward<T>(val));
+ }
+};
+
+FK_YAML_DETAIL_NAMESPACE_END
+
+FK_YAML_NAMESPACE_BEGIN
+
+#ifndef FK_YAML_HAS_CXX_17
+// anonymous namespace to hold `from_node` functor.
+// see http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2015/n4381.html for why it's needed.
+namespace // NOLINT(cert-dcl59-cpp,fuchsia-header-anon-namespaces,google-build-namespaces)
+{
+#endif
+
+/// @brief A global object to represent ADL friendly from_node functor.
+// NOLINTNEXTLINE(misc-definitions-in-headers)
+FK_YAML_INLINE_VAR constexpr const auto& from_node = detail::static_const<detail::from_node_fn>::value;
+
+#ifndef FK_YAML_HAS_CXX_17
+} // namespace
+#endif
+
+FK_YAML_NAMESPACE_END
+
+#endif /* FK_YAML_DETAIL_CONVERSIONS_FROM_NODE_HPP */
+
+// #include <fkYAML/detail/conversions/to_node.hpp>
+// _______ __ __ __ _____ __ __ __
+// | __| |_/ | \_/ |/ _ \ / \/ \| | fkYAML: A C++ header-only YAML library
+// | __| _ < \_ _/| ___ | _ | |___ version 0.4.2
+// |__| |_| \__| |_| |_| |_|___||___|______| https://github.com/fktn-k/fkYAML
+//
+// SPDX-FileCopyrightText: 2023-2025 Kensuke Fukutani <fktn.dev@gmail.com>
+// SPDX-License-Identifier: MIT
+
+#ifndef FK_YAML_DETAIL_CONVERSIONS_TO_NODE_HPP
+#define FK_YAML_DETAIL_CONVERSIONS_TO_NODE_HPP
+
+#include <utility>
+
+// #include <fkYAML/detail/macros/define_macros.hpp>
+
+// #include <fkYAML/detail/exception_safe_allocation.hpp>
+
+// #include <fkYAML/detail/meta/node_traits.hpp>
+
+// #include <fkYAML/detail/meta/type_traits.hpp>
+
+// #include <fkYAML/detail/meta/stl_supplement.hpp>
+
+// #include <fkYAML/detail/node_attrs.hpp>
+
+// #include <fkYAML/node_type.hpp>
+
+
+FK_YAML_DETAIL_NAMESPACE_BEGIN
+
+///////////////////////////////////
+// external_node_constructor //
+///////////////////////////////////
+
+/// @brief The external constructor template for basic_node objects.
+/// @note All the non-specialized instantiations results in compilation error since such instantiations are not
+/// supported.
+/// @warning All the specialization must call n.m_value.destroy() first in the construct function to avoid
+/// memory leak.
+/// @tparam node_type The resulting YAML node value type.
+template <typename BasicNodeType>
+struct external_node_constructor {
+ template <typename... Args>
+ static void sequence(BasicNodeType& n, Args&&... args) {
+ destroy(n);
+ n.m_attrs |= node_attr_bits::seq_bit;
+ n.m_value.p_seq = create_object<typename BasicNodeType::sequence_type>(std::forward<Args>(args)...);
+ }
+
+ template <typename... Args>
+ static void mapping(BasicNodeType& n, Args&&... args) {
+ destroy(n);
+ n.m_attrs |= node_attr_bits::map_bit;
+ n.m_value.p_map = create_object<typename BasicNodeType::mapping_type>(std::forward<Args>(args)...);
+ }
+
+ static void null_scalar(BasicNodeType& n, std::nullptr_t) {
+ destroy(n);
+ n.m_attrs |= node_attr_bits::null_bit;
+ n.m_value.p_map = nullptr;
+ }
+
+ static void boolean_scalar(BasicNodeType& n, const typename BasicNodeType::boolean_type b) {
+ destroy(n);
+ n.m_attrs |= node_attr_bits::bool_bit;
+ n.m_value.boolean = b;
+ }
+
+ static void integer_scalar(BasicNodeType& n, const typename BasicNodeType::integer_type i) {
+ destroy(n);
+ n.m_attrs |= node_attr_bits::int_bit;
+ n.m_value.integer = i;
+ }
+
+ static void float_scalar(BasicNodeType& n, const typename BasicNodeType::float_number_type f) {
+ destroy(n);
+ n.m_attrs |= node_attr_bits::float_bit;
+ n.m_value.float_val = f;
+ }
+
+ template <typename... Args>
+ static void string_scalar(BasicNodeType& n, Args&&... args) {
+ destroy(n);
+ n.m_attrs |= node_attr_bits::string_bit;
+ n.m_value.p_str = create_object<typename BasicNodeType::string_type>(std::forward<Args>(args)...);
+ }
+
+private:
+ static void destroy(BasicNodeType& n) {
+ n.m_value.destroy(n.m_attrs & node_attr_mask::value);
+ n.m_attrs &= ~node_attr_mask::value;
+ }
+};
+
+/////////////////
+// to_node //
+/////////////////
+
+/// @brief to_node function for BasicNodeType::sequence_type objects.
+/// @tparam BasicNodeType A basic_node template instance type.
+/// @tparam T A sequence node value type.
+/// @param n A basic_node object.
+/// @param s A sequence node value object.
+template <
+ typename BasicNodeType, typename T,
+ enable_if_t<
+ conjunction<
+ is_basic_node<BasicNodeType>,
+ std::is_same<typename BasicNodeType::sequence_type, remove_cvref_t<T>>>::value,
+ int> = 0>
+inline void to_node(BasicNodeType& n, T&& s) noexcept {
+ external_node_constructor<BasicNodeType>::sequence(n, std::forward<T>(s));
+}
+
+/// @brief to_node function for compatible sequence types.
+/// @note This overload is enabled when
+/// * both begin()/end() functions are callable on a `CompatSeqType` object
+/// * CompatSeqType doesn't have `mapped_type` (mapping-like type)
+/// * BasicNodeType::string_type cannot be constructed from a CompatSeqType object (string-like type)
+/// @tparam BasicNodeType A basic_node template instance type.
+/// @tparam CompatSeqType A container type.
+/// @param n A basic_node object.
+/// @param s A container object.
+template <
+ typename BasicNodeType, typename CompatSeqType,
+ enable_if_t<
+ conjunction<
+ is_basic_node<BasicNodeType>,
+ negation<std::is_same<typename BasicNodeType::sequence_type, remove_cvref_t<CompatSeqType>>>,
+ negation<is_basic_node<CompatSeqType>>, detect::has_begin_end<CompatSeqType>,
+ negation<conjunction<detect::has_key_type<CompatSeqType>, detect::has_mapped_type<CompatSeqType>>>,
+ negation<std::is_constructible<typename BasicNodeType::string_type, CompatSeqType>>>::value,
+ int> = 0>
+// NOLINTNEXTLINE(cppcoreguidelines-missing-std-forward)
+inline void to_node(BasicNodeType& n, CompatSeqType&& s) {
+ using std::begin;
+ using std::end;
+ external_node_constructor<BasicNodeType>::sequence(n, begin(s), end(s));
+}
+
+/// @brief to_node function for std::pair objects.
+/// @tparam BasicNodeType A basic_node template instance type.
+/// @tparam T The first type of std::pair.
+/// @tparam U The second type of std::pair.
+/// @param n A basic_node object.
+/// @param p A std::pair object.
+template <typename BasicNodeType, typename T, typename U>
+inline void to_node(BasicNodeType& n, const std::pair<T, U>& p) {
+ n = {p.first, p.second};
+}
+
+/// @brief concrete implementation of to_node function for std::tuple objects.
+/// @tparam BasicNodeType A basic_node template instance type.
+/// @tparam ...Types The value types of std::tuple.
+/// @tparam ...Idx Index sequence values for std::tuple value types.
+/// @param n A basic_node object.
+/// @param t A std::tuple object.
+/// @param _ An index sequence. (unused)
+template <typename BasicNodeType, typename... Types, std::size_t... Idx>
+inline void to_node_tuple_impl(BasicNodeType& n, const std::tuple<Types...>& t, index_sequence<Idx...> /*unused*/) {
+ n = {std::get<Idx>(t)...};
+}
+
+/// @brief to_node function for std::tuple objects with no value types.
+/// @note This implementation is needed since calling `to_node_tuple_impl()` with an empty tuple creates a null node.
+/// @tparam BasicNodeType A basic_node template instance type.
+/// @param n A basic_node object.
+/// @param _ A std::tuple object. (unused)
+template <typename BasicNodeType>
+inline void to_node(BasicNodeType& n, const std::tuple<>& /*unused*/) {
+ n = BasicNodeType::sequence();
+}
+
+/// @brief to_node function for std::tuple objects with at least one value type.
+/// @tparam BasicNodeType A basic_node template instance type.
+/// @tparam ...FirstType The first value types of std::tuple.
+/// @tparam ...RestTypes The rest value types of std::tuple. (maybe empty)
+/// @param n A basic_node object.
+/// @param t A std::tuple object.
+template <typename BasicNodeType, typename FirstType, typename... RestTypes>
+inline void to_node(BasicNodeType& n, const std::tuple<FirstType, RestTypes...>& t) {
+ to_node_tuple_impl(n, t, index_sequence_for<FirstType, RestTypes...> {});
+}
+
+/// @brief to_node function for BasicNodeType::mapping_type objects.
+/// @tparam BasicNodeType A basic_node template instance type.
+/// @tparam T A mapping node value type.
+/// @param n A basic_node object.
+/// @param m A mapping node value object.
+template <
+ typename BasicNodeType, typename T,
+ enable_if_t<
+ conjunction<
+ is_basic_node<BasicNodeType>, std::is_same<typename BasicNodeType::mapping_type, remove_cvref_t<T>>>::value,
+ int> = 0>
+inline void to_node(BasicNodeType& n, T&& m) noexcept {
+ external_node_constructor<BasicNodeType>::mapping(n, std::forward<T>(m));
+}
+
+/// @brief to_node function for compatible mapping types.
+/// @note This overload is enabled when
+/// * both begin()/end() functions are callable on a `CompatMapType` object
+/// * CompatMapType has both `key_type` and `mapped_type`
+/// @tparam BasicNodeType A basic_node template instance type.
+/// @tparam CompatMapType A container type.
+/// @param n A basic_node object.
+/// @param m A container object.
+template <
+ typename BasicNodeType, typename CompatMapType,
+ enable_if_t<
+ conjunction<
+ is_basic_node<BasicNodeType>, negation<is_basic_node<CompatMapType>>,
+ negation<std::is_same<typename BasicNodeType::mapping_type, remove_cvref_t<CompatMapType>>>,
+ detect::has_begin_end<CompatMapType>, detect::has_key_type<CompatMapType>,
+ detect::has_mapped_type<CompatMapType>>::value,
+ int> = 0>
+inline void to_node(BasicNodeType& n, CompatMapType&& m) {
+ external_node_constructor<BasicNodeType>::mapping(n);
+ auto& map = n.as_map();
+ for (const auto& pair : std::forward<CompatMapType>(m)) {
+ map.emplace(pair.first, pair.second);
+ }
+}
+
+/// @brief to_node function for null objects.
+/// @tparam BasicNodeType A mapping node value type.
+/// @tparam NullType This must be std::nullptr_t type
+template <typename BasicNodeType, enable_if_t<is_basic_node<BasicNodeType>::value, int> = 0>
+inline void to_node(BasicNodeType& n, std::nullptr_t /*unused*/) {
+ external_node_constructor<BasicNodeType>::null_scalar(n, nullptr);
+}
+
+/// @brief to_node function for BasicNodeType::boolean_type objects.
+/// @tparam BasicNodeType A basic_node template instance type.
+/// @tparam T A boolean scalar node value type.
+/// @param n A basic_node object.
+/// @param b A boolean scalar node value object.
+template <typename BasicNodeType, enable_if_t<is_basic_node<BasicNodeType>::value, int> = 0>
+inline void to_node(BasicNodeType& n, typename BasicNodeType::boolean_type b) noexcept {
+ external_node_constructor<BasicNodeType>::boolean_scalar(n, b);
+}
+
+/// @brief to_node function for integers.
+/// @tparam BasicNodeType A basic_node template instance type.
+/// @tparam T An integer type.
+/// @param n A basic_node object.
+/// @param i An integer object.
+template <
+ typename BasicNodeType, typename T,
+ enable_if_t<conjunction<is_basic_node<BasicNodeType>, is_non_bool_integral<T>>::value, int> = 0>
+inline void to_node(BasicNodeType& n, T i) noexcept {
+ external_node_constructor<BasicNodeType>::integer_scalar(n, i);
+}
+
+/// @brief to_node function for floating point numbers.
+/// @tparam BasicNodeType A basic_node template instance type.
+/// @tparam T A floating point number type.
+/// @param n A basic_node object.
+/// @param f A floating point number object.
+template <
+ typename BasicNodeType, typename T,
+ enable_if_t<conjunction<is_basic_node<BasicNodeType>, std::is_floating_point<T>>::value, int> = 0>
+inline void to_node(BasicNodeType& n, T f) noexcept {
+ external_node_constructor<BasicNodeType>::float_scalar(n, f);
+}
+
+/// @brief to_node function for compatible strings.
+/// @tparam BasicNodeType A basic_node template instance type.
+/// @tparam T A compatible string type.
+/// @param n A basic_node object.
+/// @param s A compatible string object.
+template <
+ typename BasicNodeType, typename T,
+ enable_if_t<
+ conjunction<
+ is_basic_node<BasicNodeType>, negation<is_null_pointer<T>>,
+ std::is_constructible<typename BasicNodeType::string_type, T>>::value,
+ int> = 0>
+inline void to_node(BasicNodeType& n, T&& s) {
+ external_node_constructor<BasicNodeType>::string_scalar(n, std::forward<T>(s));
+}
+
+/// @brief A function object to call to_node functions.
+/// @note User-defined specialization is available by providing implementation **OUTSIDE** fkyaml namespace.
+struct to_node_fn {
+ /// @brief Call to_node function suitable for the given T type.
+ /// @tparam BasicNodeType A basic_node template instance type.
+ /// @tparam T A target value type assigned to the basic_node object.
+ /// @param n A basic_node object.
+ /// @param val A target object assigned to the basic_node object.
+ /// @return decltype(to_node(n, std::forward<T>(val))) void by default. User can set it to some other type.
+ template <typename BasicNodeType, typename T>
+ auto operator()(BasicNodeType& n, T&& val) const
+ noexcept(noexcept(to_node(n, std::forward<T>(val)))) -> decltype(to_node(n, std::forward<T>(val))) {
+ return to_node(n, std::forward<T>(val));
+ }
+};
+
+FK_YAML_DETAIL_NAMESPACE_END
+
+FK_YAML_NAMESPACE_BEGIN
+
+#ifndef FK_YAML_HAS_CXX_17
+// anonymous namespace to hold `to_node` functor.
+// see http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2015/n4381.html for why it's needed.
+namespace // NOLINT(cert-dcl59-cpp,fuchsia-header-anon-namespaces,google-build-namespaces)
+{
+#endif
+
+/// @brief A global object to represent ADL friendly to_node functor.
+// NOLINTNEXTLINE(misc-definitions-in-headers)
+FK_YAML_INLINE_VAR constexpr const auto& to_node = detail::static_const<detail::to_node_fn>::value;
+
+#ifndef FK_YAML_HAS_CXX_17
+} // namespace
+#endif
+
+FK_YAML_NAMESPACE_END
+
+#endif /* FK_YAML_DETAIL_CONVERSIONS_TO_NODE_HPP */
+
+
+FK_YAML_NAMESPACE_BEGIN
+
+/// @brief An ADL friendly converter between basic_node objects and native data objects.
+/// @tparam ValueType A default target data type.
+/// @sa https://fktn-k.github.io/fkYAML/api/node_value_converter/
+template <typename ValueType, typename>
+class node_value_converter {
+public:
+ /// @brief Convert a YAML node value into compatible native data.
+ /// @tparam BasicNodeType A basic_node template instance type.
+ /// @tparam TargetType A native data type for conversion.
+ /// @param n A basic_node object.
+ /// @param val A native data object.
+ /// @sa https://fktn-k.github.io/fkYAML/api/node_value_converter/from_node/
+ template <typename BasicNodeType, typename TargetType = ValueType>
+ static auto from_node(BasicNodeType&& n, TargetType& val) noexcept(
+ noexcept(::fkyaml::from_node(std::forward<BasicNodeType>(n), val)))
+ -> decltype(::fkyaml::from_node(std::forward<BasicNodeType>(n), val), void()) {
+ ::fkyaml::from_node(std::forward<BasicNodeType>(n), val);
+ }
+
+ /// @brief Convert compatible native data into a YAML node.
+ /// @tparam BasicNodeType A basic_node template instance type.
+ /// @tparam TargetType A native data type for conversion.
+ /// @param n A basic_node object.
+ /// @param val A native data object.
+ /// @sa https://fktn-k.github.io/fkYAML/api/node_value_converter/to_node/
+ template <typename BasicNodeType, typename TargetType = ValueType>
+ static auto to_node(BasicNodeType& n, TargetType&& val) noexcept(noexcept(::fkyaml::to_node(
+ n, std::forward<TargetType>(val)))) -> decltype(::fkyaml::to_node(n, std::forward<TargetType>(val))) {
+ ::fkyaml::to_node(n, std::forward<TargetType>(val));
+ }
+};
+
+FK_YAML_NAMESPACE_END
+
+#endif /* FK_YAML_NODE_VALUE_CONVERTER_HPP */
+
+// #include <fkYAML/ordered_map.hpp>
+// _______ __ __ __ _____ __ __ __
+// | __| |_/ | \_/ |/ _ \ / \/ \| | fkYAML: A C++ header-only YAML library
+// | __| _ < \_ _/| ___ | _ | |___ version 0.4.2
+// |__| |_| \__| |_| |_| |_|___||___|______| https://github.com/fktn-k/fkYAML
+//
+// SPDX-FileCopyrightText: 2023-2025 Kensuke Fukutani <fktn.dev@gmail.com>
+// SPDX-License-Identifier: MIT
+
+#ifndef FK_YAML_ORDERED_MAP_HPP
+#define FK_YAML_ORDERED_MAP_HPP
+
+#include <functional>
+#include <initializer_list>
+#include <memory>
+#include <utility>
+#include <vector>
+
+// #include <fkYAML/detail/macros/define_macros.hpp>
+
+// #include <fkYAML/detail/meta/type_traits.hpp>
+
+// #include <fkYAML/exception.hpp>
+
+
+FK_YAML_NAMESPACE_BEGIN
+
+/// @brief A minimal map-like container which preserves insertion order.
+/// @tparam Key A type for keys.
+/// @tparam Value A type for values.
+/// @tparam IgnoredCompare A placeholder for key comparison. This will be ignored.
+/// @tparam Allocator A class for allocators.
+/// @sa https://fktn-k.github.io/fkYAML/api/ordered_map/
+template <
+ typename Key, typename Value, typename IgnoredCompare = std::less<Key>,
+ typename Allocator = std::allocator<std::pair<const Key, Value>>>
+class ordered_map : public std::vector<std::pair<const Key, Value>, Allocator> {
+public:
+ /// @brief A type for keys.
+ /// @sa https://fktn-k.github.io/fkYAML/api/ordered_map/
+ using key_type = Key;
+
+ /// @brief A type for values.
+ /// @sa https://fktn-k.github.io/fkYAML/api/ordered_map/
+ using mapped_type = Value;
+
+ /// @brief A type for internal key-value containers.
+ /// @sa https://fktn-k.github.io/fkYAML/api/ordered_map/
+ using Container = std::vector<std::pair<const Key, Value>, Allocator>;
+
+ /// @brief A type for key-value pairs.
+ /// @sa https://fktn-k.github.io/fkYAML/api/ordered_map/
+ using value_type = typename Container::value_type;
+
+ /// @brief A type for non-const iterators.
+ /// @sa https://fktn-k.github.io/fkYAML/api/ordered_map/
+ using iterator = typename Container::iterator;
+
+ /// @brief A type for const iterators.
+ /// @sa https://fktn-k.github.io/fkYAML/api/ordered_map/
+ using const_iterator = typename Container::const_iterator;
+
+ /// @brief A type for size parameters used in this class.
+ /// @sa https://fktn-k.github.io/fkYAML/api/ordered_map/
+ using size_type = typename Container::size_type;
+
+ /// @brief A type for comparison between keys.
+ /// @sa https://fktn-k.github.io/fkYAML/api/ordered_map/
+ using key_compare = std::equal_to<Key>;
+
+public:
+ /// @brief Construct a new ordered_map object.
+ /// @sa https://fktn-k.github.io/fkYAML/api/ordered_map/constructor/
+ ordered_map() noexcept(noexcept(Container()))
+ : Container() {
+ }
+
+ /// @brief Construct a new ordered_map object with an initializer list.
+ /// @param init An initializer list to construct the inner container object.
+ /// @sa https://fktn-k.github.io/fkYAML/api/ordered_map/constructor/
+ ordered_map(std::initializer_list<value_type> init)
+ : Container {init} {
+ }
+
+public:
+ /// @brief A subscript operator for ordered_map objects.
+ /// @tparam KeyType A type for the input key.
+ /// @param key A key to the target value.
+ /// @return mapped_type& Reference to a mapped_type object associated with the given key.
+ /// @sa https://fktn-k.github.io/fkYAML/api/ordered_map/operator[]/
+ template <
+ typename KeyType,
+ detail::enable_if_t<detail::is_usable_as_key_type<key_compare, key_type, KeyType>::value, int> = 0>
+ mapped_type& operator[](KeyType&& key) noexcept {
+ return emplace(std::forward<KeyType>(key), mapped_type()).first->second;
+ }
+
+public:
+ /// @brief Emplace a new key-value pair if the new key does not exist.
+ /// @tparam KeyType A type for the input key.
+ /// @param key A key to be emplaced to this ordered_map object.
+ /// @param value A value to be emplaced to this ordered_map object.
+ /// @return std::pair<iterator, bool> A result of emplacement of the new key-value pair.
+ /// @sa https://fktn-k.github.io/fkYAML/api/ordered_map/emplace/
+ template <
+ typename KeyType,
+ detail::enable_if_t<detail::is_usable_as_key_type<key_compare, key_type, KeyType>::value, int> = 0>
+ std::pair<iterator, bool> emplace(KeyType&& key, const mapped_type& value) noexcept {
+ for (auto itr = this->begin(); itr != this->end(); ++itr) {
+ if (m_compare(itr->first, key)) {
+ return {itr, false};
+ }
+ }
+ this->emplace_back(std::forward<KeyType>(key), value);
+ return {std::prev(this->end()), true};
+ }
+
+ /// @brief Find a value associated to the given key. Throws an exception if the search fails.
+ /// @tparam KeyType A type for the input key.
+ /// @param key A key to find a value with.
+ /// @return mapped_type& The value associated to the given key.
+ /// @sa https://fktn-k.github.io/fkYAML/api/ordered_map/at/
+ template <
+ typename KeyType,
+ detail::enable_if_t<detail::is_usable_as_key_type<key_compare, key_type, KeyType>::value, int> = 0>
+ mapped_type& at(KeyType&& key) { // NOLINT(cppcoreguidelines-missing-std-forward)
+ for (auto itr = this->begin(); itr != this->end(); ++itr) {
+ if (m_compare(itr->first, key)) {
+ return itr->second;
+ }
+ }
+ throw fkyaml::exception("key not found.");
+ }
+
+ /// @brief Find a value associated to the given key. Throws an exception if the search fails.
+ /// @tparam KeyType A type for the input key.
+ /// @param key A key to find a value with.
+ /// @return const mapped_type& The value associated to the given key.
+ /// @sa https://fktn-k.github.io/fkYAML/api/ordered_map/at/
+ template <
+ typename KeyType,
+ detail::enable_if_t<detail::is_usable_as_key_type<key_compare, key_type, KeyType>::value, int> = 0>
+ const mapped_type& at(KeyType&& key) const { // NOLINT(cppcoreguidelines-missing-std-forward)
+ for (auto itr = this->begin(); itr != this->end(); ++itr) {
+ if (m_compare(itr->first, key)) {
+ return itr->second;
+ }
+ }
+ throw fkyaml::exception("key not found.");
+ }
+
+ /// @brief Find a value with the given key.
+ /// @tparam KeyType A type for the input key.
+ /// @param key A key to find a value with.
+ /// @return iterator The iterator for the found value, or the result of end().
+ /// @sa https://fktn-k.github.io/fkYAML/api/ordered_map/find/
+ template <
+ typename KeyType,
+ detail::enable_if_t<detail::is_usable_as_key_type<key_compare, key_type, KeyType>::value, int> = 0>
+ iterator find(KeyType&& key) noexcept { // NOLINT(cppcoreguidelines-missing-std-forward)
+ for (auto itr = this->begin(); itr != this->end(); ++itr) {
+ if (m_compare(itr->first, key)) {
+ return itr;
+ }
+ }
+ return this->end();
+ }
+
+ /// @brief Find a value with the given key.
+ /// @tparam KeyType A type for the input key.
+ /// @param key A key to find a value with.
+ /// @return const_iterator The constant iterator for the found value, or the result of end().
+ /// @sa https://fktn-k.github.io/fkYAML/api/ordered_map/find/
+ template <
+ typename KeyType,
+ detail::enable_if_t<detail::is_usable_as_key_type<key_compare, key_type, KeyType>::value, int> = 0>
+ const_iterator find(KeyType&& key) const noexcept { // NOLINT(cppcoreguidelines-missing-std-forward)
+ for (auto itr = this->begin(); itr != this->end(); ++itr) {
+ if (m_compare(itr->first, key)) {
+ return itr;
+ }
+ }
+ return this->end();
+ }
+
+private:
+ /// The object for comparing keys.
+ key_compare m_compare {};
+};
+
+FK_YAML_NAMESPACE_END
+
+#endif /* FK_YAML_ORDERED_MAP_HPP */
+
+
+FK_YAML_NAMESPACE_BEGIN
+
+/// @brief A class to store value of YAML nodes.
+/// @sa https://fktn-k.github.io/fkYAML/api/basic_node/
+template <
+ template <typename, typename...> class SequenceType, template <typename, typename, typename...> class MappingType,
+ typename BooleanType, typename IntegerType, typename FloatNumberType, typename StringType,
+ template <typename, typename = void> class ConverterType>
+class basic_node {
+public:
+ /// @brief A type for sequence basic_node values.
+ /// @sa https://fktn-k.github.io/fkYAML/api/basic_node/sequence_type/
+ using sequence_type = SequenceType<basic_node, std::allocator<basic_node>>;
+
+ /// @brief A type for mapping basic_node values.
+ /// @note std::unordered_map is not supported since it does not allow incomplete types.
+ /// @sa https://fktn-k.github.io/fkYAML/api/basic_node/mapping_type/
+ using mapping_type = MappingType<basic_node, basic_node>;
+
+ /// @brief A type for boolean basic_node values.
+ /// @sa https://fktn-k.github.io/fkYAML/api/basic_node/boolean_type/
+ using boolean_type = BooleanType;
+
+ /// @brief A type for integer basic_node values.
+ /// @sa https://fktn-k.github.io/fkYAML/api/basic_node/integer_type/
+ using integer_type = IntegerType;
+
+ /// @brief A type for float number basic_node values.
+ /// @sa https://fktn-k.github.io/fkYAML/api/basic_node/float_number_type/
+ using float_number_type = FloatNumberType;
+
+ /// @brief A type for string basic_node values.
+ /// @sa https://fktn-k.github.io/fkYAML/api/basic_node/string_type/
+ using string_type = StringType;
+
+ /// @brief A type of elements in a basic_node container.
+ /// @sa https://fktn-k.github.io/fkYAML/api/basic_node/#container-types
+ using value_type = basic_node;
+
+ /// @brief A type of reference to a basic_node element.
+ /// @sa https://fktn-k.github.io/fkYAML/api/basic_node/#container-types
+ using reference = value_type&;
+
+ /// @brief A type of constant reference to a basic_node element.
+ /// @sa https://fktn-k.github.io/fkYAML/api/basic_node/#container-types
+ using const_reference = const value_type&;
+
+ /// @brief A type of a pointer to a basic_node element.
+ /// @sa https://fktn-k.github.io/fkYAML/api/basic_node/#container-types
+ using pointer = value_type*;
+
+ /// @brief A type of a constant pointer to a basic_node element.
+ /// @sa https://fktn-k.github.io/fkYAML/api/basic_node/#container-types
+ using const_pointer = const value_type*;
+
+ /// @brief A type to represent basic_node container sizes.
+ /// @sa https://fktn-k.github.io/fkYAML/api/basic_node/#container-types
+ using size_type = std::size_t;
+
+ /// @brief A type to represent differences between basic_node iterators.
+ /// @sa https://fktn-k.github.io/fkYAML/api/basic_node/#container-types
+ using difference_type = std::ptrdiff_t;
+
+ /// @brief A type for iterators of basic_node containers.
+ /// @sa https://fktn-k.github.io/fkYAML/api/basic_node/iterator/
+ using iterator = fkyaml::detail::iterator<basic_node>;
+
+ /// @brief A type for constant iterators of basic_node containers.
+ /// @sa https://fktn-k.github.io/fkYAML/api/basic_node/iterator/
+ using const_iterator = fkyaml::detail::iterator<const basic_node>;
+
+ /// @brief A type for reverse iterators of basic_node containers.
+ /// @sa https://fktn-k.github.io/fkYAML/api/basic_node/reverse_iterator/
+ using reverse_iterator = fkyaml::detail::reverse_iterator<iterator>;
+
+ /// @brief A type for constant reverse iterators of basic_node containers.
+ /// @sa https://fktn-k.github.io/fkYAML/api/basic_node/reverse_iterator/
+ using const_reverse_iterator = fkyaml::detail::reverse_iterator<const_iterator>;
+
+ /// @brief A helper alias to determine converter type for the given target native data type.
+ /// @sa https://fktn-k.github.io/fkYAML/api/basic_node/value_converter_type/
+ template <typename T, typename SFINAE>
+ using value_converter_type = ConverterType<T, SFINAE>;
+
+ /// @brief Definition of node value types.
+ /// @deprecated Use fkyaml::node_type enum class. (since 0.3.12)
+ /// @sa https://fktn-k.github.io/fkYAML/api/basic_node/node_t/
+ using node_t = detail::node_t;
+
+ /// @brief Definition of YAML version types.
+ /// @deprecated Use fkyaml::yaml_version_type enum class. (since 0.3.12)
+ /// @sa https://fktn-k.github.io/fkYAML/api/basic_node/yaml_version_t/
+ using yaml_version_t = detail::yaml_version_t;
+
+ /// @brief A type for mapping range objects for the map_items() function.
+ /// @sa https://fktn-k.github.io/fkYAML/api/basic_node/map_range/
+ using map_range = fkyaml::detail::map_range_proxy<basic_node>;
+
+ /// @brief A type for constant mapping range objects for the map_items() function.
+ /// @sa https://fktn-k.github.io/fkYAML/api/basic_node/map_range/
+ using const_map_range = fkyaml::detail::map_range_proxy<const basic_node>;
+
+private:
+ template <typename BasicNodeType>
+ friend struct fkyaml::detail::external_node_constructor;
+
+ template <typename BasicNodeType>
+ friend class fkyaml::detail::basic_deserializer;
+
+ template <typename BasicNodeType>
+ friend class fkyaml::detail::basic_serializer;
+
+ /// @brief A type for YAML docs deserializers.
+ using deserializer_type = detail::basic_deserializer<basic_node>;
+ /// @brief A type for YAML docs serializers.
+ using serializer_type = detail::basic_serializer<basic_node>;
+ /// @brief A helper type alias for std::initializer_list.
+ using initializer_list_t = std::initializer_list<detail::node_ref_storage<basic_node>>;
+
+ /// @brief The actual storage for a YAML node value of the @ref basic_node class.
+ /// @details This union combines the different storage types for the YAML value types defined in @ref node_t.
+ /// @note Container types are stored as pointers so that the size of this union will not exceed 64 bits by
+ /// default.
+ union node_value {
+ /// @brief Constructs a new basic_node Value object for null types.
+ node_value() = default;
+
+ /// @brief Constructs a new basic_node value object with a node type. The default value for the specified
+ /// type will be assigned.
+ /// @param[in] type A node type.
+ explicit node_value(detail::node_attr_t value_type_bit) {
+ switch (value_type_bit) {
+ case detail::node_attr_bits::seq_bit:
+ p_seq = detail::create_object<sequence_type>();
+ break;
+ case detail::node_attr_bits::map_bit:
+ p_map = detail::create_object<mapping_type>();
+ break;
+ case detail::node_attr_bits::null_bit:
+ p_map = nullptr;
+ break;
+ case detail::node_attr_bits::bool_bit:
+ boolean = static_cast<boolean_type>(false);
+ break;
+ case detail::node_attr_bits::int_bit:
+ integer = static_cast<integer_type>(0);
+ break;
+ case detail::node_attr_bits::float_bit:
+ float_val = static_cast<float_number_type>(0.0);
+ break;
+ case detail::node_attr_bits::string_bit:
+ p_str = detail::create_object<string_type>();
+ break;
+ default: // LCOV_EXCL_LINE
+ detail::unreachable(); // LCOV_EXCL_LINE
+ }
+ }
+
+ /// @brief Destroys the existing Node value. This process is recursive if the specified node type is for
+ /// containers.
+ /// @param[in] type A Node type to determine the value to be destroyed.
+ void destroy(detail::node_attr_t value_type_bit) {
+ switch (value_type_bit) {
+ case detail::node_attr_bits::seq_bit:
+ p_seq->clear();
+ detail::destroy_object<sequence_type>(p_seq);
+ p_seq = nullptr;
+ break;
+ case detail::node_attr_bits::map_bit:
+ p_map->clear();
+ detail::destroy_object<mapping_type>(p_map);
+ p_map = nullptr;
+ break;
+ case detail::node_attr_bits::string_bit:
+ detail::destroy_object<string_type>(p_str);
+ p_str = nullptr;
+ break;
+ default:
+ break;
+ }
+ }
+
+ /// A pointer to the value of sequence type.
+ sequence_type* p_seq;
+ /// A pointer to the value of mapping type. This pointer is also used when node type is null.
+ mapping_type* p_map {nullptr};
+ /// A value of boolean type.
+ boolean_type boolean;
+ /// A value of integer type.
+ integer_type integer;
+ /// A value of float number type.
+ float_number_type float_val;
+ /// A pointer to the value of string type.
+ string_type* p_str;
+ };
+
+public:
+ /// @brief Constructs a new basic_node object of null type.
+ /// @sa https://fktn-k.github.io/fkYAML/api/basic_node/constructor/
+ basic_node() = default;
+
+ /// @brief Constructs a new basic_node object with a specified type.
+ /// @param[in] type A YAML node type.
+ /// @sa https://fktn-k.github.io/fkYAML/api/basic_node/constructor/
+ FK_YAML_DEPRECATED("Since 0.3.12; Use explicit basic_node(const node_type)")
+ explicit basic_node(const node_t type)
+ : basic_node(detail::convert_to_node_type(type)) {
+ }
+
+ explicit basic_node(const node_type type)
+ : m_attrs(detail::node_attr_bits::from_node_type(type)),
+ m_value(m_attrs & detail::node_attr_mask::value) {
+ }
+
+ /// @brief Copy constructor of the basic_node class.
+ /// @param[in] rhs A basic_node object to be copied with.
+ /// @sa https://fktn-k.github.io/fkYAML/api/basic_node/constructor/
+ basic_node(const basic_node& rhs)
+ : m_attrs(rhs.m_attrs),
+ mp_meta(rhs.mp_meta),
+ m_prop(rhs.m_prop) {
+ if FK_YAML_LIKELY (!has_anchor_name()) {
+ switch (m_attrs & detail::node_attr_mask::value) {
+ case detail::node_attr_bits::seq_bit:
+ m_value.p_seq = detail::create_object<sequence_type>(*(rhs.m_value.p_seq));
+ break;
+ case detail::node_attr_bits::map_bit:
+ m_value.p_map = detail::create_object<mapping_type>(*(rhs.m_value.p_map));
+ break;
+ case detail::node_attr_bits::null_bit:
+ m_value.p_map = nullptr;
+ break;
+ case detail::node_attr_bits::bool_bit:
+ m_value.boolean = rhs.m_value.boolean;
+ break;
+ case detail::node_attr_bits::int_bit:
+ m_value.integer = rhs.m_value.integer;
+ break;
+ case detail::node_attr_bits::float_bit:
+ m_value.float_val = rhs.m_value.float_val;
+ break;
+ case detail::node_attr_bits::string_bit:
+ m_value.p_str = detail::create_object<string_type>(*(rhs.m_value.p_str));
+ break;
+ default: // LCOV_EXCL_LINE
+ detail::unreachable(); // LCOV_EXCL_LINE
+ }
+ }
+ }
+
+ /// @brief Move constructor of the basic_node class.
+ /// @param[in] rhs A basic_node object to be moved from.
+ /// @sa https://fktn-k.github.io/fkYAML/api/basic_node/constructor/
+ basic_node(basic_node&& rhs) noexcept
+ : m_attrs(rhs.m_attrs),
+ mp_meta(std::move(rhs.mp_meta)),
+ m_prop(std::move(rhs.m_prop)) {
+ if FK_YAML_LIKELY (!has_anchor_name()) {
+ switch (m_attrs & detail::node_attr_mask::value) {
+ case detail::node_attr_bits::seq_bit:
+ FK_YAML_ASSERT(rhs.m_value.p_seq != nullptr);
+ m_value.p_seq = rhs.m_value.p_seq;
+ rhs.m_value.p_seq = nullptr;
+ break;
+ case detail::node_attr_bits::map_bit:
+ FK_YAML_ASSERT(rhs.m_value.p_map != nullptr);
+ m_value.p_map = rhs.m_value.p_map;
+ rhs.m_value.p_map = nullptr;
+ break;
+ case detail::node_attr_bits::null_bit:
+ FK_YAML_ASSERT(rhs.m_value.p_map == nullptr);
+ m_value.p_map = rhs.m_value.p_map;
+ break;
+ case detail::node_attr_bits::bool_bit:
+ m_value.boolean = rhs.m_value.boolean;
+ rhs.m_value.boolean = static_cast<boolean_type>(false);
+ break;
+ case detail::node_attr_bits::int_bit:
+ m_value.integer = rhs.m_value.integer;
+ rhs.m_value.integer = static_cast<integer_type>(0);
+ break;
+ case detail::node_attr_bits::float_bit:
+ m_value.float_val = rhs.m_value.float_val;
+ rhs.m_value.float_val = static_cast<float_number_type>(0.0);
+ break;
+ case detail::node_attr_bits::string_bit:
+ FK_YAML_ASSERT(rhs.m_value.p_str != nullptr);
+ m_value.p_str = rhs.m_value.p_str;
+ rhs.m_value.p_str = nullptr;
+ break;
+ default: // LCOV_EXCL_LINE
+ detail::unreachable(); // LCOV_EXCL_LINE
+ }
+ }
+
+ rhs.m_attrs = detail::node_attr_bits::default_bits;
+ rhs.m_value.p_map = nullptr;
+ }
+
+ /// @brief Construct a new basic_node object from a value of compatible types.
+ /// @tparam CompatibleType Type of native data which is compatible with node values.
+ /// @tparam U Type of compatible native data without cv-qualifiers and reference.
+ /// @param[in] val The value of a compatible type.
+ /// @sa https://fktn-k.github.io/fkYAML/api/basic_node/constructor/
+ template <
+ typename CompatibleType, typename U = detail::remove_cvref_t<CompatibleType>,
+ detail::enable_if_t<
+ detail::conjunction<
+ detail::negation<detail::is_basic_node<U>>,
+ detail::disjunction<detail::is_node_compatible_type<basic_node, U>>>::value,
+ int> = 0>
+ basic_node(CompatibleType&& val) noexcept(
+ noexcept(ConverterType<U, void>::to_node(std::declval<basic_node&>(), std::declval<CompatibleType>()))) {
+ ConverterType<U, void>::to_node(*this, std::forward<CompatibleType>(val));
+ }
+
+ /// @brief Construct a new basic node object with a node_ref_storage object.
+ /// @tparam NodeRefStorageType Type of basic_node with reference.
+ /// @param[in] node_ref_storage A node_ref_storage template class object.
+ /// @sa https://fktn-k.github.io/fkYAML/api/basic_node/constructor/
+ template <
+ typename NodeRefStorageType,
+ detail::enable_if_t<detail::is_node_ref_storage<NodeRefStorageType>::value, int> = 0>
+ basic_node(const NodeRefStorageType& node_ref_storage) noexcept
+ : basic_node(node_ref_storage.release()) {
+ }
+
+ /// @brief Construct a new basic node object with std::initializer_list.
+ /// @param[in] init A initializer list of basic_node objects.
+ /// @sa https://fktn-k.github.io/fkYAML/api/basic_node/constructor/
+ basic_node(initializer_list_t init) {
+ bool is_mapping =
+ std::all_of(init.begin(), init.end(), [](const detail::node_ref_storage<basic_node>& node_ref) {
+ // Do not use is_sequence_impl() since node_ref may be an anchor or alias.
+ return node_ref->is_sequence() && node_ref->size() == 2;
+ });
+
+ if (is_mapping) {
+ m_attrs = detail::node_attr_bits::map_bit;
+ m_value.p_map = detail::create_object<mapping_type>();
+
+ auto& map = *m_value.p_map;
+ for (auto& elem_ref : init) {
+ auto elem = elem_ref.release();
+ auto& seq = *elem.m_value.p_seq;
+ map.emplace(std::move(seq[0]), std::move(seq[1]));
+ }
+ }
+ else {
+ m_attrs = detail::node_attr_bits::seq_bit;
+ m_value.p_seq = detail::create_object<sequence_type>();
+
+ auto& seq = *m_value.p_seq;
+ seq.reserve(std::distance(init.begin(), init.end()));
+ for (auto& elem_ref : init) {
+ seq.emplace_back(std::move(elem_ref.release()));
+ }
+ }
+ }
+
+ /// @brief Destroy the basic_node object and its value storage.
+ /// @sa https://fktn-k.github.io/fkYAML/api/basic_node/destructor/
+ ~basic_node() noexcept // NOLINT(bugprone-exception-escape)
+ {
+ if (m_attrs & detail::node_attr_mask::anchoring) {
+ if (m_attrs & detail::node_attr_bits::anchor_bit) {
+ auto itr = mp_meta->anchor_table.equal_range(m_prop.anchor).first;
+ std::advance(itr, detail::node_attr_bits::get_anchor_offset(m_attrs));
+ itr->second.m_value.destroy(itr->second.m_attrs & detail::node_attr_mask::value);
+ itr->second.m_attrs = detail::node_attr_bits::default_bits;
+ itr->second.mp_meta.reset();
+ }
+ }
+ else if ((m_attrs & detail::node_attr_bits::null_bit) == 0) {
+ m_value.destroy(m_attrs & detail::node_attr_mask::value);
+ }
+
+ m_attrs = detail::node_attr_bits::default_bits;
+ mp_meta.reset();
+ }
+
+public:
+ /// @brief Deserialize the first YAML document in the input into a basic_node object.
+ /// @tparam InputType Type of a compatible input.
+ /// @param[in] input An input source in the YAML format.
+ /// @return The resulting basic_node object deserialized from the input source.
+ /// @sa https://fktn-k.github.io/fkYAML/api/basic_node/deserialize/
+ template <typename InputType>
+ static basic_node deserialize(InputType&& input) {
+ return deserializer_type().deserialize(detail::input_adapter(std::forward<InputType>(input)));
+ }
+
+ /// @brief Deserialize the first YAML document in the input ranged by the iterators into a basic_node object.
+ /// @note
+ /// Iterators must satisfy the LegacyInputIterator requirements.
+ /// See https://en.cppreference.com/w/cpp/named_req/InputIterator.
+ /// @tparam ItrType Type of a compatible iterator
+ /// @param[in] begin An iterator to the first element of an input sequence.
+ /// @param[in] end An iterator to the past-the-last element of an input sequence.
+ /// @return The resulting basic_node object deserialized from the pair of iterators.
+ /// @sa https://fktn-k.github.io/fkYAML/api/basic_node/deserialize/
+ template <typename ItrType>
+ static basic_node deserialize(ItrType begin, ItrType end) {
+ return deserializer_type().deserialize(
+ detail::input_adapter(std::forward<ItrType>(begin), std::forward<ItrType>(end)));
+ }
+
+ /// @brief Deserialize all YAML documents in the input into basic_node objects.
+ /// @tparam InputType Type of a compatible input.
+ /// @param[in] input An input source in the YAML format.
+ /// @return The resulting basic_node objects deserialized from the input.
+ /// @sa https://fktn-k.github.io/fkYAML/api/basic_node/deserialize_docs/
+ template <typename InputType>
+ static std::vector<basic_node> deserialize_docs(InputType&& input) {
+ return deserializer_type().deserialize_docs(detail::input_adapter(std::forward<InputType>(input)));
+ }
+
+ /// @brief Deserialize all YAML documents in the input ranged by the iterators into basic_node objects.
+ /// @tparam ItrType Type of a compatible iterator.
+ /// @param[in] begin An iterator to the first element of an input sequence.
+ /// @param[in] end An iterator to the past-the-last element of an input sequence.
+ /// @return The resulting basic_node objects deserialized from the pair of iterators.
+ /// @sa https://fktn-k.github.io/fkYAML/api/basic_node/deserialize_docs/
+ template <typename ItrType>
+ static std::vector<basic_node> deserialize_docs(ItrType&& begin, ItrType&& end) {
+ return deserializer_type().deserialize_docs(
+ detail::input_adapter(std::forward<ItrType>(begin), std::forward<ItrType>(end)));
+ }
+
+ /// @brief Serialize a basic_node object into a string.
+ /// @param[in] node A basic_node object to be serialized.
+ /// @return The resulting string object from the serialization of the given node.
+ /// @sa https://fktn-k.github.io/fkYAML/api/basic_node/serialize/
+ static std::string serialize(const basic_node& node) {
+ return serializer_type().serialize(node);
+ }
+
+ /// @brief Serialize basic_node objects into a string.
+ /// @param docs basic_node objects to be serialized.
+ /// @return The resulting string object from the serialization of the given nodes.
+ /// @sa https://fktn-k.github.io/fkYAML/api/basic_node/serialize_docs/
+ static std::string serialize_docs(const std::vector<basic_node>& docs) {
+ return serializer_type().serialize_docs(docs);
+ }
+
+ /// @brief A factory method for sequence basic_node objects without sequence_type objects.
+ /// @return A YAML sequence node.
+ /// @sa https://fktn-k.github.io/fkYAML/api/basic_node/sequence/
+ static basic_node sequence() {
+ basic_node node;
+ node.m_attrs = detail::node_attr_bits::seq_bit;
+ node.m_value.p_seq = detail::create_object<sequence_type>();
+ return node;
+ } // LCOV_EXCL_LINE
+
+ /// @brief A factory method for sequence basic_node objects with lvalue sequence_type objects.
+ /// @param[in] seq A lvalue sequence node value.
+ /// @return A YAML sequence node.
+ /// @sa https://fktn-k.github.io/fkYAML/api/basic_node/sequence/
+ static basic_node sequence(const sequence_type& seq) {
+ basic_node node;
+ node.m_attrs = detail::node_attr_bits::seq_bit;
+ node.m_value.p_seq = detail::create_object<sequence_type>(seq);
+ return node;
+ } // LCOV_EXCL_LINE
+
+ /// @brief A factory method for sequence basic_node objects with rvalue sequence_type objects.
+ /// @param[in] seq A rvalue sequence node value.
+ /// @return A YAML sequence node.
+ /// @sa https://fktn-k.github.io/fkYAML/api/basic_node/sequence/
+ static basic_node sequence(sequence_type&& seq) {
+ basic_node node;
+ node.m_attrs = detail::node_attr_bits::seq_bit;
+ node.m_value.p_seq = detail::create_object<sequence_type>(std::move(seq));
+ return node;
+ } // LCOV_EXCL_LINE
+
+ /// @brief A factory method for mapping basic_node objects without mapping_type objects.
+ /// @return A YAML mapping node.
+ /// @sa https://fktn-k.github.io/fkYAML/api/basic_node/mapping/
+ static basic_node mapping() {
+ basic_node node;
+ node.m_attrs = detail::node_attr_bits::map_bit;
+ node.m_value.p_map = detail::create_object<mapping_type>();
+ return node;
+ } // LCOV_EXCL_LINE
+
+ /// @brief A factory method for mapping basic_node objects with lvalue mapping_type objects.
+ /// @param[in] map A lvalue mapping node value.
+ /// @return A YAML mapping node.
+ /// @sa https://fktn-k.github.io/fkYAML/api/basic_node/mapping/
+ static basic_node mapping(const mapping_type& map) {
+ basic_node node;
+ node.m_attrs = detail::node_attr_bits::map_bit;
+ node.m_value.p_map = detail::create_object<mapping_type>(map);
+ return node;
+ } // LCOV_EXCL_LINE
+
+ /// @brief A factory method for mapping basic_node objects with rvalue mapping_type objects.
+ /// @param[in] map A rvalue mapping node value.
+ /// @return A YAML mapping node.
+ /// @sa https://fktn-k.github.io/fkYAML/api/basic_node/mapping/
+ static basic_node mapping(mapping_type&& map) {
+ basic_node node;
+ node.m_attrs = detail::node_attr_bits::map_bit;
+ node.m_value.p_map = detail::create_object<mapping_type>(std::move(map));
+ return node;
+ } // LCOV_EXCL_LINE
+
+ /// @brief A factory method for alias basic_node objects referencing the given anchor basic_node object.
+ /// @note The given anchor basic_node must have a non-empty anchor name.
+ /// @param[in] anchor_node A basic_node object with an anchor name.
+ /// @return An alias YAML node created from the given anchor node.
+ /// @sa https://fktn-k.github.io/fkYAML/api/basic_node/alias_of/
+ static basic_node alias_of(const basic_node& anchor_node) {
+ constexpr detail::node_attr_t anchor_bit = detail::node_attr_bits::anchor_bit;
+
+ if FK_YAML_UNLIKELY (!anchor_node.has_anchor_name() || !(anchor_node.m_attrs & anchor_bit)) {
+ throw fkyaml::exception("Cannot create an alias without anchor name.");
+ }
+
+ basic_node node = anchor_node;
+ node.m_attrs &= ~detail::node_attr_mask::anchoring;
+ node.m_attrs |= detail::node_attr_bits::alias_bit;
+ return node;
+ } // LCOV_EXCL_LINE
+
+public:
+ /// @brief A copy assignment operator of the basic_node class.
+ /// @param[in] rhs A lvalue basic_node object to be copied with.
+ /// @return Reference to this basic_node object.
+ /// @sa https://fktn-k.github.io/fkYAML/api/basic_node/operator=/
+ basic_node& operator=(const basic_node& rhs) noexcept {
+ basic_node(rhs).swap(*this);
+ return *this;
+ }
+
+ /// @brief A move assignment operator of the basic_node class.
+ /// @param[in] rhs A rvalue basic_node object to be moved from.
+ /// @return Reference to this basic_node object.
+ /// @sa https://fktn-k.github.io/fkYAML/api/basic_node/operator=/
+ basic_node& operator=(basic_node&& rhs) noexcept {
+ basic_node(std::move(rhs)).swap(*this);
+ return *this;
+ }
+
+ /// @brief A subscript operator of the basic_node class with a key of a compatible type with basic_node.
+ /// @tparam KeyType A key type compatible with basic_node
+ /// @param key A key to the target value in a sequence/mapping node.
+ /// @return The value associated with the given key, or a default basic_node object associated with the given key.
+ /// @sa https://fktn-k.github.io/fkYAML/api/basic_node/operator[]/
+ template <
+ typename KeyType, detail::enable_if_t<
+ detail::conjunction<
+ detail::negation<detail::is_basic_node<KeyType>>,
+ detail::is_node_compatible_type<basic_node, KeyType>>::value,
+ int> = 0>
+ basic_node& operator[](KeyType&& key) {
+ basic_node& act_node = resolve_reference();
+
+ if FK_YAML_UNLIKELY (act_node.is_scalar_impl()) {
+ throw fkyaml::type_error("operator[] is unavailable for a scalar node.", get_type());
+ }
+
+ basic_node key_node = std::forward<KeyType>(key);
+
+ if (act_node.is_sequence_impl()) {
+ // Do not use is_integer_impl() since n may be an anchor or alias.
+ if FK_YAML_UNLIKELY (!key_node.is_integer()) {
+ throw fkyaml::type_error(
+ "An argument of operator[] for sequence nodes must be an integer.", get_type());
+ }
+ FK_YAML_ASSERT(act_node.m_value.p_seq != nullptr);
+ return act_node.m_value.p_seq->operator[](key_node.get_value<int>());
+ }
+
+ FK_YAML_ASSERT(act_node.m_value.p_map != nullptr);
+ return act_node.m_value.p_map->operator[](std::move(key_node));
+ }
+
+ /// @brief A subscript operator of the basic_node class with a key of a compatible type with basic_node.
+ /// @tparam KeyType A key type compatible with basic_node
+ /// @param key A key to the target value in a sequence/mapping node.
+ /// @return The value associated with the given key, or a default basic_node object associated with the given key.
+ /// @sa https://fktn-k.github.io/fkYAML/api/basic_node/operator[]/
+ template <
+ typename KeyType, detail::enable_if_t<
+ detail::conjunction<
+ detail::negation<detail::is_basic_node<KeyType>>,
+ detail::is_node_compatible_type<basic_node, KeyType>>::value,
+ int> = 0>
+ const basic_node& operator[](KeyType&& key) const {
+ const basic_node& act_node = resolve_reference();
+
+ if FK_YAML_UNLIKELY (act_node.is_scalar_impl()) {
+ throw fkyaml::type_error("operator[] is unavailable for a scalar node.", get_type());
+ }
+
+ basic_node key_node = std::forward<KeyType>(key);
+
+ if (act_node.is_sequence_impl()) {
+ if FK_YAML_UNLIKELY (!key_node.is_integer_impl()) {
+ throw fkyaml::type_error(
+ "An argument of operator[] for sequence nodes must be an integer.", get_type());
+ }
+ FK_YAML_ASSERT(act_node.m_value.p_seq != nullptr);
+ return act_node.m_value.p_seq->operator[](key_node.get_value<int>());
+ }
+
+ FK_YAML_ASSERT(act_node.m_value.p_map != nullptr);
+ return act_node.m_value.p_map->operator[](std::move(key_node));
+ }
+
+ /// @brief A subscript operator of the basic_node class with a basic_node key object.
+ /// @tparam KeyType A key type which is a kind of the basic_node template class.
+ /// @param key A key to the target value in a sequence/mapping node.
+ /// @return The value associated with the given key, or a default basic_node object associated with the given key.
+ /// @sa https://fktn-k.github.io/fkYAML/api/basic_node/operator[]/
+ template <typename KeyType, detail::enable_if_t<detail::is_basic_node<KeyType>::value, int> = 0>
+ basic_node& operator[](KeyType&& key) {
+ if FK_YAML_UNLIKELY (is_scalar()) {
+ throw fkyaml::type_error("operator[] is unavailable for a scalar node.", get_type());
+ }
+
+ const node_value& node_value = resolve_reference().m_value;
+
+ if (is_sequence()) {
+ if FK_YAML_UNLIKELY (!key.is_integer()) {
+ throw fkyaml::type_error(
+ "An argument of operator[] for sequence nodes must be an integer.", get_type());
+ }
+ FK_YAML_ASSERT(node_value.p_seq != nullptr);
+ return node_value.p_seq->operator[](std::forward<KeyType>(key).template get_value<int>());
+ }
+
+ FK_YAML_ASSERT(node_value.p_map != nullptr);
+ return node_value.p_map->operator[](std::forward<KeyType>(key));
+ }
+
+ /// @brief A subscript operator of the basic_node class with a basic_node key object.
+ /// @tparam KeyType A key type which is a kind of the basic_node template class.
+ /// @param key A key to the target value in a sequence/mapping node.
+ /// @return The value associated with the given key, or a default basic_node object associated with the given key.
+ /// @sa https://fktn-k.github.io/fkYAML/api/basic_node/operator[]/
+ template <typename KeyType, detail::enable_if_t<detail::is_basic_node<KeyType>::value, int> = 0>
+ const basic_node& operator[](KeyType&& key) const {
+ if FK_YAML_UNLIKELY (is_scalar()) {
+ throw fkyaml::type_error("operator[] is unavailable for a scalar node.", get_type());
+ }
+
+ const node_value& node_value = resolve_reference().m_value;
+
+ if (is_sequence()) {
+ if FK_YAML_UNLIKELY (!key.is_integer()) {
+ throw fkyaml::type_error(
+ "An argument of operator[] for sequence nodes must be an integer.", get_type());
+ }
+ FK_YAML_ASSERT(node_value.p_seq != nullptr);
+ return node_value.p_seq->operator[](key.template get_value<int>());
+ }
+
+ FK_YAML_ASSERT(node_value.p_map != nullptr);
+ return node_value.p_map->operator[](std::forward<KeyType>(key));
+ }
+
+ /// @brief An equal-to operator of the basic_node class.
+ /// @param rhs A basic_node object to be compared with this basic_node object.
+ /// @return true if both types and values are equal, false otherwise.
+ /// @sa https://fktn-k.github.io/fkYAML/api/basic_node/operator_eq/
+ bool operator==(const basic_node& rhs) const noexcept {
+ const basic_node& lhs = resolve_reference();
+ const basic_node& act_rhs = rhs.resolve_reference();
+
+ const detail::node_attr_t lhs_val_bit = lhs.m_attrs & detail::node_attr_mask::value;
+ if (lhs_val_bit != (act_rhs.m_attrs & detail::node_attr_mask::value)) {
+ return false;
+ }
+
+ bool ret = false;
+ switch (lhs_val_bit) {
+ case detail::node_attr_bits::seq_bit:
+ ret = (*(lhs.m_value.p_seq) == *(act_rhs.m_value.p_seq));
+ break;
+ case detail::node_attr_bits::map_bit:
+ ret = (*(lhs.m_value.p_map) == *(act_rhs.m_value.p_map));
+ break;
+ case detail::node_attr_bits::null_bit:
+ // Always true for comparisons between null nodes.
+ ret = true;
+ break;
+ case detail::node_attr_bits::bool_bit:
+ ret = (lhs.m_value.boolean == act_rhs.m_value.boolean);
+ break;
+ case detail::node_attr_bits::int_bit:
+ ret = (lhs.m_value.integer == act_rhs.m_value.integer);
+ break;
+ case detail::node_attr_bits::float_bit:
+ ret =
+ (std::abs(lhs.m_value.float_val - act_rhs.m_value.float_val) <
+ std::numeric_limits<float_number_type>::epsilon());
+ break;
+ case detail::node_attr_bits::string_bit:
+ ret = (*(lhs.m_value.p_str) == *(act_rhs.m_value.p_str));
+ break;
+ default: // LCOV_EXCL_LINE
+ detail::unreachable(); // LCOV_EXCL_LINE
+ }
+
+ return ret;
+ }
+
+ /// @brief A not-equal-to operator of the basic_node class.
+ /// @param rhs A basic_node object to be compared with this basic_node object.
+ /// @return true if either types or values are different, false otherwise.
+ /// @sa https://fktn-k.github.io/fkYAML/api/basic_node/operator_ne/
+ bool operator!=(const basic_node& rhs) const noexcept {
+ return !operator==(rhs);
+ }
+
+ /// @brief A less-than operator of the basic_node class.
+ /// @param rhs A basic_node object to be compared with this basic_node object.
+ /// @return true this basic_node object is less than `rhs`.
+ /// @sa https://fktn-k.github.io/fkYAML/api/basic_node/operator_lt/
+ bool operator<(const basic_node& rhs) const noexcept {
+ if (operator==(rhs)) {
+ return false;
+ }
+
+ const basic_node& lhs = resolve_reference();
+ const basic_node& act_rhs = rhs.resolve_reference();
+
+ const detail::node_attr_t lhs_val_bit = lhs.m_attrs & detail::node_attr_mask::value;
+ const detail::node_attr_t rhs_val_bit = act_rhs.m_attrs & detail::node_attr_mask::value;
+
+ if (lhs_val_bit < rhs_val_bit) {
+ return true;
+ }
+
+ if (lhs_val_bit != rhs_val_bit) {
+ return false;
+ }
+
+ bool ret = false;
+ switch (lhs_val_bit) {
+ case detail::node_attr_bits::seq_bit:
+ ret = (*(lhs.m_value.p_seq) < *(act_rhs.m_value.p_seq));
+ break;
+ case detail::node_attr_bits::map_bit:
+ ret = (*(lhs.m_value.p_map) < *(act_rhs.m_value.p_map));
+ break;
+ case detail::node_attr_bits::null_bit: // LCOV_EXCL_LINE
+ // Will not come here since null nodes are always the same.
+ detail::unreachable(); // LCOV_EXCL_LINE
+ case detail::node_attr_bits::bool_bit:
+ // false < true
+ ret = (!lhs.m_value.boolean && act_rhs.m_value.boolean);
+ break;
+ case detail::node_attr_bits::int_bit:
+ ret = (lhs.m_value.integer < act_rhs.m_value.integer);
+ break;
+ case detail::node_attr_bits::float_bit:
+ ret = (lhs.m_value.float_val < act_rhs.m_value.float_val);
+ break;
+ case detail::node_attr_bits::string_bit:
+ ret = (*(lhs.m_value.p_str) < *(act_rhs.m_value.p_str));
+ break;
+ default: // LCOV_EXCL_LINE
+ detail::unreachable(); // LCOV_EXCL_LINE
+ }
+
+ return ret;
+ }
+
+ /// @brief A less-than-or-equal-to operator of the basic_node class.
+ /// @param rhs A basic_node object to be compared with this basic_node object.
+ /// @return true this basic_node object is less than or equal to `rhs`.
+ /// @sa https://fktn-k.github.io/fkYAML/api/basic_node/operator_le/
+ bool operator<=(const basic_node& rhs) const noexcept {
+ return !rhs.operator<(*this);
+ }
+
+ /// @brief A greater-than operator of the basic_node class.
+ /// @param rhs A basic_node object to be compared with this basic_node object.
+ /// @return true this basic_node object is greater than `rhs`.
+ /// @sa https://fktn-k.github.io/fkYAML/api/basic_node/operator_gt/
+ bool operator>(const basic_node& rhs) const noexcept {
+ return !operator<=(rhs);
+ }
+
+ /// @brief A greater-than-or-equal-to operator of the basic_node class.
+ /// @param rhs A basic_node object to be compared with this basic_node object.
+ /// @return true this basic_node object is greater than or equal to `rhs`.
+ /// @sa https://fktn-k.github.io/fkYAML/api/basic_node/operator_ge/
+ bool operator>=(const basic_node& rhs) const noexcept {
+ return !operator<(rhs);
+ }
+
+public:
+ /// @brief Returns the type of the current basic_node value.
+ /// @return The type of the YAML node value.
+ /// @sa https://fktn-k.github.io/fkYAML/api/basic_node/get_type/
+ node_type get_type() const noexcept {
+ return detail::node_attr_bits::to_node_type(resolve_reference().m_attrs);
+ }
+
+ /// @brief Returns the type of the current basic_node value.
+ /// @deprecated Use get_type() function. (since 0.3.12)
+ /// @return The type of the YAML node value.
+ /// @sa https://fktn-k.github.io/fkYAML/api/basic_node/type/
+ FK_YAML_DEPRECATED("Since 0.3.12; Use get_type()")
+ node_t type() const noexcept {
+ node_type tmp_type = get_type();
+ return detail::convert_from_node_type(tmp_type);
+ }
+
+ /// @brief Tests whether the current basic_node value is of sequence type.
+ /// @return true if the type is sequence, false otherwise.
+ /// @sa https://fktn-k.github.io/fkYAML/api/basic_node/is_sequence/
+ bool is_sequence() const noexcept {
+ return resolve_reference().is_sequence_impl();
+ }
+
+ /// @brief Tests whether the current basic_node value is of mapping type.
+ /// @return true if the type is mapping, false otherwise.
+ /// @sa https://fktn-k.github.io/fkYAML/api/basic_node/is_mapping/
+ bool is_mapping() const noexcept {
+ return resolve_reference().is_mapping_impl();
+ }
+
+ /// @brief Tests whether the current basic_node value is of null type.
+ /// @return true if the type is null, false otherwise.
+ /// @sa https://fktn-k.github.io/fkYAML/api/basic_node/is_null/
+ bool is_null() const noexcept {
+ return resolve_reference().is_null_impl();
+ }
+
+ /// @brief Tests whether the current basic_node value is of boolean type.
+ /// @return true if the type is boolean, false otherwise
+ /// @sa https://fktn-k.github.io/fkYAML/api/basic_node/is_boolean/
+ bool is_boolean() const noexcept {
+ return resolve_reference().is_boolean_impl();
+ }
+
+ /// @brief Tests whether the current basic_node value is of integer type.
+ /// @return true if the type is integer, false otherwise.
+ /// @sa https://fktn-k.github.io/fkYAML/api/basic_node/is_integer/
+ bool is_integer() const noexcept {
+ return resolve_reference().is_integer_impl();
+ }
+
+ /// @brief Tests whether the current basic_node value is of float number type.
+ /// @return true if the type is floating point number, false otherwise.
+ /// @sa https://fktn-k.github.io/fkYAML/api/basic_node/is_float_number/
+ bool is_float_number() const noexcept {
+ return resolve_reference().is_float_number_impl();
+ }
+
+ /// @brief Tests whether the current basic_node value is of string type.
+ /// @return true if the type is string, false otherwise.
+ /// @sa https://fktn-k.github.io/fkYAML/api/basic_node/is_string/
+ bool is_string() const noexcept {
+ return resolve_reference().is_string_impl();
+ }
+
+ /// @brief Tests whether the current basic_node value is of scalar types.
+ /// @return true if the type is scalar, false otherwise.
+ /// @sa https://fktn-k.github.io/fkYAML/api/basic_node/is_scalar/
+ bool is_scalar() const noexcept {
+ return resolve_reference().is_scalar_impl();
+ }
+
+ /// @brief Tests whether the current basic_node is an anchor node.
+ /// @return true if the current basic_node is an anchor node, false otherwise.
+ /// @sa https://fktn-k.github.io/fkYAML/api/basic_node/is_anchor/
+ bool is_anchor() const noexcept {
+ return m_attrs & detail::node_attr_bits::anchor_bit;
+ }
+
+ /// @brief Tests whether the current basic_node is an alias node.
+ /// @return true if the current basic_node is an alias node, false otherwise.
+ /// @sa https://fktn-k.github.io/fkYAML/api/basic_node/is_alias/
+ bool is_alias() const noexcept {
+ return m_attrs & detail::node_attr_bits::alias_bit;
+ }
+
+ /// @brief Tests whether the current basic_node value (sequence, mapping, string) is empty.
+ /// @return true if the node value is empty, false otherwise.
+ /// @sa https://fktn-k.github.io/fkYAML/api/basic_node/empty/
+ bool empty() const {
+ const basic_node& act_node = resolve_reference();
+ switch (act_node.m_attrs & detail::node_attr_mask::value) {
+ case detail::node_attr_bits::seq_bit: {
+ FK_YAML_ASSERT(act_node.m_value.p_seq != nullptr);
+ return act_node.m_value.p_seq->empty();
+ }
+ case detail::node_attr_bits::map_bit: {
+ FK_YAML_ASSERT(act_node.m_value.p_map != nullptr);
+ return act_node.m_value.p_map->empty();
+ }
+ case detail::node_attr_bits::string_bit: {
+ FK_YAML_ASSERT(act_node.m_value.p_str != nullptr);
+ return act_node.m_value.p_str->empty();
+ }
+ default:
+ throw fkyaml::type_error("The target node is not of a container type.", get_type());
+ }
+ }
+
+ /// @brief Returns the size of the current basic_node value (sequence, mapping, string).
+ /// @return The size of a node value.
+ /// @sa https://fktn-k.github.io/fkYAML/api/basic_node/size/
+ std::size_t size() const {
+ const basic_node& act_node = resolve_reference();
+ switch (act_node.m_attrs & detail::node_attr_mask::value) {
+ case detail::node_attr_bits::seq_bit:
+ FK_YAML_ASSERT(act_node.m_value.p_seq != nullptr);
+ return act_node.m_value.p_seq->size();
+ case detail::node_attr_bits::map_bit:
+ FK_YAML_ASSERT(act_node.m_value.p_map != nullptr);
+ return act_node.m_value.p_map->size();
+ case detail::node_attr_bits::string_bit:
+ FK_YAML_ASSERT(act_node.m_value.p_str != nullptr);
+ return act_node.m_value.p_str->size();
+ default:
+ throw fkyaml::type_error("The target node is not of a container type.", get_type());
+ }
+ }
+
+ /// @brief Check whether this basic_node object has a given key in its inner mapping node value.
+ /// @tparam KeyType A key type compatible with basic_node.
+ /// @param key A key to the target value in the mapping node value.
+ /// @return true if the target node is a mapping and has the given key, false otherwise.
+ /// @sa https://fktn-k.github.io/fkYAML/api/basic_node/contains/
+ template <
+ typename KeyType, detail::enable_if_t<
+ detail::disjunction<
+ detail::is_basic_node<KeyType>,
+ detail::is_node_compatible_type<basic_node, detail::remove_cvref_t<KeyType>>>::value,
+ int> = 0>
+ bool contains(KeyType&& key) const {
+ const basic_node& act_node = resolve_reference();
+ if FK_YAML_LIKELY (act_node.m_attrs & detail::node_attr_bits::map_bit) {
+ FK_YAML_ASSERT(act_node.m_value.p_map != nullptr);
+ const auto& map = *act_node.m_value.p_map;
+ return map.find(std::forward<KeyType>(key)) != map.end();
+ }
+
+ return false;
+ }
+
+ /// @brief Get a basic_node object with a key of a compatible type.
+ /// @tparam KeyType A key type compatible with basic_node
+ /// @param key A key to the target basic_node object in a sequence/mapping node.
+ /// @return Reference to the basic_node object associated with the given key.
+ /// @sa https://fktn-k.github.io/fkYAML/api/basic_node/at/
+ template <
+ typename KeyType, detail::enable_if_t<
+ detail::conjunction<
+ detail::negation<detail::is_basic_node<KeyType>>,
+ detail::is_node_compatible_type<basic_node, KeyType>>::value,
+ int> = 0>
+ basic_node& at(KeyType&& key) {
+ basic_node& act_node = resolve_reference();
+
+ if FK_YAML_UNLIKELY (act_node.is_scalar_impl()) {
+ throw fkyaml::type_error("at() is unavailable for a scalar node.", get_type());
+ }
+
+ basic_node node_key = std::forward<KeyType>(key);
+
+ if (act_node.is_sequence_impl()) {
+ if FK_YAML_UNLIKELY (!node_key.is_integer_impl()) {
+ throw fkyaml::type_error("An argument of at() for sequence nodes must be an integer.", get_type());
+ }
+
+ FK_YAML_ASSERT(act_node.m_value.p_seq != nullptr);
+ sequence_type& seq = *act_node.m_value.p_seq;
+ int index = std::move(node_key).template get_value<int>();
+ int size = static_cast<int>(seq.size());
+ if FK_YAML_UNLIKELY (index >= size) {
+ throw fkyaml::out_of_range(index);
+ }
+ return seq[index];
+ }
+
+ FK_YAML_ASSERT(act_node.m_value.p_map != nullptr);
+ mapping_type& map = *act_node.m_value.p_map;
+ const bool is_found = map.find(node_key) != map.end();
+ if FK_YAML_UNLIKELY (!is_found) {
+ throw fkyaml::out_of_range(serialize(node_key).c_str());
+ }
+ return map[std::move(node_key)];
+ }
+
+ /// @brief Get a basic_node object with a key of a compatible type.
+ /// @tparam KeyType A key type compatible with basic_node
+ /// @param key A key to the target basic_node object in a sequence/mapping node.
+ /// @return Constant reference to the basic_node object associated with the given key.
+ /// @sa https://fktn-k.github.io/fkYAML/api/basic_node/at/
+ template <
+ typename KeyType, detail::enable_if_t<
+ detail::conjunction<
+ detail::negation<detail::is_basic_node<KeyType>>,
+ detail::is_node_compatible_type<basic_node, KeyType>>::value,
+ int> = 0>
+ const basic_node& at(KeyType&& key) const {
+ const basic_node& act_node = resolve_reference();
+
+ if FK_YAML_UNLIKELY (act_node.is_scalar_impl()) {
+ throw fkyaml::type_error("at() is unavailable for a scalar node.", get_type());
+ }
+
+ basic_node node_key = std::forward<KeyType>(key);
+
+ if (act_node.is_sequence_impl()) {
+ if FK_YAML_UNLIKELY (!node_key.is_integer()) {
+ throw fkyaml::type_error("An argument of at() for sequence nodes must be an integer.", get_type());
+ }
+
+ FK_YAML_ASSERT(act_node.m_value.p_seq != nullptr);
+ const sequence_type& seq = *act_node.m_value.p_seq;
+ int index = std::move(node_key).template get_value<int>();
+ int size = static_cast<int>(seq.size());
+ if FK_YAML_UNLIKELY (index >= size) {
+ throw fkyaml::out_of_range(index);
+ }
+ return seq[index];
+ }
+
+ FK_YAML_ASSERT(act_node.m_value.p_map != nullptr);
+ const mapping_type& map = *act_node.m_value.p_map;
+ const bool is_found = map.find(node_key) != map.end();
+ if FK_YAML_UNLIKELY (!is_found) {
+ throw fkyaml::out_of_range(serialize(node_key).c_str());
+ }
+ return map.at(std::move(node_key));
+ }
+
+ /// @brief Get a basic_node object with a basic_node key object.
+ /// @tparam KeyType A key type which is a kind of the basic_node template class.
+ /// @param key A key to the target basic_node object in a sequence/mapping node.
+ /// @return Reference to the basic_node object associated with the given key.
+ /// @sa https://fktn-k.github.io/fkYAML/api/basic_node/at/
+ template <typename KeyType, detail::enable_if_t<detail::is_basic_node<KeyType>::value, int> = 0>
+ basic_node& at(KeyType&& key) {
+ basic_node& act_node = resolve_reference();
+ if FK_YAML_UNLIKELY (act_node.is_scalar_impl()) {
+ throw fkyaml::type_error("at() is unavailable for a scalar node.", get_type());
+ }
+
+ if (act_node.is_sequence_impl()) {
+ if FK_YAML_UNLIKELY (!key.is_integer()) {
+ throw fkyaml::type_error("An argument of at() for sequence nodes must be an integer.", get_type());
+ }
+
+ FK_YAML_ASSERT(act_node.m_value.p_seq != nullptr);
+ sequence_type& seq = *act_node.m_value.p_seq;
+ int index = std::forward<KeyType>(key).template get_value<int>();
+ int size = static_cast<int>(seq.size());
+ if FK_YAML_UNLIKELY (index >= size) {
+ throw fkyaml::out_of_range(index);
+ }
+ return seq[index];
+ }
+
+ FK_YAML_ASSERT(act_node.m_value.p_map != nullptr);
+ mapping_type& map = *act_node.m_value.p_map;
+ bool is_found = map.find(key) != map.end();
+ if FK_YAML_UNLIKELY (!is_found) {
+ throw fkyaml::out_of_range(serialize(key).c_str());
+ }
+ return map[std::forward<KeyType>(key)];
+ }
+
+ /// @brief Get a basic_node object with a basic_node key object.
+ /// @tparam KeyType A key type which is a kind of the basic_node template class.
+ /// @param key A key to the target basic_node object in a sequence/mapping node.
+ /// @return Constant reference to the basic_node object associated with the given key.
+ /// @sa https://fktn-k.github.io/fkYAML/api/basic_node/at/
+ template <typename KeyType, detail::enable_if_t<detail::is_basic_node<KeyType>::value, int> = 0>
+ const basic_node& at(KeyType&& key) const {
+ const basic_node& act_node = resolve_reference();
+ if FK_YAML_UNLIKELY (act_node.is_scalar_impl()) {
+ throw fkyaml::type_error("at() is unavailable for a scalar node.", get_type());
+ }
+
+ if (act_node.is_sequence_impl()) {
+ if FK_YAML_UNLIKELY (!key.is_integer()) {
+ throw fkyaml::type_error("An argument of at() for sequence nodes must be an integer.", get_type());
+ }
+
+ FK_YAML_ASSERT(act_node.m_value.p_seq != nullptr);
+ const sequence_type& seq = *act_node.m_value.p_seq;
+ int index = std::forward<KeyType>(key).template get_value<int>();
+ int size = static_cast<int>(seq.size());
+ if FK_YAML_UNLIKELY (index >= size) {
+ throw fkyaml::out_of_range(index);
+ }
+ return seq[index];
+ }
+
+ FK_YAML_ASSERT(act_node.m_value.p_map != nullptr);
+ const mapping_type& map = *act_node.m_value.p_map;
+ bool is_found = map.find(key) != map.end();
+ if FK_YAML_UNLIKELY (!is_found) {
+ throw fkyaml::out_of_range(serialize(key).c_str());
+ }
+ return map.at(std::forward<KeyType>(key));
+ }
+
+ /// @brief Get the YAML version for this basic_node object.
+ /// @return The YAML version if already set, `yaml_version_type::VERSION_1_2` otherwise.
+ /// @sa https://fktn-k.github.io/fkYAML/api/basic_node/get_yaml_version_type/
+ yaml_version_type get_yaml_version_type() const noexcept {
+ return mp_meta->is_version_specified ? mp_meta->version : yaml_version_type::VERSION_1_2;
+ }
+
+ /// @brief Set the YAML version for this basic_node object.
+ /// @param[in] version The target YAML version.
+ /// @sa https://fktn-k.github.io/fkYAML/api/basic_node/set_yaml_version_type/
+ void set_yaml_version_type(const yaml_version_type version) noexcept {
+ mp_meta->version = version;
+ mp_meta->is_version_specified = true;
+ }
+
+ /// @brief Get the YAML version for this basic_node object.
+ /// @deprecated Use get_yaml_version_type() function. (since 0.3.12)
+ /// @return The YAML version if already set, `yaml_version_t::VER_1_2` otherwise.
+ /// @sa https://fktn-k.github.io/fkYAML/api/basic_node/get_yaml_version/
+ FK_YAML_DEPRECATED("Since 0.3.12; Use get_yaml_version_type()")
+ yaml_version_t get_yaml_version() const noexcept {
+ yaml_version_type tmp_type = get_yaml_version_type();
+ return detail::convert_from_yaml_version_type(tmp_type);
+ }
+
+ /// @brief Set the YAML version for this basic_node object.
+ /// @deprecated Use set_yaml_version_type(yaml_version_type) function. (since 0.3.12)
+ /// @param[in] version The target YAML version.
+ /// @sa https://fktn-k.github.io/fkYAML/api/basic_node/set_yaml_version/
+ FK_YAML_DEPRECATED("Since 0.3.12; Use set_yaml_version_type(const yaml_version_type)")
+ void set_yaml_version(const yaml_version_t version) noexcept {
+ set_yaml_version_type(detail::convert_to_yaml_version_type(version));
+ }
+
+ /// @brief Check whether this basic_node object has already had any anchor name.
+ /// @return true if ths basic_node has an anchor name, false otherwise.
+ /// @sa https://fktn-k.github.io/fkYAML/api/basic_node/has_anchor_name/
+ bool has_anchor_name() const noexcept {
+ return (m_attrs & detail::node_attr_mask::anchoring) && !m_prop.anchor.empty();
+ }
+
+ /// @brief Get the anchor name associated with this basic_node object.
+ /// @note Some anchor name must be set before calling this method. Call has_anchor_name() to see if this basic_node
+ /// object has any anchor name.
+ /// @return The anchor name associated with the node.
+ /// @sa https://fktn-k.github.io/fkYAML/api/basic_node/get_anchor_name/
+ const std::string& get_anchor_name() const {
+ if FK_YAML_UNLIKELY (!has_anchor_name()) {
+ throw fkyaml::exception("No anchor name has been set.");
+ }
+ return m_prop.anchor;
+ }
+
+ /// @brief Add an anchor name to this basic_node object.
+ /// @note If this basic_node object has already had any anchor name, the new anchor name will overwrite the old one.
+ /// @param[in] anchor_name An anchor name. This should not be empty.
+ /// @sa https://fktn-k.github.io/fkYAML/api/basic_node/add_anchor_name/
+ void add_anchor_name(const std::string& anchor_name) {
+ if (is_anchor()) {
+ m_attrs &= ~detail::node_attr_mask::anchoring;
+ auto itr = mp_meta->anchor_table.equal_range(m_prop.anchor).first;
+ std::advance(itr, detail::node_attr_bits::get_anchor_offset(m_attrs));
+ mp_meta.reset();
+ itr->second.swap(*this);
+ mp_meta->anchor_table.erase(itr);
+ }
+
+ auto p_meta = mp_meta;
+
+ basic_node node;
+ node.swap(*this);
+ p_meta->anchor_table.emplace(anchor_name, std::move(node));
+
+ m_attrs &= ~detail::node_attr_mask::anchoring;
+ m_attrs |= detail::node_attr_bits::anchor_bit;
+ mp_meta = p_meta;
+ const auto offset = static_cast<uint32_t>(mp_meta->anchor_table.count(anchor_name) - 1);
+ detail::node_attr_bits::set_anchor_offset(offset, m_attrs);
+ m_prop.anchor = anchor_name;
+ }
+
+ /// @brief Add an anchor name to this basic_node object.
+ /// @note If this basic_node object has already had any anchor name, the new anchor name will overwrite the old one.
+ /// @param[in] anchor_name An anchor name. This should not be empty.
+ /// @sa https://fktn-k.github.io/fkYAML/api/basic_node/add_anchor_name/
+ void add_anchor_name(std::string&& anchor_name) {
+ if (is_anchor()) {
+ m_attrs &= ~detail::node_attr_mask::anchoring;
+ auto itr = mp_meta->anchor_table.equal_range(m_prop.anchor).first;
+ std::advance(itr, detail::node_attr_bits::get_anchor_offset(m_attrs));
+ mp_meta.reset();
+ itr->second.swap(*this);
+ mp_meta->anchor_table.erase(itr);
+ }
+
+ auto p_meta = mp_meta;
+
+ basic_node node;
+ node.swap(*this);
+ p_meta->anchor_table.emplace(anchor_name, std::move(node));
+
+ m_attrs &= ~detail::node_attr_mask::anchoring;
+ m_attrs |= detail::node_attr_bits::anchor_bit;
+ mp_meta = p_meta;
+ auto offset = static_cast<uint32_t>(mp_meta->anchor_table.count(anchor_name) - 1);
+ detail::node_attr_bits::set_anchor_offset(offset, m_attrs);
+ m_prop.anchor = std::move(anchor_name);
+ }
+
+ /// @brief Check whether this basic_node object has already had any tag name.
+ /// @return true if ths basic_node has a tag name, false otherwise.
+ /// @sa https://fktn-k.github.io/fkYAML/api/basic_node/has_tag_name/
+ bool has_tag_name() const noexcept {
+ return !m_prop.tag.empty();
+ }
+
+ /// @brief Get the tag name associated with this basic_node object.
+ /// @note Some tag name must be set before calling this method. Call has_tag_name() to see if this basic_node
+ /// object has any tag name.
+ /// @return The tag name associated with the node. It may be empty.
+ /// @sa https://fktn-k.github.io/fkYAML/api/basic_node/get_tag_name/
+ const std::string& get_tag_name() const {
+ if FK_YAML_UNLIKELY (!has_tag_name()) {
+ throw fkyaml::exception("No tag name has been set.");
+ }
+ return m_prop.tag;
+ }
+
+ /// @brief Add a tag name to this basic_node object.
+ /// @note If this basic_node object has already had any tag name, the new tag name will overwrite the old one.
+ /// @param[in] tag_name A tag name to get associated with this basic_node object.
+ /// @sa https://fktn-k.github.io/fkYAML/api/basic_node/add_tag_name/
+ void add_tag_name(const std::string& tag_name) {
+ m_prop.tag = tag_name;
+ }
+
+ /// @brief Add a tag name to this basic_node object.
+ /// @note If this basic_node object has already had any tag name, the new tag name will overwrite the old one.
+ /// @param[in] tag_name A tag name to get associated with this basic_node object.
+ /// @sa https://fktn-k.github.io/fkYAML/api/basic_node/add_tag_name/
+ void add_tag_name(std::string&& tag_name) {
+ m_prop.tag = std::move(tag_name);
+ }
+
+ /// @brief Get the node value object converted into a given type.
+ /// @note This function requires T objects to be default constructible. Also, T cannot be either a reference,
+ /// pointer or C-style array type.
+ /// @tparam T A compatible value type which may be cv-qualified.
+ /// @tparam ValueType A compatible value type (T without cv-qualifiers by default).
+ /// @return A value converted from this basic_node object.
+ /// @sa https://fktn-k.github.io/fkYAML/api/basic_node/get_value/
+ template <
+ typename T, typename ValueType = detail::remove_cv_t<T>,
+ detail::enable_if_t<
+ detail::conjunction<std::is_default_constructible<ValueType>, detail::negation<std::is_pointer<T>>>::value,
+ int> = 0>
+ T get_value() const noexcept(
+ noexcept(std::declval<const basic_node&>().template get_value_impl<ValueType>(std::declval<ValueType&>()))) {
+ // emit a compile error if T is either a reference, pointer or C-style array type.
+ static_assert(
+ !std::is_reference<T>::value,
+ "get_value() cannot be called with reference types. "
+ "You might want to call one of as_seq(), as_map(), as_bool(), as_int(), as_float() or as_str().");
+ static_assert(
+ !std::is_array<T>::value,
+ "get_value() cannot be called with C-style array types. You might want to call get_value_inplace().");
+
+ auto ret = ValueType();
+ resolve_reference().get_value_impl(ret);
+ return ret;
+ }
+
+ /// @brief Get the node value object converted into a given type. The conversion result is filled into `value_ref`.
+ /// @tparam T A compatible value type.
+ /// @param value_ref A storage into which the conversion result is filled.
+ /// @sa https://fktn-k.github.io/fkYAML/api/basic_node/get_value_inplace/
+ template <typename T>
+ void get_value_inplace(T& value_ref) const
+ noexcept(noexcept(std::declval<const basic_node&>().template get_value_impl<T>(std::declval<T&>()))) {
+ resolve_reference().get_value_impl(value_ref);
+ }
+
+ /// @brief Get the node value object converted to a given type. If the conversion fails, this function returns a
+ /// given default value instead.
+ /// @note This function requires T to be default constructible. Also, T cannot be either a reference, pointer or
+ /// C-style array type.
+ /// @tparam T A compatible value type which may be cv-qualified.
+ /// @tparam U A default value type from which T must be constructible.
+ /// @param default_value The default value returned if conversion fails.
+ /// @return A value converted from this basic_node object if conversion succeeded, the given default value
+ /// otherwise.
+ /// @sa https://fktn-k.github.io/fkYAML/api/basic_node/get_value_or/
+ template <
+ typename T, typename U,
+ detail::enable_if_t<
+ detail::conjunction<
+ std::is_constructible<T, U>, std::is_default_constructible<T>,
+ detail::negation<std::is_pointer<T>>>::value,
+ int> = 0>
+ T get_value_or(U&& default_value) const noexcept {
+ static_assert(
+ !std::is_reference<T>::value,
+ "get_value_or() cannot be called with reference types. "
+ "You might want to call one of as_seq(), as_map(), as_bool(), as_int(), as_float() or as_str().");
+ static_assert(
+ !std::is_array<T>::value,
+ "get_value_or() cannot be called with C-style array types. You might want to call get_value_inplace().");
+
+ // TODO:
+ // Ideally, there should be no exception thrown in this kind of function. However, achieving that would require
+ // a lot of refactoring and/or some API changes, especially `from_node` interface definition. So, try-catch is
+ // used instead for now.
+ try {
+ return get_value<T>();
+ }
+ catch (const std::exception& /*unused*/) {
+ // Any exception derived from std::exception is interpreted as a conversion failure in some way
+ // since user-defined from_node function may throw a different object from a fkyaml::type_error.
+ // and std::exception is usually the base class of user-defined exception types.
+ return std::forward<U>(default_value);
+ }
+ }
+
+ /// @brief Explicit reference access to the internally stored YAML node value.
+ /// @tparam ReferenceType Reference type to the target YAML node value.
+ /// @return Reference to the internally stored YAML node value.
+ /// @sa https://fktn-k.github.io/fkYAML/api/basic_node/get_value_ref/
+ template <typename ReferenceType, detail::enable_if_t<std::is_reference<ReferenceType>::value, int> = 0>
+ FK_YAML_DEPRECATED("Since 0.4.3; Use one of as_seq(), as_map(), as_bool(), as_int(), as_float() or as_str()")
+ ReferenceType get_value_ref() {
+ return get_value_ref_impl(static_cast<detail::add_pointer_t<ReferenceType>>(nullptr));
+ }
+
+ /// @brief Explicit reference access to the internally stored YAML node value.
+ /// @tparam ReferenceType Constant reference type to the target YAML node value.
+ /// @return Constant reference to the internally stored YAML node value.
+ /// @sa https://fktn-k.github.io/fkYAML/api/basic_node/get_value_ref/
+ template <
+ typename ReferenceType,
+ detail::enable_if_t<
+ detail::conjunction<
+ std::is_reference<ReferenceType>, std::is_const<detail::remove_reference_t<ReferenceType>>>::value,
+ int> = 0>
+ FK_YAML_DEPRECATED("Since 0.4.3; Use one of as_seq(), as_map(), as_bool(), as_int(), as_float() or as_str()")
+ ReferenceType get_value_ref() const {
+ return get_value_ref_impl(static_cast<detail::add_pointer_t<ReferenceType>>(nullptr));
+ }
+
+ /// @brief Returns reference to the sequence node value.
+ /// @throw fkyaml::type_error The node value is not a sequence.
+ /// @return Reference to the sequence node value.
+ /// @sa https://fktn-k.github.io/fkYAML/api/basic_node/as_seq/
+ sequence_type& as_seq() {
+ basic_node& act_node = resolve_reference(); // NOLINT(misc-const-correctness)
+ if FK_YAML_LIKELY (act_node.is_sequence_impl()) {
+ return *act_node.m_value.p_seq;
+ }
+ throw fkyaml::type_error("The node value is not a sequence.", get_type());
+ }
+
+ /// @brief Returns constant reference to the sequence node value.
+ /// @throw fkyaml::type_error The node value is not a sequence.
+ /// @return Constant reference to the sequence node value.
+ /// @sa https://fktn-k.github.io/fkYAML/api/basic_node/as_seq/
+ const sequence_type& as_seq() const {
+ const basic_node& act_node = resolve_reference();
+ if FK_YAML_LIKELY (act_node.is_sequence_impl()) {
+ return *act_node.m_value.p_seq;
+ }
+ throw fkyaml::type_error("The node value is not a sequence.", get_type());
+ }
+
+ /// @brief Returns reference to the mapping node value.
+ /// @throw fkyaml::type_error The node value is not a mapping.
+ /// @return Reference to the mapping node value.
+ /// @sa https://fktn-k.github.io/fkYAML/api/basic_node/as_map/
+ mapping_type& as_map() {
+ basic_node& act_node = resolve_reference(); // NOLINT(misc-const-correctness)
+ if FK_YAML_LIKELY (act_node.is_mapping_impl()) {
+ return *act_node.m_value.p_map;
+ }
+ throw fkyaml::type_error("The node value is not a mapping.", get_type());
+ }
+
+ /// @brief Returns constant reference to the mapping node value.
+ /// @throw fkyaml::type_error The node value is not a mapping.
+ /// @return Constant reference to the mapping node value.
+ /// @sa https://fktn-k.github.io/fkYAML/api/basic_node/as_map/
+ const mapping_type& as_map() const {
+ const basic_node& act_node = resolve_reference();
+ if FK_YAML_LIKELY (act_node.is_mapping_impl()) {
+ return *act_node.m_value.p_map;
+ }
+ throw fkyaml::type_error("The node value is not a mapping.", get_type());
+ }
+
+ /// @brief Returns reference to the boolean node value.
+ /// @throw fkyaml::type_error The node value is not a boolean.
+ /// @return Reference to the boolean node value.
+ /// @sa https://fktn-k.github.io/fkYAML/api/basic_node/as_bool/
+ boolean_type& as_bool() {
+ basic_node& act_node = resolve_reference();
+ if FK_YAML_LIKELY (act_node.is_boolean_impl()) {
+ return act_node.m_value.boolean;
+ }
+ throw fkyaml::type_error("The node value is not a boolean.", get_type());
+ }
+
+ /// @brief Returns reference to the boolean node value.
+ /// @throw fkyaml::type_error The node value is not a boolean.
+ /// @return Constant reference to the boolean node value.
+ /// @sa https://fktn-k.github.io/fkYAML/api/basic_node/as_bool/
+ const boolean_type& as_bool() const {
+ const basic_node& act_node = resolve_reference();
+ if FK_YAML_LIKELY (act_node.is_boolean_impl()) {
+ return act_node.m_value.boolean;
+ }
+ throw fkyaml::type_error("The node value is not a boolean.", get_type());
+ }
+
+ /// @brief Returns reference to the integer node value.
+ /// @throw fkyaml::type_error The node value is not an integer.
+ /// @return Reference to the integer node value.
+ /// @sa https://fktn-k.github.io/fkYAML/api/basic_node/as_int/
+ integer_type& as_int() {
+ basic_node& act_node = resolve_reference();
+ if FK_YAML_LIKELY (act_node.is_integer_impl()) {
+ return act_node.m_value.integer;
+ }
+ throw fkyaml::type_error("The node value is not an integer.", get_type());
+ }
+
+ /// @brief Returns reference to the integer node value.
+ /// @throw fkyaml::type_error The node value is not an integer.
+ /// @return Constant reference to the integer node value.
+ /// @sa https://fktn-k.github.io/fkYAML/api/basic_node/as_int/
+ const integer_type& as_int() const {
+ const basic_node& act_node = resolve_reference();
+ if FK_YAML_LIKELY (act_node.is_integer_impl()) {
+ return act_node.m_value.integer;
+ }
+ throw fkyaml::type_error("The node value is not an integer.", get_type());
+ }
+
+ /// @brief Returns reference to the float node value.
+ /// @throw fkyaml::type_error The node value is not a float.
+ /// @return Reference to the float node value.
+ /// @sa https://fktn-k.github.io/fkYAML/api/basic_node/as_float/
+ float_number_type& as_float() {
+ basic_node& act_node = resolve_reference();
+ if FK_YAML_LIKELY (act_node.is_float_number_impl()) {
+ return act_node.m_value.float_val;
+ }
+ throw fkyaml::type_error("The node value is not a float.", get_type());
+ }
+
+ /// @brief Returns reference to the float node value.
+ /// @throw fkyaml::type_error The node value is not a float.
+ /// @return Constant reference to the float node value.
+ /// @sa https://fktn-k.github.io/fkYAML/api/basic_node/as_float/
+ const float_number_type& as_float() const {
+ const basic_node& act_node = resolve_reference();
+ if FK_YAML_LIKELY (act_node.is_float_number_impl()) {
+ return act_node.m_value.float_val;
+ }
+ throw fkyaml::type_error("The node value is not a float.", get_type());
+ }
+
+ /// @brief Returns reference to the string node value.
+ /// @throw fkyaml::type_error The node value is not a string.
+ /// @return Reference to the string node value.
+ /// @sa https://fktn-k.github.io/fkYAML/api/basic_node/as_str/
+ string_type& as_str() {
+ basic_node& act_node = resolve_reference();
+ if FK_YAML_LIKELY (act_node.is_string_impl()) {
+ return *act_node.m_value.p_str;
+ }
+ throw fkyaml::type_error("The node value is not a string.", get_type());
+ }
+
+ /// @brief Returns reference to the string node value.
+ /// @throw fkyaml::type_error The node value is not a string.
+ /// @return Constant reference to the string node value.
+ /// @sa https://fktn-k.github.io/fkYAML/api/basic_node/as_str/
+ const string_type& as_str() const {
+ const basic_node& act_node = resolve_reference();
+ if FK_YAML_LIKELY (act_node.is_string_impl()) {
+ return *act_node.m_value.p_str;
+ }
+ throw fkyaml::type_error("The node value is not a string.", get_type());
+ }
+
+ /// @brief Swaps the internally stored data with the specified basic_node object.
+ /// @param[in] rhs A basic_node object to be swapped with.
+ /// @sa https://fktn-k.github.io/fkYAML/api/basic_node/swap/
+ void swap(basic_node& rhs) noexcept {
+ using std::swap;
+ swap(m_attrs, rhs.m_attrs);
+ swap(mp_meta, rhs.mp_meta);
+
+ node_value tmp {};
+ std::memcpy(&tmp, &m_value, sizeof(node_value));
+ std::memcpy(&m_value, &rhs.m_value, sizeof(node_value));
+ std::memcpy(&rhs.m_value, &tmp, sizeof(node_value));
+
+ swap(m_prop.tag, rhs.m_prop.tag);
+ swap(m_prop.anchor, rhs.m_prop.anchor);
+ }
+
+ /// @brief Returns an iterator to the first element of a container node (sequence or mapping).
+ /// @throw `type_error` if this basic_node is neither a sequence nor mapping node.
+ /// @return An iterator to the first element of a container node.
+ /// @sa https://fktn-k.github.io/fkYAML/api/basic_node/begin/
+ iterator begin() {
+ basic_node& act_node = resolve_reference();
+ switch (act_node.m_attrs & detail::node_attr_mask::value) {
+ case detail::node_attr_bits::seq_bit:
+ FK_YAML_ASSERT(act_node.m_value.p_seq != nullptr);
+ return {act_node.m_value.p_seq->begin()};
+ case detail::node_attr_bits::map_bit:
+ FK_YAML_ASSERT(act_node.m_value.p_map != nullptr);
+ return {act_node.m_value.p_map->begin()};
+ default:
+ throw fkyaml::type_error("The target node is neither of sequence nor mapping types.", get_type());
+ }
+ }
+
+ /// @brief Returns a const iterator to the first element of a container node (sequence or mapping).
+ /// @throw `type_error` if this basic_node is neither a sequence nor mapping node.
+ /// @return A const iterator to the first element of a container node.
+ /// @sa https://fktn-k.github.io/fkYAML/api/basic_node/begin/
+ const_iterator begin() const {
+ const basic_node& act_node = resolve_reference();
+ switch (act_node.m_attrs & detail::node_attr_mask::value) {
+ case detail::node_attr_bits::seq_bit:
+ FK_YAML_ASSERT(act_node.m_value.p_seq != nullptr);
+ return {act_node.m_value.p_seq->begin()};
+ case detail::node_attr_bits::map_bit:
+ FK_YAML_ASSERT(act_node.m_value.p_map != nullptr);
+ return {act_node.m_value.p_map->begin()};
+ default:
+ throw fkyaml::type_error("The target node is neither of sequence nor mapping types.", get_type());
+ }
+ }
+
+ /// @brief Returns a const iterator to the first element of a container node (sequence or mapping).
+ /// @throw `type_error` if this basic_node is neither a sequence nor mapping node.
+ /// @return A const iterator to the first element of a container node.
+ /// @sa https://fktn-k.github.io/fkYAML/api/basic_node/begin/
+ const_iterator cbegin() const {
+ return begin();
+ }
+
+ /// @brief Returns an iterator to the past-the-last element of a container node (sequence or mapping).
+ /// @throw `type_error` if the basic_node value is not of container types.
+ /// @return An iterator to the past-the-last element of a container node.
+ /// @sa https://fktn-k.github.io/fkYAML/api/basic_node/end/
+ iterator end() {
+ basic_node& act_node = resolve_reference();
+ switch (act_node.m_attrs & detail::node_attr_mask::value) {
+ case detail::node_attr_bits::seq_bit:
+ FK_YAML_ASSERT(act_node.m_value.p_seq != nullptr);
+ return {act_node.m_value.p_seq->end()};
+ case detail::node_attr_bits::map_bit:
+ FK_YAML_ASSERT(act_node.m_value.p_map != nullptr);
+ return {act_node.m_value.p_map->end()};
+ default:
+ throw fkyaml::type_error("The target node is neither of sequence nor mapping types.", get_type());
+ }
+ }
+
+ /// @brief Returns a const iterator to the past-the-last element of a container node (sequence or mapping).
+ /// @throw `type_error` if this basic_node is neither a sequence nor mapping node.
+ /// @return A const iterator to the past-the-last element of a container node.
+ /// @sa https://fktn-k.github.io/fkYAML/api/basic_node/end/
+ const_iterator end() const {
+ const basic_node& act_node = resolve_reference();
+ switch (act_node.m_attrs & detail::node_attr_mask::value) {
+ case detail::node_attr_bits::seq_bit:
+ FK_YAML_ASSERT(act_node.m_value.p_seq != nullptr);
+ return {act_node.m_value.p_seq->end()};
+ case detail::node_attr_bits::map_bit:
+ FK_YAML_ASSERT(act_node.m_value.p_map != nullptr);
+ return {act_node.m_value.p_map->end()};
+ default:
+ throw fkyaml::type_error("The target node is neither of sequence nor mapping types.", get_type());
+ }
+ }
+
+ /// @brief Returns a const iterator to the past-the-last element of a container node (sequence or mapping).
+ /// @throw `type_error` if this basic_node is neither a sequence nor mapping node.
+ /// @return A const iterator to the past-the-last element of a container node.
+ /// @sa https://fktn-k.github.io/fkYAML/api/basic_node/end/
+ const_iterator cend() const {
+ return end();
+ }
+
+ /// @brief Returns an iterator to the reverse-beginning (i.e., last) element of a container node (sequence or
+ /// mapping).
+ /// @throw `type_error` if this basic_node is neither a sequence nor mapping node.
+ /// @return An iterator to the reverse-beginning element of a container node.
+ /// @sa https://fktn-k.github.io/fkYAML/api/basic_node/rbegin/
+ reverse_iterator rbegin() {
+ return {end()};
+ }
+
+ /// @brief Returns a const iterator to the reverse-beginning (i.e., last) element of a container node (sequence or
+ /// mapping).
+ /// @throw `type_error` if this basic_node is neither a sequence nor mapping node.
+ /// @return A const iterator to the reverse-beginning element of a container node.
+ /// @sa https://fktn-k.github.io/fkYAML/api/basic_node/rbegin/
+ const_reverse_iterator rbegin() const {
+ return {end()};
+ }
+
+ /// @brief Returns a const iterator to the reverse-beginning (i.e., last) element of a container node (sequence or
+ /// mapping).
+ /// @throw `type_error` if this basic_node is neither a sequence nor mapping node.
+ /// @return A const iterator to the reverse-beginning element of a container node.
+ /// @sa https://fktn-k.github.io/fkYAML/api/basic_node/rbegin/
+ const_reverse_iterator crbegin() const {
+ return rbegin();
+ }
+
+ /// @brief Returns an iterator to the reverse-end (i.e., one before the first) element of a container node (sequence
+ /// or mapping).
+ /// @throw `type_error` if this basic_node is neither a sequence nor mapping node.
+ /// @return An iterator to the reverse-end element.
+ /// @sa https://fktn-k.github.io/fkYAML/api/basic_node/rend/
+ reverse_iterator rend() {
+ return {begin()};
+ }
+
+ /// @brief Returns a const iterator to the reverse-end (i.e., one before the first) element of a container node
+ /// (sequence or mapping).
+ /// @throw `type_error` if this basic_node is neither a sequence nor mapping node.
+ /// @return A const iterator to the reverse-end element.
+ /// @sa https://fktn-k.github.io/fkYAML/api/basic_node/rend/
+ const_reverse_iterator rend() const {
+ return {begin()};
+ }
+
+ /// @brief Returns a const iterator to the reverse-end (i.e., one before the first) element of a container node
+ /// (sequence or mapping).
+ /// @throw `type_error` if this basic_node is neither a sequence nor mapping node.
+ /// @return A const iterator to the reverse-end element.
+ /// @sa https://fktn-k.github.io/fkYAML/api/basic_node/rend/
+ const_reverse_iterator crend() const {
+ return rend();
+ }
+
+ /// @brief Returns a range of mapping entries.
+ /// @throw `type_error` if this basic_node is not a mapping.
+ /// @return A range of mapping entries.
+ /// @sa https://fktn-k.github.io/fkYAML/api/basic_node/map_items/
+ map_range map_items() {
+ if FK_YAML_UNLIKELY (!is_mapping()) {
+ throw type_error("map_items() cannot be called on a non-mapping node.", get_type());
+ }
+ return {*this};
+ }
+
+ /// @brief Returns a const range of mapping entries.
+ /// @throw `type_error` if this basic_node is not a mapping.
+ /// @return A const range of mapping entries.
+ /// @sa https://fktn-k.github.io/fkYAML/api/basic_node/map_items/
+ const_map_range map_items() const {
+ if FK_YAML_UNLIKELY (!is_mapping()) {
+ throw type_error("map_items() cannot be called on a non-mapping node.", get_type());
+ }
+ return {*this};
+ }
+
+private:
+ /// @brief Resolves anchor/alias reference and returns reference to an actual value node.
+ /// @return Reference to an actual value node.
+ basic_node& resolve_reference() {
+ if FK_YAML_UNLIKELY (has_anchor_name()) {
+ auto itr = mp_meta->anchor_table.equal_range(m_prop.anchor).first;
+ std::advance(itr, detail::node_attr_bits::get_anchor_offset(m_attrs));
+ return itr->second;
+ }
+ return *this;
+ }
+
+ /// @brief Resolves anchor/alias reference and returns const reference to an actual value node.
+ /// @return Const reference to an actual value node.
+ const basic_node& resolve_reference() const {
+ if FK_YAML_UNLIKELY (has_anchor_name()) {
+ auto itr = mp_meta->anchor_table.equal_range(m_prop.anchor).first;
+ std::advance(itr, detail::node_attr_bits::get_anchor_offset(m_attrs));
+ return itr->second;
+ }
+ return *this;
+ }
+
+ bool is_sequence_impl() const noexcept {
+ return m_attrs & detail::node_attr_bits::seq_bit;
+ }
+
+ bool is_mapping_impl() const noexcept {
+ return m_attrs & detail::node_attr_bits::map_bit;
+ }
+
+ bool is_null_impl() const noexcept {
+ return m_attrs & detail::node_attr_bits::null_bit;
+ }
+
+ bool is_boolean_impl() const noexcept {
+ return m_attrs & detail::node_attr_bits::bool_bit;
+ }
+
+ bool is_integer_impl() const noexcept {
+ return m_attrs & detail::node_attr_bits::int_bit;
+ }
+
+ bool is_float_number_impl() const noexcept {
+ return m_attrs & detail::node_attr_bits::float_bit;
+ }
+
+ bool is_string_impl() const noexcept {
+ return m_attrs & detail::node_attr_bits::string_bit;
+ }
+
+ bool is_scalar_impl() const noexcept {
+ return m_attrs & detail::node_attr_bits::scalar_bits;
+ }
+
+ template <
+ typename ValueType, detail::enable_if_t<detail::negation<detail::is_basic_node<ValueType>>::value, int> = 0>
+ void get_value_impl(ValueType& v) const
+ noexcept(noexcept(ConverterType<ValueType, void>::from_node(std::declval<const basic_node&>(), v))) {
+ ConverterType<ValueType, void>::from_node(*this, v);
+ }
+
+ template <typename ValueType, detail::enable_if_t<detail::is_basic_node<ValueType>::value, int> = 0>
+ void get_value_impl(ValueType& v) const {
+ v = *this;
+ }
+
+ /// @brief Returns reference to the sequence node value.
+ /// @throw fkyaml::exception The node value is not a sequence.
+ /// @return Reference to the sequence node value.
+ sequence_type& get_value_ref_impl(sequence_type* /*unused*/) {
+ return as_seq();
+ }
+
+ /// @brief Returns constant reference to the sequence node value.
+ /// @throw fkyaml::exception The node value is not a sequence.
+ /// @return Constant reference to the sequence node value.
+ const sequence_type& get_value_ref_impl(const sequence_type* /*unused*/) const {
+ return as_seq();
+ }
+
+ /// @brief Returns reference to the mapping node value.
+ /// @throw fkyaml::exception The node value is not a mapping.
+ /// @return Reference to the mapping node value.
+ mapping_type& get_value_ref_impl(mapping_type* /*unused*/) {
+ return as_map();
+ }
+
+ /// @brief Returns constant reference to the mapping node value.
+ /// @throw fkyaml::exception The node value is not a mapping.
+ /// @return Constant reference to the mapping node value.
+ const mapping_type& get_value_ref_impl(const mapping_type* /*unused*/) const {
+ return as_map();
+ }
+
+ /// @brief Returns reference to the boolean node value.
+ /// @throw fkyaml::exception The node value is not a boolean.
+ /// @return Reference to the boolean node value.
+ boolean_type& get_value_ref_impl(boolean_type* /*unused*/) {
+ return as_bool();
+ }
+
+ /// @brief Returns reference to the boolean node value.
+ /// @throw fkyaml::exception The node value is not a boolean.
+ /// @return Constant reference to the boolean node value.
+ const boolean_type& get_value_ref_impl(const boolean_type* /*unused*/) const {
+ return as_bool();
+ }
+
+ /// @brief Returns reference to the integer node value.
+ /// @throw fkyaml::exception The node value is not an integer.
+ /// @return Reference to the integer node value.
+ integer_type& get_value_ref_impl(integer_type* /*unused*/) {
+ return as_int();
+ }
+
+ /// @brief Returns reference to the integer node value.
+ /// @throw fkyaml::exception The node value is not an integer.
+ /// @return Constant reference to the integer node value.
+ const integer_type& get_value_ref_impl(const integer_type* /*unused*/) const {
+ return as_int();
+ }
+
+ /// @brief Returns reference to the floating point number node value.
+ /// @throw fkyaml::exception The node value is not a floating point number.
+ /// @return Reference to the floating point number node value.
+ float_number_type& get_value_ref_impl(float_number_type* /*unused*/) {
+ return as_float();
+ }
+
+ /// @brief Returns reference to the floating point number node value.
+ /// @throw fkyaml::exception The node value is not a floating point number.
+ /// @return Constant reference to the floating point number node value.
+ const float_number_type& get_value_ref_impl(const float_number_type* /*unused*/) const {
+ return as_float();
+ }
+
+ /// @brief Returns reference to the string node value.
+ /// @throw fkyaml::exception The node value is not a string.
+ /// @return Reference to the string node value.
+ string_type& get_value_ref_impl(string_type* /*unused*/) {
+ return as_str();
+ }
+
+ /// @brief Returns reference to the string node value.
+ /// @throw fkyaml::exception The node value is not a string.
+ /// @return Constant reference to the string node value.
+ const string_type& get_value_ref_impl(const string_type* /*unused*/) const {
+ return as_str();
+ }
+
+ /// The current node attributes.
+ detail::node_attr_t m_attrs {detail::node_attr_bits::default_bits};
+ /// The shared set of YAML directives applied to this node.
+ mutable std::shared_ptr<detail::document_metainfo<basic_node>> mp_meta {
+ // NOLINTNEXTLINE(bugprone-unhandled-exception-at-new)
+ std::shared_ptr<detail::document_metainfo<basic_node>>(new detail::document_metainfo<basic_node>())};
+ /// The current node value.
+ node_value m_value {};
+ /// The property set of this node.
+ detail::node_property m_prop {};
+};
+
+/// @brief Swap function for basic_node objects.
+/// @param[in] lhs A left-side-hand basic_node object to be swapped with.
+/// @param[in] rhs A right-side-hand basic_node object to be swapped with.
+/// @sa https://fktn-k.github.io/fkYAML/api/swap/
+template <
+ template <typename, typename...> class SequenceType, template <typename, typename, typename...> class MappingType,
+ typename BooleanType, typename IntegerType, typename FloatNumberType, typename StringType,
+ template <typename, typename = void> class ConverterType>
+inline void swap(
+ basic_node<SequenceType, MappingType, BooleanType, IntegerType, FloatNumberType, StringType, ConverterType>& lhs,
+ basic_node<SequenceType, MappingType, BooleanType, IntegerType, FloatNumberType, StringType, ConverterType>&
+ rhs) noexcept(noexcept(lhs.swap(rhs))) {
+ lhs.swap(rhs);
+}
+
+/// @brief Insertion operator for basic_node template class. A wrapper for the serialization feature.
+/// @param[in] os An output stream object.
+/// @param[in] n A basic_node object.
+/// @return Reference to the output stream object `os`.
+/// @sa https://fktn-k.github.io/fkYAML/api/basic_node/insertion_operator/
+template <
+ template <typename, typename...> class SequenceType, template <typename, typename, typename...> class MappingType,
+ typename BooleanType, typename IntegerType, typename FloatNumberType, typename StringType,
+ template <typename, typename = void> class ConverterType>
+inline std::ostream& operator<<(
+ std::ostream& os,
+ const basic_node<SequenceType, MappingType, BooleanType, IntegerType, FloatNumberType, StringType, ConverterType>&
+ n) {
+ os << basic_node<SequenceType, MappingType, BooleanType, IntegerType, FloatNumberType, StringType, ConverterType>::
+ serialize(n);
+ return os;
+}
+
+/// @brief Extraction operator for basic_node template class. A wrapper for the deserialization feature with input
+/// streams.
+/// @param[in] is An input stream object.
+/// @param[in] n A basic_node object.
+/// @return Reference to the input stream object `is`.
+/// @sa https://fktn-k.github.io/fkYAML/api/basic_node/extraction_operator/
+template <
+ template <typename, typename...> class SequenceType, template <typename, typename, typename...> class MappingType,
+ typename BooleanType, typename IntegerType, typename FloatNumberType, typename StringType,
+ template <typename, typename = void> class ConverterType>
+inline std::istream& operator>>(
+ std::istream& is,
+ basic_node<SequenceType, MappingType, BooleanType, IntegerType, FloatNumberType, StringType, ConverterType>& n) {
+ n = basic_node<SequenceType, MappingType, BooleanType, IntegerType, FloatNumberType, StringType, ConverterType>::
+ deserialize(is);
+ return is;
+}
+
+/// @brief namespace for user-defined literals for the fkYAML library.
+inline namespace literals {
+/// @brief namespace for user-defined literals for YAML node objects.
+inline namespace yaml_literals {
+
+// Whitespace before the literal operator identifier is deprecated in C++23 or better but required in C++11.
+// Ignore the warning as a workaround. https://github.com/fktn-k/fkYAML/pull/417
+#if defined(__clang__)
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Wdeprecated"
+#endif
+
+#if defined(__GNUC__) && (__GNUC__ > 6)
+#define FK_YAML_QUOTE_OPERATOR operator""_yaml
+#else
+#define FK_YAML_QUOTE_OPERATOR operator"" _yaml
+#endif
+
+/// @brief The user-defined string literal which deserializes a `char` array into a `node` object.
+/// @param s An input `char` array.
+/// @param n The size of `s`.
+/// @return The resulting `node` object deserialized from `s`.
+/// @sa https://fktn-k.github.io/fkYAML/api/operator_literal_yaml/
+inline fkyaml::node FK_YAML_QUOTE_OPERATOR(const char* s, std::size_t n) {
+ return fkyaml::node::deserialize(s, s + n);
+}
+
+/// @brief The user-defined string literal which deserializes a `char16_t` array into a `node` object.
+/// @param s An input `char16_t` array.
+/// @param n The size of `s`.
+/// @return The resulting `node` object deserialized from `s`.
+/// @sa https://fktn-k.github.io/fkYAML/api/operator_literal_yaml/
+inline fkyaml::node FK_YAML_QUOTE_OPERATOR(const char16_t* s, std::size_t n) {
+ return fkyaml::node::deserialize(s, s + n);
+}
+
+/// @brief The user-defined string literal which deserializes a `char32_t` array into a `node` object.
+/// @param s An input `char32_t` array.
+/// @param n The size of `s`.
+/// @return The resulting `node` object deserialized from `s`.
+/// @sa https://fktn-k.github.io/fkYAML/api/operator_literal_yaml/
+inline fkyaml::node FK_YAML_QUOTE_OPERATOR(const char32_t* s, std::size_t n) {
+ return fkyaml::node::deserialize(s, s + n);
+}
+
+#if FK_YAML_HAS_CHAR8_T
+/// @brief The user-defined string literal which deserializes a `char8_t` array into a `node` object.
+/// @param s An input `char8_t` array.
+/// @param n The size of `s`.
+/// @return The resulting `node` object deserialized from `s`.
+inline fkyaml::node FK_YAML_QUOTE_OPERATOR(const char8_t* s, std::size_t n) {
+ return fkyaml::node::deserialize((const char8_t*)s, (const char8_t*)s + n);
+}
+
+#if defined(__clang__)
+#pragma clang diagnostic pop
+#endif
+
+#endif
+
+} // namespace yaml_literals
+} // namespace literals
+
+FK_YAML_NAMESPACE_END
+
+namespace std {
+
+template <
+ template <typename, typename...> class SequenceType, template <typename, typename, typename...> class MappingType,
+ typename BooleanType, typename IntegerType, typename FloatNumberType, typename StringType,
+ template <typename, typename = void> class ConverterType>
+// NOLINTNEXTLINE(cert-dcl58-cpp)
+struct hash<fkyaml::basic_node<
+ SequenceType, MappingType, BooleanType, IntegerType, FloatNumberType, StringType, ConverterType>> {
+ using node_t = fkyaml::basic_node<
+ SequenceType, MappingType, BooleanType, IntegerType, FloatNumberType, StringType, ConverterType>;
+
+ std::size_t operator()(const node_t& n) const {
+ using boolean_type = typename node_t::boolean_type;
+ using integer_type = typename node_t::integer_type;
+ using float_number_type = typename node_t::float_number_type;
+ using string_type = typename node_t::string_type;
+
+ const auto type = n.get_type();
+
+ std::size_t seed = 0;
+ hash_combine(seed, std::hash<uint8_t>()(static_cast<uint8_t>(type)));
+
+ switch (type) {
+ case fkyaml::node_type::SEQUENCE:
+ hash_combine(seed, n.size());
+ for (const auto& elem : n) {
+ hash_combine(seed, operator()(elem));
+ }
+ return seed;
+
+ case fkyaml::node_type::MAPPING:
+ hash_combine(seed, n.size());
+ for (auto itr = n.begin(), end_itr = n.end(); itr != end_itr; ++itr) {
+ hash_combine(seed, operator()(itr.key()));
+ hash_combine(seed, operator()(itr.value()));
+ }
+ return seed;
+
+ case fkyaml::node_type::NULL_OBJECT:
+ hash_combine(seed, 0);
+ return seed;
+ case fkyaml::node_type::BOOLEAN:
+ hash_combine(seed, std::hash<boolean_type>()(n.template get_value<boolean_type>()));
+ return seed;
+ case fkyaml::node_type::INTEGER:
+ hash_combine(seed, std::hash<integer_type>()(n.template get_value<integer_type>()));
+ return seed;
+ case fkyaml::node_type::FLOAT:
+ hash_combine(seed, std::hash<float_number_type>()(n.template get_value<float_number_type>()));
+ return seed;
+ case fkyaml::node_type::STRING:
+ hash_combine(seed, std::hash<string_type>()(n.template get_value<string_type>()));
+ return seed;
+ default: // LCOV_EXCL_LINE
+ fkyaml::detail::unreachable(); // LCOV_EXCL_LINE
+ }
+ }
+
+private:
+ // taken from boost::hash_combine
+ FK_YAML_NO_SANITIZE("unsigned-shift-base", "unsigned-integer-overflow")
+ static void hash_combine(std::size_t& seed, std::size_t v) {
+ seed ^= v + 0x9e3779b9 + (seed << 6u) + (seed >> 2u);
+ }
+};
+
+} // namespace std
+
+#endif /* FK_YAML_NODE_HPP */
diff --git a/deps/recastnavigation/Detour/CMakeLists.txt b/deps/recastnavigation/Detour/CMakeLists.txt
index e658bef152..e1294b0e01 100644
--- a/deps/recastnavigation/Detour/CMakeLists.txt
+++ b/deps/recastnavigation/Detour/CMakeLists.txt
@@ -1,5 +1,5 @@
# Copyright (C) 2008-2016 TrinityCore <http://www.trinitycore.org/>
-# Copyright (C) 2016+ AzerothCore <www.azerothcore.org>, released under GNU AGPL v3 license: https://github.com/azerothcore/azerothcore-wotlk/blob/master/LICENSE
+# Copyright (C) 2016+ AzerothCore <www.azerothcore.org>
#
# This file is free software; as a special exception the author gives
# unlimited permission to copy and/or distribute it, with or without
diff --git a/deps/recastnavigation/Recast/CMakeLists.txt b/deps/recastnavigation/Recast/CMakeLists.txt
index ab1641bad8..c54d570c3a 100644
--- a/deps/recastnavigation/Recast/CMakeLists.txt
+++ b/deps/recastnavigation/Recast/CMakeLists.txt
@@ -1,5 +1,5 @@
# Copyright (C) 2008-2016 TrinityCore <http://www.trinitycore.org/>
-# Copyright (C) 2016+ AzerothCore <www.azerothcore.org>, released under GNU AGPL v3 license: https://github.com/azerothcore/azerothcore-wotlk/blob/master/LICENSE
+# Copyright (C) 2016+ AzerothCore <www.azerothcore.org>
#
# This file is free software; as a special exception the author gives
# unlimited permission to copy and/or distribute it, with or without
diff --git a/doc/ConfigPolicy.md b/doc/ConfigPolicy.md
new file mode 100644
index 0000000000..daa20b2fb7
--- /dev/null
+++ b/doc/ConfigPolicy.md
@@ -0,0 +1,101 @@
+# Configuration Severity Policy
+
+The configuration loader can decide how strictly it should react when it
+encounters missing files, undefined options or invalid values. This document
+describes the available knobs and provides ready-to-use presets.
+
+## Severity Levels
+
+Each policy entry maps a **key** to one of the following severities:
+
+| Severity | Description |
+|----------|-----------------------------------------------------------------------------|
+| `skip` | Ignore the problem and continue silently. |
+| `warn` | Log a warning and continue. |
+| `error` | Log an error and continue (useful to surface issues without aborting). |
+| `fatal` | Log a fatal message and abort the process immediately. |
+
+## Policy Keys
+
+The following keys can be customised:
+
+| Key | Applies to |
+|--------------------|----------------------------------------------------------------------|
+| `default` | Fallback severity for any key that is not explicitly overridden. |
+| `missing_file` | Missing or empty configuration files (worldserver.conf, modules, …). |
+| `missing_option` | Options looked up in code but not present in any config file. |
+| `critical_option` | Required options (`RealmID`, `*DatabaseInfo`, …). |
+| `unknown_option` | Options found in optional configs that the core does not recognise. |
+| `value_error` | Options that cannot be converted to the expected type. |
+
+> Critical options remain fatal by default to prevent the core from booting with
+> incomplete database details; you can relax them if required.
+
+## Configuration Channels
+
+### `config.sh`
+
+`conf/dist/config.sh` exposes the `AC_CONFIG_POLICY` variable alongside a few
+presets:
+
+```bash
+# Mirrors the default behaviour (errors, with fatal criticals)
+export AC_CONFIG_POLICY="$AC_CONFIG_POLICY_PRESET_DEFAULT"
+
+# Skip anything non-critical so the core can bootstrap from defaults + env vars
+export AC_CONFIG_POLICY="$AC_CONFIG_POLICY_PRESET_ZERO_CONF"
+
+# Treat everything strictly (useful for CI)
+export AC_CONFIG_POLICY="$AC_CONFIG_POLICY_PRESET_STRICT"
+```
+
+The presets are defined as:
+
+```bash
+AC_CONFIG_POLICY_PRESET_DEFAULT='missing_file=error,missing_option=warn,critical_option=fatal,unknown_option=error,value_error=error'
+AC_CONFIG_POLICY_PRESET_ZERO_CONF='default=skip,critical_option=fatal,unknown_option=warn,value_error=warn'
+AC_CONFIG_POLICY_PRESET_STRICT='default=error,missing_file=fatal,missing_option=error,critical_option=fatal,unknown_option=error,value_error=error'
+```
+
+Modify or extend these entries to suit your deployment.
+
+### Environment Variable
+
+The runtime honours the `AC_CONFIG_POLICY` environment variable, so you can
+override the policy without editing `config.sh`:
+
+```bash
+export AC_CONFIG_POLICY="default=skip,critical_option=fatal"
+./acore.sh run-worldserver
+```
+
+### CLI Override
+
+Every server/tool executable accepts `--config-policy`:
+
+```bash
+./bin/worldserver --config-policy="missing_file=fatal,unknown_option=warn"
+./bin/authserver --config-policy "$AC_CONFIG_POLICY_PRESET_STRICT"
+```
+
+The CLI flag takes precedence over the environment and `config.sh`.
+
+## Quick Presets
+
+| Preset | Intended use |
+|---------------|---------------------------------------------------------------------------|
+| `legacy` | Default behaviour before this feature (errors for missing files/options). |
+| `zero-conf` | Zero-touch deployments; rely on defaults/env vars where possible. |
+| `strict` | Fail-fast in CI or controlled environments. |
+
+Feel free to clone these presets and store your own variants inside
+`config.sh` or deployment scripts.
+
+## Tips
+
+- Pair `fatal` severities with monitoring so regressions in configuration
+ surface quickly.
+- When experimenting locally, start with `zero-conf` and elevate specific keys
+ to `error`/`fatal` as you validate your setup.
+- Remember that number parsing errors (`value_error`) often indicate typos;
+ keep them at least `error` unless you have a very good reason.
diff --git a/doc/changelog/master.md b/doc/changelog/master.md
index 3cd001b8d5..59b9f7bb9b 100644
--- a/doc/changelog/master.md
+++ b/doc/changelog/master.md
@@ -414,7 +414,7 @@ minimal-dynamic - builds commands and spells dynamically. Now don't support
- Example loader script for modules:
```cpp
/*
- * Copyright (C) 2016+ AzerothCore <www.azerothcore.org>, released under GNU AGPL v3 license: https://github.com/azerothcore/azerothcore-wotlk/blob/master/LICENSE
+ * Copyright (C) 2016+ AzerothCore <www.azerothcore.org>
*/
// From SC
diff --git a/modules/CMakeLists.txt b/modules/CMakeLists.txt
index 46c9d5e16f..fd36c5068a 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,8 +277,13 @@ 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)
+ # Also ensure include directories are propagated for modules that include sol.hpp
+ get_target_property(LUALIB_INCLUDE_DIRS lualib INTERFACE_INCLUDE_DIRECTORIES)
+ if(LUALIB_INCLUDE_DIRS)
+ list(APPEND PUBLIC_INCLUDES ${LUALIB_INCLUDE_DIRS})
+ endif()
endif()
target_link_libraries(modules
@@ -342,6 +347,7 @@ foreach(ModuleName ${MODULE_LIST__})
foreach(configFileName ${MODULE_CONFIG_LIST})
CopyModuleConfig("${MODULE_CONFIG_PATH}/${configFileName}")
+ string(REGEX REPLACE "\.dist$" "" configFileName ${configFileName})
set(CONFIG_LIST ${CONFIG_LIST}${configFileName},)
message(STATUS " | * ${configFileName}")
endforeach()
@@ -357,7 +363,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
@@ -376,10 +382,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/modules/ModulesLoader.cpp.in.cmake b/modules/ModulesLoader.cpp.in.cmake
index ec542a4bc7..0df08a1cc5 100644
--- a/modules/ModulesLoader.cpp.in.cmake
+++ b/modules/ModulesLoader.cpp.in.cmake
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/modules/ModulesPCH.h b/modules/ModulesPCH.h
index 305faa88f9..f278206a6c 100644
--- a/modules/ModulesPCH.h
+++ b/modules/ModulesPCH.h
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/modules/ModulesScriptLoader.h b/modules/ModulesScriptLoader.h
index 4117882202..ec59e9b309 100644
--- a/modules/ModulesScriptLoader.h
+++ b/modules/ModulesScriptLoader.h
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/modules/create_module.sh b/modules/create_module.sh
index 51e9de479a..8a7b12823d 100644
--- a/modules/create_module.sh
+++ b/modules/create_module.sh
@@ -5,7 +5,7 @@
##------------------------------- VARIABLES ---------------------------------##
MODULE_TEMPLATE_URL="https://github.com/azerothcore/skeleton-module/"
-GIT_COMMIT_MSG_SETUP="setup_git_commit_template.sh"
+GIT_COMMIT_MSG_SETUP="../../apps/git_tools/setup_git_commit_template.sh"
##------------------------------- CODE ---------------------------------##
diff --git a/pull_request_template.md b/pull_request_template.md
index b62291ba41..5d48e12588 100644
--- a/pull_request_template.md
+++ b/pull_request_template.md
@@ -1,5 +1,8 @@
<!-- First of all, THANK YOU for your contribution. -->
+<!-- How to title your Pull Request, Description, Co-Authors (Cherry Pick) and others, please see the link below -->
+<!-- https://www.azerothcore.org/wiki/commit-message-guidelines -->
+
## Changes Proposed:
<!-- If your pull request promotes complex changes that require a detailed explanation, please describe them in detail specifying what your solution is and what is it meant to address. -->
This PR proposes changes to:
diff --git a/src/cmake/macros/FindMySQL.cmake b/src/cmake/macros/FindMySQL.cmake
index 2a8de7e7a8..999dadc48d 100644
--- a/src/cmake/macros/FindMySQL.cmake
+++ b/src/cmake/macros/FindMySQL.cmake
@@ -137,7 +137,6 @@ if(WIN32)
)
list(SORT _MYSQL_ROOT_HINTS_SUBKEYS COMPARE NATURAL ORDER DESCENDING)
- set(_MYSQL_ROOT_HINTS_REGISTRY_LOCATIONS)
foreach(subkey IN LISTS _MYSQL_ROOT_HINTS_SUBKEYS)
cmake_host_system_information(
RESULT
@@ -147,7 +146,7 @@ if(WIN32)
"HKEY_LOCAL_MACHINE\\SOFTWARE\\MySQL AB\\${subkey}" VALUE "Location"
VIEW BOTH
)
- list(APPEND _MYSQL_ROOT_HINTS_REGISTRY_LOCATIONS ${_MYSQL_ROOT_HINTS_REGISTRY_LOCATION})
+ list(APPEND _MYSQL_ROOT_HINTS ${_MYSQL_ROOT_HINTS_REGISTRY_LOCATION})
endforeach()
file(GLOB _MYSQL_ROOT_PATHS_VERSION_SUBDIRECTORIES
diff --git a/src/common/Asio/AsioHacksFwd.h b/src/common/Asio/AsioHacksFwd.h
index 8746a92fd2..a8f9279b45 100644
--- a/src/common/Asio/AsioHacksFwd.h
+++ b/src/common/Asio/AsioHacksFwd.h
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/common/Asio/IoContext.h b/src/common/Asio/IoContext.h
index fa85c67155..52631fbe34 100644
--- a/src/common/Asio/IoContext.h
+++ b/src/common/Asio/IoContext.h
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/common/Asio/IpAddress.h b/src/common/Asio/IpAddress.h
index 5739615b79..f008708479 100644
--- a/src/common/Asio/IpAddress.h
+++ b/src/common/Asio/IpAddress.h
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/common/Asio/IpNetwork.h b/src/common/Asio/IpNetwork.h
index 30a71b614f..07ad0fd977 100644
--- a/src/common/Asio/IpNetwork.h
+++ b/src/common/Asio/IpNetwork.h
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/common/Asio/Resolver.h b/src/common/Asio/Resolver.h
index 92033281de..4c829b5c86 100644
--- a/src/common/Asio/Resolver.h
+++ b/src/common/Asio/Resolver.h
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/common/Asio/SteadyTimer.h b/src/common/Asio/SteadyTimer.h
index 2c5a6fd7fa..8945f77594 100644
--- a/src/common/Asio/SteadyTimer.h
+++ b/src/common/Asio/SteadyTimer.h
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/common/Asio/Strand.h b/src/common/Asio/Strand.h
index e580e4ae37..07b0f15b80 100644
--- a/src/common/Asio/Strand.h
+++ b/src/common/Asio/Strand.h
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/common/Banner.cpp b/src/common/Banner.cpp
index 65f5ab577f..b2dfaaea40 100644
--- a/src/common/Banner.cpp
+++ b/src/common/Banner.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/common/Banner.h b/src/common/Banner.h
index 5c1b9fe0bc..5a961c61cb 100644
--- a/src/common/Banner.h
+++ b/src/common/Banner.h
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/common/Collision/BoundingIntervalHierarchy.cpp b/src/common/Collision/BoundingIntervalHierarchy.cpp
index 7e44771e82..9f15618425 100644
--- a/src/common/Collision/BoundingIntervalHierarchy.cpp
+++ b/src/common/Collision/BoundingIntervalHierarchy.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/common/Collision/BoundingIntervalHierarchy.h b/src/common/Collision/BoundingIntervalHierarchy.h
index d626bc86fc..84aa011394 100644
--- a/src/common/Collision/BoundingIntervalHierarchy.h
+++ b/src/common/Collision/BoundingIntervalHierarchy.h
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
@@ -70,6 +70,7 @@ private:
{
tree.clear();
objects.clear();
+ bounds = G3D::AABox::empty();
// create space for the first node
tree.push_back(3u << 30u); // dummy leaf
tree.insert(tree.end(), 2, 0);
@@ -116,6 +117,7 @@ public:
delete[] dat.indices;
}
[[nodiscard]] uint32 primCount() const { return objects.size(); }
+ G3D::AABox const& bound() const { return bounds; }
template<typename RayCallback>
void intersectRay(const G3D::Ray& r, RayCallback& intersectCallback, float& maxDist, bool stopAtFirstHit) const
diff --git a/src/common/Collision/BoundingIntervalHierarchyWrapper.h b/src/common/Collision/BoundingIntervalHierarchyWrapper.h
index 81c5f433a9..69aee48022 100644
--- a/src/common/Collision/BoundingIntervalHierarchyWrapper.h
+++ b/src/common/Collision/BoundingIntervalHierarchyWrapper.h
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/common/Collision/DynamicTree.cpp b/src/common/Collision/DynamicTree.cpp
index 4fcfc55b49..0025bf9984 100644
--- a/src/common/Collision/DynamicTree.cpp
+++ b/src/common/Collision/DynamicTree.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
@@ -170,25 +170,6 @@ private:
VMAP::ModelIgnoreFlags _ignoreFlags;
};
-struct DynamicTreeAreaInfoCallback
-{
- DynamicTreeAreaInfoCallback(uint32 phaseMask) : _phaseMask(phaseMask) { }
-
- void operator()(G3D::Vector3 const& p, GameObjectModel const& obj)
- {
- obj.IntersectPoint(p, _areaInfo, _phaseMask);
- }
-
- VMAP::AreaInfo const& GetAreaInfo() const
- {
- return _areaInfo;
- }
-
-private:
- uint32 _phaseMask;
- VMAP::AreaInfo _areaInfo;
-};
-
struct DynamicTreeLocationInfoCallback
{
DynamicTreeLocationInfoCallback(uint32 phaseMask)
@@ -308,24 +289,7 @@ float DynamicMapTree::getHeight(float x, float y, float z, float maxSearchDist,
}
}
-bool DynamicMapTree::GetAreaInfo(float x, float y, float& z, uint32 phasemask, uint32& flags, int32& adtId, int32& rootId, int32& groupId) const
-{
- G3D::Vector3 v(x, y, z + 0.5f);
- DynamicTreeAreaInfoCallback intersectionCallBack(phasemask);
- impl->intersectPoint(v, intersectionCallBack);
- if (intersectionCallBack.GetAreaInfo().result)
- {
- flags = intersectionCallBack.GetAreaInfo().flags;
- adtId = intersectionCallBack.GetAreaInfo().adtId;
- rootId = intersectionCallBack.GetAreaInfo().rootId;
- groupId = intersectionCallBack.GetAreaInfo().groupId;
- z = intersectionCallBack.GetAreaInfo().ground_Z;
- return true;
- }
- return false;
-}
-
-void DynamicMapTree::GetAreaAndLiquidData(float x, float y, float z, uint32 phasemask, uint8 reqLiquidType, VMAP::AreaAndLiquidData& data) const
+bool DynamicMapTree::GetAreaAndLiquidData(float x, float y, float z, uint32 phasemask, Optional<uint8> reqLiquidType, VMAP::AreaAndLiquidData& data) const
{
G3D::Vector3 v(x, y, z + 0.5f);
DynamicTreeLocationInfoCallback intersectionCallBack(phasemask);
@@ -335,13 +299,16 @@ void DynamicMapTree::GetAreaAndLiquidData(float x, float y, float z, uint32 phas
data.floorZ = intersectionCallBack.GetLocationInfo().ground_Z;
uint32 liquidType = intersectionCallBack.GetLocationInfo().hitModel->GetLiquidType();
float liquidLevel;
- if (!reqLiquidType || (dynamic_cast<VMAP::VMapMgr2*>(VMAP::VMapFactory::createOrGetVMapMgr())->GetLiquidFlagsPtr(liquidType) & reqLiquidType))
+ if (!reqLiquidType || (dynamic_cast<VMAP::VMapMgr2*>(VMAP::VMapFactory::createOrGetVMapMgr())->GetLiquidFlagsPtr(liquidType) & *reqLiquidType))
if (intersectionCallBack.GetHitModel()->GetLiquidLevel(v, intersectionCallBack.GetLocationInfo(), liquidLevel))
data.liquidInfo.emplace(liquidType, liquidLevel);
- data.areaInfo.emplace(0,
+ data.areaInfo.emplace(intersectionCallBack.GetLocationInfo().hitModel->GetWmoID(),
+ 0,
intersectionCallBack.GetLocationInfo().rootId,
- intersectionCallBack.GetLocationInfo().hitModel->GetWmoID(),
- intersectionCallBack.GetLocationInfo().hitModel->GetMogpFlags());
+ intersectionCallBack.GetLocationInfo().hitModel->GetMogpFlags(),
+ 0);
+ return true;
}
+ return false;
}
diff --git a/src/common/Collision/DynamicTree.h b/src/common/Collision/DynamicTree.h
index c9dd5281bb..e2ddca550b 100644
--- a/src/common/Collision/DynamicTree.h
+++ b/src/common/Collision/DynamicTree.h
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
@@ -19,6 +19,7 @@
#define _DYNTREE_H
#include "Define.h"
+#include "Optional.h"
namespace G3D
{
@@ -47,8 +48,7 @@ public:
bool GetIntersectionTime(uint32 phasemask, const G3D::Ray& ray, const G3D::Vector3& endPos, float& maxDist) const;
- bool GetAreaInfo(float x, float y, float& z, uint32 phasemask, uint32& flags, int32& adtId, int32& rootId, int32& groupId) const;
- void GetAreaAndLiquidData(float x, float y, float z, uint32 phasemask, uint8 reqLiquidType, VMAP::AreaAndLiquidData& data) const;
+ bool GetAreaAndLiquidData(float x, float y, float z, uint32 phasemask, Optional<uint8> reqLiquidType, VMAP::AreaAndLiquidData& data) const;
bool GetObjectHitPos(uint32 phasemask, const G3D::Vector3& pPos1,
const G3D::Vector3& pPos2, G3D::Vector3& pResultHitPos,
diff --git a/src/common/Collision/Management/IMMAPMgr.h b/src/common/Collision/Management/IMMAPMgr.h
index e68f0ff488..49452c4a7b 100644
--- a/src/common/Collision/Management/IMMAPMgr.h
+++ b/src/common/Collision/Management/IMMAPMgr.h
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/common/Collision/Management/IVMapMgr.h b/src/common/Collision/Management/IVMapMgr.h
index 260188e7b6..410743f768 100644
--- a/src/common/Collision/Management/IVMapMgr.h
+++ b/src/common/Collision/Management/IVMapMgr.h
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
@@ -52,20 +52,23 @@ namespace VMAP
{
struct AreaInfo
{
- AreaInfo(int32 _adtId, int32 _rootId, int32 _groupId, uint32 _flags)
- : adtId(_adtId), rootId(_rootId), groupId(_groupId), mogpFlags(_flags) { }
- int32 const adtId;
- int32 const rootId;
- int32 const groupId;
- uint32 const mogpFlags;
+ AreaInfo() = default;
+ AreaInfo(int32 _groupId, int32 _adtId, int32 _rootId, uint32 _mogpFlags, uint32 _uniqueId)
+ : groupId(_groupId), adtId(_adtId), rootId(_rootId), mogpFlags(_mogpFlags), uniqueId(_uniqueId) { }
+ int32 groupId = 0;
+ int32 adtId = 0;
+ int32 rootId = 0;
+ uint32 mogpFlags = 0;
+ uint32 uniqueId = 0;
};
struct LiquidInfo
{
+ LiquidInfo() = default;
LiquidInfo(uint32 _type, float _level)
: type(_type), level(_level) {}
- uint32 const type;
- float const level;
+ uint32 type = 0;
+ float level = 0.0f;
};
float floorZ = VMAP_INVALID_HEIGHT;
@@ -120,14 +123,12 @@ namespace VMAP
[[nodiscard]] bool isMapLoadingEnabled() const { return (iEnableLineOfSightCalc || iEnableHeightCalc ); }
[[nodiscard]] virtual std::string getDirFileName(unsigned int pMapId, int x, int y) const = 0;
+
/**
Query world model area info.
\param z gets adjusted to the ground height for which this are info is valid
*/
- virtual bool GetAreaInfo(uint32 pMapId, float x, float y, float& z, uint32& flags, int32& adtId, int32& rootId, int32& groupId) const = 0;
- virtual bool GetLiquidLevel(uint32 pMapId, float x, float y, float z, uint8 ReqLiquidType, float& level, float& floor, uint32& type, uint32& mogpFlags) const = 0;
- // get both area + liquid data in a single vmap lookup
- virtual void GetAreaAndLiquidData(uint32 mapId, float x, float y, float z, uint8 reqLiquidType, AreaAndLiquidData& data) const = 0;
+ virtual bool GetAreaAndLiquidData(uint32 mapId, float x, float y, float z, Optional<uint8> reqLiquidType, AreaAndLiquidData& data) const = 0;
};
}
diff --git a/src/common/Collision/Management/MMapFactory.cpp b/src/common/Collision/Management/MMapFactory.cpp
index 70a57726dd..4409bcc77e 100644
--- a/src/common/Collision/Management/MMapFactory.cpp
+++ b/src/common/Collision/Management/MMapFactory.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/common/Collision/Management/MMapFactory.h b/src/common/Collision/Management/MMapFactory.h
index 08136b6fc9..923954ab40 100644
--- a/src/common/Collision/Management/MMapFactory.h
+++ b/src/common/Collision/Management/MMapFactory.h
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/common/Collision/Management/MMapMgr.cpp b/src/common/Collision/Management/MMapMgr.cpp
index e08ecba790..d3c450097c 100644
--- a/src/common/Collision/Management/MMapMgr.cpp
+++ b/src/common/Collision/Management/MMapMgr.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
@@ -23,9 +23,6 @@
namespace MMAP
{
- static char const* const MAP_FILE_NAME_FORMAT = "{}/mmaps/{:03}.mmap";
- static char const* const TILE_FILE_NAME_FORMAT = "{}/mmaps/{:03}{:02}{:02}.mmtile";
-
// ######################## MMapMgr ########################
MMapMgr::~MMapMgr()
{
diff --git a/src/common/Collision/Management/MMapMgr.h b/src/common/Collision/Management/MMapMgr.h
index 013f34292a..823142cde6 100644
--- a/src/common/Collision/Management/MMapMgr.h
+++ b/src/common/Collision/Management/MMapMgr.h
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
@@ -39,6 +39,9 @@ inline void dtCustomFree(void* ptr)
// move map related classes
namespace MMAP
{
+ static char const* const MAP_FILE_NAME_FORMAT = "{}/mmaps/{:03}.mmap";
+ static char const* const TILE_FILE_NAME_FORMAT = "{}/mmaps/{:03}{:02}{:02}.mmtile";
+
typedef std::unordered_map<uint32, dtTileRef> MMapTileSet;
typedef std::unordered_map<uint32, dtNavMeshQuery*> NavMeshQuerySet;
diff --git a/src/common/Collision/Management/VMapFactory.cpp b/src/common/Collision/Management/VMapFactory.cpp
index 3303910966..034fdf1bed 100644
--- a/src/common/Collision/Management/VMapFactory.cpp
+++ b/src/common/Collision/Management/VMapFactory.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/common/Collision/Management/VMapFactory.h b/src/common/Collision/Management/VMapFactory.h
index aa6ebd4ee8..1efae9643c 100644
--- a/src/common/Collision/Management/VMapFactory.h
+++ b/src/common/Collision/Management/VMapFactory.h
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/common/Collision/Management/VMapMgr2.cpp b/src/common/Collision/Management/VMapMgr2.cpp
index 46df0b3301..7639c9c6bc 100644
--- a/src/common/Collision/Management/VMapMgr2.cpp
+++ b/src/common/Collision/Management/VMapMgr2.cpp
@@ -253,70 +253,8 @@ namespace VMAP
return VMAP_INVALID_HEIGHT_VALUE;
}
- bool VMapMgr2::GetAreaInfo(uint32 mapId, float x, float y, float& z, uint32& flags, int32& adtId, int32& rootId, int32& groupId) const
+ bool VMapMgr2::GetAreaAndLiquidData(uint32 mapId, float x, float y, float z, Optional<uint8> reqLiquidType, AreaAndLiquidData& data) const
{
-#if defined(ENABLE_VMAP_CHECKS)
- if (!IsVMAPDisabledForPtr(mapId, VMAP_DISABLE_AREAFLAG))
-#endif
- {
- InstanceTreeMap::const_iterator instanceTree = GetMapTree(mapId);
- if (instanceTree != iInstanceMapTrees.end())
- {
- Vector3 pos = convertPositionToInternalRep(x, y, z);
- bool result = instanceTree->second->GetAreaInfo(pos, flags, adtId, rootId, groupId);
- // z is not touched by convertPositionToInternalRep(), so just copy
- z = pos.z;
- return result;
- }
- }
-
- return false;
- }
-
- bool VMapMgr2::GetLiquidLevel(uint32 mapId, float x, float y, float z, uint8 reqLiquidType, float& level, float& floor, uint32& type, uint32& mogpFlags) const
- {
-#if defined(ENABLE_VMAP_CHECKS)
- if (!IsVMAPDisabledForPtr(mapId, VMAP_DISABLE_LIQUIDSTATUS))
-#endif
- {
- InstanceTreeMap::const_iterator instanceTree = GetMapTree(mapId);
- if (instanceTree != iInstanceMapTrees.end())
- {
- LocationInfo info;
- Vector3 pos = convertPositionToInternalRep(x, y, z);
- if (instanceTree->second->GetLocationInfo(pos, info))
- {
- floor = info.ground_Z;
- ASSERT(floor < std::numeric_limits<float>::max());
- type = info.hitModel->GetLiquidType(); // entry from LiquidType.dbc
- mogpFlags = info.hitModel->GetMogpFlags();
- if (reqLiquidType && !(GetLiquidFlagsPtr(type) & reqLiquidType))
- {
- return false;
- }
- if (info.hitInstance->GetLiquidLevel(pos, info, level))
- {
- return true;
- }
- }
- }
- }
-
- return false;
- }
-
- void VMapMgr2::GetAreaAndLiquidData(uint32 mapId, float x, float y, float z, uint8 reqLiquidType, AreaAndLiquidData& data) const
- {
- if (IsVMAPDisabledForPtr(mapId, VMAP_DISABLE_LIQUIDSTATUS))
- {
- data.floorZ = z;
- int32 adtId, rootId, groupId;
- uint32 flags;
- if (GetAreaInfo(mapId, x, y, data.floorZ, flags, adtId, rootId, groupId))
- data.areaInfo.emplace(adtId, rootId, groupId, flags);
- return;
- }
-
InstanceTreeMap::const_iterator instanceTree = GetMapTree(mapId);
if (instanceTree != iInstanceMapTrees.end())
{
@@ -325,16 +263,22 @@ namespace VMAP
if (instanceTree->second->GetLocationInfo(pos, info))
{
data.floorZ = info.ground_Z;
- uint32 liquidType = info.hitModel->GetLiquidType();
- float liquidLevel;
- if (!reqLiquidType || (GetLiquidFlagsPtr(liquidType) & reqLiquidType))
- if (info.hitInstance->GetLiquidLevel(pos, info, liquidLevel))
- data.liquidInfo.emplace(liquidType, liquidLevel);
+ if (!IsVMAPDisabledForPtr(mapId, VMAP_DISABLE_LIQUIDSTATUS))
+ {
+ uint32 liquidType = info.hitModel->GetLiquidType(); // entry from LiquidType.dbc
+ float liquidLevel;
+ if (!reqLiquidType || (GetLiquidFlagsPtr(liquidType) & *reqLiquidType))
+ if (info.hitInstance->GetLiquidLevel(pos, info, liquidLevel))
+ data.liquidInfo.emplace(liquidType, liquidLevel);
+ }
if (!IsVMAPDisabledForPtr(mapId, VMAP_DISABLE_AREAFLAG))
- data.areaInfo.emplace(info.hitInstance->adtId, info.rootId, info.hitModel->GetWmoID(), info.hitModel->GetMogpFlags());
+ data.areaInfo.emplace(info.hitModel->GetWmoID(), info.hitInstance->adtId, info.rootId, info.hitModel->GetMogpFlags(), info.hitInstance->ID);
+ return true;
}
}
+
+ return false;
}
WorldModel* VMapMgr2::acquireModelInstance(const std::string& basepath, const std::string& filename, uint32 flags/* Only used when creating the model */)
diff --git a/src/common/Collision/Management/VMapMgr2.h b/src/common/Collision/Management/VMapMgr2.h
index f025c8086c..5fc4106d21 100644
--- a/src/common/Collision/Management/VMapMgr2.h
+++ b/src/common/Collision/Management/VMapMgr2.h
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
@@ -115,9 +115,7 @@ namespace VMAP
bool processCommand(char* /*command*/) override { return false; } // for debug and extensions
- bool GetAreaInfo(uint32 pMapId, float x, float y, float& z, uint32& flags, int32& adtId, int32& rootId, int32& groupId) const override;
- bool GetLiquidLevel(uint32 pMapId, float x, float y, float z, uint8 reqLiquidType, float& level, float& floor, uint32& type, uint32& mogpFlags) const override;
- void GetAreaAndLiquidData(uint32 mapId, float x, float y, float z, uint8 reqLiquidType, AreaAndLiquidData& data) const override;
+ bool GetAreaAndLiquidData(uint32 mapId, float x, float y, float z, Optional<uint8> reqLiquidType, AreaAndLiquidData& data) const override;
WorldModel* acquireModelInstance(const std::string& basepath, const std::string& filename, uint32 flags);
void releaseModelInstance(const std::string& filename);
diff --git a/src/common/Collision/Maps/MapDefines.h b/src/common/Collision/Maps/MapDefines.h
index 7f28fc8b2a..a3527f16c2 100644
--- a/src/common/Collision/Maps/MapDefines.h
+++ b/src/common/Collision/Maps/MapDefines.h
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
@@ -26,7 +26,40 @@
#define SIZE_OF_GRIDS 533.3333f
#define MMAP_MAGIC 0x4d4d4150 // 'MMAP'
-#define MMAP_VERSION 16
+#define MMAP_VERSION 19
+
+struct MmapTileRecastConfig
+{
+ float walkableSlopeAngle;
+
+ uint8 walkableRadius; // 1
+ uint8 walkableHeight; // 1
+ uint8 walkableClimb; // 1
+ uint8 padding0{0}; // 1 → align next to 4
+
+ uint32 vertexPerMapEdge;
+ uint32 vertexPerTileEdge;
+ uint32 tilesPerMapEdge;
+ float baseUnitDim;
+ float cellSizeHorizontal;
+ float cellSizeVertical;
+ float maxSimplificationError;
+
+ bool operator==(const MmapTileRecastConfig& b) const {
+ return walkableSlopeAngle == b.walkableSlopeAngle &&
+ walkableRadius == b.walkableRadius &&
+ walkableHeight == b.walkableHeight &&
+ walkableClimb == b.walkableClimb &&
+ vertexPerMapEdge == b.vertexPerMapEdge &&
+ vertexPerTileEdge == b.vertexPerTileEdge &&
+ tilesPerMapEdge == b.tilesPerMapEdge &&
+ baseUnitDim == b.baseUnitDim &&
+ cellSizeHorizontal == b.cellSizeHorizontal &&
+ cellSizeVertical == b.cellSizeVertical &&
+ maxSimplificationError == b.maxSimplificationError;
+ }
+};
+static_assert(sizeof(MmapTileRecastConfig) == 36, "Unexpected size of MmapTileRecastConfig");
struct MmapTileHeader
{
@@ -37,17 +70,20 @@ struct MmapTileHeader
char usesLiquids{true};
char padding[3] {};
+ MmapTileRecastConfig recastConfig;
+
MmapTileHeader() : dtVersion(DT_NAVMESH_VERSION) { }
};
// All padding fields must be handled and initialized to ensure mmaps_generator will produce binary-identical *.mmtile files
-static_assert(sizeof(MmapTileHeader) == 20, "MmapTileHeader size is not correct, adjust the padding field size");
+static_assert(sizeof(MmapTileHeader) == 56, "MmapTileHeader size is not correct, adjust the padding field size");
static_assert(sizeof(MmapTileHeader) == (sizeof(MmapTileHeader::mmapMagic) +
sizeof(MmapTileHeader::dtVersion) +
sizeof(MmapTileHeader::mmapVersion) +
sizeof(MmapTileHeader::size) +
sizeof(MmapTileHeader::usesLiquids) +
- sizeof(MmapTileHeader::padding)), "MmapTileHeader has uninitialized padding fields");
+ sizeof(MmapTileHeader::padding)+
+ sizeof(MmapTileRecastConfig)), "MmapTileHeader has uninitialized padding fields");
enum NavTerrain
{
diff --git a/src/common/Collision/Maps/MapTree.cpp b/src/common/Collision/Maps/MapTree.cpp
index 27c4c1ded1..bb9577d4ec 100644
--- a/src/common/Collision/Maps/MapTree.cpp
+++ b/src/common/Collision/Maps/MapTree.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
@@ -51,22 +51,6 @@ namespace VMAP
bool hit;
};
- class AreaInfoCallback
- {
- public:
- AreaInfoCallback(ModelInstance* val): prims(val) {}
- void operator()(const Vector3& point, uint32 entry)
- {
-#if defined(VMAP_DEBUG)
- LOG_DEBUG("maps", "AreaInfoCallback: trying to intersect '{}'", prims[entry].name);
-#endif
- prims[entry].intersectPoint(point, aInfo);
- }
-
- ModelInstance* prims;
- AreaInfo aInfo;
- };
-
class LocationInfoCallback
{
public:
@@ -99,22 +83,6 @@ namespace VMAP
return tilefilename.str();
}
- bool StaticMapTree::GetAreaInfo(Vector3& pos, uint32& flags, int32& adtId, int32& rootId, int32& groupId) const
- {
- AreaInfoCallback intersectionCallBack(iTreeValues);
- iTree.intersectPoint(pos, intersectionCallBack);
- if (intersectionCallBack.aInfo.result)
- {
- flags = intersectionCallBack.aInfo.flags;
- adtId = intersectionCallBack.aInfo.adtId;
- rootId = intersectionCallBack.aInfo.rootId;
- groupId = intersectionCallBack.aInfo.groupId;
- pos.z = intersectionCallBack.aInfo.ground_Z;
- return true;
- }
- return false;
- }
-
bool StaticMapTree::GetLocationInfo(const Vector3& pos, LocationInfo& info) const
{
LocationInfoCallback intersectionCallBack(iTreeValues, info);
diff --git a/src/common/Collision/Maps/MapTree.h b/src/common/Collision/Maps/MapTree.h
index c7d6e59392..09e426e3f1 100644
--- a/src/common/Collision/Maps/MapTree.h
+++ b/src/common/Collision/Maps/MapTree.h
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
@@ -30,6 +30,12 @@ namespace VMAP
enum class ModelIgnoreFlags : uint32;
enum class LoadResult : uint8;
+ struct GroupLocationInfo
+ {
+ const GroupModel* hitModel = nullptr;
+ int32 rootId = -1;
+ };
+
struct LocationInfo
{
LocationInfo(): ground_Z(-G3D::inf()) { }
@@ -73,7 +79,6 @@ namespace VMAP
[[nodiscard]] bool isInLineOfSight(const G3D::Vector3& pos1, const G3D::Vector3& pos2, ModelIgnoreFlags ignoreFlags) const;
bool GetObjectHitPos(const G3D::Vector3& pos1, const G3D::Vector3& pos2, G3D::Vector3& pResultHitPos, float pModifyDist) const;
[[nodiscard]] float getHeight(const G3D::Vector3& pPos, float maxSearchDist) const;
- bool GetAreaInfo(G3D::Vector3& pos, uint32& flags, int32& adtId, int32& rootId, int32& groupId) const;
bool GetLocationInfo(const G3D::Vector3& pos, LocationInfo& info) const;
bool InitMap(const std::string& fname, VMapMgr2* vm);
diff --git a/src/common/Collision/Maps/TileAssembler.cpp b/src/common/Collision/Maps/TileAssembler.cpp
index 50cf2eaca0..368d7e6d77 100644
--- a/src/common/Collision/Maps/TileAssembler.cpp
+++ b/src/common/Collision/Maps/TileAssembler.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/common/Collision/Maps/TileAssembler.h b/src/common/Collision/Maps/TileAssembler.h
index efd6dda49e..b51f98307f 100644
--- a/src/common/Collision/Maps/TileAssembler.h
+++ b/src/common/Collision/Maps/TileAssembler.h
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/common/Collision/Models/GameObjectModel.cpp b/src/common/Collision/Models/GameObjectModel.cpp
index 683dd0c1a9..eebc7e62d2 100644
--- a/src/common/Collision/Models/GameObjectModel.cpp
+++ b/src/common/Collision/Models/GameObjectModel.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
@@ -203,27 +203,6 @@ bool GameObjectModel::intersectRay(const G3D::Ray& ray, float& MaxDist, bool Sto
return hit;
}
-void GameObjectModel::IntersectPoint(G3D::Vector3 const& point, VMAP::AreaInfo& info, uint32 ph_mask) const
-{
- if (!(phasemask & ph_mask) || !owner->IsSpawned() || !IsMapObject())
- return;
-
- if (!iBound.contains(point))
- return;
-
- // child bounds are defined in object space:
- Vector3 pModel = iInvRot * (point - iPos) * iInvScale;
- Vector3 zDirModel = iInvRot * Vector3(0.f, 0.f, -1.f);
- float zDist;
- if (iModel->IntersectPoint(pModel, zDirModel, zDist, info))
- {
- Vector3 modelGround = pModel + zDist * zDirModel;
- float world_Z = ((modelGround * iInvRot) * iScale + iPos).z;
- if (info.ground_Z < world_Z)
- info.ground_Z = world_Z;
- }
-}
-
bool GameObjectModel::GetLocationInfo(G3D::Vector3 const& point, VMAP::LocationInfo& info, uint32 ph_mask) const
{
if (!(phasemask & ph_mask) || !owner->IsSpawned() || !IsMapObject())
@@ -236,7 +215,9 @@ bool GameObjectModel::GetLocationInfo(G3D::Vector3 const& point, VMAP::LocationI
Vector3 pModel = iInvRot * (point - iPos) * iInvScale;
Vector3 zDirModel = iInvRot * Vector3(0.f, 0.f, -1.f);
float zDist;
- if (iModel->GetLocationInfo(pModel, zDirModel, zDist, info))
+
+ VMAP::GroupLocationInfo groupInfo;
+ if (iModel->GetLocationInfo(pModel, zDirModel, zDist, groupInfo))
{
Vector3 modelGround = pModel + zDist * zDirModel;
float world_Z = ((modelGround * iInvRot) * iScale + iPos).z;
diff --git a/src/common/Collision/Models/GameObjectModel.h b/src/common/Collision/Models/GameObjectModel.h
index d0f8e35f4a..5938a5c1d0 100644
--- a/src/common/Collision/Models/GameObjectModel.h
+++ b/src/common/Collision/Models/GameObjectModel.h
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
@@ -70,7 +70,6 @@ public:
[[nodiscard]] bool IsMapObject() const { return isWmo; }
bool intersectRay(const G3D::Ray& Ray, float& MaxDist, bool StopAtFirstHit, uint32 ph_mask, VMAP::ModelIgnoreFlags ignoreFlags) const;
- void IntersectPoint(G3D::Vector3 const& point, VMAP::AreaInfo& info, uint32 ph_mask) const;
bool GetLocationInfo(G3D::Vector3 const& point, VMAP::LocationInfo& info, uint32 ph_mask) const;
bool GetLiquidLevel(G3D::Vector3 const& point, VMAP::LocationInfo& info, float& liqHeight) const;
diff --git a/src/common/Collision/Models/ModelIgnoreFlags.h b/src/common/Collision/Models/ModelIgnoreFlags.h
index f54da68ef5..2a7ccfe737 100644
--- a/src/common/Collision/Models/ModelIgnoreFlags.h
+++ b/src/common/Collision/Models/ModelIgnoreFlags.h
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/common/Collision/Models/ModelInstance.cpp b/src/common/Collision/Models/ModelInstance.cpp
index a18d5d4f9f..c5b6fbfdb0 100644
--- a/src/common/Collision/Models/ModelInstance.cpp
+++ b/src/common/Collision/Models/ModelInstance.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
@@ -63,44 +63,6 @@ namespace VMAP
return hit;
}
- void ModelInstance::intersectPoint(const G3D::Vector3& p, AreaInfo& info) const
- {
- if (!iModel)
- {
-#ifdef VMAP_DEBUG
- std::cout << "<object not loaded>\n";
-#endif
- return;
- }
-
- // M2 files don't contain area info, only WMO files
- if (flags & MOD_M2)
- {
- return;
- }
- if (!iBound.contains(p))
- {
- return;
- }
- // child bounds are defined in object space:
- Vector3 pModel = iInvRot * (p - iPos) * iInvScale;
- Vector3 zDirModel = iInvRot * Vector3(0.f, 0.f, -1.f);
- float zDist;
- if (iModel->IntersectPoint(pModel, zDirModel, zDist, info))
- {
- Vector3 modelGround = pModel + zDist * zDirModel;
- // Transform back to world space. Note that:
- // Mat * vec == vec * Mat.transpose()
- // and for rotation matrices: Mat.inverse() == Mat.transpose()
- float world_Z = ((modelGround * iInvRot) * iScale + iPos).z;
- if (info.ground_Z < world_Z)
- {
- info.ground_Z = world_Z;
- info.adtId = adtId;
- }
- }
- }
-
bool ModelInstance::GetLocationInfo(const G3D::Vector3& p, LocationInfo& info) const
{
if (!iModel)
@@ -124,7 +86,9 @@ namespace VMAP
Vector3 pModel = iInvRot * (p - iPos) * iInvScale;
Vector3 zDirModel = iInvRot * Vector3(0.f, 0.f, -1.f);
float zDist;
- if (iModel->GetLocationInfo(pModel, zDirModel, zDist, info))
+
+ GroupLocationInfo groupInfo;
+ if (iModel->GetLocationInfo(pModel, zDirModel, zDist, groupInfo))
{
Vector3 modelGround = pModel + zDist * zDirModel;
// Transform back to world space. Note that:
@@ -133,6 +97,8 @@ namespace VMAP
float world_Z = ((modelGround * iInvRot) * iScale + iPos).z;
if (info.ground_Z < world_Z) // hm...could it be handled automatically with zDist at intersection?
{
+ info.rootId = groupInfo.rootId;
+ info.hitModel = groupInfo.hitModel;
info.ground_Z = world_Z;
info.hitInstance = this;
return true;
diff --git a/src/common/Collision/Models/ModelInstance.h b/src/common/Collision/Models/ModelInstance.h
index 25987f3fd6..3476a514d5 100644
--- a/src/common/Collision/Models/ModelInstance.h
+++ b/src/common/Collision/Models/ModelInstance.h
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
@@ -66,7 +66,6 @@ namespace VMAP
ModelInstance(const ModelSpawn& spawn, WorldModel* model);
void setUnloaded() { iModel = nullptr; }
bool intersectRay(const G3D::Ray& pRay, float& pMaxDist, bool StopAtFirstHit, ModelIgnoreFlags ignoreFlags) const;
- void intersectPoint(const G3D::Vector3& p, AreaInfo& info) const;
bool GetLocationInfo(const G3D::Vector3& p, LocationInfo& info) const;
bool GetLiquidLevel(const G3D::Vector3& p, LocationInfo& info, float& liqHeight) const;
WorldModel* getWorldModel() { return iModel; }
diff --git a/src/common/Collision/Models/WorldModel.cpp b/src/common/Collision/Models/WorldModel.cpp
index 99375e294a..53bd55a2d2 100644
--- a/src/common/Collision/Models/WorldModel.cpp
+++ b/src/common/Collision/Models/WorldModel.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
@@ -20,9 +20,9 @@
#include "ModelIgnoreFlags.h"
#include "ModelInstance.h"
#include "VMapDefinitions.h"
+#include <array>
using G3D::Vector3;
-using G3D::Ray;
template<> struct BoundsTrait<VMAP::GroupModel>
{
@@ -451,21 +451,46 @@ namespace VMAP
return callback.hit;
}
- bool GroupModel::IsInsideObject(const Vector3& pos, const Vector3& down, float& z_dist) const
+ inline bool IsInsideOrAboveBound(G3D::AABox const& bounds, const G3D::Point3& point)
{
- if (triangles.empty() || !iBound.contains(pos))
+ return point.x >= bounds.low().x
+ && point.y >= bounds.low().y
+ && point.z >= bounds.low().z
+ && point.x <= bounds.high().x
+ && point.y <= bounds.high().y;
+ }
+
+ GroupModel::InsideResult GroupModel::IsInsideObject(G3D::Ray const& ray, float& z_dist) const
+ {
+ if (triangles.empty() || !IsInsideOrAboveBound(iBound, ray.origin()))
+ return OUT_OF_BOUNDS;
+
+ if (meshTree.bound().high().z >= ray.origin().z)
{
- return false;
+ float dist = G3D::finf();
+ if (IntersectRay(ray, dist, false))
+ {
+ z_dist = dist - 0.1f;
+ return INSIDE;
+ }
+ if (meshTree.bound().contains(ray.origin()))
+ return MAYBE_INSIDE;
}
- Vector3 rPos = pos - 0.1f * down;
- float dist = G3D::inf();
- G3D::Ray ray(rPos, down);
- bool hit = IntersectRay(ray, dist, false);
- if (hit)
+ else
{
- z_dist = dist - 0.1f;
+ // some group models don't have any floor to intersect with
+ // so we should attempt to intersect with a model part below this group
+ // then find back where we originated from (in WorldModel::GetLocationInfo)
+ float dist = G3D::finf();
+ float delta = ray.origin().z - meshTree.bound().high().z;
+ if (IntersectRay(ray.bumpedRay(delta), dist, false))
+ {
+ z_dist = dist - 0.1f + delta;
+ return ABOVE;
+ }
}
- return hit;
+
+ return OUT_OF_BOUNDS;
}
bool GroupModel::GetLiquidLevel(const Vector3& pos, float& liqHeight) const
@@ -541,76 +566,58 @@ namespace VMAP
class WModelAreaCallback
{
public:
- WModelAreaCallback(const std::vector<GroupModel>& vals, const Vector3& down):
- prims(vals.begin()), hit(vals.end()), minVol(G3D::inf()), zDist(G3D::inf()), zVec(down) { }
- std::vector<GroupModel>::const_iterator prims;
- std::vector<GroupModel>::const_iterator hit;
- float minVol;
- float zDist;
- Vector3 zVec;
- void operator()(const Vector3& point, uint32 entry)
+ WModelAreaCallback(std::vector<GroupModel> const& vals) :
+ prims(vals), hit() { }
+ std::vector<GroupModel> const& prims;
+ std::array<GroupModel const*, 3> hit;
+ bool operator()(G3D::Ray const& ray, uint32 entry, float& distance, bool /*stopAtFirstHit*/)
{
float group_Z;
- //float pVol = prims[entry].GetBound().volume();
- //if (pVol < minVol)
- //{
- /* if (prims[entry].iBound.contains(point)) */
- if (prims[entry].IsInsideObject(point, zVec, group_Z))
+ if (GroupModel::InsideResult result = prims[entry].IsInsideObject(ray, group_Z); result != GroupModel::OUT_OF_BOUNDS)
{
- //minVol = pVol;
- //hit = prims + entry;
- if (group_Z < zDist)
+ if (result != GroupModel::MAYBE_INSIDE)
{
- zDist = group_Z;
- hit = prims + entry;
+ if (group_Z < distance)
+ {
+ distance = group_Z;
+ hit[result] = &prims[entry];
+ return true;
+ }
}
-#ifdef VMAP_DEBUG
- const GroupModel& gm = prims[entry];
- printf("%10u %8X %7.3f, %7.3f, %7.3f | %7.3f, %7.3f, %7.3f | z=%f, p_z=%f\n", gm.GetWmoID(), gm.GetMogpFlags(),
- gm.GetBound().low().x, gm.GetBound().low().y, gm.GetBound().low().z,
- gm.GetBound().high().x, gm.GetBound().high().y, gm.GetBound().high().z, group_Z, point.z);
-#endif
+ else
+ hit[result] = &prims[entry];
}
- //}
- //std::cout << "trying to intersect '" << prims[entry].name << "'\n";
+ return false;
}
};
- bool WorldModel::IntersectPoint(const G3D::Vector3& p, const G3D::Vector3& down, float& dist, AreaInfo& info) const
+ bool WorldModel::GetLocationInfo(const G3D::Vector3& p, const G3D::Vector3& down, float& dist, GroupLocationInfo& info) const
{
if (groupModels.empty())
{
return false;
}
- WModelAreaCallback callback(groupModels, down);
- groupTree.intersectPoint(p, callback);
- if (callback.hit != groupModels.end())
+ WModelAreaCallback callback(groupModels);
+ G3D::Ray r(p - down * 0.1f, down);
+ float zDist = groupTree.bound().extent().length();
+ groupTree.intersectRay(r, callback, zDist, false);
+ if (callback.hit[GroupModel::INSIDE])
{
info.rootId = RootWMOID;
- info.groupId = callback.hit->GetWmoID();
- info.flags = callback.hit->GetMogpFlags();
- info.result = true;
- dist = callback.zDist;
+ info.hitModel = callback.hit[GroupModel::INSIDE];
+ dist = zDist;
return true;
}
- return false;
- }
-
- bool WorldModel::GetLocationInfo(const G3D::Vector3& p, const G3D::Vector3& down, float& dist, LocationInfo& info) const
- {
- if (groupModels.empty())
- {
- return false;
- }
- WModelAreaCallback callback(groupModels, down);
- groupTree.intersectPoint(p, callback);
- if (callback.hit != groupModels.end())
+ // some group models don't have any floor to intersect with
+ // so we should attempt to intersect with a model part below the group `p` is in (stored in GroupModel::ABOVE)
+ // then find back where we originated from (GroupModel::MAYBE_INSIDE)
+ if (callback.hit[GroupModel::MAYBE_INSIDE] && callback.hit[GroupModel::ABOVE])
{
info.rootId = RootWMOID;
- info.hitModel = &(*callback.hit);
- dist = callback.zDist;
+ info.hitModel = callback.hit[GroupModel::MAYBE_INSIDE];
+ dist = zDist;
return true;
}
return false;
diff --git a/src/common/Collision/Models/WorldModel.h b/src/common/Collision/Models/WorldModel.h
index df1bd47512..2d5d8126b1 100644
--- a/src/common/Collision/Models/WorldModel.h
+++ b/src/common/Collision/Models/WorldModel.h
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
@@ -29,6 +29,7 @@ namespace VMAP
class TreeNode;
struct AreaInfo;
struct LocationInfo;
+ struct GroupLocationInfo;
enum class ModelIgnoreFlags : uint32;
class MeshTriangle
@@ -81,12 +82,14 @@ namespace VMAP
void setMeshData(std::vector<G3D::Vector3>& vert, std::vector<MeshTriangle>& tri);
void setLiquidData(WmoLiquid*& liquid) { iLiquid = liquid; liquid = nullptr; }
bool IntersectRay(const G3D::Ray& ray, float& distance, bool stopAtFirstHit) const;
- bool IsInsideObject(const G3D::Vector3& pos, const G3D::Vector3& down, float& z_dist) const;
+ enum InsideResult { INSIDE = 0, MAYBE_INSIDE = 1, ABOVE = 2, OUT_OF_BOUNDS = -1 };
+ InsideResult IsInsideObject(G3D::Ray const& ray, float& z_dist) const;
bool GetLiquidLevel(const G3D::Vector3& pos, float& liqHeight) const;
[[nodiscard]] uint32 GetLiquidType() const;
bool writeToFile(FILE* wf);
bool readFromFile(FILE* rf);
- [[nodiscard]] const G3D::AABox& GetBound() const { return iBound; }
+ [[nodiscard]] G3D::AABox const& GetBound() const { return iBound; }
+ [[nodiscard]] G3D::AABox const& GetMeshTreeBound() const { return meshTree.bound(); }
[[nodiscard]] uint32 GetMogpFlags() const { return iMogpFlags; }
[[nodiscard]] uint32 GetWmoID() const { return iGroupWMOID; }
void GetMeshData(std::vector<G3D::Vector3>& outVertices, std::vector<MeshTriangle>& outTriangles, WmoLiquid*& liquid);
@@ -109,8 +112,7 @@ namespace VMAP
void setGroupModels(std::vector<GroupModel>& models);
void setRootWmoID(uint32 id) { RootWMOID = id; }
bool IntersectRay(const G3D::Ray& ray, float& distance, bool stopAtFirstHit, ModelIgnoreFlags ignoreFlags) const;
- bool IntersectPoint(const G3D::Vector3& p, const G3D::Vector3& down, float& dist, AreaInfo& info) const;
- bool GetLocationInfo(const G3D::Vector3& p, const G3D::Vector3& down, float& dist, LocationInfo& info) const;
+ bool GetLocationInfo(const G3D::Vector3& p, const G3D::Vector3& down, float& dist, GroupLocationInfo& info) const;
bool writeFile(const std::string& filename);
bool readFile(const std::string& filename);
void GetGroupModels(std::vector<GroupModel>& outGroupModels);
diff --git a/src/common/Collision/VMapDefinitions.h b/src/common/Collision/VMapDefinitions.h
index eee744fe45..b8026d9496 100644
--- a/src/common/Collision/VMapDefinitions.h
+++ b/src/common/Collision/VMapDefinitions.h
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
@@ -22,8 +22,8 @@
namespace VMAP
{
- const char VMAP_MAGIC[] = "VMAP_4.7";
- const char RAW_VMAP_MAGIC[] = "VMAP047"; // used in extracted vmap files with raw data
+ const char VMAP_MAGIC[] = "VMAP_4.8";
+ const char RAW_VMAP_MAGIC[] = "VMAP048"; // used in extracted vmap files with raw data
const char GAMEOBJECT_MODELS[] = "GameObjectModels.dtree";
// defined in TileAssembler.cpp currently...
diff --git a/src/common/Collision/VMapTools.h b/src/common/Collision/VMapTools.h
index f200e3647b..ba47cdf62d 100644
--- a/src/common/Collision/VMapTools.h
+++ b/src/common/Collision/VMapTools.h
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/common/Common.cpp b/src/common/Common.cpp
index 530dec961f..9d7835248c 100644
--- a/src/common/Common.cpp
+++ b/src/common/Common.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/common/Common.h b/src/common/Common.h
index c8cd5e7892..6b258207b4 100644
--- a/src/common/Common.h
+++ b/src/common/Common.h
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/common/CompilerDefs.h b/src/common/CompilerDefs.h
index 7b47e66178..5cec405555 100644
--- a/src/common/CompilerDefs.h
+++ b/src/common/CompilerDefs.h
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/common/Configuration/BuiltInConfig.cpp b/src/common/Configuration/BuiltInConfig.cpp
index 1258f10a9e..a238b24fc9 100644
--- a/src/common/Configuration/BuiltInConfig.cpp
+++ b/src/common/Configuration/BuiltInConfig.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/common/Configuration/BuiltInConfig.h b/src/common/Configuration/BuiltInConfig.h
index dbd7f7399d..fe4f5a5849 100644
--- a/src/common/Configuration/BuiltInConfig.h
+++ b/src/common/Configuration/BuiltInConfig.h
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/common/Configuration/Config.cpp b/src/common/Configuration/Config.cpp
index 5f653fa968..7548fd4900 100644
--- a/src/common/Configuration/Config.cpp
+++ b/src/common/Configuration/Config.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
@@ -21,10 +21,14 @@
#include "StringFormat.h"
#include "Tokenize.h"
#include "Util.h"
+#include <algorithm>
+#include <cctype>
#include <cstdlib>
#include <fstream>
+#include <locale>
#include <mutex>
#include <unordered_map>
+#include <unordered_set>
namespace
{
@@ -34,13 +38,14 @@ namespace
std::unordered_map<std::string /*name*/, std::string /*value*/> _configOptions;
std::unordered_map<std::string /*name*/, std::string /*value*/> _envVarCache;
std::mutex _configLock;
+ ConfigPolicy _policy;
- std::vector<std::string> _fatalConfigOptions =
+ std::unordered_set<std::string> _criticalConfigOptions =
{
- { "RealmID" },
- { "LoginDatabaseInfo" },
- { "WorldDatabaseInfo" },
- { "CharacterDatabaseInfo" },
+ "RealmID",
+ "LoginDatabaseInfo",
+ "WorldDatabaseInfo",
+ "CharacterDatabaseInfo",
};
// Check system configs like *server.conf*
@@ -62,6 +67,29 @@ namespace
return foundAppender != std::string_view::npos || foundLogger != std::string_view::npos;
}
+ Optional<ConfigSeverity> ParseSeverity(std::string_view value)
+ {
+ if (value.empty())
+ return std::nullopt;
+
+ std::string lowered(value);
+ std::transform(lowered.begin(), lowered.end(), lowered.begin(), [](unsigned char c) { return std::tolower(c); });
+
+ if (lowered == "skip")
+ return ConfigSeverity::Skip;
+
+ if (lowered == "warn" || lowered == "warning")
+ return ConfigSeverity::Warn;
+
+ if (lowered == "error")
+ return ConfigSeverity::Error;
+
+ if (lowered == "fatal" || lowered == "abort" || lowered == "panic")
+ return ConfigSeverity::Fatal;
+
+ return std::nullopt;
+ }
+
template<typename Format, typename... Args>
inline void PrintError(std::string_view filename, Format&& fmt, Args&& ... args)
{
@@ -77,6 +105,138 @@ namespace
}
}
+ template<typename Format, typename... Args>
+ inline void LogWithSeverity(ConfigSeverity severity, std::string_view filename, Format&& fmt, Args&&... args)
+ {
+ std::string message = Acore::StringFormat(std::forward<Format>(fmt), std::forward<Args>(args)...);
+
+ switch (severity)
+ {
+ case ConfigSeverity::Skip:
+ return;
+ case ConfigSeverity::Warn:
+ {
+ if (IsAppConfig(filename))
+ fmt::print("{}\n", message);
+
+ LOG_WARN("server.loading", message);
+ return;
+ }
+ case ConfigSeverity::Error:
+ {
+ if (IsAppConfig(filename))
+ fmt::print("{}\n", message);
+
+ LOG_ERROR("server.loading", message);
+ return;
+ }
+ case ConfigSeverity::Fatal:
+ {
+ if (IsAppConfig(filename))
+ fmt::print("{}\n", message);
+
+ LOG_FATAL("server.loading", message);
+ ABORT(message);
+ }
+ }
+ }
+
+ ConfigPolicy ApplyPolicyString(ConfigPolicy policy, std::string_view input)
+ {
+ if (input.empty())
+ return policy;
+
+ std::vector<std::pair<std::string, ConfigSeverity>> overrides;
+ Optional<ConfigSeverity> defaultOverride;
+
+ std::string tokenBuffer(input);
+ for (std::string_view rawToken : Acore::Tokenize(tokenBuffer, ',', false))
+ {
+ std::string token = Acore::String::Trim(std::string(rawToken), std::locale());
+ if (token.empty())
+ continue;
+
+ auto separator = token.find('=');
+ if (separator == std::string::npos)
+ continue;
+
+ std::string key = Acore::String::Trim(token.substr(0, separator), std::locale());
+ std::string value = Acore::String::Trim(token.substr(separator + 1), std::locale());
+
+ if (key.empty() || value.empty())
+ continue;
+
+ auto severity = ParseSeverity(value);
+ if (!severity)
+ continue;
+
+ std::transform(key.begin(), key.end(), key.begin(), [](unsigned char c) { return std::tolower(c); });
+
+ if (key == "default")
+ {
+ defaultOverride = severity;
+ continue;
+ }
+
+ overrides.emplace_back(std::move(key), *severity);
+ }
+
+ if (defaultOverride)
+ {
+ policy.defaultSeverity = *defaultOverride;
+ policy.missingFileSeverity = *defaultOverride;
+ policy.missingOptionSeverity = *defaultOverride;
+ policy.criticalOptionSeverity = *defaultOverride;
+ policy.unknownOptionSeverity = *defaultOverride;
+ policy.valueErrorSeverity = *defaultOverride;
+ }
+
+ for (auto const& [key, severity] : overrides)
+ {
+ if (key == "missing_file" || key == "file")
+ policy.missingFileSeverity = severity;
+ else if (key == "missing_option" || key == "option")
+ policy.missingOptionSeverity = severity;
+ else if (key == "critical_option" || key == "critical")
+ policy.criticalOptionSeverity = severity;
+ else if (key == "unknown_option" || key == "unknown")
+ policy.unknownOptionSeverity = severity;
+ else if (key == "value_error" || key == "value")
+ policy.valueErrorSeverity = severity;
+ }
+
+ return policy;
+ }
+
+ ConfigPolicy ApplyPolicyFromArgs(ConfigPolicy policy, std::vector<std::string> const& args)
+ {
+ for (std::size_t i = 0; i < args.size(); ++i)
+ {
+ std::string const& arg = args[i];
+ std::string_view value;
+
+ constexpr std::string_view shortOpt = "--config-policy";
+
+ if (arg.rfind(shortOpt, 0) == 0)
+ {
+ if (arg.size() == shortOpt.size() && (i + 1) < args.size())
+ {
+ value = args[i + 1];
+ ++i;
+ }
+ else if (arg.size() > shortOpt.size() && arg[shortOpt.size()] == '=')
+ {
+ value = std::string_view(arg).substr(shortOpt.size() + 1);
+ }
+
+ if (!value.empty())
+ policy = ApplyPolicyString(policy, value);
+ }
+ }
+
+ return policy;
+ }
+
void AddKey(std::string const& optionName, std::string const& optionKey, std::string_view fileName, bool isOptional, [[maybe_unused]] bool isReload)
{
auto const& itr = _configOptions.find(optionName);
@@ -86,7 +246,7 @@ namespace
{
if (!IsLoggingSystemOptions(optionName) && !isReload)
{
- PrintError(fileName, "> Config::LoadFile: Found incorrect option '{}' in config file '{}'. Skip", optionName, fileName);
+ LogWithSeverity(_policy.unknownOptionSeverity, fileName, "> Config::LoadFile: Found incorrect option '{}' in config file '{}'. Skip", optionName, fileName);
#ifdef CONFIG_ABORT_INCORRECT_OPTIONS
ABORT("> Core can't start if found incorrect options");
@@ -111,13 +271,10 @@ namespace
if (in.fail())
{
- if (isOptional)
- {
- // No display erorr if file optional
- return false;
- }
-
- throw ConfigException(Acore::StringFormat("Config::LoadFile: Failed open {}file '{}'", isOptional ? "optional " : "", file));
+ ConfigSeverity severity = isOptional ? ConfigSeverity::Skip : _policy.missingFileSeverity;
+ LogWithSeverity(severity, file, "> Config::LoadFile: Failed open {}file '{}'", isOptional ? "optional " : "", file);
+ // Treat SKIP as a successful no-op so the app can proceed
+ return severity == ConfigSeverity::Skip;
}
uint32 count = 0;
@@ -181,13 +338,10 @@ namespace
// No lines read
if (!count)
{
- if (isOptional)
- {
- // No display erorr if file optional
- return false;
- }
-
- throw ConfigException(Acore::StringFormat("Config::LoadFile: Empty file '{}'", file));
+ ConfigSeverity severity = isOptional ? ConfigSeverity::Skip : _policy.missingFileSeverity;
+ LogWithSeverity(severity, file, "> Config::LoadFile: Empty file '{}'", file);
+ // Treat SKIP as a successful no-op
+ return severity == ConfigSeverity::Skip;
}
// Add correct keys if file load without errors
@@ -382,7 +536,6 @@ T ConfigMgr::GetValueDefault(std::string const& name, T const& def, bool showLog
std::string strValue;
auto const& itr = _configOptions.find(name);
- bool fatalConfig = false;
bool notFound = itr == _configOptions.end();
auto envVarName = GetEnvVarName(name);
Optional<std::string> envVar = GetEnvFromCache(name, envVarName);
@@ -401,19 +554,25 @@ T ConfigMgr::GetValueDefault(std::string const& name, T const& def, bool showLog
{
if (showLogs)
{
- for (std::string s : _fatalConfigOptions)
- if (s == name)
- {
- fatalConfig = true;
- break;
- }
+ bool isCritical = _criticalConfigOptions.find(name) != _criticalConfigOptions.end();
+ ConfigSeverity severity = isCritical ? _policy.criticalOptionSeverity : _policy.missingOptionSeverity;
- if (fatalConfig)
- LOG_FATAL("server.loading", "> Config:\n\nFATAL ERROR: Missing property {} in config file {}, add \"{} = {}\" to this file or define '{}' as an environment variable\n\nYour server cannot start without this option!",
+ if (isCritical)
+ {
+ LogWithSeverity(severity, _filename,
+ "> Config:\n\nFATAL ERROR: Missing property {} in config file {}, add \"{} = {}\" to this file or define '{}' as an environment variable\n\nYour server cannot start without this option!",
name, _filename, name, Acore::ToString(def), envVarName);
+ }
else
- LOG_WARN("server.loading", "> Config: Missing property {} in config file {}, add \"{} = {}\" to this file or define '{}' as an environment variable.",
- name, _filename, name, Acore::ToString(def), envVarName);
+ {
+ std::string configs = _filename;
+ if (!_moduleConfigFiles.empty())
+ configs += " or module config";
+
+ LogWithSeverity(severity, _filename,
+ "> Config: Missing property {} in config file {}, add \"{} = {}\" to this file or define '{}' as an environment variable.",
+ name, configs, name, def, envVarName);
+ }
}
return def;
}
@@ -427,7 +586,8 @@ T ConfigMgr::GetValueDefault(std::string const& name, T const& def, bool showLog
{
if (showLogs)
{
- LOG_ERROR("server.loading", "> Config: Bad value defined for name '{}', going to use '{}' instead",
+ LogWithSeverity(_policy.valueErrorSeverity, _filename,
+ "> Config: Bad value defined for name '{}', going to use '{}' instead",
name, Acore::ToString(def));
}
@@ -441,7 +601,6 @@ template<>
std::string ConfigMgr::GetValueDefault<std::string>(std::string const& name, std::string const& def, bool showLogs /*= true*/) const
{
auto const& itr = _configOptions.find(name);
- bool fatalConfig = false;
bool notFound = itr == _configOptions.end();
auto envVarName = GetEnvVarName(name);
Optional<std::string> envVar = GetEnvFromCache(name, envVarName);
@@ -460,19 +619,25 @@ std::string ConfigMgr::GetValueDefault<std::string>(std::string const& name, std
{
if (showLogs)
{
- for (std::string s : _fatalConfigOptions)
- if (s == name)
- {
- fatalConfig = true;
- break;
- }
+ bool isCritical = _criticalConfigOptions.find(name) != _criticalConfigOptions.end();
+ ConfigSeverity severity = isCritical ? _policy.criticalOptionSeverity : _policy.missingOptionSeverity;
- if (fatalConfig)
- LOG_FATAL("server.loading", "> Config:\n\nFATAL ERROR: Missing property {} in config file {}, add \"{} = {}\" to this file or define '{}' as an environment variable.\n\nYour server cannot start without this option!",
+ if (isCritical)
+ {
+ LogWithSeverity(severity, _filename,
+ "> Config:\n\nFATAL ERROR: Missing property {} in config file {}, add \"{} = {}\" to this file or define '{}' as an environment variable.\n\nYour server cannot start without this option!",
name, _filename, name, def, envVarName);
+ }
else
- LOG_WARN("server.loading", "> Config: Missing property {} in config file {}, add \"{} = {}\" to this file or define '{}' as an environment variable.",
- name, _filename, name, def, envVarName);
+ {
+ std::string configs = _filename;
+ if (!_moduleConfigFiles.empty())
+ configs += " or module config";
+
+ LogWithSeverity(severity, _filename,
+ "> Config: Missing property {} in config file {}, add \"{} = {}\" to this file or define '{}' as an environment variable.",
+ name, configs, name, def, envVarName);
+ }
}
return def;
@@ -497,7 +662,8 @@ bool ConfigMgr::GetOption<bool>(std::string const& name, bool const& def, bool s
{
if (showLogs)
{
- LOG_ERROR("server.loading", "> Config: Bad value defined for name '{}', going to use '{}' instead",
+ LogWithSeverity(_policy.valueErrorSeverity, _filename,
+ "> Config: Bad value defined for name '{}', going to use '{}' instead",
name, def ? "true" : "false");
}
@@ -546,17 +712,27 @@ std::string const ConfigMgr::GetConfigPath()
#endif
}
-void ConfigMgr::Configure(std::string const& initFileName, std::vector<std::string> args, std::string_view modulesConfigList /*= {}*/)
+void ConfigMgr::Configure(std::string const& initFileName, std::vector<std::string> args, std::string_view modulesConfigList /*= {}*/, ConfigPolicy policy /*= {}*/)
{
_filename = initFileName;
_args = std::move(args);
+ _policy = policy;
+
+ if (char const* env = std::getenv("AC_CONFIG_POLICY"))
+ _policy = ApplyPolicyString(_policy, env);
+
+ _policy = ApplyPolicyFromArgs(_policy, _args);
+
+ _additonalFiles.clear();
+ _moduleConfigFiles.clear();
// Add modules config if exist
if (!modulesConfigList.empty())
{
for (auto const& itr : Acore::Tokenize(modulesConfigList, ',', false))
{
- _additonalFiles.emplace_back(itr);
+ if (!itr.empty())
+ _additonalFiles.emplace_back(itr);
}
}
}
@@ -588,38 +764,13 @@ bool ConfigMgr::LoadModulesConfigs(bool isReload /*= false*/, bool isNeedPrintIn
// Start loading module configs
std::string const& moduleConfigPath = GetConfigPath() + "modules/";
- bool isExistDefaultConfig = true;
- bool isExistDistConfig = true;
- for (auto const& distFileName : _additonalFiles)
+ for (auto const& fileName : _additonalFiles)
{
- std::string defaultFileName = distFileName;
-
- if (!defaultFileName.empty())
- {
- defaultFileName.erase(defaultFileName.end() - 5, defaultFileName.end());
- }
+ bool isExistConfig = LoadAdditionalFile(moduleConfigPath + fileName, false, isReload);
- // Load .conf.dist config
- isExistDistConfig = LoadAdditionalFile(moduleConfigPath + distFileName, false, isReload);
-
- if (!isReload && !isExistDistConfig)
- {
- LOG_FATAL("server.loading", "> ConfigMgr::LoadModulesConfigs: Not found original config '{}'. Stop loading", distFileName);
- ABORT();
- }
-
- // Load .conf config
- isExistDefaultConfig = LoadAdditionalFile(moduleConfigPath + defaultFileName, true, isReload);
-
- if (isExistDefaultConfig && isExistDistConfig)
- {
- _moduleConfigFiles.emplace_back(defaultFileName);
- }
- else if (!isExistDefaultConfig && isExistDistConfig)
- {
- _moduleConfigFiles.emplace_back(distFileName);
- }
+ if (isExistConfig)
+ _moduleConfigFiles.emplace_back(fileName);
}
if (isNeedPrintInfo)
diff --git a/src/common/Configuration/Config.h b/src/common/Configuration/Config.h
index ccb35132dd..16d522f7d6 100644
--- a/src/common/Configuration/Config.h
+++ b/src/common/Configuration/Config.h
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
@@ -18,10 +18,29 @@
#ifndef CONFIG_H
#define CONFIG_H
+#include <cstdint>
#include <stdexcept>
#include <string_view>
#include <vector>
+enum class ConfigSeverity : uint8_t
+{
+ Skip,
+ Warn,
+ Error,
+ Fatal
+};
+
+struct ConfigPolicy
+{
+ ConfigSeverity defaultSeverity = ConfigSeverity::Warn;
+ ConfigSeverity missingFileSeverity = ConfigSeverity::Error;
+ ConfigSeverity missingOptionSeverity = ConfigSeverity::Warn;
+ ConfigSeverity criticalOptionSeverity = ConfigSeverity::Fatal;
+ ConfigSeverity unknownOptionSeverity = ConfigSeverity::Error;
+ ConfigSeverity valueErrorSeverity = ConfigSeverity::Error;
+};
+
class ConfigMgr
{
ConfigMgr() = default;
@@ -32,7 +51,7 @@ class ConfigMgr
public:
bool LoadAppConfigs(bool isReload = false);
bool LoadModulesConfigs(bool isReload = false, bool isNeedPrintInfo = true);
- void Configure(std::string const& initFileName, std::vector<std::string> args, std::string_view modulesConfigList = {});
+ void Configure(std::string const& initFileName, std::vector<std::string> args, std::string_view modulesConfigList = {}, ConfigPolicy policy = {});
static ConfigMgr* instance();
diff --git a/src/common/Configuration/ConfigValueCache.h b/src/common/Configuration/ConfigValueCache.h
index e36d411ac4..4f0d6471e6 100644
--- a/src/common/Configuration/ConfigValueCache.h
+++ b/src/common/Configuration/ConfigValueCache.h
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/common/Cryptography/AES.cpp b/src/common/Cryptography/AES.cpp
index f4061cdcbc..d28cf7e381 100644
--- a/src/common/Cryptography/AES.cpp
+++ b/src/common/Cryptography/AES.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/common/Cryptography/AES.h b/src/common/Cryptography/AES.h
index c49f181831..650fb7e34c 100644
--- a/src/common/Cryptography/AES.h
+++ b/src/common/Cryptography/AES.h
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/common/Cryptography/ARC4.cpp b/src/common/Cryptography/ARC4.cpp
index 357911c6c9..d830d0db0e 100644
--- a/src/common/Cryptography/ARC4.cpp
+++ b/src/common/Cryptography/ARC4.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/common/Cryptography/ARC4.h b/src/common/Cryptography/ARC4.h
index e45126a9bd..e02b527f52 100644
--- a/src/common/Cryptography/ARC4.h
+++ b/src/common/Cryptography/ARC4.h
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/common/Cryptography/Argon2.cpp b/src/common/Cryptography/Argon2.cpp
index ead8449cbf..18ec2a57a8 100644
--- a/src/common/Cryptography/Argon2.cpp
+++ b/src/common/Cryptography/Argon2.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/common/Cryptography/Argon2.h b/src/common/Cryptography/Argon2.h
index b2f3ed968e..f7199ac317 100644
--- a/src/common/Cryptography/Argon2.h
+++ b/src/common/Cryptography/Argon2.h
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/common/Cryptography/Authentication/AuthCrypt.cpp b/src/common/Cryptography/Authentication/AuthCrypt.cpp
index 26084f76ab..9888134f57 100644
--- a/src/common/Cryptography/Authentication/AuthCrypt.cpp
+++ b/src/common/Cryptography/Authentication/AuthCrypt.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/common/Cryptography/Authentication/AuthCrypt.h b/src/common/Cryptography/Authentication/AuthCrypt.h
index 3a7ff89df9..17c1bbc57c 100644
--- a/src/common/Cryptography/Authentication/AuthCrypt.h
+++ b/src/common/Cryptography/Authentication/AuthCrypt.h
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/common/Cryptography/Authentication/AuthDefines.h b/src/common/Cryptography/Authentication/AuthDefines.h
index 3de2a02fbe..7d54b5190b 100644
--- a/src/common/Cryptography/Authentication/AuthDefines.h
+++ b/src/common/Cryptography/Authentication/AuthDefines.h
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/common/Cryptography/Authentication/SRP6.cpp b/src/common/Cryptography/Authentication/SRP6.cpp
index e89ac99a74..133138b854 100644
--- a/src/common/Cryptography/Authentication/SRP6.cpp
+++ b/src/common/Cryptography/Authentication/SRP6.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/common/Cryptography/Authentication/SRP6.h b/src/common/Cryptography/Authentication/SRP6.h
index d7f288dc39..7b22f75a7f 100644
--- a/src/common/Cryptography/Authentication/SRP6.h
+++ b/src/common/Cryptography/Authentication/SRP6.h
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/common/Cryptography/BigNumber.cpp b/src/common/Cryptography/BigNumber.cpp
index 9f9d9a9175..7c8b4ee441 100644
--- a/src/common/Cryptography/BigNumber.cpp
+++ b/src/common/Cryptography/BigNumber.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/common/Cryptography/BigNumber.h b/src/common/Cryptography/BigNumber.h
index 591da4e67a..3b93c29f31 100644
--- a/src/common/Cryptography/BigNumber.h
+++ b/src/common/Cryptography/BigNumber.h
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/common/Cryptography/CryptoConstants.h b/src/common/Cryptography/CryptoConstants.h
index 7fadc4f366..5c98151cd9 100644
--- a/src/common/Cryptography/CryptoConstants.h
+++ b/src/common/Cryptography/CryptoConstants.h
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/common/Cryptography/CryptoGenerics.h b/src/common/Cryptography/CryptoGenerics.h
index 3e84c6b3ec..c154c2e053 100644
--- a/src/common/Cryptography/CryptoGenerics.h
+++ b/src/common/Cryptography/CryptoGenerics.h
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/common/Cryptography/CryptoHash.h b/src/common/Cryptography/CryptoHash.h
index 77c4a16cd2..8fca1c4bb3 100644
--- a/src/common/Cryptography/CryptoHash.h
+++ b/src/common/Cryptography/CryptoHash.h
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/common/Cryptography/CryptoRandom.cpp b/src/common/Cryptography/CryptoRandom.cpp
index c44f73eab5..95166d0ca6 100644
--- a/src/common/Cryptography/CryptoRandom.cpp
+++ b/src/common/Cryptography/CryptoRandom.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/common/Cryptography/CryptoRandom.h b/src/common/Cryptography/CryptoRandom.h
index 7554735ad5..1142d21be5 100644
--- a/src/common/Cryptography/CryptoRandom.h
+++ b/src/common/Cryptography/CryptoRandom.h
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/common/Cryptography/HMAC.h b/src/common/Cryptography/HMAC.h
index 6830c6131f..7478d895be 100644
--- a/src/common/Cryptography/HMAC.h
+++ b/src/common/Cryptography/HMAC.h
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/common/Cryptography/OpenSSLCrypto.cpp b/src/common/Cryptography/OpenSSLCrypto.cpp
index 64a1962958..a997cfe6e3 100644
--- a/src/common/Cryptography/OpenSSLCrypto.cpp
+++ b/src/common/Cryptography/OpenSSLCrypto.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/common/Cryptography/OpenSSLCrypto.h b/src/common/Cryptography/OpenSSLCrypto.h
index be68504510..3446693e15 100644
--- a/src/common/Cryptography/OpenSSLCrypto.h
+++ b/src/common/Cryptography/OpenSSLCrypto.h
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/common/Cryptography/SessionKeyGenerator.h b/src/common/Cryptography/SessionKeyGenerator.h
index bafd9ce014..68b9ee532a 100644
--- a/src/common/Cryptography/SessionKeyGenerator.h
+++ b/src/common/Cryptography/SessionKeyGenerator.h
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/common/Cryptography/TOTP.cpp b/src/common/Cryptography/TOTP.cpp
index 3b132bc46e..a40aa5329c 100644
--- a/src/common/Cryptography/TOTP.cpp
+++ b/src/common/Cryptography/TOTP.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/common/Cryptography/TOTP.h b/src/common/Cryptography/TOTP.h
index 56ddccb6be..746ed42c5f 100644
--- a/src/common/Cryptography/TOTP.h
+++ b/src/common/Cryptography/TOTP.h
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/common/DataStores/DBCFileLoader.cpp b/src/common/DataStores/DBCFileLoader.cpp
index 2f05d8fe7b..91bc24eb0f 100644
--- a/src/common/DataStores/DBCFileLoader.cpp
+++ b/src/common/DataStores/DBCFileLoader.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/common/DataStores/DBCFileLoader.h b/src/common/DataStores/DBCFileLoader.h
index ffe52e9a03..3d7608e58b 100644
--- a/src/common/DataStores/DBCFileLoader.h
+++ b/src/common/DataStores/DBCFileLoader.h
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/common/Debugging/Errors.cpp b/src/common/Debugging/Errors.cpp
index b42b34a187..a5682e750b 100644
--- a/src/common/Debugging/Errors.cpp
+++ b/src/common/Debugging/Errors.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/common/Debugging/Errors.h b/src/common/Debugging/Errors.h
index 24a36f1e8d..043065a083 100644
--- a/src/common/Debugging/Errors.h
+++ b/src/common/Debugging/Errors.h
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/common/Define.h b/src/common/Define.h
index 09cd43544f..f38b4f7787 100644
--- a/src/common/Define.h
+++ b/src/common/Define.h
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/common/Dynamic/FactoryHolder.h b/src/common/Dynamic/FactoryHolder.h
index 245bd02825..40ca6abe98 100644
--- a/src/common/Dynamic/FactoryHolder.h
+++ b/src/common/Dynamic/FactoryHolder.h
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/common/Dynamic/LinkedList.h b/src/common/Dynamic/LinkedList.h
index bd2e8224c6..a6b8b08c76 100644
--- a/src/common/Dynamic/LinkedList.h
+++ b/src/common/Dynamic/LinkedList.h
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/common/Dynamic/LinkedReference/RefMgr.h b/src/common/Dynamic/LinkedReference/RefMgr.h
index 79c8c2e585..f7c7631f00 100644
--- a/src/common/Dynamic/LinkedReference/RefMgr.h
+++ b/src/common/Dynamic/LinkedReference/RefMgr.h
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/common/Dynamic/LinkedReference/Reference.h b/src/common/Dynamic/LinkedReference/Reference.h
index 9c20a2704a..7991a9f326 100644
--- a/src/common/Dynamic/LinkedReference/Reference.h
+++ b/src/common/Dynamic/LinkedReference/Reference.h
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/common/Dynamic/ObjectRegistry.h b/src/common/Dynamic/ObjectRegistry.h
index 31adcd8f16..ca42e0608c 100644
--- a/src/common/Dynamic/ObjectRegistry.h
+++ b/src/common/Dynamic/ObjectRegistry.h
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/common/Dynamic/TypeContainer.h b/src/common/Dynamic/TypeContainer.h
index 6240eb48df..a43ddfd6e7 100644
--- a/src/common/Dynamic/TypeContainer.h
+++ b/src/common/Dynamic/TypeContainer.h
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/common/Dynamic/TypeContainerFunctions.h b/src/common/Dynamic/TypeContainerFunctions.h
index 61735d7d89..f2f606e23f 100644
--- a/src/common/Dynamic/TypeContainerFunctions.h
+++ b/src/common/Dynamic/TypeContainerFunctions.h
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/common/Dynamic/TypeContainerFunctionsPtr.h b/src/common/Dynamic/TypeContainerFunctionsPtr.h
index 7b17b4c388..7855089c64 100644
--- a/src/common/Dynamic/TypeContainerFunctionsPtr.h
+++ b/src/common/Dynamic/TypeContainerFunctionsPtr.h
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/common/Dynamic/TypeContainerVisitor.h b/src/common/Dynamic/TypeContainerVisitor.h
index 066f6f3085..a85ad9a9f6 100644
--- a/src/common/Dynamic/TypeContainerVisitor.h
+++ b/src/common/Dynamic/TypeContainerVisitor.h
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/common/Dynamic/TypeList.h b/src/common/Dynamic/TypeList.h
index 7fffb357eb..cbd77376bd 100644
--- a/src/common/Dynamic/TypeList.h
+++ b/src/common/Dynamic/TypeList.h
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/common/Encoding/Base32.cpp b/src/common/Encoding/Base32.cpp
index 8906e0eaf7..60a555ef7b 100644
--- a/src/common/Encoding/Base32.cpp
+++ b/src/common/Encoding/Base32.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/common/Encoding/Base32.h b/src/common/Encoding/Base32.h
index 1f15212c13..6e00292463 100644
--- a/src/common/Encoding/Base32.h
+++ b/src/common/Encoding/Base32.h
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/common/Encoding/Base64.cpp b/src/common/Encoding/Base64.cpp
index ee37be5303..a281606b62 100644
--- a/src/common/Encoding/Base64.cpp
+++ b/src/common/Encoding/Base64.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/common/Encoding/Base64.h b/src/common/Encoding/Base64.h
index b1cb7b18fe..43f7bfc651 100644
--- a/src/common/Encoding/Base64.h
+++ b/src/common/Encoding/Base64.h
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/common/Encoding/BaseEncoding.h b/src/common/Encoding/BaseEncoding.h
index ed1ea96ec6..49e83d8dac 100644
--- a/src/common/Encoding/BaseEncoding.h
+++ b/src/common/Encoding/BaseEncoding.h
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/common/GitRevision.cpp b/src/common/GitRevision.cpp
index 085199ddf5..7d2c4142c9 100644
--- a/src/common/GitRevision.cpp
+++ b/src/common/GitRevision.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/common/GitRevision.h b/src/common/GitRevision.h
index 34d0d99223..27f170cd6f 100644
--- a/src/common/GitRevision.h
+++ b/src/common/GitRevision.h
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/common/IPLocation/IPLocation.cpp b/src/common/IPLocation/IPLocation.cpp
index 2f90e5a440..ebdc6ec76e 100644
--- a/src/common/IPLocation/IPLocation.cpp
+++ b/src/common/IPLocation/IPLocation.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/common/IPLocation/IPLocation.h b/src/common/IPLocation/IPLocation.h
index 5d20102f8a..7be44557f2 100644
--- a/src/common/IPLocation/IPLocation.h
+++ b/src/common/IPLocation/IPLocation.h
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/common/Logging/Appender.cpp b/src/common/Logging/Appender.cpp
index cf9d9df2bf..c65a1c4629 100644
--- a/src/common/Logging/Appender.cpp
+++ b/src/common/Logging/Appender.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/common/Logging/Appender.h b/src/common/Logging/Appender.h
index 0d5e028019..7cdc77f660 100644
--- a/src/common/Logging/Appender.h
+++ b/src/common/Logging/Appender.h
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/common/Logging/AppenderConsole.cpp b/src/common/Logging/AppenderConsole.cpp
index db5a473361..778cbfd6d5 100644
--- a/src/common/Logging/AppenderConsole.cpp
+++ b/src/common/Logging/AppenderConsole.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/common/Logging/AppenderConsole.h b/src/common/Logging/AppenderConsole.h
index d60553523a..770297bf06 100644
--- a/src/common/Logging/AppenderConsole.h
+++ b/src/common/Logging/AppenderConsole.h
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/common/Logging/AppenderFile.cpp b/src/common/Logging/AppenderFile.cpp
index 9b4aa53ca1..997210e337 100644
--- a/src/common/Logging/AppenderFile.cpp
+++ b/src/common/Logging/AppenderFile.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/common/Logging/AppenderFile.h b/src/common/Logging/AppenderFile.h
index 95a990d63b..47c5102219 100644
--- a/src/common/Logging/AppenderFile.h
+++ b/src/common/Logging/AppenderFile.h
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/common/Logging/Log.cpp b/src/common/Logging/Log.cpp
index 2b473a8731..736346c128 100644
--- a/src/common/Logging/Log.cpp
+++ b/src/common/Logging/Log.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
@@ -211,13 +211,16 @@ void Log::ReadLoggersFromConfig()
AppenderConsole* appender = new AppenderConsole(NextAppenderId(), "Console", LOG_LEVEL_DEBUG, APPENDER_FLAGS_NONE, {});
appenders[appender->getId()].reset(appender);
- Logger* rootLogger = new Logger(LOGGER_ROOT, LOG_LEVEL_ERROR);
+ Logger* rootLogger = new Logger(LOGGER_ROOT, LOG_LEVEL_WARN);
rootLogger->addAppender(appender->getId(), appender);
loggers[LOGGER_ROOT].reset(rootLogger);
Logger* serverLogger = new Logger("server", LOG_LEVEL_INFO);
serverLogger->addAppender(appender->getId(), appender);
loggers["server"].reset(serverLogger);
+
+ highestLogLevel = LOG_LEVEL_INFO;
+ return;
}
}
diff --git a/src/common/Logging/Log.h b/src/common/Logging/Log.h
index 2cf588ccac..284204f879 100644
--- a/src/common/Logging/Log.h
+++ b/src/common/Logging/Log.h
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/common/Logging/LogCommon.h b/src/common/Logging/LogCommon.h
index ba53ba6dfc..f62ea04568 100644
--- a/src/common/Logging/LogCommon.h
+++ b/src/common/Logging/LogCommon.h
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/common/Logging/LogMessage.cpp b/src/common/Logging/LogMessage.cpp
index aea9718b19..ac73481d7f 100644
--- a/src/common/Logging/LogMessage.cpp
+++ b/src/common/Logging/LogMessage.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/common/Logging/LogMessage.h b/src/common/Logging/LogMessage.h
index 95ec0e635e..79732319ba 100644
--- a/src/common/Logging/LogMessage.h
+++ b/src/common/Logging/LogMessage.h
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/common/Logging/LogOperation.cpp b/src/common/Logging/LogOperation.cpp
index 1d64ad86c0..de9ae3470e 100644
--- a/src/common/Logging/LogOperation.cpp
+++ b/src/common/Logging/LogOperation.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/common/Logging/LogOperation.h b/src/common/Logging/LogOperation.h
index 9c24ca5b7a..c7e950b0af 100644
--- a/src/common/Logging/LogOperation.h
+++ b/src/common/Logging/LogOperation.h
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/common/Logging/Logger.cpp b/src/common/Logging/Logger.cpp
index 9334a84b65..a8f27c2aea 100644
--- a/src/common/Logging/Logger.cpp
+++ b/src/common/Logging/Logger.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/common/Logging/Logger.h b/src/common/Logging/Logger.h
index b4f3684fb6..ddc5d15fe6 100644
--- a/src/common/Logging/Logger.h
+++ b/src/common/Logging/Logger.h
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/common/Logging/enuminfo_AppenderConsole.cpp b/src/common/Logging/enuminfo_AppenderConsole.cpp
index 28031a58b9..d68aaa1772 100644
--- a/src/common/Logging/enuminfo_AppenderConsole.cpp
+++ b/src/common/Logging/enuminfo_AppenderConsole.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/common/Logging/enuminfo_LogCommon.cpp b/src/common/Logging/enuminfo_LogCommon.cpp
index db9c330c6e..55e04cc2e9 100644
--- a/src/common/Logging/enuminfo_LogCommon.cpp
+++ b/src/common/Logging/enuminfo_LogCommon.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/common/Metric/Metric.cpp b/src/common/Metric/Metric.cpp
index 96e142faf4..75cc58dc65 100644
--- a/src/common/Metric/Metric.cpp
+++ b/src/common/Metric/Metric.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/common/Metric/Metric.h b/src/common/Metric/Metric.h
index 7ebc3cabb0..7c7c9d23be 100644
--- a/src/common/Metric/Metric.h
+++ b/src/common/Metric/Metric.h
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/common/Platform/ServiceWin32.cpp b/src/common/Platform/ServiceWin32.cpp
index b0104e43bb..8a27e7f0cd 100644
--- a/src/common/Platform/ServiceWin32.cpp
+++ b/src/common/Platform/ServiceWin32.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/common/Platform/ServiceWin32.h b/src/common/Platform/ServiceWin32.h
index 1b42c64622..752193404d 100644
--- a/src/common/Platform/ServiceWin32.h
+++ b/src/common/Platform/ServiceWin32.h
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/common/Threading/LockedQueue.h b/src/common/Threading/LockedQueue.h
index 76266a6b21..1c8bbb199c 100644
--- a/src/common/Threading/LockedQueue.h
+++ b/src/common/Threading/LockedQueue.h
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/common/Threading/MPSCQueue.h b/src/common/Threading/MPSCQueue.h
index 2bc2ec8262..55c7c3b747 100644
--- a/src/common/Threading/MPSCQueue.h
+++ b/src/common/Threading/MPSCQueue.h
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/common/Threading/PCQueue.h b/src/common/Threading/PCQueue.h
index 57ea0b2d34..94e69a4025 100644
--- a/src/common/Threading/PCQueue.h
+++ b/src/common/Threading/PCQueue.h
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/common/Threading/PolicyLock.h b/src/common/Threading/PolicyLock.h
index d0b77e3b1f..528f064297 100644
--- a/src/common/Threading/PolicyLock.h
+++ b/src/common/Threading/PolicyLock.h
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/common/Threading/ProcessPriority.cpp b/src/common/Threading/ProcessPriority.cpp
index 885ffaed6f..fca37f63a7 100644
--- a/src/common/Threading/ProcessPriority.cpp
+++ b/src/common/Threading/ProcessPriority.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/common/Threading/ProcessPriority.h b/src/common/Threading/ProcessPriority.h
index 3746c16ea0..df3e58f96d 100644
--- a/src/common/Threading/ProcessPriority.h
+++ b/src/common/Threading/ProcessPriority.h
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/common/Threading/Threading.cpp b/src/common/Threading/Threading.cpp
index ed681c8b3e..ef35b94d45 100644
--- a/src/common/Threading/Threading.cpp
+++ b/src/common/Threading/Threading.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/common/Threading/Threading.h b/src/common/Threading/Threading.h
index 7cfa382e2b..fdac117ffa 100644
--- a/src/common/Threading/Threading.h
+++ b/src/common/Threading/Threading.h
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/common/Threading/ThreadingModel.h b/src/common/Threading/ThreadingModel.h
index a23884df39..cf013ec769 100644
--- a/src/common/Threading/ThreadingModel.h
+++ b/src/common/Threading/ThreadingModel.h
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/common/Utilities/AsyncCallbackProcessor.h b/src/common/Utilities/AsyncCallbackProcessor.h
index 68566809a6..2ca6674a5a 100644
--- a/src/common/Utilities/AsyncCallbackProcessor.h
+++ b/src/common/Utilities/AsyncCallbackProcessor.h
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/common/Utilities/ByteConverter.h b/src/common/Utilities/ByteConverter.h
index 0c972ba47f..cce9312705 100644
--- a/src/common/Utilities/ByteConverter.h
+++ b/src/common/Utilities/ByteConverter.h
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/common/Utilities/CircularBuffer.h b/src/common/Utilities/CircularBuffer.h
index 4c23099c9e..55681c87ba 100644
--- a/src/common/Utilities/CircularBuffer.h
+++ b/src/common/Utilities/CircularBuffer.h
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2016+ AzerothCore <www.azerothcore.org>, released under GNU AGPL v3 license: https://github.com/azerothcore/azerothcore-wotlk/blob/master/LICENSE
+# Copyright (C) 2016+ AzerothCore <www.azerothcore.org>
*
* This file was based on
* https://embeddedartistry.com/blog/2017/05/17/creating-a-circular-buffer-in-c-and-c/
diff --git a/src/common/Utilities/Containers.h b/src/common/Utilities/Containers.h
index ca89e7de09..22e133d027 100644
--- a/src/common/Utilities/Containers.h
+++ b/src/common/Utilities/Containers.h
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/common/Utilities/DataMap.h b/src/common/Utilities/DataMap.h
index 170539a673..31910f9453 100644
--- a/src/common/Utilities/DataMap.h
+++ b/src/common/Utilities/DataMap.h
@@ -1,5 +1,5 @@
/*
- * Originally written by Rochet2 - Copyright (C) 2018+ AzerothCore <www.azerothcore.org>, released under GNU AGPL v3 license: http://github.com/azerothcore/azerothcore-wotlk/blob/master/LICENSE
+ * Originally written by Rochet2 - Copyright (C) 2018+ AzerothCore <www.azerothcore.org>
*/
#ifndef _DATA_MAP_H_
diff --git a/src/common/Utilities/Duration.h b/src/common/Utilities/Duration.h
index ed6bbf8817..d5138b6a67 100644
--- a/src/common/Utilities/Duration.h
+++ b/src/common/Utilities/Duration.h
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/common/Utilities/EnumFlag.h b/src/common/Utilities/EnumFlag.h
index d02232cfce..dea8d253e7 100644
--- a/src/common/Utilities/EnumFlag.h
+++ b/src/common/Utilities/EnumFlag.h
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/common/Utilities/EventEmitter.h b/src/common/Utilities/EventEmitter.h
index 77755935bd..1b72e472bc 100644
--- a/src/common/Utilities/EventEmitter.h
+++ b/src/common/Utilities/EventEmitter.h
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/common/Utilities/EventMap.cpp b/src/common/Utilities/EventMap.cpp
index 00dac4a6db..1b175a47ef 100644
--- a/src/common/Utilities/EventMap.cpp
+++ b/src/common/Utilities/EventMap.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
@@ -21,113 +21,81 @@
void EventMap::Reset()
{
_eventMap.clear();
- _time = 0;
- _phase = 0;
+ _time = TimePoint::min();
+ _phaseMask = 0;
}
-void EventMap::SetPhase(uint8 phase)
+void EventMap::SetPhase(PhaseIndex phase)
{
if (!phase)
- {
- _phase = 0;
- }
- else if (phase <= 8)
- {
- _phase = (1 << (phase - 1));
- }
+ _phaseMask = 0;
+ else if (phase <= sizeof(PhaseMask) * 8)
+ _phaseMask = PhaseMask(1u << (phase - 1u));
}
-void EventMap::AddPhase(uint8 phase)
+void EventMap::AddPhase(PhaseIndex phase)
{
- if (phase && phase <= 8)
- {
- _phase |= (1 << (phase - 1));
- }
+ if (phase && phase <= sizeof(PhaseMask) * 8)
+ _phaseMask |= PhaseMask(1u << (phase - 1u));
}
-void EventMap::RemovePhase(uint8 phase)
+void EventMap::RemovePhase(PhaseIndex phase)
{
- if (phase && phase <= 8)
- {
- _phase &= ~(1 << (phase - 1));
- }
+ if (phase && phase <= sizeof(PhaseMask) * 8)
+ _phaseMask &= PhaseMask(~(1u << (phase - 1u)));
}
-void EventMap::ScheduleEvent(uint32 eventId, uint32 time, uint32 group /*= 0*/, uint32 phase /*= 0*/)
+void EventMap::ScheduleEvent(EventId eventId, Milliseconds time, GroupIndex group /*= 0u*/, PhaseIndex phase /*= 0u*/)
{
- if (group && group <= 8)
- {
- eventId |= (1 << (group + 15));
- }
-
- if (phase && phase <= 8)
- {
- eventId |= (1 << (phase + 23));
- }
-
- _eventMap.emplace(_time + time, eventId);
-}
+ if (group > sizeof(GroupMask) * 8)
+ return;
-void EventMap::ScheduleEvent(uint32 eventId, Milliseconds time, uint32 group /*= 0*/, uint8 phase /* = 0*/)
-{
- ScheduleEvent(eventId, time.count(), group, phase);
-}
+ if (phase > sizeof(PhaseMask) * 8)
+ return;
-void EventMap::ScheduleEvent(uint32 eventId, Milliseconds minTime, Milliseconds maxTime, uint32 group /*= 0*/, uint32 phase /*= 0*/)
-{
- ScheduleEvent(eventId, randtime(minTime, maxTime).count(), group, phase);
+ _eventMap.emplace(_time + time, Event(eventId, group, phase));
}
-void EventMap::RescheduleEvent(uint32 eventId, uint32 time, uint32 groupId /*= 0*/, uint32 phase/* = 0*/)
+void EventMap::ScheduleEvent(EventId eventId, Milliseconds minTime, Milliseconds maxTime, GroupIndex group /*= 0u*/, PhaseIndex phase /*= 0u*/)
{
- CancelEvent(eventId);
- ScheduleEvent(eventId, time, groupId, phase);
+ ScheduleEvent(eventId, randtime(minTime, maxTime), group, phase);
}
-void EventMap::RescheduleEvent(uint32 eventId, Milliseconds time, uint32 group /*= 0*/, uint8 phase /* = 0*/)
+void EventMap::RescheduleEvent(EventId eventId, Milliseconds minTime, Milliseconds maxTime, GroupIndex group /*= 0u*/, PhaseIndex phase /*= 0u*/)
{
CancelEvent(eventId);
- ScheduleEvent(eventId, time.count(), group, phase);
+ ScheduleEvent(eventId, randtime(minTime, maxTime), group, phase);
}
-void EventMap::RescheduleEvent(uint32 eventId, Milliseconds minTime, Milliseconds maxTime, uint32 group /*= 0*/, uint32 phase /*= 0*/)
+void EventMap::RescheduleEvent(EventId eventId, Milliseconds time, GroupIndex group /*= 0u*/, PhaseIndex phase /*= 0u*/)
{
CancelEvent(eventId);
- ScheduleEvent(eventId, randtime(minTime, maxTime).count(), group, phase);
-}
-
-void EventMap::RepeatEvent(uint32 time)
-{
- _eventMap.emplace(_time + time, _lastEvent);
+ ScheduleEvent(eventId, time, group, phase);
}
void EventMap::Repeat(Milliseconds time)
{
- RepeatEvent(time.count());
+ _eventMap.emplace(_time + time, _lastEvent);
}
void EventMap::Repeat(Milliseconds minTime, Milliseconds maxTime)
{
- RepeatEvent(randtime(minTime, maxTime).count());
+ Repeat(randtime(minTime, maxTime));
}
-uint32 EventMap::ExecuteEvent()
+EventMap::EventId EventMap::ExecuteEvent()
{
while (!Empty())
{
auto const& itr = _eventMap.begin();
if (itr->first > _time)
- {
return 0;
- }
- else if (_phase && (itr->second & 0xFF000000) && !((itr->second >> 24) & _phase))
- {
+ else if (_phaseMask && itr->second._phaseMask && !(itr->second._phaseMask & _phaseMask))
_eventMap.erase(itr);
- }
else
{
- uint32 eventId = (itr->second & 0x0000FFFF);
+ auto eventId = itr->second._id;
_lastEvent = itr->second;
_eventMap.erase(itr);
return eventId;
@@ -137,30 +105,32 @@ uint32 EventMap::ExecuteEvent()
return 0;
}
-void EventMap::DelayEvents(uint32 delay)
-{
- _time = delay < _time ? _time - delay : 0;
-}
-
void EventMap::DelayEvents(Milliseconds delay)
{
- DelayEvents(delay.count());
+ if (Empty())
+ return;
+
+ EventStore delayed = std::move(_eventMap);
+ for (auto itr = delayed.begin(); itr != delayed.end();)
+ {
+ auto node = delayed.extract(itr++);
+ node.key() = node.key() + delay;
+ _eventMap.insert(_eventMap.end(), std::move(node));
+ }
}
-void EventMap::DelayEvents(uint32 delay, uint32 group)
+void EventMap::DelayEvents(Milliseconds delay, GroupIndex group)
{
- if (group > 8 || Empty())
- {
+ if (group > sizeof(GroupMask) * 8 || Empty())
return;
- }
EventStore delayed;
- for (EventStore::iterator itr = _eventMap.begin(); itr != _eventMap.end();)
+ for (auto itr = _eventMap.begin(); itr != _eventMap.end();)
{
- if (!group || (itr->second & (1 << (group + 15))))
+ if (!group || (itr->second._groupMask & GroupMask(1u << (group - 1u))))
{
- delayed.insert(EventStore::value_type(itr->first + delay, itr->second));
+ delayed.emplace(itr->first + delay, itr->second);
itr = _eventMap.erase(itr);
continue;
}
@@ -171,13 +141,13 @@ void EventMap::DelayEvents(uint32 delay, uint32 group)
_eventMap.insert(delayed.begin(), delayed.end());
}
-void EventMap::DelayEventsToMax(uint32 delay, uint32 group)
+void EventMap::DelayEventsToMax(Milliseconds delay, GroupIndex group)
{
for (auto itr = _eventMap.begin(); itr != _eventMap.end();)
{
- if (itr->first < _time + delay && (group == 0 || ((1 << (group + 15)) & itr->second)))
+ if (itr->first < _time + delay && (!group || (itr->second._groupMask & GroupMask(1u << (group - 1u)))))
{
- ScheduleEvent(itr->second, delay);
+ ScheduleEvent(itr->second._id, delay, group);
_eventMap.erase(itr);
itr = _eventMap.begin();
continue;
@@ -187,16 +157,14 @@ void EventMap::DelayEventsToMax(uint32 delay, uint32 group)
}
}
-void EventMap::CancelEvent(uint32 eventId)
+void EventMap::CancelEvent(EventId eventId)
{
if (Empty())
- {
return;
- }
for (auto itr = _eventMap.begin(); itr != _eventMap.end();)
{
- if (eventId == (itr->second & 0x0000FFFF))
+ if (eventId == itr->second._id)
{
itr = _eventMap.erase(itr);
continue;
@@ -206,17 +174,14 @@ void EventMap::CancelEvent(uint32 eventId)
}
}
-void EventMap::CancelEventGroup(uint32 group)
+void EventMap::CancelEventGroup(GroupIndex group)
{
- if (!group || group > 8 || Empty())
- {
+ if (!group || group > sizeof(GroupMask) * 8 || Empty())
return;
- }
- uint32 groupMask = (1 << (group + 15));
- for (EventStore::iterator itr = _eventMap.begin(); itr != _eventMap.end();)
+ for (auto itr = _eventMap.begin(); itr != _eventMap.end();)
{
- if (itr->second & groupMask)
+ if (itr->second._groupMask & GroupMask(1u << (group - 1u)))
{
_eventMap.erase(itr);
itr = _eventMap.begin();
@@ -227,39 +192,21 @@ void EventMap::CancelEventGroup(uint32 group)
}
}
-uint32 EventMap::GetNextEventTime(uint32 eventId) const
+bool EventMap::IsInPhase(PhaseIndex phase) const
{
- if (Empty())
- {
- return 0;
- }
-
- for (auto const& itr : _eventMap)
- {
- if (eventId == (itr.second & 0x0000FFFF))
- {
- return itr.first;
- }
- }
-
- return 0;
+ return phase <= sizeof(PhaseIndex) * 8 && (!phase || _phaseMask & PhaseMask(1u << (phase - 1u)));
}
-uint32 EventMap::GetNextEventTime() const
+Milliseconds EventMap::GetTimeUntilEvent(EventId eventId) const
{
- return Empty() ? 0 : _eventMap.begin()->first;
-}
+ for (auto const& [time, event] : _eventMap)
+ if (eventId == event._id)
+ return std::chrono::duration_cast<Milliseconds>(time - _time);
-bool EventMap::IsInPhase(uint8 phase)
-{
- return phase <= 8 && (!phase || _phase & (1 << (phase - 1)));
+ return Milliseconds::max();
}
-Milliseconds EventMap::GetTimeUntilEvent(uint32 eventId) const
+bool EventMap::HasTimeUntilEvent(EventId eventId) const
{
- for (std::pair<uint32 const, uint32> const& itr : _eventMap)
- if (eventId == (itr.second & 0x0000FFFF))
- return std::chrono::duration_cast<Milliseconds>(Milliseconds(itr.first) - Milliseconds(_time));
-
- return Milliseconds::max();
+ return GetTimeUntilEvent(eventId) != Milliseconds::max();
}
diff --git a/src/common/Utilities/EventMap.h b/src/common/Utilities/EventMap.h
index 1d3df6222e..a382910b82 100644
--- a/src/common/Utilities/EventMap.h
+++ b/src/common/Utilities/EventMap.h
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
@@ -24,18 +24,31 @@
class EventMap
{
- /**
- * Internal storage type.
- * Key: Time as TimePoint when the event should occur.
- * Value: The event data as uint32.
- *
- * Structure of event data:
- * - Bit 0 - 15: Event Id.
- * - Bit 16 - 23: Group
- * - Bit 24 - 31: Phase
- * - Pattern: 0xPPGGEEEE
- */
- typedef std::multimap<uint32, uint32> EventStore;
+ using EventId = uint16;
+ using GroupIndex = uint8;
+ using GroupMask = uint8;
+ using PhaseIndex = uint8;
+ using PhaseMask = uint8;
+ struct Event
+ {
+ Event() = default;
+ Event(EventId id, GroupIndex groupIndex, PhaseIndex phaseIndex) :
+ _id(id),
+ _groupMask(groupIndex ? GroupMask(1u << (groupIndex - 1u)) : 0u),
+ _phaseMask(phaseIndex ? PhaseMask(1u << (phaseIndex - 1u)) : 0u)
+ {
+ }
+
+ EventId _id = 0u;
+ GroupMask _groupMask = 0u;
+ PhaseMask _phaseMask = 0u;
+ };
+
+ /**
+ * Internal storage type.
+ * Key: Time as TimePoint when the event should occur.
+ */
+ using EventStore = std::multimap<TimePoint, Event>;
public:
EventMap() { }
@@ -47,13 +60,13 @@ public:
void Reset();
/**
- * @name Update
- * @brief Updates the timer of the event map.
- * @param time Value to be added to time.
- */
+ * @name Update
+ * @brief Updates the timer of the event map.
+ * @param time Value to be added to time.
+ */
void Update(uint32 time)
{
- _time += time;
+ Update(Milliseconds(time));
}
/**
@@ -63,37 +76,23 @@ public:
*/
void Update(Milliseconds time)
{
- _time += static_cast<uint32>(time.count());
- }
-
- /**
- * @name GetTimer
- * @return Current timer value.
- */
- [[nodiscard]] uint32 GetTimer() const
- {
- return _time;
- }
-
- void SetTimer(uint32 time)
- {
- _time = time;
+ _time += time;
}
/**
* @name GetPhaseMask
* @return Active phases as mask.
*/
- [[nodiscard]] uint8 GetPhaseMask() const
+ PhaseMask GetPhaseMask() const
{
- return _phase;
+ return _phaseMask;
}
/**
* @name Empty
* @return True, if there are no events scheduled.
*/
- [[nodiscard]] bool Empty() const
+ bool Empty() const
{
return _eventMap.empty();
}
@@ -103,31 +102,21 @@ public:
* @brief Sets the phase of the map (absolute).
* @param phase Phase which should be set. Values: 1 - 8. 0 resets phase.
*/
- void SetPhase(uint8 phase);
+ void SetPhase(PhaseIndex phase);
/**
* @name AddPhase
- * @brief Activates the given phase (bitwise).
+ * @brief Activates the given phase (absolute).
* @param phase Phase which should be activated. Values: 1 - 8
*/
- void AddPhase(uint8 phase);
+ void AddPhase(PhaseIndex phase);
/**
* @name RemovePhase
- * @brief Deactivates the given phase (bitwise).
+ * @brief Deactivates the given phase (absolute).
* @param phase Phase which should be deactivated. Values: 1 - 8.
*/
- void RemovePhase(uint8 phase);
-
- /**
- * @name ScheduleEvent
- * @brief Creates new event entry in map.
- * @param eventId The id of the new event.
- * @param time The time in milliseconds until the event occurs.
- * @param group The group which the event is associated to. Has to be between 1 and 8. 0 means it has no group.
- * @param phase The phase in which the event can occur. Has to be between 1 and 8. 0 means it can occur in all phases.
- */
- void ScheduleEvent(uint32 eventId, uint32 time, uint32 group = 0, uint32 phase = 0);
+ void RemovePhase(PhaseIndex phase);
/**
* @name ScheduleEvent
@@ -137,7 +126,7 @@ public:
* @param group The group which the event is associated to. Has to be between 1 and 8. 0 means it has no group.
* @param phase The phase in which the event can occur. Has to be between 1 and 8. 0 means it can occur in all phases.
*/
- void ScheduleEvent(uint32 eventId, Milliseconds time, uint32 group = 0, uint8 phase = 0);
+ void ScheduleEvent(EventId eventId, Milliseconds time, GroupIndex group = 0u, PhaseIndex phase = 0u);
/**
* @name ScheduleEvent
@@ -148,17 +137,7 @@ public:
* @param group The group which the event is associated to. Has to be between 1 and 8. 0 means it has no group.
* @param phase The phase in which the event can occur. Has to be between 1 and 8. 0 means it can occur in all phases.
*/
- void ScheduleEvent(uint32 eventId, Milliseconds minTime, Milliseconds maxTime, uint32 group = 0, uint32 phase = 0);
-
- /**
- * @name RescheduleEvent
- * @brief Cancels the given event and reschedules it.
- * @param eventId The id of the event.
- * @param time The time in milliseconds until the event occurs.
- * @param group The group which the event is associated to. Has to be between 1 and 8. 0 means it has no group.
- * @param phase The phase in which the event can occur. Has to be between 1 and 8. 0 means it can occur in all phases.
- */
- void RescheduleEvent(uint32 eventId, uint32 time, uint32 groupId = 0, uint32 phase = 0);
+ void ScheduleEvent(EventId eventId, Milliseconds minTime, Milliseconds maxTime, GroupIndex group = 0u, PhaseIndex phase = 0u);
/**
* @name RescheduleEvent
@@ -168,7 +147,7 @@ public:
* @param group The group which the event is associated to. Has to be between 1 and 8. 0 means it has no group.
* @param phase The phase in which the event can occur. Has to be between 1 and 8. 0 means it can occur in all phases.
*/
- void RescheduleEvent(uint32 eventId, Milliseconds time, uint32 group = 0, uint8 phase = 0);
+ void RescheduleEvent(EventId eventId, Milliseconds time, GroupIndex group = 0u, PhaseIndex phase = 0u);
/**
* @name RescheduleEvent
@@ -179,25 +158,17 @@ public:
* @param group The group which the event is associated to. Has to be between 1 and 8. 0 means it has no group.
* @param phase The phase in which the event can occur. Has to be between 1 and 8. 0 means it can occur in all phases.
*/
- void RescheduleEvent(uint32 eventId, Milliseconds minTime, Milliseconds maxTime, uint32 group = 0, uint32 phase = 0);
-
- /**
- * @name RepeatEvent
- * @brief Repeats the most recently executed event.
- * @param time Time until the event occurs as std::chrono type.
- */
- void RepeatEvent(uint32 time);
+ void RescheduleEvent(EventId eventId, Milliseconds minTime, Milliseconds maxTime, GroupIndex group = 0u, PhaseIndex phase = 0u);
/**
- * @name RepeatEvent
+ * @name Repeat
* @brief Repeats the most recently executed event.
* @param time Time until the event occurs as std::chrono type.
*/
void Repeat(Milliseconds time);
/**
-
- * @name RepeatEvent
+ * @name Repeat
* @brief Repeats the most recently executed event.
* @param minTime The minimum time until the event occurs as std::chrono type.
* @param maxTime The maximum time until the event occurs as std::chrono type.
@@ -209,14 +180,7 @@ public:
* @brief Returns the next event to execute and removes it from map.
* @return Id of the event to execute.
*/
- uint32 ExecuteEvent();
-
- /**
- * @name DelayEvents
- * @brief Delays all events in the map. If delay is greater than or equal internal timer, delay will be 0.
- * @param delay Amount of delay.
- */
- void DelayEvents(uint32 delay);
+ EventId ExecuteEvent();
/**
* @name DelayEvents
@@ -228,62 +192,57 @@ public:
/**
* @name DelayEvents
* @brief Delay all events of the same group.
- * @param delay Amount of delay.
+ * @param delay Amount of delay as std::chrono type.
* @param group Group of the events.
*/
- void DelayEvents(uint32 delay, uint32 group);
+ void DelayEvents(Milliseconds delay, GroupIndex group);
/**
* @name EventsEvents
* @brief Delay all events of the same group.
- * @param delay Amount of delay.
+ * @param delay Amount of delay as std::chrono type.
* @param group Group of the events.
*/
- void DelayEventsToMax(uint32 delay, uint32 group);
+ void DelayEventsToMax(Milliseconds delay, GroupIndex group);
/**
* @name CancelEvent
* @brief Cancels all events of the specified id.
* @param eventId Event id to cancel.
*/
- void CancelEvent(uint32 eventId);
+ void CancelEvent(EventId eventId);
/**
* @name CancelEventGroup
* @brief Cancel events belonging to specified group.
* @param group Group to cancel.
*/
- void CancelEventGroup(uint32 group);
-
- /**
- * @name GetNextEventTime
- * @brief Returns closest occurence of specified event.
- * @param eventId Wanted event id.
- * @return Time of found event.
- */
- [[nodiscard]] uint32 GetNextEventTime(uint32 eventId) const;
-
- /**
- * @name GetNextEventTime
- * @return Time of next event.
- */
- [[nodiscard]] uint32 GetNextEventTime() const;
+ void CancelEventGroup(GroupIndex group);
/**
* @name IsInPhase
- * @brief Returns wether event map is in specified phase or not.
+ * @brief Returns whether event map is in specified phase or not.
* @param phase Wanted phase.
* @return True, if phase of event map contains specified phase.
*/
- bool IsInPhase(uint8 phase);
+ bool IsInPhase(PhaseIndex phase) const;
/**
* @name GetTimeUntilEvent
* @brief Returns time as std::chrono type until next event.
- * @param eventId of the event.
+ * @param eventId The id of the event.
* @return Time of next event. If event is not scheduled returns Milliseconds::max()
+ * @return Time of next event.
*/
- Milliseconds GetTimeUntilEvent(uint32 eventId) const;
+ Milliseconds GetTimeUntilEvent(EventId eventId) const;
+
+ /**
+ * @name HasTimeUntilEvent
+ * @brief Returns whether an event is scheduled
+ * @param eventId The id of the event.
+ * @return True if event is scheduled
+ */
+ bool HasTimeUntilEvent(EventId eventId) const;
private:
/**
@@ -296,23 +255,23 @@ private:
* has reached their time value. Its value is changed in the
* Update method.
*/
- uint32 _time{ 0 };
+ TimePoint _time{ TimePoint::min() };
/**
- * @name _phase
+ * @name _phaseMask
* @brief Phase mask of the event map.
*
* Contains the phases the event map is in. Multiple
* phases from 1 to 8 can be set with SetPhase or
* AddPhase. RemovePhase deactives a phase.
*/
- uint32 _phase{0};
+ PhaseMask _phaseMask{ 0 };
/**
* @name _lastEvent
* @brief Stores information on the most recently executed event
*/
- uint32 _lastEvent{0};
+ Event _lastEvent;
/**
* @name _eventMap
diff --git a/src/common/Utilities/EventProcessor.cpp b/src/common/Utilities/EventProcessor.cpp
index 3943a09b8d..5d3fb3427a 100644
--- a/src/common/Utilities/EventProcessor.cpp
+++ b/src/common/Utilities/EventProcessor.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
@@ -75,7 +75,7 @@ void EventProcessor::Update(uint32 p_time)
// Reschedule non deletable events to be checked at
// the next update tick
- AddEvent(event, CalculateTime(1), false, 0);
+ AddEvent(event, CalculateTime(1), false);
}
}
@@ -133,13 +133,13 @@ void EventProcessor::CancelEventGroup(uint8 group)
}
}
-void EventProcessor::AddEvent(BasicEvent* Event, uint64 e_time, bool set_addtime, uint8 eventGroup)
+void EventProcessor::AddEvent(BasicEvent* Event, uint64 e_time, bool set_addtime /*= true*/, uint8 eventGroup /*= 0*/)
{
if (set_addtime)
Event->m_addTime = m_time;
Event->m_execTime = e_time;
Event->m_eventGroup = eventGroup;
- m_events.insert(std::pair<uint64, BasicEvent*>(e_time, Event));
+ m_events.emplace(e_time, Event);
}
void EventProcessor::ModifyEventTime(BasicEvent* event, Milliseconds newTime)
@@ -151,7 +151,7 @@ void EventProcessor::ModifyEventTime(BasicEvent* event, Milliseconds newTime)
event->m_execTime = newTime.count();
m_events.erase(itr);
- m_events.insert(std::pair<uint64, BasicEvent*>(newTime.count(), event));
+ m_events.emplace(newTime.count(), event);
break;
}
}
diff --git a/src/common/Utilities/EventProcessor.h b/src/common/Utilities/EventProcessor.h
index 3e7896bb33..644c2b643b 100644
--- a/src/common/Utilities/EventProcessor.h
+++ b/src/common/Utilities/EventProcessor.h
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
@@ -100,20 +100,19 @@ class EventProcessor
void Update(uint32 p_time);
void KillAllEvents(bool force);
- void AddEvent(BasicEvent* Event, uint64 e_time, bool set_addtime = true) { AddEvent(Event, e_time, set_addtime, 0); };
- void AddEvent(BasicEvent* Event, uint64 e_time, bool set_addtime, uint8 eventGroup);
- template<typename T>
- is_lambda_event<T> AddEvent(T&& event, Milliseconds e_time, bool set_addtime = true) { AddEvent(new LambdaBasicEvent<T>(std::move(event)), e_time, set_addtime); }
- void AddEventAtOffset(BasicEvent* event, Milliseconds offset) { AddEvent(event, CalculateTime(offset.count()), true, 0); }
- void AddEventAtOffset(BasicEvent* event, Milliseconds offset, Milliseconds offset2) { AddEvent(event, CalculateTime(randtime(offset, offset2).count()), true, false); }
- template<typename T>
- is_lambda_event<T> AddEventAtOffset(T&& event, Milliseconds offset, uint8 eventGroup) { AddEvent(new LambdaBasicEvent<T>(std::move(event)), CalculateTime(offset.count()), true, eventGroup); };
+
+ void AddEvent(BasicEvent* Event, uint64 e_time, bool set_addtime = true, uint8 eventGroup = 0);
template<typename T>
- is_lambda_event<T> AddEventAtOffset(T&& event, Milliseconds offset, Milliseconds offset2, uint8 eventGroup) { AddEvent(new LambdaBasicEvent<T>(std::move(event)), CalculateTime(randtime(offset, offset2).count()), true, eventGroup); };
+ is_lambda_event<T> AddEvent(T&& event, Milliseconds e_time, bool set_addtime = true, uint8 eventGroup = 0) { AddEvent(new LambdaBasicEvent<T>(std::move(event)), e_time.count(), set_addtime, eventGroup); }
+
+ void AddEventAtOffset(BasicEvent* event, Milliseconds offset, uint8 eventGroup = 0) { AddEvent(event, CalculateTime(offset.count()), true, eventGroup); }
template<typename T>
- is_lambda_event<T> AddEventAtOffset(T&& event, Milliseconds offset) { AddEventAtOffset(new LambdaBasicEvent<T>(std::move(event)), offset); }
+ is_lambda_event<T> AddEventAtOffset(T&& event, Milliseconds offset, uint8 eventGroup = 0) { AddEventAtOffset(new LambdaBasicEvent<T>(std::move(event)), offset, eventGroup); };
+
+ void AddEventAtOffset(BasicEvent* event, Milliseconds offset, Milliseconds offset2, uint8 eventGroup = 0) { AddEvent(event, CalculateTime(randtime(offset, offset2).count()), true, eventGroup); }
template<typename T>
- is_lambda_event<T> AddEventAtOffset(T&& event, Milliseconds offset, Milliseconds offset2) { AddEventAtOffset(new LambdaBasicEvent<T>(std::move(event)), offset, offset2); }
+ is_lambda_event<T> AddEventAtOffset(T&& event, Milliseconds offset, Milliseconds offset2, uint8 eventGroup = 0) { AddEventAtOffset(new LambdaBasicEvent<T>(std::move(event)), offset, offset2, eventGroup); };
+
void ModifyEventTime(BasicEvent* event, Milliseconds newTime);
[[nodiscard]] uint64 CalculateTime(uint64 t_offset) const;
@@ -121,6 +120,7 @@ class EventProcessor
[[nodiscard]] uint64 CalculateQueueTime(uint64 delay) const;
void CancelEventGroup(uint8 group);
+ bool HasEvents() const { return !m_events.empty(); }
protected:
uint64 m_time{0};
diff --git a/src/common/Utilities/Geometry.h b/src/common/Utilities/Geometry.h
index 75affe53bc..8220479f87 100644
--- a/src/common/Utilities/Geometry.h
+++ b/src/common/Utilities/Geometry.h
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/common/Utilities/IteratorPair.h b/src/common/Utilities/IteratorPair.h
index 9ecef39e6f..bbb920a3f7 100644
--- a/src/common/Utilities/IteratorPair.h
+++ b/src/common/Utilities/IteratorPair.h
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/common/Utilities/MathUtil.h b/src/common/Utilities/MathUtil.h
index f1df43e7db..cd5bbc7da4 100644
--- a/src/common/Utilities/MathUtil.h
+++ b/src/common/Utilities/MathUtil.h
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/common/Utilities/MessageBuffer.h b/src/common/Utilities/MessageBuffer.h
index f0b3db9ff3..87bd79f424 100644
--- a/src/common/Utilities/MessageBuffer.h
+++ b/src/common/Utilities/MessageBuffer.h
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/common/Utilities/Optional.h b/src/common/Utilities/Optional.h
index 594827bcfd..5c75752b9c 100644
--- a/src/common/Utilities/Optional.h
+++ b/src/common/Utilities/Optional.h
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/common/Utilities/Physics.h b/src/common/Utilities/Physics.h
index 3f4d93a67d..cee3046db3 100644
--- a/src/common/Utilities/Physics.h
+++ b/src/common/Utilities/Physics.h
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/common/Utilities/Random.cpp b/src/common/Utilities/Random.cpp
index babf235005..4794b75606 100644
--- a/src/common/Utilities/Random.cpp
+++ b/src/common/Utilities/Random.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/common/Utilities/Random.h b/src/common/Utilities/Random.h
index 654b1817d2..e689079579 100644
--- a/src/common/Utilities/Random.h
+++ b/src/common/Utilities/Random.h
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/common/Utilities/SFMTRand.cpp b/src/common/Utilities/SFMTRand.cpp
index d21432bc94..b0125f5b76 100644
--- a/src/common/Utilities/SFMTRand.cpp
+++ b/src/common/Utilities/SFMTRand.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/common/Utilities/SFMTRand.h b/src/common/Utilities/SFMTRand.h
index e24cfe198d..61e704162d 100644
--- a/src/common/Utilities/SFMTRand.h
+++ b/src/common/Utilities/SFMTRand.h
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/common/Utilities/SignalHandler.h b/src/common/Utilities/SignalHandler.h
index 42283f51cd..a8426e2e23 100644
--- a/src/common/Utilities/SignalHandler.h
+++ b/src/common/Utilities/SignalHandler.h
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/common/Utilities/SmartEnum.h b/src/common/Utilities/SmartEnum.h
index 0d9fe30662..a3ce5608a0 100644
--- a/src/common/Utilities/SmartEnum.h
+++ b/src/common/Utilities/SmartEnum.h
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/common/Utilities/StartProcess.cpp b/src/common/Utilities/StartProcess.cpp
index 5218b6b3ac..7826ec71b4 100644
--- a/src/common/Utilities/StartProcess.cpp
+++ b/src/common/Utilities/StartProcess.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/common/Utilities/StartProcess.h b/src/common/Utilities/StartProcess.h
index 6de13d1be9..a375a9b8c4 100644
--- a/src/common/Utilities/StartProcess.h
+++ b/src/common/Utilities/StartProcess.h
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/common/Utilities/StringConvert.h b/src/common/Utilities/StringConvert.h
index 4f51b9746e..b2fc5d7904 100644
--- a/src/common/Utilities/StringConvert.h
+++ b/src/common/Utilities/StringConvert.h
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/common/Utilities/StringFormat.cpp b/src/common/Utilities/StringFormat.cpp
index ff116d5883..55edca8155 100644
--- a/src/common/Utilities/StringFormat.cpp
+++ b/src/common/Utilities/StringFormat.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/common/Utilities/StringFormat.h b/src/common/Utilities/StringFormat.h
index d4d93f2324..8befb6ffbd 100644
--- a/src/common/Utilities/StringFormat.h
+++ b/src/common/Utilities/StringFormat.h
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/common/Utilities/Systemd.cpp b/src/common/Utilities/Systemd.cpp
new file mode 100644
index 0000000000..f7c39cfb17
--- /dev/null
+++ b/src/common/Utilities/Systemd.cpp
@@ -0,0 +1,59 @@
+/*
+ * This file is part of the AzerothCore Project. See AUTHORS file for Copyright information.
+ *
+ * Portions of this file are derived from systemd, licensed under:
+ * - GPL-2.0-or-later (if the original systemd file was GPL-2.0+)
+ * OR
+ * - LGPL-2.1-or-later, relicensed under GPL-2.0-or-later as permitted by LGPL-2.1+
+ *
+ * Original systemd copyright:
+ * Copyright (c) the systemd contributors.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
+ * more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#if defined(__linux__)
+#include "Log.h"
+#include "StringConvert.h"
+#include <cstdlib>
+#include <unistd.h>
+#include <string>
+
+int get_listen_fd()
+{
+ char* const listen_pid = std::getenv("LISTEN_PID");
+ char* const listen_fds = std::getenv("LISTEN_FDS");
+ if (!listen_pid || !listen_fds)
+ return 0;
+
+ pid_t pid = Acore::StringTo<int>(listen_pid).value_or(0);
+ if (pid != getpid())
+ return 0;
+
+ int fds = Acore::StringTo<int>(listen_fds).value_or(0);
+ if (fds <= 0)
+ return 0;
+
+ if (fds > 1)
+ LOG_WARN("network", "Multiple file descriptors received from systemd socket activation, only the first will be used");
+
+ return 3;
+}
+#else
+// On non-Linux systems, just return 0 (no socket activation)
+int get_listen_fd()
+{
+ return 0;
+}
+#endif
diff --git a/src/common/Utilities/Systemd.h b/src/common/Utilities/Systemd.h
new file mode 100644
index 0000000000..312345cea1
--- /dev/null
+++ b/src/common/Utilities/Systemd.h
@@ -0,0 +1,31 @@
+/*
+ * This file is part of the AzerothCore Project. See AUTHORS file for Copyright information.
+ *
+ * Portions of this file are derived from systemd, licensed under:
+ * - GPL-2.0-or-later (if the original systemd file was GPL-2.0+)
+ * OR
+ * - LGPL-2.1-or-later, relicensed under GPL-2.0-or-later as permitted by LGPL-2.1+
+ *
+ * Original systemd copyright:
+ * Copyright (c) the systemd contributors.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
+ * more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#ifndef _SYSTEMD_H_
+#define _SYSTEMD_H_
+
+int get_listen_fd();
+
+#endif
diff --git a/src/common/Utilities/TaskScheduler.cpp b/src/common/Utilities/TaskScheduler.cpp
index 8e07e0ed03..285242629d 100644
--- a/src/common/Utilities/TaskScheduler.cpp
+++ b/src/common/Utilities/TaskScheduler.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/common/Utilities/TaskScheduler.h b/src/common/Utilities/TaskScheduler.h
index 4e422d6375..2dcc72e926 100644
--- a/src/common/Utilities/TaskScheduler.h
+++ b/src/common/Utilities/TaskScheduler.h
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/common/Utilities/Timer.cpp b/src/common/Utilities/Timer.cpp
index 54913163fe..e8941fff1c 100644
--- a/src/common/Utilities/Timer.cpp
+++ b/src/common/Utilities/Timer.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/common/Utilities/Timer.h b/src/common/Utilities/Timer.h
index e8d3924392..9dca405999 100644
--- a/src/common/Utilities/Timer.h
+++ b/src/common/Utilities/Timer.h
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/common/Utilities/Tokenize.cpp b/src/common/Utilities/Tokenize.cpp
index 3ceb57f087..d71feb9ea4 100644
--- a/src/common/Utilities/Tokenize.cpp
+++ b/src/common/Utilities/Tokenize.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/common/Utilities/Tokenize.h b/src/common/Utilities/Tokenize.h
index 6ee20ca53e..4ade43a4fe 100644
--- a/src/common/Utilities/Tokenize.h
+++ b/src/common/Utilities/Tokenize.h
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/common/Utilities/Tuples.h b/src/common/Utilities/Tuples.h
index f648e20e64..076c322256 100644
--- a/src/common/Utilities/Tuples.h
+++ b/src/common/Utilities/Tuples.h
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/common/Utilities/Types.h b/src/common/Utilities/Types.h
index ad7b2c4983..f15bc06140 100644
--- a/src/common/Utilities/Types.h
+++ b/src/common/Utilities/Types.h
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/common/Utilities/Util.cpp b/src/common/Utilities/Util.cpp
index 56cc75e166..6e5757f1ee 100644
--- a/src/common/Utilities/Util.cpp
+++ b/src/common/Utilities/Util.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/common/Utilities/Util.h b/src/common/Utilities/Util.h
index e5ced06991..3976d4e76b 100644
--- a/src/common/Utilities/Util.h
+++ b/src/common/Utilities/Util.h
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
@@ -47,15 +47,6 @@ AC_COMMON_API Optional<int32> MoneyStringToMoney(std::string_view moneyString);
std::string secsToTimeString(uint64 timeInSecs, bool shortText = false);
uint32 TimeStringToSecs(const std::string& timestring);
-inline void ApplyPercentModFloatVar(float& var, float val, bool apply)
-{
- if (val == -100.0f) // prevent set var to zero
- {
- val = -99.99f;
- }
- var *= (apply ? (100.0f + val) / 100.0f : 100.0f / (100.0f + val));
-}
-
// Percentage calculation
template <class T, class U>
inline T CalculatePct(T base, U pct)
diff --git a/src/common/Utilities/advstd.h b/src/common/Utilities/advstd.h
index eafe58e4cd..abf77201f3 100644
--- a/src/common/Utilities/advstd.h
+++ b/src/common/Utilities/advstd.h
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/apps/authserver/Authentication/AuthCodes.cpp b/src/server/apps/authserver/Authentication/AuthCodes.cpp
index 0f7e5d0e09..663b7809ef 100644
--- a/src/server/apps/authserver/Authentication/AuthCodes.cpp
+++ b/src/server/apps/authserver/Authentication/AuthCodes.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/apps/authserver/Authentication/AuthCodes.h b/src/server/apps/authserver/Authentication/AuthCodes.h
index 8482b3acf9..de0a7136fa 100644
--- a/src/server/apps/authserver/Authentication/AuthCodes.h
+++ b/src/server/apps/authserver/Authentication/AuthCodes.h
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/apps/authserver/Main.cpp b/src/server/apps/authserver/Main.cpp
index b5fbb319a4..6d351336a2 100644
--- a/src/server/apps/authserver/Main.cpp
+++ b/src/server/apps/authserver/Main.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
@@ -278,7 +278,8 @@ variables_map GetConsoleArguments(int argc, char** argv, fs::path& configFile)
("help,h", "print usage message")
("version,v", "print version build info")
("dry-run,d", "Dry run")
- ("config,c", value<fs::path>(&configFile)->default_value(fs::path(sConfigMgr->GetConfigPath() + std::string(_ACORE_REALM_CONFIG))), "use <arg> as configuration file");
+ ("config,c", value<fs::path>(&configFile)->default_value(fs::path(sConfigMgr->GetConfigPath() + std::string(_ACORE_REALM_CONFIG))), "use <arg> as configuration file")
+ ("config-policy", value<std::string>()->value_name("policy"), "override config severity policy (e.g. default=skip,critical_option=fatal)");
variables_map variablesMap;
diff --git a/src/server/apps/authserver/PrecompiledHeaders/authserverPCH.h b/src/server/apps/authserver/PrecompiledHeaders/authserverPCH.h
index e252912e7c..684ecd6f4c 100644
--- a/src/server/apps/authserver/PrecompiledHeaders/authserverPCH.h
+++ b/src/server/apps/authserver/PrecompiledHeaders/authserverPCH.h
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/apps/authserver/Server/AuthSession.cpp b/src/server/apps/authserver/Server/AuthSession.cpp
index c59cfb13c2..29c0c643cf 100644
--- a/src/server/apps/authserver/Server/AuthSession.cpp
+++ b/src/server/apps/authserver/Server/AuthSession.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/apps/authserver/Server/AuthSession.h b/src/server/apps/authserver/Server/AuthSession.h
index f6f7c9ddef..1c5e28eee5 100644
--- a/src/server/apps/authserver/Server/AuthSession.h
+++ b/src/server/apps/authserver/Server/AuthSession.h
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/apps/authserver/Server/AuthSocketMgr.h b/src/server/apps/authserver/Server/AuthSocketMgr.h
index 5ceaeeacb0..162a6363c8 100644
--- a/src/server/apps/authserver/Server/AuthSocketMgr.h
+++ b/src/server/apps/authserver/Server/AuthSocketMgr.h
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/apps/authserver/authserver.rc b/src/server/apps/authserver/authserver.rc
index 0b30740e63..3cf579e6c0 100644
--- a/src/server/apps/authserver/authserver.rc
+++ b/src/server/apps/authserver/authserver.rc
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/apps/worldserver/ACSoap/ACSoap.cpp b/src/server/apps/worldserver/ACSoap/ACSoap.cpp
index a63542ec25..247f6bb956 100644
--- a/src/server/apps/worldserver/ACSoap/ACSoap.cpp
+++ b/src/server/apps/worldserver/ACSoap/ACSoap.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/apps/worldserver/ACSoap/ACSoap.h b/src/server/apps/worldserver/ACSoap/ACSoap.h
index 4463edf640..bcdccc07bd 100644
--- a/src/server/apps/worldserver/ACSoap/ACSoap.h
+++ b/src/server/apps/worldserver/ACSoap/ACSoap.h
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/apps/worldserver/CommandLine/CliRunnable.cpp b/src/server/apps/worldserver/CommandLine/CliRunnable.cpp
index 6db897bde2..78b723a27a 100644
--- a/src/server/apps/worldserver/CommandLine/CliRunnable.cpp
+++ b/src/server/apps/worldserver/CommandLine/CliRunnable.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/apps/worldserver/CommandLine/CliRunnable.h b/src/server/apps/worldserver/CommandLine/CliRunnable.h
index b4ac398a1d..1be6838b82 100644
--- a/src/server/apps/worldserver/CommandLine/CliRunnable.h
+++ b/src/server/apps/worldserver/CommandLine/CliRunnable.h
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/apps/worldserver/Main.cpp b/src/server/apps/worldserver/Main.cpp
index bdc2f860f7..511c17e367 100644
--- a/src/server/apps/worldserver/Main.cpp
+++ b/src/server/apps/worldserver/Main.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
@@ -48,6 +48,7 @@
#include "SecretMgr.h"
#include "SharedDefines.h"
#include "SteadyTimer.h"
+#include "Systemd.h"
#include "World.h"
#include "WorldSessionMgr.h"
#include "WorldSocket.h"
@@ -406,7 +407,8 @@ int main(int argc, char** argv)
sScriptMgr->OnShutdown();
// set server offline
- LoginDatabase.DirectExecute("UPDATE realmlist SET flag = flag | {} WHERE id = '{}'", REALM_FLAG_OFFLINE, realm.Id.Realm);
+ if (!sConfigMgr->GetOption<bool>("Network.UseSocketActivation", false))
+ LoginDatabase.DirectExecute("UPDATE realmlist SET flag = flag | {} WHERE id = '{}'", REALM_FLAG_OFFLINE, realm.Id.Realm);
LOG_INFO("server.worldserver", "Halting process...");
@@ -423,7 +425,7 @@ bool StartDB()
MySQL::Library_Init();
// Load databases
- DatabaseLoader loader("server.worldserver", DatabaseLoader::DATABASE_NONE, AC_MODULES_LIST);
+ DatabaseLoader loader("server.worldserver", DatabaseLoader::DATABASE_MASK_ALL, AC_MODULES_LIST);
loader
.AddDatabase(LoginDatabase, "Login")
.AddDatabase(CharacterDatabase, "Character")
@@ -433,7 +435,7 @@ bool StartDB()
return false;
///- Get the realm Id from the configuration file
- realm.Id.Realm = sConfigMgr->GetOption<uint32>("RealmID", 0);
+ realm.Id.Realm = sConfigMgr->GetOption<uint32>("RealmID", 1);
if (!realm.Id.Realm)
{
LOG_ERROR("server.worldserver", "Realm ID not defined in configuration file");
@@ -710,7 +712,8 @@ variables_map GetConsoleArguments(int argc, char** argv, fs::path& configFile, [
("help,h", "print usage message")
("version,v", "print version build info")
("dry-run,d", "Dry run")
- ("config,c", value<fs::path>(&configFile)->default_value(fs::path(sConfigMgr->GetConfigPath() + std::string(_ACORE_CORE_CONFIG))), "use <arg> as configuration file");
+ ("config,c", value<fs::path>(&configFile)->default_value(fs::path(sConfigMgr->GetConfigPath() + std::string(_ACORE_CORE_CONFIG))), "use <arg> as configuration file")
+ ("config-policy", value<std::string>()->value_name("policy"), "override config severity policy (e.g. default=skip,critical_option=fatal)");
#if AC_PLATFORM == AC_PLATFORM_WINDOWS
options_description win("Windows platform specific options");
diff --git a/src/server/apps/worldserver/PrecompiledHeaders/worldserverPCH.h b/src/server/apps/worldserver/PrecompiledHeaders/worldserverPCH.h
index 8b86ed3cc0..b40325803b 100644
--- a/src/server/apps/worldserver/PrecompiledHeaders/worldserverPCH.h
+++ b/src/server/apps/worldserver/PrecompiledHeaders/worldserverPCH.h
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/apps/worldserver/RemoteAccess/RASession.cpp b/src/server/apps/worldserver/RemoteAccess/RASession.cpp
index a6926dd5bc..03645044ec 100644
--- a/src/server/apps/worldserver/RemoteAccess/RASession.cpp
+++ b/src/server/apps/worldserver/RemoteAccess/RASession.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/apps/worldserver/RemoteAccess/RASession.h b/src/server/apps/worldserver/RemoteAccess/RASession.h
index 2addfd2623..27e2ab4a6e 100644
--- a/src/server/apps/worldserver/RemoteAccess/RASession.h
+++ b/src/server/apps/worldserver/RemoteAccess/RASession.h
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/apps/worldserver/worldserver.conf.dist b/src/server/apps/worldserver/worldserver.conf.dist
index 8f54e0dd0e..fd9c61cfed 100644
--- a/src/server/apps/worldserver/worldserver.conf.dist
+++ b/src/server/apps/worldserver/worldserver.conf.dist
@@ -344,6 +344,14 @@ Updates.AllowRehash = 1
Updates.CleanDeadRefMaxCount = 3
#
+# Updates.ExceptionShutdownDelay
+# Description: Time (in milliseconds) to wait before shutting down after a fatal exception (e.g. failed SQL update).
+# Default: 10000 - 10 seconds
+# 0 - Disabled (immediate shutdown)
+
+Updates.ExceptionShutdownDelay = 10000
+
+#
###################################################################################################
###################################################################################################
@@ -390,6 +398,20 @@ Network.TcpNodelay = 1
Network.EnableProxyProtocol = 0
#
+# Network.UseSocketActivation
+# Description: Enable systemd socket activation support for the worldserver.
+# When enabled and the process is started by systemd socket activation,
+# the server will use the socket passed by systemd instead of
+# creating and binding its own listening socket. Disabled by default.
+#
+# When enabled the realm is not automatically set as offline on shutdown.
+#
+# Example: 1 - (Enabled)
+# Default: 0 - (Disabled)
+
+Network.UseSocketActivation = 0
+
+#
###################################################################################################
###################################################################################################
@@ -2343,6 +2365,18 @@ Rate.Reputation.LowLevel.Quest = 1
Rate.Reputation.RecruitAFriendBonus = 0.1
#
+# Rate.Reputation.Gain.WSG
+# Rate.Reputation.Gain.AB
+# Rate.Reputation.Gain.AV
+# Description: Reputation bonus rate for WSG, AB and AV battlegrounds.
+# This is applied IN ADDITION to the global Rate.Reputation.Gain.
+# Default: 1
+
+Rate.Reputation.Gain.WSG = 1
+Rate.Reputation.Gain.AB = 1
+Rate.Reputation.Gain.AV = 1
+
+#
###################################################################################################
###################################################################################################
@@ -3342,6 +3376,15 @@ DungeonAccessRequirements.LFGLevelDBCOverride = 0
DungeonFinder.CastDeserter = 1
#
+# DungeonFinder.AllowCompleted
+#
+# Description: Controls whether completed heroic dungeons are excluded from LFG queue.
+# 0 - (Classic WLK mode: Dungeons completed by any group member today are excluded (daily lockout enforced))
+# Default: 1 - (Blizzlike: All dungeons are available for queue, even if already completed)
+
+DungeonFinder.AllowCompleted = 1
+
+#
###################################################################################################
###################################################################################################
diff --git a/src/server/apps/worldserver/worldserver.rc b/src/server/apps/worldserver/worldserver.rc
index 8a2790fd84..6c8df00212 100644
--- a/src/server/apps/worldserver/worldserver.rc
+++ b/src/server/apps/worldserver/worldserver.rc
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/database/Database/AdhocStatement.cpp b/src/server/database/Database/AdhocStatement.cpp
index 1eafaa728e..939fecc931 100644
--- a/src/server/database/Database/AdhocStatement.cpp
+++ b/src/server/database/Database/AdhocStatement.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/database/Database/AdhocStatement.h b/src/server/database/Database/AdhocStatement.h
index 61469c6c28..30362eb06e 100644
--- a/src/server/database/Database/AdhocStatement.h
+++ b/src/server/database/Database/AdhocStatement.h
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/database/Database/DatabaseEnv.cpp b/src/server/database/Database/DatabaseEnv.cpp
index e6bf6b0824..561e80f4b1 100644
--- a/src/server/database/Database/DatabaseEnv.cpp
+++ b/src/server/database/Database/DatabaseEnv.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/database/Database/DatabaseEnv.h b/src/server/database/Database/DatabaseEnv.h
index b1439c64d6..3e0cd2e861 100644
--- a/src/server/database/Database/DatabaseEnv.h
+++ b/src/server/database/Database/DatabaseEnv.h
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/database/Database/DatabaseEnvFwd.h b/src/server/database/Database/DatabaseEnvFwd.h
index eb3276d164..b8e5a88827 100644
--- a/src/server/database/Database/DatabaseEnvFwd.h
+++ b/src/server/database/Database/DatabaseEnvFwd.h
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/database/Database/DatabaseLoader.cpp b/src/server/database/Database/DatabaseLoader.cpp
index 5ad77d35d6..c39aa41b93 100644
--- a/src/server/database/Database/DatabaseLoader.cpp
+++ b/src/server/database/Database/DatabaseLoader.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
@@ -24,6 +24,24 @@
#include <errmsg.h>
#include <mysqld_error.h>
#include <thread>
+#include <string_view>
+namespace
+{
+ std::string const EMPTY_DATABASE_INFO;
+ std::string const LOGIN_DATABASE_INFO_DEFAULT = "127.0.0.1;3306;acore;acore;acore_auth";
+ std::string const WORLD_DATABASE_INFO_DEFAULT = "127.0.0.1;3306;acore;acore;acore_world";
+ std::string const CHARACTER_DATABASE_INFO_DEFAULT = "127.0.0.1;3306;acore;acore;acore_characters";
+ std::string const& GetDefaultDatabaseInfo(std::string_view name)
+ {
+ if (name == "Login")
+ return LOGIN_DATABASE_INFO_DEFAULT;
+ if (name == "World")
+ return WORLD_DATABASE_INFO_DEFAULT;
+ if (name == "Character")
+ return CHARACTER_DATABASE_INFO_DEFAULT;
+ return EMPTY_DATABASE_INFO;
+ }
+}
DatabaseLoader::DatabaseLoader(std::string const& logger, uint32 const defaultUpdateMask, std::string_view modulesList)
: _logger(logger),
@@ -38,7 +56,8 @@ DatabaseLoader& DatabaseLoader::AddDatabase(DatabaseWorkerPool<T>& pool, std::st
_open.push([this, name, updatesEnabledForThis, &pool]() -> bool
{
- std::string const dbString = sConfigMgr->GetOption<std::string>(name + "DatabaseInfo", "");
+ std::string const& defaultDatabaseInfo = GetDefaultDatabaseInfo(name);
+ std::string const dbString = sConfigMgr->GetOption<std::string>(name + "DatabaseInfo", defaultDatabaseInfo);
if (dbString.empty())
{
LOG_ERROR(_logger, "Database {} not specified in configuration file!", name);
diff --git a/src/server/database/Database/DatabaseLoader.h b/src/server/database/Database/DatabaseLoader.h
index 233b0a5be9..0f18315e6c 100644
--- a/src/server/database/Database/DatabaseLoader.h
+++ b/src/server/database/Database/DatabaseLoader.h
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/database/Database/DatabaseWorker.cpp b/src/server/database/Database/DatabaseWorker.cpp
index 49965e1835..f1c2f23e83 100644
--- a/src/server/database/Database/DatabaseWorker.cpp
+++ b/src/server/database/Database/DatabaseWorker.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/database/Database/DatabaseWorker.h b/src/server/database/Database/DatabaseWorker.h
index 7ce560b3d1..e36eed0a97 100644
--- a/src/server/database/Database/DatabaseWorker.h
+++ b/src/server/database/Database/DatabaseWorker.h
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/database/Database/DatabaseWorkerPool.cpp b/src/server/database/Database/DatabaseWorkerPool.cpp
index 968e4e4282..ee19a5a48c 100644
--- a/src/server/database/Database/DatabaseWorkerPool.cpp
+++ b/src/server/database/Database/DatabaseWorkerPool.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/database/Database/DatabaseWorkerPool.h b/src/server/database/Database/DatabaseWorkerPool.h
index fb11b2a4ab..d9b418b1b8 100644
--- a/src/server/database/Database/DatabaseWorkerPool.h
+++ b/src/server/database/Database/DatabaseWorkerPool.h
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/database/Database/Field.cpp b/src/server/database/Database/Field.cpp
index 83158aab9a..b60f20d8af 100644
--- a/src/server/database/Database/Field.cpp
+++ b/src/server/database/Database/Field.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/database/Database/Field.h b/src/server/database/Database/Field.h
index bfdd3cc1a1..2a1daac91d 100644
--- a/src/server/database/Database/Field.h
+++ b/src/server/database/Database/Field.h
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/database/Database/Implementation/CharacterDatabase.cpp b/src/server/database/Database/Implementation/CharacterDatabase.cpp
index 27a8b8940a..1b8650b496 100644
--- a/src/server/database/Database/Implementation/CharacterDatabase.cpp
+++ b/src/server/database/Database/Implementation/CharacterDatabase.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/database/Database/Implementation/CharacterDatabase.h b/src/server/database/Database/Implementation/CharacterDatabase.h
index b378134c35..3ead3cf403 100644
--- a/src/server/database/Database/Implementation/CharacterDatabase.h
+++ b/src/server/database/Database/Implementation/CharacterDatabase.h
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/database/Database/Implementation/LoginDatabase.cpp b/src/server/database/Database/Implementation/LoginDatabase.cpp
index 8821fe9d35..1e091b56e4 100644
--- a/src/server/database/Database/Implementation/LoginDatabase.cpp
+++ b/src/server/database/Database/Implementation/LoginDatabase.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/database/Database/Implementation/LoginDatabase.h b/src/server/database/Database/Implementation/LoginDatabase.h
index e11c285b4b..563cdf3eb6 100644
--- a/src/server/database/Database/Implementation/LoginDatabase.h
+++ b/src/server/database/Database/Implementation/LoginDatabase.h
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/database/Database/Implementation/WorldDatabase.cpp b/src/server/database/Database/Implementation/WorldDatabase.cpp
index f216c95838..fbae5ab12c 100644
--- a/src/server/database/Database/Implementation/WorldDatabase.cpp
+++ b/src/server/database/Database/Implementation/WorldDatabase.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/database/Database/Implementation/WorldDatabase.h b/src/server/database/Database/Implementation/WorldDatabase.h
index 016791ccd5..e6db156be3 100644
--- a/src/server/database/Database/Implementation/WorldDatabase.h
+++ b/src/server/database/Database/Implementation/WorldDatabase.h
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/database/Database/MySQLConnection.cpp b/src/server/database/Database/MySQLConnection.cpp
index e889ea65ad..48c9c4a622 100644
--- a/src/server/database/Database/MySQLConnection.cpp
+++ b/src/server/database/Database/MySQLConnection.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/database/Database/MySQLConnection.h b/src/server/database/Database/MySQLConnection.h
index 4b87a01712..d19fdc59b8 100644
--- a/src/server/database/Database/MySQLConnection.h
+++ b/src/server/database/Database/MySQLConnection.h
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/database/Database/MySQLHacks.h b/src/server/database/Database/MySQLHacks.h
index cc98f5dae3..2dfa085eff 100644
--- a/src/server/database/Database/MySQLHacks.h
+++ b/src/server/database/Database/MySQLHacks.h
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/database/Database/MySQLPreparedStatement.cpp b/src/server/database/Database/MySQLPreparedStatement.cpp
index a2e95864ba..e2c35034af 100644
--- a/src/server/database/Database/MySQLPreparedStatement.cpp
+++ b/src/server/database/Database/MySQLPreparedStatement.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/database/Database/MySQLPreparedStatement.h b/src/server/database/Database/MySQLPreparedStatement.h
index 7bb6ce7725..8cbff4bd1a 100644
--- a/src/server/database/Database/MySQLPreparedStatement.h
+++ b/src/server/database/Database/MySQLPreparedStatement.h
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/database/Database/MySQLThreading.cpp b/src/server/database/Database/MySQLThreading.cpp
index d15b1d70f6..86627cc7ed 100644
--- a/src/server/database/Database/MySQLThreading.cpp
+++ b/src/server/database/Database/MySQLThreading.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/database/Database/MySQLThreading.h b/src/server/database/Database/MySQLThreading.h
index c14e6872ee..df135b24e9 100644
--- a/src/server/database/Database/MySQLThreading.h
+++ b/src/server/database/Database/MySQLThreading.h
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/database/Database/MySQLWorkaround.h b/src/server/database/Database/MySQLWorkaround.h
index 1d442aab59..04bfad2072 100644
--- a/src/server/database/Database/MySQLWorkaround.h
+++ b/src/server/database/Database/MySQLWorkaround.h
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/database/Database/PreparedStatement.cpp b/src/server/database/Database/PreparedStatement.cpp
index bc9056f36f..7ffa12897b 100644
--- a/src/server/database/Database/PreparedStatement.cpp
+++ b/src/server/database/Database/PreparedStatement.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/database/Database/PreparedStatement.h b/src/server/database/Database/PreparedStatement.h
index de04749fe0..5a1e72973f 100644
--- a/src/server/database/Database/PreparedStatement.h
+++ b/src/server/database/Database/PreparedStatement.h
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/database/Database/QueryCallback.cpp b/src/server/database/Database/QueryCallback.cpp
index 2dd0525d56..15baf2654d 100644
--- a/src/server/database/Database/QueryCallback.cpp
+++ b/src/server/database/Database/QueryCallback.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/database/Database/QueryCallback.h b/src/server/database/Database/QueryCallback.h
index 9710f35dad..1526bc4ac8 100644
--- a/src/server/database/Database/QueryCallback.h
+++ b/src/server/database/Database/QueryCallback.h
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/database/Database/QueryHolder.cpp b/src/server/database/Database/QueryHolder.cpp
index c8f4375d76..8b118958d5 100644
--- a/src/server/database/Database/QueryHolder.cpp
+++ b/src/server/database/Database/QueryHolder.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/database/Database/QueryHolder.h b/src/server/database/Database/QueryHolder.h
index 2072d71ab7..7e61aa1306 100644
--- a/src/server/database/Database/QueryHolder.h
+++ b/src/server/database/Database/QueryHolder.h
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/database/Database/QueryResult.cpp b/src/server/database/Database/QueryResult.cpp
index 0e8d3c8c18..00c11b7725 100644
--- a/src/server/database/Database/QueryResult.cpp
+++ b/src/server/database/Database/QueryResult.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/database/Database/QueryResult.h b/src/server/database/Database/QueryResult.h
index f0cf4e9b5c..2aad4cffad 100644
--- a/src/server/database/Database/QueryResult.h
+++ b/src/server/database/Database/QueryResult.h
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/database/Database/SQLOperation.h b/src/server/database/Database/SQLOperation.h
index 89542886b3..06739076c5 100644
--- a/src/server/database/Database/SQLOperation.h
+++ b/src/server/database/Database/SQLOperation.h
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/database/Database/Transaction.cpp b/src/server/database/Database/Transaction.cpp
index d5cf4fcebf..6f76dfbf42 100644
--- a/src/server/database/Database/Transaction.cpp
+++ b/src/server/database/Database/Transaction.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/database/Database/Transaction.h b/src/server/database/Database/Transaction.h
index 973e657fbd..e3417cff5b 100644
--- a/src/server/database/Database/Transaction.h
+++ b/src/server/database/Database/Transaction.h
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/database/Logging/AppenderDB.cpp b/src/server/database/Logging/AppenderDB.cpp
index 41758f8154..ca382eb729 100644
--- a/src/server/database/Logging/AppenderDB.cpp
+++ b/src/server/database/Logging/AppenderDB.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/database/Logging/AppenderDB.h b/src/server/database/Logging/AppenderDB.h
index 7ec576955d..8a2a2f9e54 100644
--- a/src/server/database/Logging/AppenderDB.h
+++ b/src/server/database/Logging/AppenderDB.h
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/database/PrecompiledHeaders/databasePCH.h b/src/server/database/PrecompiledHeaders/databasePCH.h
index eeecef2120..ad18a7389b 100644
--- a/src/server/database/PrecompiledHeaders/databasePCH.h
+++ b/src/server/database/PrecompiledHeaders/databasePCH.h
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/database/Updater/DBUpdater.cpp b/src/server/database/Updater/DBUpdater.cpp
index eecce68a12..0d4e45123b 100644
--- a/src/server/database/Updater/DBUpdater.cpp
+++ b/src/server/database/Updater/DBUpdater.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
@@ -496,17 +496,13 @@ void DBUpdater<T>::ApplyFile(DatabaseWorkerPool<T>& pool, std::string const& hos
if (ssl == "ssl")
args.emplace_back("--ssl-mode=REQUIRED");
- // Execute sql file
- args.emplace_back("-e");
- args.emplace_back(Acore::StringFormat("BEGIN; SOURCE {}; COMMIT;", path.generic_string()));
-
// Database
if (!database.empty())
args.emplace_back(database);
// Invokes a mysql process which doesn't leak credentials to logs
int const ret = Acore::StartProcess(DBUpdaterUtil::GetCorrectedMySQLExecutable(), args,
- "sql.updates", "", true);
+ "sql.updates", path.generic_string(), true);
if (ret != EXIT_SUCCESS)
{
@@ -518,7 +514,12 @@ void DBUpdater<T>::ApplyFile(DatabaseWorkerPool<T>& pool, std::string const& hos
path.generic_string(), pool.GetConnectionInfo()->database);
if (!sConfigMgr->isDryRun())
+ {
+ if (uint32 delay = sConfigMgr->GetOption<uint32>("Updates.ExceptionShutdownDelay", 10000))
+ std::this_thread::sleep_for(Milliseconds(delay));
+
throw UpdateException("update failed");
+ }
}
}
diff --git a/src/server/database/Updater/DBUpdater.h b/src/server/database/Updater/DBUpdater.h
index 6ad75baf7f..58ebf33201 100644
--- a/src/server/database/Updater/DBUpdater.h
+++ b/src/server/database/Updater/DBUpdater.h
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/database/Updater/UpdateFetcher.cpp b/src/server/database/Updater/UpdateFetcher.cpp
index 67d7e393e2..b3a7eaa862 100644
--- a/src/server/database/Updater/UpdateFetcher.cpp
+++ b/src/server/database/Updater/UpdateFetcher.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/database/Updater/UpdateFetcher.h b/src/server/database/Updater/UpdateFetcher.h
index 2f9027bdba..6109e89bf6 100644
--- a/src/server/database/Updater/UpdateFetcher.h
+++ b/src/server/database/Updater/UpdateFetcher.h
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/game/AI/CoreAI/CombatAI.cpp b/src/server/game/AI/CoreAI/CombatAI.cpp
index 13609a9b56..fa1bf61b15 100644
--- a/src/server/game/AI/CoreAI/CombatAI.cpp
+++ b/src/server/game/AI/CoreAI/CombatAI.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
@@ -80,7 +80,7 @@ void CombatAI::JustEngagedWith(Unit* who)
if (AISpellInfo[*i].condition == AICOND_AGGRO)
me->CastSpell(who, *i, false);
else if (AISpellInfo[*i].condition == AICOND_COMBAT)
- events.ScheduleEvent(*i, AISpellInfo[*i].cooldown + rand() % AISpellInfo[*i].cooldown);
+ events.ScheduleEvent(*i, Milliseconds(AISpellInfo[*i].cooldown + rand() % AISpellInfo[*i].cooldown));
}
}
@@ -97,7 +97,7 @@ void CombatAI::UpdateAI(uint32 diff)
if (uint32 spellId = events.ExecuteEvent())
{
DoCast(spellId);
- events.ScheduleEvent(spellId, AISpellInfo[spellId].cooldown + rand() % AISpellInfo[spellId].cooldown);
+ events.ScheduleEvent(spellId, Milliseconds(AISpellInfo[spellId].cooldown + rand() % AISpellInfo[spellId].cooldown));
}
else
DoMeleeAttackIfReady();
@@ -143,7 +143,7 @@ void CasterAI::JustEngagedWith(Unit* who)
DoCast(spells[spell]);
cooldown += me->GetCurrentSpellCastTime(*itr);
}
- events.ScheduleEvent(*itr, cooldown);
+ events.ScheduleEvent(*itr, Milliseconds(cooldown));
}
}
}
@@ -168,7 +168,7 @@ void CasterAI::UpdateAI(uint32 diff)
{
DoCast(spellId);
uint32 casttime = me->GetCurrentSpellCastTime(spellId);
- events.ScheduleEvent(spellId, (casttime ? casttime : 500) + GetAISpellInfo(spellId)->realCooldown);
+ events.ScheduleEvent(spellId, Milliseconds((casttime ? casttime : 500) + GetAISpellInfo(spellId)->realCooldown));
}
}
diff --git a/src/server/game/AI/CoreAI/CombatAI.h b/src/server/game/AI/CoreAI/CombatAI.h
index 19dbd4618c..36ebbf58b9 100644
--- a/src/server/game/AI/CoreAI/CombatAI.h
+++ b/src/server/game/AI/CoreAI/CombatAI.h
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/game/AI/CoreAI/GameObjectAI.cpp b/src/server/game/AI/CoreAI/GameObjectAI.cpp
index 2e0b09fa01..47097946dd 100644
--- a/src/server/game/AI/CoreAI/GameObjectAI.cpp
+++ b/src/server/game/AI/CoreAI/GameObjectAI.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/game/AI/CoreAI/GameObjectAI.h b/src/server/game/AI/CoreAI/GameObjectAI.h
index b366d3c2bd..962d989d01 100644
--- a/src/server/game/AI/CoreAI/GameObjectAI.h
+++ b/src/server/game/AI/CoreAI/GameObjectAI.h
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
@@ -46,7 +46,7 @@ public:
// Pass parameters between AI
virtual void DoAction(int32 /*param = 0 */) {}
- virtual void SetGUID(ObjectGuid /*guid*/, int32 /*id = 0 */) {}
+ virtual void SetGUID(ObjectGuid const& /*guid*/, int32 /*id = 0 */) {}
virtual ObjectGuid GetGUID(int32 /*id = 0 */) const { return ObjectGuid::Empty; }
static int32 Permissible(GameObject const* go);
diff --git a/src/server/game/AI/CoreAI/GuardAI.cpp b/src/server/game/AI/CoreAI/GuardAI.cpp
index 8bf17be73e..588e93ea6c 100644
--- a/src/server/game/AI/CoreAI/GuardAI.cpp
+++ b/src/server/game/AI/CoreAI/GuardAI.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/game/AI/CoreAI/GuardAI.h b/src/server/game/AI/CoreAI/GuardAI.h
index d8c7c93109..2a15e9aa33 100644
--- a/src/server/game/AI/CoreAI/GuardAI.h
+++ b/src/server/game/AI/CoreAI/GuardAI.h
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/game/AI/CoreAI/PassiveAI.cpp b/src/server/game/AI/CoreAI/PassiveAI.cpp
index 0fbfaef991..5d9ecca752 100644
--- a/src/server/game/AI/CoreAI/PassiveAI.cpp
+++ b/src/server/game/AI/CoreAI/PassiveAI.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/game/AI/CoreAI/PassiveAI.h b/src/server/game/AI/CoreAI/PassiveAI.h
index c9844cb989..9f44ef3f86 100644
--- a/src/server/game/AI/CoreAI/PassiveAI.h
+++ b/src/server/game/AI/CoreAI/PassiveAI.h
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/game/AI/CoreAI/PetAI.cpp b/src/server/game/AI/CoreAI/PetAI.cpp
index 5b3aad614b..c4a39d6637 100644
--- a/src/server/game/AI/CoreAI/PetAI.cpp
+++ b/src/server/game/AI/CoreAI/PetAI.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/game/AI/CoreAI/PetAI.h b/src/server/game/AI/CoreAI/PetAI.h
index 7db553adb1..0d52f9679d 100644
--- a/src/server/game/AI/CoreAI/PetAI.h
+++ b/src/server/game/AI/CoreAI/PetAI.h
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/game/AI/CoreAI/ReactorAI.cpp b/src/server/game/AI/CoreAI/ReactorAI.cpp
index 9286c0ee35..b92a05725b 100644
--- a/src/server/game/AI/CoreAI/ReactorAI.cpp
+++ b/src/server/game/AI/CoreAI/ReactorAI.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/game/AI/CoreAI/ReactorAI.h b/src/server/game/AI/CoreAI/ReactorAI.h
index b6a203189b..8e2f984642 100644
--- a/src/server/game/AI/CoreAI/ReactorAI.h
+++ b/src/server/game/AI/CoreAI/ReactorAI.h
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/game/AI/CoreAI/TotemAI.cpp b/src/server/game/AI/CoreAI/TotemAI.cpp
index 79b9045930..7a207be78d 100644
--- a/src/server/game/AI/CoreAI/TotemAI.cpp
+++ b/src/server/game/AI/CoreAI/TotemAI.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
@@ -135,6 +135,6 @@ void TotemAI::AttackStart(Unit* /*victim*/)
data << me->GetGUID();
data << me->GetPositionX();
data << me->GetPositionY();
- me->GetOwner()->ToPlayer()->GetSession()->SendPacket(&data);
+ me->GetOwner()->ToPlayer()->SendDirectMessage(&data);
}
}
diff --git a/src/server/game/AI/CoreAI/TotemAI.h b/src/server/game/AI/CoreAI/TotemAI.h
index 355f7dfb5a..602f4824d9 100644
--- a/src/server/game/AI/CoreAI/TotemAI.h
+++ b/src/server/game/AI/CoreAI/TotemAI.h
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/game/AI/CoreAI/UnitAI.cpp b/src/server/game/AI/CoreAI/UnitAI.cpp
index 25d24a7cd0..81bd5ab52f 100644
--- a/src/server/game/AI/CoreAI/UnitAI.cpp
+++ b/src/server/game/AI/CoreAI/UnitAI.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/game/AI/CoreAI/UnitAI.h b/src/server/game/AI/CoreAI/UnitAI.h
index 17533d4e4c..178aaf93ba 100644
--- a/src/server/game/AI/CoreAI/UnitAI.h
+++ b/src/server/game/AI/CoreAI/UnitAI.h
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
@@ -217,7 +217,7 @@ public:
virtual void DoAction(int32 /*param*/) {}
virtual uint32 GetData(uint32 /*id = 0*/) const { return 0; }
virtual void SetData(uint32 /*id*/, uint32 /*value*/) {}
- virtual void SetGUID(ObjectGuid /*guid*/, int32 /*id*/ = 0) {}
+ virtual void SetGUID(ObjectGuid const& /*guid*/, int32 /*id*/ = 0) {}
virtual ObjectGuid GetGUID(int32 /*id*/ = 0) const { return ObjectGuid::Empty; }
// Select the best target (in <targetType> order) from the threat list that fulfill the following:
diff --git a/src/server/game/AI/CreatureAI.cpp b/src/server/game/AI/CreatureAI.cpp
index 12698c35dc..f21e93230e 100644
--- a/src/server/game/AI/CreatureAI.cpp
+++ b/src/server/game/AI/CreatureAI.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
@@ -50,9 +50,9 @@ AISpellInfoType* GetAISpellInfo(uint32 i) { return &CreatureAI::AISpellInfo[i];
* @param WorldObject target The target of the speech, in case it has elements such as $n, where the target's name will be referrenced.
* @param Milliseconds delay Delay until the creature says the text line. Creatures will talk immediately by default.
*/
-void CreatureAI::Talk(uint8 id, WorldObject const* target /*= nullptr*/, Milliseconds delay /*= 0s*/)
+void CreatureAI::Talk(uint8 id, WorldObject const* target /*= nullptr*/, Milliseconds delay /*= 0ms*/)
{
- if (delay > Seconds::zero())
+ if (delay > 0ms)
{
ObjectGuid targetGuid;
@@ -83,29 +83,19 @@ WorldObject* CreatureAI::GetSummoner() const
inline bool IsValidCombatTarget(Creature* source, Player* target)
{
if (target->IsGameMaster())
- {
return false;
- }
if (!source->IsInWorld() || !target->IsInWorld())
- {
return false;
- }
if (!source->IsAlive() || !target->IsAlive())
- {
return false;
- }
if (!source->InSamePhase(target))
- {
return false;
- }
- if (source->HasUnitState(UNIT_STATE_IN_FLIGHT) || target->HasUnitState(UNIT_STATE_IN_FLIGHT))
- {
+ if (source->IsInFlight() || target->IsInFlight())
return false;
- }
return true;
}
@@ -182,7 +172,7 @@ void CreatureAI::MoveInLineOfSight(Unit* who)
if (me->IsMoveInLineOfSightDisabled())
if (me->GetCreatureType() == CREATURE_TYPE_NON_COMBAT_PET || // nothing more to do, return
!who->IsInCombat() || // if not in combat, nothing more to do
- !me->IsWithinDist(who, ATTACK_DISTANCE, true, false)) // if in combat and in dist - neutral to all can actually assist other creatures
+ !me->IsWithinDist(who, ATTACK_DISTANCE, true, false, false)) // if in combat and in dist - neutral to all can actually assist other creatures
return;
if (me->HasReactState(REACT_AGGRESSIVE) && me->CanStartAttack(who))
diff --git a/src/server/game/AI/CreatureAI.h b/src/server/game/AI/CreatureAI.h
index cadd3b9f4c..57ea6f7ffd 100644
--- a/src/server/game/AI/CreatureAI.h
+++ b/src/server/game/AI/CreatureAI.h
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
@@ -94,7 +94,7 @@ public:
EVADE_REASON_OTHER
};
- void Talk(uint8 id, WorldObject const* whisperTarget = nullptr, Milliseconds delay = 0s);
+ void Talk(uint8 id, WorldObject const* whisperTarget = nullptr, Milliseconds delay = 0ms);
void Talk(uint8 id, Milliseconds delay) { Talk(id, nullptr, delay); }
WorldObject* GetSummoner() const;
diff --git a/src/server/game/AI/CreatureAIFactory.h b/src/server/game/AI/CreatureAIFactory.h
index 6ae188a7bb..d57e4e0b50 100644
--- a/src/server/game/AI/CreatureAIFactory.h
+++ b/src/server/game/AI/CreatureAIFactory.h
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/game/AI/CreatureAIImpl.h b/src/server/game/AI/CreatureAIImpl.h
index 5550c48400..c0bd08b1a0 100644
--- a/src/server/game/AI/CreatureAIImpl.h
+++ b/src/server/game/AI/CreatureAIImpl.h
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/game/AI/CreatureAIRegistry.cpp b/src/server/game/AI/CreatureAIRegistry.cpp
index 1982924941..42efd8d320 100644
--- a/src/server/game/AI/CreatureAIRegistry.cpp
+++ b/src/server/game/AI/CreatureAIRegistry.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/game/AI/CreatureAIRegistry.h b/src/server/game/AI/CreatureAIRegistry.h
index b3cf8aae84..93a870cb83 100644
--- a/src/server/game/AI/CreatureAIRegistry.h
+++ b/src/server/game/AI/CreatureAIRegistry.h
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/game/AI/CreatureAISelector.cpp b/src/server/game/AI/CreatureAISelector.cpp
index 2a80bf53f9..5caa213ced 100644
--- a/src/server/game/AI/CreatureAISelector.cpp
+++ b/src/server/game/AI/CreatureAISelector.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/game/AI/CreatureAISelector.h b/src/server/game/AI/CreatureAISelector.h
index 58b6a4978a..77c81b4002 100644
--- a/src/server/game/AI/CreatureAISelector.h
+++ b/src/server/game/AI/CreatureAISelector.h
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/game/AI/GameObjectAIFactory.h b/src/server/game/AI/GameObjectAIFactory.h
index 2de110f7b2..18878bcd0c 100644
--- a/src/server/game/AI/GameObjectAIFactory.h
+++ b/src/server/game/AI/GameObjectAIFactory.h
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/game/AI/ScriptedAI/ScriptedCreature.cpp b/src/server/game/AI/ScriptedAI/ScriptedCreature.cpp
index 043fa814bd..522b17e41e 100644
--- a/src/server/game/AI/ScriptedAI/ScriptedCreature.cpp
+++ b/src/server/game/AI/ScriptedAI/ScriptedCreature.cpp
@@ -1,26 +1,27 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
* with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#include "ScriptedCreature.h"
#include "Cell.h"
#include "CellImpl.h"
+#include "Containers.h"
#include "GameTime.h"
#include "GridNotifiers.h"
#include "ObjectMgr.h"
+#include "ScriptedCreature.h"
#include "Spell.h"
#include "TemporarySummon.h"
@@ -68,7 +69,7 @@ void SummonList::DespawnEntry(uint32 entry)
}
}
-void SummonList::DespawnAll(uint32 delay /*= 0*/)
+void SummonList::DespawnAll(Milliseconds delay /*= 0ms*/)
{
while (!storage_.empty())
{
@@ -141,6 +142,23 @@ Creature* SummonList::GetCreatureWithEntry(uint32 entry) const
return nullptr;
}
+Creature* SummonList::GetRandomCreatureWithEntry(uint32 entry) const
+{
+ std::vector<ObjectGuid> candidates;
+ candidates.reserve(storage_.size());
+
+ for (auto const guid : storage_)
+ if (Creature* summon = ObjectAccessor::GetCreature(*me, guid))
+ if (summon->GetEntry() == entry)
+ candidates.push_back(guid);
+
+ if (candidates.empty())
+ return nullptr;
+
+ ObjectGuid randomGuid = Acore::Containers::SelectRandomContainerElement(candidates);
+ return ObjectAccessor::GetCreature(*me, randomGuid);
+}
+
bool SummonList::IsAnyCreatureAlive() const
{
for (auto const& guid : storage_)
@@ -325,13 +343,13 @@ void ScriptedAI::ScheduleTimedEvent(Milliseconds timerMin, Milliseconds timerMax
return;
}
- scheduler.Schedule(timerMin == 0s ? timerMax : timerMin, timerMax, [exec, repeatMin, repeatMax, uniqueId](TaskContext context)
+ scheduler.Schedule(timerMin == 0ms ? timerMax : timerMin, timerMax, [exec, repeatMin, repeatMax, uniqueId](TaskContext context)
{
exec();
if (!uniqueId)
{
- repeatMax > 0s ? context.Repeat(repeatMin, repeatMax) : context.Repeat(repeatMin);
+ repeatMax > 0ms ? context.Repeat(repeatMin, repeatMax) : context.Repeat(repeatMin);
}
});
@@ -531,10 +549,6 @@ void ScriptedAI::SetEquipmentSlots(bool loadDefault, int32 mainHand /*= EQUIP_NO
if (loadDefault)
{
me->LoadEquipment(me->GetOriginalEquipmentId(), true);
- if (me->HasWeapon(OFF_ATTACK))
- me->SetCanDualWield(true);
- else
- me->SetCanDualWield(false);
return;
}
@@ -547,10 +561,6 @@ void ScriptedAI::SetEquipmentSlots(bool loadDefault, int32 mainHand /*= EQUIP_NO
if (offHand >= 0)
{
me->SetVirtualItem(1, uint32(offHand));
- if (offHand >= 1)
- me->SetCanDualWield(true);
- else
- me->SetCanDualWield(false);
}
if (ranged >= 0)
@@ -574,7 +584,7 @@ Player* ScriptedAI::SelectTargetFromPlayerList(float maxdist, uint32 excludeAura
std::vector<Player*> tList;
for(Map::PlayerList::const_iterator itr = pList.begin(); itr != pList.end(); ++itr)
{
- if (!me->IsWithinDistInMap(itr->GetSource(), maxdist, true, false) || !itr->GetSource()->IsAlive() || itr->GetSource()->IsGameMaster())
+ if (!me->IsWithinDistInMap(itr->GetSource(), maxdist, true, false, false) || !itr->GetSource()->IsAlive() || itr->GetSource()->IsGameMaster())
continue;
if (excludeAura && itr->GetSource()->HasAura(excludeAura))
continue;
@@ -662,7 +672,7 @@ void BossAI::_JustEngagedWith()
ScheduleTasks();
if (callForHelpRange)
{
- ScheduleTimedEvent(0s, [&]
+ ScheduleTimedEvent(0ms, [&]
{
me->CallForHelp(callForHelpRange);
}, 2s);
diff --git a/src/server/game/AI/ScriptedAI/ScriptedCreature.h b/src/server/game/AI/ScriptedAI/ScriptedCreature.h
index f3d9e11a51..47f8cf30c4 100644
--- a/src/server/game/AI/ScriptedAI/ScriptedCreature.h
+++ b/src/server/game/AI/ScriptedAI/ScriptedCreature.h
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
@@ -88,7 +88,7 @@ public:
void Summon(Creature const* summon) { storage_.push_back(summon->GetGUID()); }
void Despawn(Creature const* summon) { storage_.remove(summon->GetGUID()); }
void DespawnEntry(uint32 entry);
- void DespawnAll(uint32 delay = 0);
+ void DespawnAll(Milliseconds delay = 0ms);
bool IsAnyCreatureAlive() const;
bool IsAnyCreatureWithEntryAlive(uint32 entry) const;
bool IsAnyCreatureInCombat() const;
@@ -157,6 +157,7 @@ public:
uint32 GetEntryCount(uint32 entry) const;
void Respawn();
Creature* GetCreatureWithEntry(uint32 entry) const;
+ Creature* GetRandomCreatureWithEntry(uint32 entry) const;
private:
Creature* me;
@@ -355,11 +356,11 @@ struct ScriptedAI : public CreatureAI
void ClearUniqueTimedEventsDone() { _uniqueTimedEvents.clear(); }
// Schedules a timed event using task scheduler.
- void ScheduleTimedEvent(Milliseconds timerMin, Milliseconds timerMax, std::function<void()> exec, Milliseconds repeatMin, Milliseconds repeatMax = 0s, uint32 uniqueId = 0);
- void ScheduleTimedEvent(Milliseconds timerMax, std::function<void()> exec, Milliseconds repeatMin, Milliseconds repeatMax = 0s, uint32 uniqueId = 0) { ScheduleTimedEvent(0s, timerMax, exec, repeatMin, repeatMax, uniqueId); };
+ void ScheduleTimedEvent(Milliseconds timerMin, Milliseconds timerMax, std::function<void()> exec, Milliseconds repeatMin, Milliseconds repeatMax = 0ms, uint32 uniqueId = 0);
+ void ScheduleTimedEvent(Milliseconds timerMax, std::function<void()> exec, Milliseconds repeatMin, Milliseconds repeatMax = 0ms, uint32 uniqueId = 0) { ScheduleTimedEvent(0ms, timerMax, exec, repeatMin, repeatMax, uniqueId); };
// Schedules a timed event using task scheduler that never repeats. Requires an unique non-zero ID.
- void ScheduleUniqueTimedEvent(Milliseconds timer, std::function<void()> exec, uint32 uniqueId) { ScheduleTimedEvent(0s, timer, exec, 0s, 0s, uniqueId); };
+ void ScheduleUniqueTimedEvent(Milliseconds timer, std::function<void()> exec, uint32 uniqueId) { ScheduleTimedEvent(0ms, timer, exec, 0ms, 0ms, uniqueId); };
bool HealthBelowPct(uint32 pct) const { return me->HealthBelowPct(pct); }
bool HealthAbovePct(uint32 pct) const { return me->HealthAbovePct(pct); }
@@ -463,7 +464,7 @@ enum HealthCheckStatus
struct HealthCheckEventData
{
- HealthCheckEventData(uint8 healthPct, std::function<void()> exec, uint8 status = HEALTH_CHECK_SCHEDULED, bool allowedWhileCasting = true, Milliseconds Delay = 0s) : _healthPct(healthPct), _exec(exec), _status(status), _allowedWhileCasting(allowedWhileCasting), _delay(Delay) { };
+ HealthCheckEventData(uint8 healthPct, std::function<void()> exec, uint8 status = HEALTH_CHECK_SCHEDULED, bool allowedWhileCasting = true, Milliseconds Delay = 0ms) : _healthPct(healthPct), _exec(exec), _status(status), _allowedWhileCasting(allowedWhileCasting), _delay(Delay) { };
uint8 _healthPct;
std::function<void()> _exec;
diff --git a/src/server/game/AI/ScriptedAI/ScriptedEscortAI.cpp b/src/server/game/AI/ScriptedAI/ScriptedEscortAI.cpp
index ddabc130fb..bf156a6e96 100644
--- a/src/server/game/AI/ScriptedAI/ScriptedEscortAI.cpp
+++ b/src/server/game/AI/ScriptedAI/ScriptedEscortAI.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
@@ -33,7 +33,6 @@ npc_escortAI::npc_escortAI(Creature* creature) : ScriptedAI(creature),
MaxPlayerDistance(DEFAULT_MAX_PLAYER_DISTANCE),
m_pQuestForEscort(nullptr),
m_bIsActiveAttacker(true),
- m_bIsRunning(false),
m_bCanInstantRespawn(false),
m_bCanReturnToStart(false),
DespawnAtEnd(true),
@@ -186,9 +185,8 @@ void npc_escortAI::JustRespawned()
void npc_escortAI::ReturnToLastPoint()
{
float x, y, z, o;
- me->SetWalk(false);
me->GetHomePosition(x, y, z, o);
- me->GetMotionMaster()->MovePoint(POINT_LAST_POINT, x, y, z);
+ me->GetMotionMaster()->MovePoint(POINT_LAST_POINT, x, y, z, FORCED_MOVEMENT_RUN);
}
void npc_escortAI::EnterEvadeMode(EvadeReason /*why*/)
@@ -220,10 +218,10 @@ bool npc_escortAI::IsPlayerOrGroupInRange()
{
for (GroupReference* groupRef = group->GetFirstMember(); groupRef != nullptr; groupRef = groupRef->next())
if (Player* member = groupRef->GetSource())
- if (me->IsWithinDistInMap(member, GetMaxPlayerDistance(), true, false))
+ if (me->IsWithinDistInMap(member, GetMaxPlayerDistance(), true, false, false))
return true;
}
- else if (me->IsWithinDistInMap(player, GetMaxPlayerDistance(), true, false))
+ else if (me->IsWithinDistInMap(player, GetMaxPlayerDistance(), true, false, false))
return true;
}
@@ -329,7 +327,6 @@ void npc_escortAI::MovementInform(uint32 moveType, uint32 pointId)
{
LOG_DEBUG("scripts.ai", "EscortAI has returned to original position before combat");
- me->SetWalk(!m_bIsRunning);
RemoveEscortState(STATE_ESCORT_RETURNING);
if (!m_uiWPWaitTimer)
@@ -418,28 +415,8 @@ void npc_escortAI::FillPointMovementListForCreature()
}
}
-void npc_escortAI::SetRun(bool on)
-{
- if (on)
- {
- if (!m_bIsRunning)
- me->SetWalk(false);
- else
- LOG_DEBUG("scripts.ai", "EscortAI attempt to set run mode, but is already running.");
- }
- else
- {
- if (m_bIsRunning)
- me->SetWalk(true);
- else
- LOG_DEBUG("scripts.ai", "EscortAI attempt to set walk mode, but is already walking.");
- }
-
- m_bIsRunning = on;
-}
-
//TODO: get rid of this many variables passed in function.
-void npc_escortAI::Start(bool isActiveAttacker /* = true*/, bool run /* = false */, ObjectGuid playerGUID /* = ObjectGuid::Empty */, Quest const* quest /* = nullptr */, bool instantRespawn /* = false */, bool canLoopPath /* = false */, bool resetWaypoints /* = true */)
+void npc_escortAI::Start(bool isActiveAttacker /* = true*/, ObjectGuid playerGUID /* = ObjectGuid::Empty */, Quest const* quest /* = nullptr */, bool instantRespawn /* = false */, bool canLoopPath /* = false */, bool resetWaypoints /* = true */)
{
if (me->GetVictim())
{
@@ -469,7 +446,6 @@ void npc_escortAI::Start(bool isActiveAttacker /* = true*/, bool run /* = false
//set variables
m_bIsActiveAttacker = isActiveAttacker;
- m_bIsRunning = run;
m_uiPlayerGUID = playerGUID;
m_pQuestForEscort = quest;
@@ -495,17 +471,11 @@ void npc_escortAI::Start(bool isActiveAttacker /* = true*/, bool run /* = false
me->SetImmuneToNPC(false);
}
- LOG_DEBUG("scripts.ai", "EscortAI started with {} waypoints. ActiveAttacker = {}, Run = {}, PlayerGUID = {}",
- uint64(WaypointList.size()), m_bIsActiveAttacker, m_bIsRunning, m_uiPlayerGUID.ToString());
+ LOG_DEBUG("scripts.ai", "EscortAI started with {} waypoints. ActiveAttacker = {}, PlayerGUID = {}",
+ uint64(WaypointList.size()), m_bIsActiveAttacker, m_uiPlayerGUID.ToString());
CurrentWP = WaypointList.begin();
- //Set initial speed
- if (m_bIsRunning)
- me->SetWalk(false);
- else
- me->SetWalk(true);
-
AddEscortState(STATE_ESCORT_ESCORTING);
if (me->GetMotionMaster()->GetMotionSlotType(MOTION_SLOT_ACTIVE) == ESCORT_MOTION_TYPE)
me->GetMotionMaster()->MovementExpired();
diff --git a/src/server/game/AI/ScriptedAI/ScriptedEscortAI.h b/src/server/game/AI/ScriptedAI/ScriptedEscortAI.h
index 1332837ff9..a1e2aeee4a 100644
--- a/src/server/game/AI/ScriptedAI/ScriptedEscortAI.h
+++ b/src/server/game/AI/ScriptedAI/ScriptedEscortAI.h
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
@@ -90,9 +90,8 @@ public:
virtual void WaypointReached(uint32 pointId) = 0;
virtual void WaypointStart(uint32 /*pointId*/) {}
- void Start(bool isActiveAttacker = true, bool run = false, ObjectGuid playerGUID = ObjectGuid::Empty, Quest const* quest = nullptr, bool instantRespawn = false, bool canLoopPath = false, bool resetWaypoints = true);
+ void Start(bool isActiveAttacker = true, ObjectGuid playerGUID = ObjectGuid::Empty, Quest const* quest = nullptr, bool instantRespawn = false, bool canLoopPath = false, bool resetWaypoints = true);
- void SetRun(bool on = true);
void SetEscortPaused(bool on);
bool HasEscortState(uint32 escortState) { return (m_uiEscortState & escortState); }
@@ -130,7 +129,6 @@ private:
std::list<Escort_Waypoint>::iterator CurrentWP;
bool m_bIsActiveAttacker; //obsolete, determined by faction.
- bool m_bIsRunning; //all creatures are walking by default (has flag MOVEMENTFLAG_WALK)
bool m_bCanInstantRespawn; //if creature should respawn instantly after escort over (if not, database respawntime are used)
bool m_bCanReturnToStart; //if creature can walk same path (loop) without despawn. Not for regular escort quests.
bool DespawnAtEnd;
diff --git a/src/server/game/AI/ScriptedAI/ScriptedFollowerAI.cpp b/src/server/game/AI/ScriptedAI/ScriptedFollowerAI.cpp
index 019bb58b5d..ab059e8bb4 100644
--- a/src/server/game/AI/ScriptedAI/ScriptedFollowerAI.cpp
+++ b/src/server/game/AI/ScriptedAI/ScriptedFollowerAI.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
@@ -202,7 +202,7 @@ void FollowerAI::UpdateAI(uint32 uiDiff)
{
Player* member = groupRef->GetSource();
- if (member && me->IsWithinDistInMap(member, MAX_PLAYER_DISTANCE, true, false))
+ if (member && me->IsWithinDistInMap(member, MAX_PLAYER_DISTANCE, true, false, false))
{
bIsMaxRangeExceeded = false;
break;
@@ -211,7 +211,7 @@ void FollowerAI::UpdateAI(uint32 uiDiff)
}
else
{
- if (me->IsWithinDistInMap(player, MAX_PLAYER_DISTANCE, true, false))
+ if (me->IsWithinDistInMap(player, MAX_PLAYER_DISTANCE, true, false, false))
bIsMaxRangeExceeded = false;
}
}
diff --git a/src/server/game/AI/ScriptedAI/ScriptedFollowerAI.h b/src/server/game/AI/ScriptedAI/ScriptedFollowerAI.h
index f827f7e368..beec7c23ae 100644
--- a/src/server/game/AI/ScriptedAI/ScriptedFollowerAI.h
+++ b/src/server/game/AI/ScriptedAI/ScriptedFollowerAI.h
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/game/AI/ScriptedAI/ScriptedGossip.cpp b/src/server/game/AI/ScriptedAI/ScriptedGossip.cpp
index 120a75582d..cae80a09a0 100644
--- a/src/server/game/AI/ScriptedAI/ScriptedGossip.cpp
+++ b/src/server/game/AI/ScriptedAI/ScriptedGossip.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
@@ -42,7 +42,7 @@ void AddGossipItemFor(Player* player, uint32 gossipMenuID, uint32 gossipMenuItem
player->PlayerTalkClass->GetGossipMenu().AddMenuItem(gossipMenuID, gossipMenuItemID, sender, action, boxMoney);
}
-void SendGossipMenuFor(Player* player, uint32 npcTextID, ObjectGuid const guid)
+void SendGossipMenuFor(Player* player, uint32 npcTextID, ObjectGuid const& guid)
{
player->PlayerTalkClass->SendGossipMenu(npcTextID, guid);
}
diff --git a/src/server/game/AI/ScriptedAI/ScriptedGossip.h b/src/server/game/AI/ScriptedAI/ScriptedGossip.h
index eee8411480..d70d82c5ae 100644
--- a/src/server/game/AI/ScriptedAI/ScriptedGossip.h
+++ b/src/server/game/AI/ScriptedAI/ScriptedGossip.h
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
@@ -94,7 +94,7 @@ void AddGossipItemFor(Player* player, uint32 icon, std::string const& text, uint
void AddGossipItemFor(Player* player, uint32 gossipMenuID, uint32 gossipMenuItemID, uint32 sender, uint32 action, uint32 boxMoney = 0);
// Send menu text
-void SendGossipMenuFor(Player* player, uint32 npcTextID, ObjectGuid const guid);
+void SendGossipMenuFor(Player* player, uint32 npcTextID, ObjectGuid const& guid);
void SendGossipMenuFor(Player* player, uint32 npcTextID, Creature const* creature);
// Close menu
diff --git a/src/server/game/AI/SmartScripts/SmartAI.cpp b/src/server/game/AI/SmartScripts/SmartAI.cpp
index cb4067e0c8..3c952a42d9 100644
--- a/src/server/game/AI/SmartScripts/SmartAI.cpp
+++ b/src/server/game/AI/SmartScripts/SmartAI.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
@@ -43,15 +43,14 @@ SmartAI::SmartAI(Creature* c) : CreatureAI(c)
mCanRepeatPath = false;
- // spawn in run mode
- // Xinef: spawn in run mode and set mRun to run... this overrides SetWalk EVERYWHERE
- mRun = true;
mEvadeDisabled = false;
mCanAutoAttack = true;
mForcedPaused = false;
+ mForcedMovement = FORCED_MOVEMENT_NONE;
+
mEscortQuestID = 0;
mDespawnTime = 0;
@@ -109,20 +108,20 @@ void SmartAI::UpdateDespawn(const uint32 diff)
mDespawnTime -= diff;
}
-WayPoint* SmartAI::GetNextWayPoint()
+WaypointData const* SmartAI::GetNextWayPoint()
{
if (!mWayPoints || mWayPoints->empty())
return nullptr;
mCurrentWPID++;
- WPPath::const_iterator itr = mWayPoints->find(mCurrentWPID);
+ auto itr = mWayPoints->find(mCurrentWPID);
if (itr != mWayPoints->end())
{
- mLastWP = (*itr).second;
+ mLastWP = &(*itr).second;
if (mLastWP->id != mCurrentWPID)
LOG_ERROR("scripts.ai.sai", "SmartAI::GetNextWayPoint: Got not expected waypoint id {}, expected {}", mLastWP->id, mCurrentWPID);
- return (*itr).second;
+ return &(*itr).second;
}
return nullptr;
}
@@ -139,12 +138,15 @@ void SmartAI::GenerateWayPointArray(Movement::PointsArray* points)
points->clear();
points->push_back(G3D::Vector3(me->GetPositionX(), me->GetPositionY(), me->GetPositionZ()));
uint32 wpCounter = mCurrentWPID;
- WPPath::const_iterator itr;
- while ((itr = mWayPoints->find(wpCounter++)) != mWayPoints->end())
+ auto itr = mWayPoints->find(wpCounter++);
+ do
{
- WayPoint* wp = (*itr).second;
- points->push_back(G3D::Vector3(wp->x, wp->y, wp->z));
+ WaypointData const& wp = (*itr).second;
+ points->push_back(G3D::Vector3(wp.x, wp.y, wp.z));
+
+ itr = mWayPoints->find(wpCounter++);
}
+ while (itr != mWayPoints->end());
}
else
{
@@ -153,15 +155,15 @@ void SmartAI::GenerateWayPointArray(Movement::PointsArray* points)
std::vector<G3D::Vector3> pVector;
// xinef: first point in vector is unit real position
pVector.push_back(G3D::Vector3(me->GetPositionX(), me->GetPositionY(), me->GetPositionZ()));
+ uint32 wpCounter = mCurrentWPID;
+
uint32 length = (mWayPoints->size() - mCurrentWPID) * size;
uint32 cnt = 0;
- uint32 wpCounter = mCurrentWPID;
- WPPath::const_iterator itr;
- while ((itr = mWayPoints->find(wpCounter++)) != mWayPoints->end() && cnt++ <= length)
+ for (auto itr = mWayPoints->find(wpCounter); itr != mWayPoints->end() && cnt++ <= length; ++itr)
{
- WayPoint* wp = (*itr).second;
- pVector.push_back(G3D::Vector3(wp->x, wp->y, wp->z));
+ WaypointData const& wp = (*itr).second;
+ pVector.push_back(G3D::Vector3(wp.x, wp.y, wp.z));
}
if (pVector.size() > 2) // more than source + dest
@@ -190,25 +192,25 @@ void SmartAI::GenerateWayPointArray(Movement::PointsArray* points)
}
}
-void SmartAI::StartPath(bool run, uint32 path, bool repeat, Unit* invoker)
+void SmartAI::StartPath(ForcedMovement forcedMovement, uint32 path, bool repeat, Unit* invoker, PathSource pathSource)
{
if (HasEscortState(SMART_ESCORT_ESCORTING))
StopPath();
if (path)
{
- if (!LoadPath(path))
+ if (!LoadPath(path, pathSource))
return;
}
if (!mWayPoints || mWayPoints->empty())
return;
- if (WayPoint* wp = GetNextWayPoint())
+ if (WaypointData const* wp = GetNextWayPoint())
{
AddEscortState(SMART_ESCORT_ESCORTING);
mCanRepeatPath = repeat;
- SetRun(run);
+ mForcedMovement = forcedMovement;
if (invoker && invoker->IsPlayer())
{
@@ -219,21 +221,38 @@ void SmartAI::StartPath(bool run, uint32 path, bool repeat, Unit* invoker)
Movement::PointsArray pathPoints;
GenerateWayPointArray(&pathPoints);
- me->GetMotionMaster()->MoveSplinePath(&pathPoints);
- GetScript()->ProcessEventsFor(SMART_EVENT_WAYPOINT_START, nullptr, wp->id, GetScript()->GetPathId());
+ me->GetMotionMaster()->MoveSplinePath(&pathPoints, mForcedMovement);
+ GetScript()->ProcessEventsFor(SMART_EVENT_ESCORT_START, nullptr, wp->id, GetScript()->GetPathId());
}
}
-bool SmartAI::LoadPath(uint32 entry)
+bool SmartAI::LoadPath(uint32 entry, PathSource pathSource)
{
if (HasEscortState(SMART_ESCORT_ESCORTING))
return false;
- mWayPoints = sSmartWaypointMgr->GetPath(entry);
- if (!mWayPoints)
+ switch (pathSource)
{
- GetScript()->SetPathId(0);
- return false;
+ case PathSource::SMART_WAYPOINT_MGR:
+ {
+ mWayPoints = sSmartWaypointMgr->GetPath(entry);
+ if (!mWayPoints)
+ {
+ GetScript()->SetPathId(0);
+ return false;
+ }
+ break;
+ }
+ case PathSource::WAYPOINT_MGR:
+ {
+ mWayPoints = sWaypointMgr->GetPath(entry);
+ if (!mWayPoints)
+ {
+ GetScript()->SetPathId(0);
+ return false;
+ }
+ break;
+ }
}
GetScript()->SetPathId(entry);
@@ -256,7 +275,6 @@ void SmartAI::PausePath(uint32 delay, bool forced)
if (forced && !mWPReached)
{
mForcedPaused = forced;
- SetRun(mRun);
if (me->GetMotionMaster()->GetMotionSlotType(MOTION_SLOT_ACTIVE) == ESCORT_MOTION_TYPE)
me->GetMotionMaster()->MovementExpired();
@@ -264,12 +282,12 @@ void SmartAI::PausePath(uint32 delay, bool forced)
me->GetMotionMaster()->MoveIdle();//force stop
auto waypoint = mWayPoints->find(mCurrentWPID);
- if (waypoint->second->o.has_value())
+ if (waypoint->second.orientation.has_value())
{
- me->SetFacingTo(waypoint->second->o.has_value());
+ me->SetFacingTo(*waypoint->second.orientation);
}
}
- GetScript()->ProcessEventsFor(SMART_EVENT_WAYPOINT_PAUSED, nullptr, mCurrentWPID, GetScript()->GetPathId());
+ GetScript()->ProcessEventsFor(SMART_EVENT_ESCORT_PAUSED, nullptr, mCurrentWPID, GetScript()->GetPathId());
}
void SmartAI::StopPath(uint32 DespawnTime, uint32 quest, bool fail)
@@ -287,7 +305,7 @@ void SmartAI::StopPath(uint32 DespawnTime, uint32 quest, bool fail)
me->StopMoving();
me->GetMotionMaster()->MoveIdle();
- GetScript()->ProcessEventsFor(SMART_EVENT_WAYPOINT_STOPPED, nullptr, mCurrentWPID, GetScript()->GetPathId());
+ GetScript()->ProcessEventsFor(SMART_EVENT_ESCORT_STOPPED, nullptr, mCurrentWPID, GetScript()->GetPathId());
EndPath(fail);
}
@@ -356,13 +374,13 @@ void SmartAI::EndPath(bool fail)
return;
}
- GetScript()->ProcessEventsFor(SMART_EVENT_WAYPOINT_ENDED, nullptr, mCurrentWPID, GetScript()->GetPathId());
+ GetScript()->ProcessEventsFor(SMART_EVENT_ESCORT_ENDED, nullptr, mCurrentWPID, GetScript()->GetPathId());
mCurrentWPID = 0;
if (mCanRepeatPath)
{
if (IsAIControlled())
- StartPath(mRun, GetScript()->GetPathId(), true);
+ StartPath(mForcedMovement, GetScript()->GetPathId(), true);
}
else
GetScript()->SetPathId(0);
@@ -373,14 +391,12 @@ void SmartAI::EndPath(bool fail)
void SmartAI::ResumePath()
{
- SetRun(mRun);
-
if (mLastWP)
{
Movement::PointsArray pathPoints;
GenerateWayPointArray(&pathPoints);
- me->GetMotionMaster()->MoveSplinePath(&pathPoints);
+ me->GetMotionMaster()->MoveSplinePath(&pathPoints, mForcedMovement);
}
}
@@ -389,10 +405,9 @@ void SmartAI::ReturnToLastOOCPos()
if (!IsAIControlled())
return;
- me->SetWalk(false);
float x, y, z, o;
me->GetHomePosition(x, y, z, o);
- me->GetMotionMaster()->MovePoint(SMART_ESCORT_LAST_OOC_POINT, x, y, z);
+ me->GetMotionMaster()->MovePoint(SMART_ESCORT_LAST_OOC_POINT, x, y, z, FORCED_MOVEMENT_RUN);
}
void SmartAI::UpdatePath(const uint32 diff)
@@ -410,7 +425,7 @@ void SmartAI::UpdatePath(const uint32 diff)
// Xinef: allow to properly hook out of range despawn action, which in most cases should perform the same operation as dying
GetScript()->ProcessEventsFor(SMART_EVENT_DEATH, me);
- me->DespawnOrUnsummon(1);
+ me->DespawnOrUnsummon(1ms);
return;
}
mEscortInvokerCheckTimer = 1000;
@@ -425,7 +440,7 @@ void SmartAI::UpdatePath(const uint32 diff)
{
if (!me->IsInCombat() && !HasEscortState(SMART_ESCORT_RETURNING) && (mWPReached || mForcedPaused))
{
- GetScript()->ProcessEventsFor(SMART_EVENT_WAYPOINT_RESUMED, nullptr, mCurrentWPID, GetScript()->GetPathId());
+ GetScript()->ProcessEventsFor(SMART_EVENT_ESCORT_RESUMED, nullptr, mCurrentWPID, GetScript()->GetPathId());
RemoveEscortState(SMART_ESCORT_PAUSED);
if (mForcedPaused)// if paused between 2 wps resend movement
{
@@ -469,7 +484,6 @@ void SmartAI::UpdatePath(const uint32 diff)
EndPath();
else if (GetNextWayPoint())
{
- SetRun(mRun);
// xinef: if we have reached waypoint, and there is no working spline movement it means our splitted array has ended, make new one
if (me->movespline->Finalized())
ResumePath();
@@ -605,7 +619,7 @@ void SmartAI::MovepointReached(uint32 id)
}
mWPReached = true;
- GetScript()->ProcessEventsFor(SMART_EVENT_WAYPOINT_REACHED, nullptr, mCurrentWPID);
+ GetScript()->ProcessEventsFor(SMART_EVENT_ESCORT_REACHED, nullptr, mCurrentWPID);
if (mLastWP)
{
@@ -629,7 +643,6 @@ void SmartAI::MovepointReached(uint32 id)
EndPath();
else if (GetNextWayPoint())
{
- SetRun(mRun);
// xinef: if we have reached waypoint, and there is no working spline movement it means our splitted array has ended, make new one
if (me->movespline->Finalized())
ResumePath();
@@ -643,7 +656,7 @@ void SmartAI::MovementInform(uint32 MovementType, uint32 Data)
me->ClearUnitState(UNIT_STATE_EVADE);
if (MovementType == WAYPOINT_MOTION_TYPE)
- GetScript()->ProcessEventsFor(SMART_EVENT_WAYPOINT_DATA_REACHED, nullptr, Data + 1); // Data + 1 to align smart_scripts and waypoint_data Id rows
+ GetScript()->ProcessEventsFor(SMART_EVENT_WAYPOINT_REACHED, nullptr, Data); // data now corresponds to columns
GetScript()->ProcessEventsFor(SMART_EVENT_MOVEMENTINFORM, nullptr, MovementType, Data);
if (!HasEscortState(SMART_ESCORT_ESCORTING))
@@ -675,7 +688,6 @@ void SmartAI::EnterEvadeMode(EvadeReason /*why*/)
GetScript()->ProcessEventsFor(SMART_EVENT_EVADE); //must be after aura clear so we can cast spells from db
- SetRun(mRun);
if (HasEscortState(SMART_ESCORT_ESCORTING))
{
AddEscortState(SMART_ESCORT_RETURNING);
@@ -794,7 +806,7 @@ void SmartAI::JustReachedHome()
GetScript()->ProcessEventsFor(SMART_EVENT_REACHED_HOME);
if (!UpdateVictim() && me->GetMotionMaster()->GetCurrentMovementGeneratorType() == IDLE_MOTION_TYPE && me->GetWaypointPath())
- me->GetMotionMaster()->MovePath(me->GetWaypointPath(), true);
+ me->GetMotionMaster()->MoveWaypoint(me->GetWaypointPath(), true);
}
mJustReset = false;
@@ -846,11 +858,10 @@ void SmartAI::AttackStart(Unit* who)
return;
}
- if (who && me->Attack(who, me->IsWithinMeleeRange(who)))
+ if (who && me->Attack(who, me->IsWithinMeleeRange(who) || _currentRangeMode))
{
if (!me->HasUnitState(UNIT_STATE_NO_COMBAT_MOVEMENT))
{
- SetRun(mRun);
MovementGeneratorType type = me->GetMotionMaster()->GetMotionSlotType(MOTION_SLOT_ACTIVE);
if (type == ESCORT_MOTION_TYPE || type == POINT_MOTION_TYPE)
{
@@ -859,7 +870,7 @@ void SmartAI::AttackStart(Unit* who)
me->GetMotionMaster()->Clear(false);
}
- me->GetMotionMaster()->MoveChase(who);
+ me->GetMotionMaster()->MoveChase(who, _attackDistance);
}
}
}
@@ -930,6 +941,35 @@ void SmartAI::PassengerBoarded(Unit* who, int8 seatId, bool apply)
void SmartAI::InitializeAI()
{
GetScript()->OnInitialize(me);
+
+ for (SmartScriptHolder const& event : GetScript()->GetEvents())
+ {
+ if (event.GetActionType() != SMART_ACTION_CAST)
+ continue;
+
+ if (!(event.action.cast.castFlags & SMARTCAST_MAIN_SPELL))
+ continue;
+
+ SetMainSpell(event.action.cast.spell);
+ break;
+ }
+
+ // Fallback: use first SMARTCAST_COMBAT_MOVE if no MAIN_SPELL found
+ if (!_currentRangeMode)
+ {
+ for (SmartScriptHolder const& event : GetScript()->GetEvents())
+ {
+ if (event.GetActionType() != SMART_ACTION_CAST)
+ continue;
+
+ if (!(event.action.cast.castFlags & SMARTCAST_COMBAT_MOVE))
+ continue;
+
+ SetMainSpell(event.action.cast.spell);
+ break;
+ }
+ }
+
if (!me->isDead())
{
mJustReset = true;
@@ -952,9 +992,7 @@ void SmartAI::OnCharmed(bool /* apply */)
if (!charmed && !me->IsInEvadeMode())
{
if (mCanRepeatPath)
- StartPath(mRun, GetScript()->GetPathId(), true);
- else
- me->SetWalk(!mRun);
+ StartPath(mForcedMovement, GetScript()->GetPathId(), true);
if (Unit* charmer = me->GetCharmer())
AttackStart(charmer);
@@ -993,7 +1031,7 @@ void SmartAI::SetData(uint32 id, uint32 value, WorldObject* invoker)
GetScript()->ProcessEventsFor(SMART_EVENT_DATA_SET, unit, id, value, false, nullptr, gob);
}
-void SmartAI::SetGUID(ObjectGuid /*guid*/, int32 /*id*/)
+void SmartAI::SetGUID(ObjectGuid const& /*guid*/, int32 /*id*/)
{
}
@@ -1002,12 +1040,6 @@ ObjectGuid SmartAI::GetGUID(int32 /*id*/) const
return ObjectGuid::Empty;
}
-void SmartAI::SetRun(bool run)
-{
- me->SetWalk(!run);
- mRun = run;
-}
-
void SmartAI::SetFly(bool fly)
{
// xinef: set proper flag!
@@ -1080,6 +1112,20 @@ void SmartAI::SetCurrentRangeMode(bool on, float range)
me->GetMotionMaster()->MoveChase(victim, _attackDistance);
}
+void SmartAI::SetMainSpell(uint32 spellId)
+{
+ SpellInfo const* spellInfo = sSpellMgr->GetSpellInfo(spellId);
+ if (!spellInfo)
+ return;
+
+ float maxRange = spellInfo->GetMaxRange(false);
+ if (maxRange <= NOMINAL_MELEE_RANGE)
+ return;
+
+ _attackDistance = std::max(maxRange - NOMINAL_MELEE_RANGE, 0.0f);
+ _currentRangeMode = true;
+}
+
void SmartAI::DistanceYourself(float range)
{
Unit* victim = me->GetVictim();
@@ -1108,7 +1154,6 @@ void SmartAI::SetFollow(Unit* target, float dist, float angle, uint32 credit, ui
mFollowArrivedEntry = end;
mFollowArrivedAlive = !aliveState; // negate - 0 is alive
mFollowCreditType = creditType;
- SetRun(mRun);
me->GetMotionMaster()->MoveFollow(target, mFollowDist, mFollowAngle);
}
@@ -1167,7 +1212,7 @@ void SmartAI::OnSpellClick(Unit* clicker, bool& /*result*/)
void SmartAI::PathEndReached(uint32 /*pathId*/)
{
- GetScript()->ProcessEventsFor(SMART_EVENT_WAYPOINT_DATA_ENDED, nullptr, 0, me->GetWaypointPath());
+ GetScript()->ProcessEventsFor(SMART_EVENT_WAYPOINT_ENDED, nullptr, 0, me->GetWaypointPath());
me->LoadPath(0);
}
diff --git a/src/server/game/AI/SmartScripts/SmartAI.h b/src/server/game/AI/SmartScripts/SmartAI.h
index 5bd9fcd8b3..0876336458 100644
--- a/src/server/game/AI/SmartScripts/SmartAI.h
+++ b/src/server/game/AI/SmartScripts/SmartAI.h
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
@@ -52,13 +52,13 @@ public:
bool IsAIControlled() const;
// Start moving to the desired MovePoint
- void StartPath(bool run = false, uint32 path = 0, bool repeat = false, Unit* invoker = nullptr);
- bool LoadPath(uint32 entry);
+ void StartPath(ForcedMovement forcedMovement = FORCED_MOVEMENT_NONE, uint32 path = 0, bool repeat = false, Unit* invoker = nullptr, PathSource pathSource = PathSource::SMART_WAYPOINT_MGR);
+ bool LoadPath(uint32 entry, PathSource pathSource);
void PausePath(uint32 delay, bool forced = false);
void StopPath(uint32 DespawnTime = 0, uint32 quest = 0, bool fail = false);
void EndPath(bool fail = false);
void ResumePath();
- WayPoint* GetNextWayPoint();
+ WaypointData const* GetNextWayPoint();
void GenerateWayPointArray(Movement::PointsArray* points);
bool HasEscortState(uint32 uiEscortState) { return (mEscortState & uiEscortState); }
void AddEscortState(uint32 uiEscortState) { mEscortState |= uiEscortState; }
@@ -67,6 +67,7 @@ public:
void SetAutoAttack(bool on) { mCanAutoAttack = on; }
void SetCombatMovement(bool on, bool stopOrStartMovement);
void SetCurrentRangeMode(bool on, float range = 0.f);
+ void SetMainSpell(uint32 spellId);
void DistanceYourself(float range);
void SetFollow(Unit* target, float dist = 0.0f, float angle = 0.0f, uint32 credit = 0, uint32 end = 0, uint32 creditType = 0, bool aliveState = true);
void StopFollow(bool complete);
@@ -164,7 +165,7 @@ public:
void SetData(uint32 id, uint32 value, WorldObject* invoker);
// Used in scripts to share variables
- void SetGUID(ObjectGuid guid, int32 id = 0) override;
+ void SetGUID(ObjectGuid const& guid, int32 id = 0) override;
// Used in scripts to share variables
ObjectGuid GetGUID(int32 id = 0) const override;
@@ -175,9 +176,6 @@ public:
// Called at movepoint reached
void MovepointReached(uint32 id);
- // Makes the creature run/walk
- void SetRun(bool run = true);
-
void SetFly(bool fly = true);
void SetSwim(bool swim = true);
@@ -230,21 +228,21 @@ private:
void ReturnToLastOOCPos();
void UpdatePath(const uint32 diff);
SmartScript mScript;
- WPPath* mWayPoints;
+ WaypointPath const* mWayPoints;
uint32 mEscortState;
uint32 mCurrentWPID;
bool mWPReached;
bool mOOCReached;
uint32 mWPPauseTimer;
- WayPoint* mLastWP;
+ WaypointData const* mLastWP;
uint32 mEscortNPCFlags;
uint32 GetWPCount() { return mWayPoints ? mWayPoints->size() : 0; }
bool mCanRepeatPath;
- bool mRun;
bool mEvadeDisabled;
bool mCanAutoAttack;
bool mForcedPaused;
uint32 mInvincibilityHpLevel;
+ ForcedMovement mForcedMovement;
bool AssistPlayerInCombatAgainst(Unit* who);
diff --git a/src/server/game/AI/SmartScripts/SmartScript.cpp b/src/server/game/AI/SmartScripts/SmartScript.cpp
index 1a64641e95..2d18bd7503 100644
--- a/src/server/game/AI/SmartScripts/SmartScript.cpp
+++ b/src/server/game/AI/SmartScripts/SmartScript.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
@@ -707,7 +707,6 @@ void SmartScript::ProcessAction(SmartScriptHolder& e, Unit* unit, uint32 var0, u
continue;
}
- // Let us not try to cast spell if we know it is going to fail anyway. Stick to chasing and continue.
if (distanceToTarget > spellMaxRange && isWithinLOSInMap)
{
failedSpellCast = true;
@@ -745,12 +744,9 @@ void SmartScript::ProcessAction(SmartScriptHolder& e, Unit* unit, uint32 var0, u
if (e.action.cast.castFlags & SMARTCAST_COMBAT_MOVE)
{
- // If cast flag SMARTCAST_COMBAT_MOVE is set combat movement will not be allowed unless target is outside spell range, out of mana, or LOS.
- if (result == SPELL_FAILED_OUT_OF_RANGE || result == SPELL_CAST_OK)
- // if we are just out of range, we only chase until we are back in spell range.
+ if (result == SPELL_FAILED_OUT_OF_RANGE)
CAST_AI(SmartAI, me->AI())->SetCurrentRangeMode(true, std::max(spellMaxRange - NOMINAL_MELEE_RANGE, 0.0f));
- else // move into melee on any other fail
- // if spell fail for any other reason, we chase to melee range, or stay where we are if spellcast was successful.
+ else if (result != SPELL_CAST_OK)
CAST_AI(SmartAI, me->AI())->SetCurrentRangeMode(false, 0.f);
}
@@ -1683,10 +1679,7 @@ void SmartScript::ProcessAction(SmartScriptHolder& e, Unit* unit, uint32 var0, u
{
if (IsCreature(target))
{
- if (IsSmart(target->ToCreature()))
- CAST_AI(SmartAI, target->ToCreature()->AI())->SetRun(e.action.setRun.run);
- else
- target->ToCreature()->SetWalk(e.action.setRun.run ? false : true); // Xinef: reversed
+ target->ToCreature()->SetWalk(e.action.setRun.run ? false : true);
}
}
@@ -1726,12 +1719,12 @@ void SmartScript::ProcessAction(SmartScriptHolder& e, Unit* unit, uint32 var0, u
StoreCounter(e.action.setCounter.counterId, e.action.setCounter.value, e.action.setCounter.reset, e.action.setCounter.subtract);
break;
}
- case SMART_ACTION_WP_START:
+ case SMART_ACTION_ESCORT_START:
{
if (!IsSmart())
break;
- bool run = e.action.wpStart.run != 0;
+ ForcedMovement forcedMovement = static_cast<ForcedMovement>(e.action.wpStart.forcedMovement);
uint32 entry = e.action.wpStart.pathID;
bool repeat = e.action.wpStart.repeat != 0;
@@ -1745,7 +1738,7 @@ void SmartScript::ProcessAction(SmartScriptHolder& e, Unit* unit, uint32 var0, u
}
me->SetReactState((ReactStates)e.action.wpStart.reactState);
- CAST_AI(SmartAI, me->AI())->StartPath(run, entry, repeat, unit);
+ CAST_AI(SmartAI, me->AI())->StartPath(forcedMovement, entry, repeat, unit);
uint32 quest = e.action.wpStart.quest;
uint32 DespawnTime = e.action.wpStart.despawnTime;
@@ -1753,16 +1746,16 @@ void SmartScript::ProcessAction(SmartScriptHolder& e, Unit* unit, uint32 var0, u
CAST_AI(SmartAI, me->AI())->SetDespawnTime(DespawnTime);
break;
}
- case SMART_ACTION_WP_PAUSE:
+ case SMART_ACTION_ESCORT_PAUSE:
{
if (!IsSmart())
break;
uint32 delay = e.action.wpPause.delay;
- CAST_AI(SmartAI, me->AI())->PausePath(delay, e.GetEventType() == SMART_EVENT_WAYPOINT_REACHED ? false : true);
+ CAST_AI(SmartAI, me->AI())->PausePath(delay, e.GetEventType() == SMART_EVENT_ESCORT_REACHED ? false : true);
break;
}
- case SMART_ACTION_WP_STOP:
+ case SMART_ACTION_ESCORT_STOP:
{
if (!IsSmart())
break;
@@ -1773,7 +1766,7 @@ void SmartScript::ProcessAction(SmartScriptHolder& e, Unit* unit, uint32 var0, u
CAST_AI(SmartAI, me->AI())->StopPath(DespawnTime, quest, fail);
break;
}
- case SMART_ACTION_WP_RESUME:
+ case SMART_ACTION_ESCORT_RESUME:
{
if (!IsSmart())
break;
@@ -1854,8 +1847,8 @@ void SmartScript::ProcessAction(SmartScriptHolder& e, Unit* unit, uint32 var0, u
if (TransportBase* trans = me->GetDirectTransport())
trans->CalculatePassengerPosition(dest.x, dest.y, dest.z);
- me->GetMotionMaster()->MovePoint(e.action.moveToPos.pointId, dest.x, dest.y, dest.z, true, isForced,
- isControlled ? MOTION_SLOT_CONTROLLED : MOTION_SLOT_ACTIVE, e.target.o);
+ me->GetMotionMaster()->MovePoint(e.action.moveToPos.pointId, dest.x, dest.y, dest.z, FORCED_MOVEMENT_NONE,
+ 0.f, e.target.o, true, isForced, isControlled ? MOTION_SLOT_CONTROLLED : MOTION_SLOT_ACTIVE);
break;
}
@@ -1871,9 +1864,8 @@ void SmartScript::ProcessAction(SmartScriptHolder& e, Unit* unit, uint32 var0, u
randomPoint.m_positionX,
randomPoint.m_positionY,
randomPoint.m_positionZ,
- true,
- isForced,
- isControlled ? MOTION_SLOT_CONTROLLED : MOTION_SLOT_ACTIVE
+ FORCED_MOVEMENT_NONE,
+ 0.f, 0.f, true, isForced, isControlled ? MOTION_SLOT_CONTROLLED : MOTION_SLOT_ACTIVE
);
}
@@ -1897,7 +1889,8 @@ void SmartScript::ProcessAction(SmartScriptHolder& e, Unit* unit, uint32 var0, u
else if (e.action.moveToPos.ContactDistance)
target->GetNearPoint(me, x, y, z, e.action.moveToPos.ContactDistance, 0, target->GetAngle(me));
- me->GetMotionMaster()->MovePoint(e.action.moveToPos.pointId, x + e.target.x, y + e.target.y, z + e.target.z, true, isForced, isControlled ? MOTION_SLOT_CONTROLLED : MOTION_SLOT_ACTIVE);
+ me->GetMotionMaster()->MovePoint(e.action.moveToPos.pointId, x + e.target.x, y + e.target.y, z + e.target.z, FORCED_MOVEMENT_NONE,
+ 0.f, 0.f, true, isForced, isControlled ? MOTION_SLOT_CONTROLLED : MOTION_SLOT_ACTIVE);
break;
}
@@ -1914,7 +1907,8 @@ void SmartScript::ProcessAction(SmartScriptHolder& e, Unit* unit, uint32 var0, u
SAIBool isForced = !e.action.moveToPosTarget.disableForceDestination;
Creature* ctarget = target->ToCreature();
- ctarget->GetMotionMaster()->MovePoint(e.action.moveToPosTarget.pointId, e.target.x, e.target.y, e.target.z, true, isForced, isControlled ? MOTION_SLOT_CONTROLLED : MOTION_SLOT_ACTIVE);
+ ctarget->GetMotionMaster()->MovePoint(e.action.moveToPosTarget.pointId, e.target.x, e.target.y, e.target.z, FORCED_MOVEMENT_NONE,
+ 0.f, 0.f, true, isForced, isControlled ? MOTION_SLOT_CONTROLLED : MOTION_SLOT_ACTIVE);
}
}
@@ -2521,21 +2515,19 @@ void SmartScript::ProcessAction(SmartScriptHolder& e, Unit* unit, uint32 var0, u
{
for (uint32 wp = e.action.startClosestWaypoint.pathId1; wp <= e.action.startClosestWaypoint.pathId2; ++wp)
{
- WPPath* path = sSmartWaypointMgr->GetPath(wp);
+ WaypointPath* path = sSmartWaypointMgr->GetPath(wp);
if (!path || path->empty())
continue;
auto itrWp = path->find(1);
if (itrWp != path->end())
{
- if (WayPoint* wpData = itrWp->second)
+ WaypointData& wpData = itrWp->second;
+ float distToThisPath = creature->GetExactDistSq(wpData.x, wpData.y, wpData.z);
+ if (distToThisPath < distanceToClosest)
{
- float distToThisPath = creature->GetExactDistSq(wpData->x, wpData->y, wpData->z);
- if (distToThisPath < distanceToClosest)
- {
- distanceToClosest = distToThisPath;
- closestWpId = wp;
- }
+ distanceToClosest = distToThisPath;
+ closestWpId = wp;
}
}
}
@@ -2543,9 +2535,9 @@ void SmartScript::ProcessAction(SmartScriptHolder& e, Unit* unit, uint32 var0, u
if (closestWpId)
{
bool repeat = e.action.startClosestWaypoint.repeat;
- bool run = e.action.startClosestWaypoint.run;
+ ForcedMovement forcedMovement = static_cast<ForcedMovement>(e.action.startClosestWaypoint.forcedMovement);
- CAST_AI(SmartAI, creature->AI())->StartPath(repeat, closestWpId, run);
+ CAST_AI(SmartAI, creature->AI())->StartPath(forcedMovement, closestWpId, repeat);
}
}
}
@@ -2700,6 +2692,8 @@ void SmartScript::ProcessAction(SmartScriptHolder& e, Unit* unit, uint32 var0, u
{
if (me && me->FindMap())
me->FindMap()->LoadGrid(e.target.x, e.target.y);
+ else if (go && go->FindMap())
+ go->FindMap()->LoadGrid(e.target.x, e.target.y);
break;
}
case SMART_ACTION_PLAYER_TALK:
@@ -3223,7 +3217,7 @@ void SmartScript::ProcessAction(SmartScriptHolder& e, Unit* unit, uint32 var0, u
}
break;
}
- case SMART_ACTION_WAYPOINT_DATA_START:
+ case SMART_ACTION_WAYPOINT_START:
{
if (e.action.wpData.pathId)
{
@@ -3232,7 +3226,7 @@ void SmartScript::ProcessAction(SmartScriptHolder& e, Unit* unit, uint32 var0, u
if (IsCreature(target))
{
target->ToCreature()->LoadPath(e.action.wpData.pathId);
- target->ToCreature()->GetMotionMaster()->MovePath(e.action.wpData.pathId, e.action.wpData.repeat);
+ target->ToCreature()->GetMotionMaster()->MoveWaypoint(e.action.wpData.pathId, e.action.wpData.repeat, e.action.wpData.pathSource);
}
}
}
@@ -3249,7 +3243,7 @@ void SmartScript::ProcessAction(SmartScriptHolder& e, Unit* unit, uint32 var0, u
{
uint32 path = urand(e.action.wpDataRandom.pathId1, e.action.wpDataRandom.pathId2);
target->ToCreature()->LoadPath(path);
- target->ToCreature()->GetMotionMaster()->MovePath(path, e.action.wpDataRandom.repeat);
+ target->ToCreature()->GetMotionMaster()->MoveWaypoint(path, e.action.wpDataRandom.repeat);
}
}
}
@@ -4400,22 +4394,24 @@ void SmartScript::ProcessEvent(SmartScriptHolder& e, Unit* unit, uint32 var0, ui
{
if ((e.event.movementInform.type && var0 != e.event.movementInform.type) || (e.event.movementInform.id && var1 != e.event.movementInform.id))
return;
+ if (e.event.movementInform.pathId != 0 && e.event.movementInform.pathId != me->GetWaypointPath())
+ return;
ProcessAction(e, unit, var0, var1);
break;
}
case SMART_EVENT_TRANSPORT_RELOCATE:
- case SMART_EVENT_WAYPOINT_START:
+ case SMART_EVENT_ESCORT_START:
{
if (e.event.waypoint.pathID && var0 != e.event.waypoint.pathID)
return;
ProcessAction(e, unit, var0);
break;
}
- case SMART_EVENT_WAYPOINT_REACHED:
- case SMART_EVENT_WAYPOINT_RESUMED:
- case SMART_EVENT_WAYPOINT_PAUSED:
- case SMART_EVENT_WAYPOINT_STOPPED:
- case SMART_EVENT_WAYPOINT_ENDED:
+ case SMART_EVENT_ESCORT_REACHED:
+ case SMART_EVENT_ESCORT_RESUMED:
+ case SMART_EVENT_ESCORT_PAUSED:
+ case SMART_EVENT_ESCORT_STOPPED:
+ case SMART_EVENT_ESCORT_ENDED:
{
if (!me || (e.event.waypoint.pointID && var0 != e.event.waypoint.pointID) || (e.event.waypoint.pathID && GetPathId() != e.event.waypoint.pathID))
return;
@@ -4504,14 +4500,7 @@ void SmartScript::ProcessEvent(SmartScriptHolder& e, Unit* unit, uint32 var0, ui
if (!IsInPhase(e.event.eventPhaseChange.phasemask))
return;
- WorldObject* templastInvoker = GetLastInvoker();
- if (!templastInvoker)
- return;
-
- if (!IsUnit(templastInvoker))
- return;
-
- ProcessAction(e, templastInvoker->ToUnit());
+ ProcessAction(e);
break;
}
case SMART_EVENT_GAME_EVENT_START:
@@ -4809,8 +4798,8 @@ void SmartScript::ProcessEvent(SmartScriptHolder& e, Unit* unit, uint32 var0, ui
RecalcTimer(e, 1200, 1200);
break;
}
- case SMART_EVENT_WAYPOINT_DATA_REACHED:
- case SMART_EVENT_WAYPOINT_DATA_ENDED:
+ case SMART_EVENT_WAYPOINT_REACHED:
+ case SMART_EVENT_WAYPOINT_ENDED:
{
if (!me || (e.event.wpData.pointId && var0 != e.event.wpData.pointId) || (e.event.wpData.pathId && me->GetWaypointPath() != e.event.wpData.pathId))
return;
diff --git a/src/server/game/AI/SmartScripts/SmartScript.h b/src/server/game/AI/SmartScripts/SmartScript.h
index 4f98c49d1a..250fdd775a 100644
--- a/src/server/game/AI/SmartScripts/SmartScript.h
+++ b/src/server/game/AI/SmartScripts/SmartScript.h
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
@@ -207,6 +207,8 @@ public:
void AddCreatureSummon(ObjectGuid const& guid);
void RemoveCreatureSummon(ObjectGuid const& guid);
+ SmartAIEventList const& GetEvents() const { return mEvents; }
+
private:
void IncPhase(uint32 p);
void DecPhase(uint32 p);
diff --git a/src/server/game/AI/SmartScripts/SmartScriptMgr.cpp b/src/server/game/AI/SmartScripts/SmartScriptMgr.cpp
index 6db3e4cb2d..c4dab89b91 100644
--- a/src/server/game/AI/SmartScripts/SmartScriptMgr.cpp
+++ b/src/server/game/AI/SmartScripts/SmartScriptMgr.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
@@ -48,12 +48,9 @@ void SmartWaypointMgr::LoadFromDB()
{
uint32 oldMSTime = getMSTime();
- for (std::unordered_map<uint32, WPPath*>::iterator itr = waypoint_map.begin(); itr != waypoint_map.end(); ++itr)
+ for (auto itr : waypoint_map)
{
- for (WPPath::iterator pathItr = itr->second->begin(); pathItr != itr->second->end(); ++pathItr)
- delete pathItr->second;
-
- delete itr->second;
+ delete itr.second;
}
waypoint_map.clear();
@@ -88,7 +85,7 @@ void SmartWaypointMgr::LoadFromDB()
if (last_entry != entry)
{
- waypoint_map[entry] = new WPPath();
+ waypoint_map[entry] = new WaypointPath();
last_id = 1;
count++;
}
@@ -97,7 +94,15 @@ void SmartWaypointMgr::LoadFromDB()
LOG_ERROR("sql.sql", "SmartWaypointMgr::LoadFromDB: Path entry {}, unexpected point id {}, expected {}.", entry, id, last_id);
last_id++;
- (*waypoint_map[entry])[id] = new WayPoint(id, x, y, z, o, delay);
+ WaypointData data;
+ data.id = id;
+ data.x = x;
+ data.y = y;
+ data.z = z;
+ data.orientation = o;
+ data.delay = delay;
+ data.move_type = WAYPOINT_MOVE_TYPE_MAX;
+ (*waypoint_map[entry]).emplace(id, data);
last_entry = entry;
total++;
@@ -109,12 +114,9 @@ void SmartWaypointMgr::LoadFromDB()
SmartWaypointMgr::~SmartWaypointMgr()
{
- for (std::unordered_map<uint32, WPPath*>::iterator itr = waypoint_map.begin(); itr != waypoint_map.end(); ++itr)
+ for (auto itr : waypoint_map)
{
- for (WPPath::iterator pathItr = itr->second->begin(); pathItr != itr->second->end(); ++pathItr)
- delete pathItr->second;
-
- delete itr->second;
+ delete itr.second;
}
}
@@ -555,6 +557,7 @@ bool SmartAIMgr::IsTargetValid(SmartScriptHolder const& e)
case SMART_TARGET_RANDOM_POINT:
case SMART_TARGET_ROLE_SELECTION:
case SMART_TARGET_LOOT_RECIPIENTS:
+ case SMART_TARGET_VEHICLE_PASSENGER:
case SMART_EVENT_SUMMONED_UNIT_DIES:
case SMART_EVENT_SUMMONED_UNIT_EVADE:
case SMART_TARGET_PLAYER_RANGE:
@@ -624,8 +627,8 @@ bool SmartAIMgr::CheckUnusedEventParams(SmartScriptHolder const& e)
case SMART_EVENT_CORPSE_REMOVED: return NO_PARAMS;
case SMART_EVENT_AI_INIT: return NO_PARAMS;
case SMART_EVENT_DATA_SET: return sizeof(SmartEvent::dataSet);
- case SMART_EVENT_WAYPOINT_START: return sizeof(SmartEvent::waypoint);
- case SMART_EVENT_WAYPOINT_REACHED: return sizeof(SmartEvent::waypoint);
+ case SMART_EVENT_ESCORT_START: return sizeof(SmartEvent::waypoint);
+ case SMART_EVENT_ESCORT_REACHED: return sizeof(SmartEvent::waypoint);
case SMART_EVENT_TRANSPORT_ADDPLAYER: return NO_PARAMS;
case SMART_EVENT_TRANSPORT_ADDCREATURE: return sizeof(SmartEvent::transportAddCreature);
case SMART_EVENT_TRANSPORT_REMOVE_PLAYER: return NO_PARAMS;
@@ -640,10 +643,10 @@ bool SmartAIMgr::CheckUnusedEventParams(SmartScriptHolder const& e)
case SMART_EVENT_TEXT_OVER: return sizeof(SmartEvent::textOver);
case SMART_EVENT_RECEIVE_HEAL: return sizeof(SmartEvent::minMaxRepeat);
case SMART_EVENT_JUST_SUMMONED: return NO_PARAMS;
- case SMART_EVENT_WAYPOINT_PAUSED: return sizeof(SmartEvent::waypoint);
- case SMART_EVENT_WAYPOINT_RESUMED: return sizeof(SmartEvent::waypoint);
- case SMART_EVENT_WAYPOINT_STOPPED: return sizeof(SmartEvent::waypoint);
- case SMART_EVENT_WAYPOINT_ENDED: return sizeof(SmartEvent::waypoint);
+ case SMART_EVENT_ESCORT_PAUSED: return sizeof(SmartEvent::waypoint);
+ case SMART_EVENT_ESCORT_RESUMED: return sizeof(SmartEvent::waypoint);
+ case SMART_EVENT_ESCORT_STOPPED: return sizeof(SmartEvent::waypoint);
+ case SMART_EVENT_ESCORT_ENDED: return sizeof(SmartEvent::waypoint);
case SMART_EVENT_TIMED_EVENT_TRIGGERED: return sizeof(SmartEvent::timedEvent);
case SMART_EVENT_UPDATE: return sizeof(SmartEvent::minMaxRepeat);
case SMART_EVENT_LINK: return NO_PARAMS;
@@ -676,8 +679,8 @@ bool SmartAIMgr::CheckUnusedEventParams(SmartScriptHolder const& e)
case SMART_EVENT_AREA_CASTING: return sizeof(SmartEvent::minMaxRepeat);
case SMART_EVENT_AREA_RANGE: return sizeof(SmartEvent::minMaxRepeat);
case SMART_EVENT_SUMMONED_UNIT_EVADE: return sizeof(SmartEvent::summoned);
- case SMART_EVENT_WAYPOINT_DATA_REACHED: return sizeof(SmartEvent::wpData);
- case SMART_EVENT_WAYPOINT_DATA_ENDED: return sizeof(SmartEvent::wpData);
+ case SMART_EVENT_WAYPOINT_REACHED: return sizeof(SmartEvent::wpData);
+ case SMART_EVENT_WAYPOINT_ENDED: return sizeof(SmartEvent::wpData);
default:
LOG_WARN("sql.sql", "SmartAIMgr: entryorguid {} source_type {} id {} action_type {} is using an event {} with no unused params specified in SmartAIMgr::CheckUnusedEventParams(), please report this.",
e.entryOrGuid, e.GetScriptType(), e.event_id, e.GetActionType(), e.GetEventType());
@@ -764,9 +767,9 @@ bool SmartAIMgr::CheckUnusedActionParams(SmartScriptHolder const& e)
case SMART_ACTION_SUMMON_GO: return sizeof(SmartAction::summonGO);
case SMART_ACTION_KILL_UNIT: return NO_PARAMS;
case SMART_ACTION_ACTIVATE_TAXI: return sizeof(SmartAction::taxi);
- case SMART_ACTION_WP_START: return sizeof(SmartAction::wpStart);
- case SMART_ACTION_WP_PAUSE: return sizeof(SmartAction::wpPause);
- case SMART_ACTION_WP_STOP: return sizeof(SmartAction::wpStop);
+ case SMART_ACTION_ESCORT_START: return sizeof(SmartAction::wpStart);
+ case SMART_ACTION_ESCORT_PAUSE: return sizeof(SmartAction::wpPause);
+ case SMART_ACTION_ESCORT_STOP: return sizeof(SmartAction::wpStop);
case SMART_ACTION_ADD_ITEM: return sizeof(SmartAction::item);
case SMART_ACTION_REMOVE_ITEM: return sizeof(SmartAction::item);
case SMART_ACTION_INSTALL_AI_TEMPLATE: return sizeof(SmartAction::installTtemplate);
@@ -776,7 +779,7 @@ bool SmartAIMgr::CheckUnusedActionParams(SmartScriptHolder const& e)
case SMART_ACTION_TELEPORT: return sizeof(SmartAction::teleport);
case SMART_ACTION_SET_COUNTER: return sizeof(SmartAction::setCounter);
case SMART_ACTION_STORE_TARGET_LIST: return sizeof(SmartAction::storeTargets);
- case SMART_ACTION_WP_RESUME: return NO_PARAMS;
+ case SMART_ACTION_ESCORT_RESUME: return NO_PARAMS;
case SMART_ACTION_SET_ORIENTATION: return sizeof(SmartAction::orientation);
case SMART_ACTION_CREATE_TIMED_EVENT: return sizeof(SmartAction::timeEvent);
case SMART_ACTION_PLAYMOVIE: return sizeof(SmartAction::movie);
@@ -866,6 +869,7 @@ bool SmartAIMgr::CheckUnusedActionParams(SmartScriptHolder const& e)
case SMART_ACTION_ZONE_UNDER_ATTACK: return NO_PARAMS;
case SMART_ACTION_LOAD_GRID: return NO_PARAMS;
case SMART_ACTION_MUSIC: return sizeof(SmartAction::music);
+ case SMART_ACTION_DO_ACTION: return sizeof(SmartAction::doAction);
case SMART_ACTION_SET_GUID: return sizeof(SmartAction::setGuid);
case SMART_ACTION_SCRIPTED_SPAWN: return sizeof(SmartAction::scriptSpawn);
case SMART_ACTION_SET_SCALE: return sizeof(SmartAction::setScale);
@@ -873,13 +877,14 @@ bool SmartAIMgr::CheckUnusedActionParams(SmartScriptHolder const& e)
case SMART_ACTION_PLAY_SPELL_VISUAL: return sizeof(SmartAction::spellVisual);
case SMART_ACTION_FOLLOW_GROUP: return sizeof(SmartAction::followGroup);
case SMART_ACTION_SET_ORIENTATION_TARGET: return sizeof(SmartAction::orientationTarget);
- case SMART_ACTION_WAYPOINT_DATA_START: return sizeof(SmartAction::wpData);
+ case SMART_ACTION_WAYPOINT_START: return sizeof(SmartAction::wpData);
case SMART_ACTION_WAYPOINT_DATA_RANDOM: return sizeof(SmartAction::wpDataRandom);
case SMART_ACTION_MOVEMENT_STOP: return NO_PARAMS;
case SMART_ACTION_MOVEMENT_PAUSE: return sizeof(SmartAction::move);
case SMART_ACTION_MOVEMENT_RESUME: return sizeof(SmartAction::move);
case SMART_ACTION_WORLD_SCRIPT: return sizeof(SmartAction::worldStateScript);
case SMART_ACTION_DISABLE_REWARD: return sizeof(SmartAction::reward);
+ case SMART_ACTION_DISMOUNT: return NO_PARAMS;
default:
LOG_WARN("sql.sql", "SmartAIMgr: entryorguid {} source_type {} id {} action_type {} is using an action with no unused params specified in SmartAIMgr::CheckUnusedActionParams(), please report this.",
e.entryOrGuid, e.GetScriptType(), e.event_id, e.GetActionType());
@@ -944,6 +949,9 @@ bool SmartAIMgr::CheckUnusedTargetParams(SmartScriptHolder const& e)
case SMART_TARGET_VEHICLE_PASSENGER: return sizeof(SmartTarget::vehicle);
// case SMART_TARGET_CLOSEST_UNSPAWNED_GAMEOBJECT: return sizeof(SmartTarget::goClosest);
case SMART_TARGET_PLAYER_WITH_AURA: return sizeof(SmartTarget::playerWithAura);
+ case SMART_TARGET_RANDOM_POINT: return sizeof(SmartTarget::randomPoint);
+ case SMART_TARGET_SUMMONED_CREATURES: return sizeof(SmartTarget::summonedCreatures);
+ case SMART_TARGET_INSTANCE_STORAGE: return sizeof(SmartTarget::instanceStorage);
default:
LOG_WARN("sql.sql", "SmartAIMgr: entryorguid {} source_type {} id {} action_type {} is using a target {} with no unused params specified in SmartAIMgr::CheckUnusedTargetParams(), please report this.",
e.entryOrGuid, e.GetScriptType(), e.event_id, e.GetActionType(), e.GetTargetType());
@@ -1414,19 +1422,19 @@ bool SmartAIMgr::IsEventValid(SmartScriptHolder& e)
case SMART_EVENT_QUEST_REWARDED:
case SMART_EVENT_QUEST_FAIL:
case SMART_EVENT_JUST_SUMMONED:
- case SMART_EVENT_WAYPOINT_START:
- case SMART_EVENT_WAYPOINT_REACHED:
- case SMART_EVENT_WAYPOINT_PAUSED:
- case SMART_EVENT_WAYPOINT_RESUMED:
- case SMART_EVENT_WAYPOINT_STOPPED:
- case SMART_EVENT_WAYPOINT_ENDED:
+ case SMART_EVENT_ESCORT_START:
+ case SMART_EVENT_ESCORT_REACHED:
+ case SMART_EVENT_ESCORT_PAUSED:
+ case SMART_EVENT_ESCORT_RESUMED:
+ case SMART_EVENT_ESCORT_STOPPED:
+ case SMART_EVENT_ESCORT_ENDED:
case SMART_EVENT_GOSSIP_SELECT:
case SMART_EVENT_GOSSIP_HELLO:
case SMART_EVENT_JUST_CREATED:
case SMART_EVENT_FOLLOW_COMPLETED:
case SMART_EVENT_ON_SPELLCLICK:
- case SMART_EVENT_WAYPOINT_DATA_REACHED:
- case SMART_EVENT_WAYPOINT_DATA_ENDED:
+ case SMART_EVENT_WAYPOINT_REACHED:
+ case SMART_EVENT_WAYPOINT_ENDED:
break;
default:
LOG_ERROR("sql.sql", "SmartAIMgr: Not handled event_type({}), Entry {} SourceType {} Event {} Action {}, skipped.", e.GetEventType(), e.entryOrGuid, e.GetScriptType(), e.event_id, e.GetActionType());
@@ -1562,11 +1570,11 @@ bool SmartAIMgr::IsEventValid(SmartScriptHolder& e)
e.entryOrGuid, e.GetScriptType(), e.event_id, e.GetActionType());
return false;
}
- if (e.action.startClosestWaypoint.repeat > 1 || e.action.startClosestWaypoint.run > 1)
+ if (e.action.startClosestWaypoint.repeat > 1 || e.action.startClosestWaypoint.forcedMovement >= FORCED_MOVEMENT_MAX)
{
- LOG_ERROR("sql.sql", "SmartAIMgr: Entry {} SourceType {} Event {} Action {} has invalid run ({}) or repeat ({}) parameter, must be 0 or 1.",
+ LOG_ERROR("sql.sql", "SmartAIMgr: Entry {} SourceType {} Event {} Action {} has invalid forcedMovement ({}) or repeat ({}) parameter, must be 0 or 1.",
e.entryOrGuid, e.GetScriptType(), e.event_id, e.GetActionType(),
- e.action.startClosestWaypoint.repeat, e.action.startClosestWaypoint.run);
+ e.action.startClosestWaypoint.repeat, e.action.startClosestWaypoint.forcedMovement);
return false;
}
break;
@@ -1719,11 +1727,11 @@ bool SmartAIMgr::IsEventValid(SmartScriptHolder& e)
return false;
}
break;
- case SMART_ACTION_WP_STOP:
+ case SMART_ACTION_ESCORT_STOP:
if (e.action.wpStop.quest && !IsQuestValid(e, e.action.wpStop.quest))
return false;
return IsSAIBoolValid(e, e.action.wpStop.fail);
- case SMART_ACTION_WP_START:
+ case SMART_ACTION_ESCORT_START:
{
if (!sSmartWaypointMgr->GetPath(e.action.wpStart.pathID))
{
@@ -1743,8 +1751,13 @@ bool SmartAIMgr::IsEventValid(SmartScriptHolder& e)
return false;
}
- return IsSAIBoolValid(e, e.action.wpStart.run) &&
- IsSAIBoolValid(e, e.action.wpStart.repeat);
+ if (e.action.wpStart.forcedMovement >= FORCED_MOVEMENT_MAX)
+ {
+ LOG_ERROR("sql.sql", "SmartAIMgr: Creature {} Event {} Action {} uses invalid forcedMovement {}, skipped.", e.entryOrGuid, e.event_id, e.GetActionType(), e.action.wpStart.forcedMovement);
+ return false;
+ }
+
+ return IsSAIBoolValid(e, e.action.wpStart.repeat);
}
case SMART_ACTION_CREATE_TIMED_EVENT:
{
@@ -1933,7 +1946,7 @@ bool SmartAIMgr::IsEventValid(SmartScriptHolder& e)
case SMART_ACTION_STORE_TARGET_LIST:
case SMART_ACTION_COMBAT_STOP:
case SMART_ACTION_DIE:
- case SMART_ACTION_WP_RESUME:
+ case SMART_ACTION_ESCORT_RESUME:
case SMART_ACTION_KILL_UNIT:
case SMART_ACTION_SET_INVINCIBILITY_HP_LEVEL:
case SMART_ACTION_RESET_GOBJECT:
@@ -1943,7 +1956,7 @@ bool SmartAIMgr::IsEventValid(SmartScriptHolder& e)
case SMART_ACTION_SET_INST_DATA64:
case SMART_ACTION_SET_DATA:
case SMART_ACTION_MOVE_FORWARD:
- case SMART_ACTION_WP_PAUSE:
+ case SMART_ACTION_ESCORT_PAUSE:
case SMART_ACTION_SET_FLY:
case SMART_ACTION_FORCE_DESPAWN:
case SMART_ACTION_SET_INGAME_PHASE_MASK:
@@ -2013,7 +2026,7 @@ bool SmartAIMgr::IsEventValid(SmartScriptHolder& e)
case SMART_ACTION_PLAY_SPELL_VISUAL:
case SMART_ACTION_FOLLOW_GROUP:
case SMART_ACTION_SET_ORIENTATION_TARGET:
- case SMART_ACTION_WAYPOINT_DATA_START:
+ case SMART_ACTION_WAYPOINT_START:
case SMART_ACTION_WAYPOINT_DATA_RANDOM:
case SMART_ACTION_MOVEMENT_STOP:
case SMART_ACTION_MOVEMENT_PAUSE:
diff --git a/src/server/game/AI/SmartScripts/SmartScriptMgr.h b/src/server/game/AI/SmartScripts/SmartScriptMgr.h
index 47b0d47961..8dd177dfa6 100644
--- a/src/server/game/AI/SmartScripts/SmartScriptMgr.h
+++ b/src/server/game/AI/SmartScripts/SmartScriptMgr.h
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
@@ -26,29 +26,10 @@
#include "Optional.h"
#include "SpellMgr.h"
#include <limits>
+#include "WaypointMgr.h"
typedef uint32 SAIBool;
-struct WayPoint
-{
- WayPoint(uint32 _id, float _x, float _y, float _z, Optional<float> _o, uint32 _delay)
- {
- id = _id;
- x = _x;
- y = _y;
- z = _z;
- o = _o;
- delay = _delay;
- }
-
- uint32 id;
- float x;
- float y;
- float z;
- std::optional<float> o;
- uint32 delay;
-};
-
enum eSmartAI
{
SMART_EVENT_PARAM_COUNT = 4,
@@ -149,13 +130,13 @@ enum SMART_EVENT
SMART_EVENT_SPELLHIT_TARGET = 31, // SpellID, School, CooldownMin, CooldownMax
SMART_EVENT_DAMAGED = 32, // MinDmg, MaxDmg, CooldownMin, CooldownMax
SMART_EVENT_DAMAGED_TARGET = 33, // MinDmg, MaxDmg, CooldownMin, CooldownMax
- SMART_EVENT_MOVEMENTINFORM = 34, // MovementType(any), PointID
+ SMART_EVENT_MOVEMENTINFORM = 34, // MovementType(any), PointID, PathId(0 - any)
SMART_EVENT_SUMMON_DESPAWNED = 35, // Entry, CooldownMin, CooldownMax
SMART_EVENT_CORPSE_REMOVED = 36, // NONE
SMART_EVENT_AI_INIT = 37, // NONE
SMART_EVENT_DATA_SET = 38, // Id, Value, CooldownMin, CooldownMax
- SMART_EVENT_WAYPOINT_START = 39, // PointId(0any), pathID(0any)
- SMART_EVENT_WAYPOINT_REACHED = 40, // PointId(0any), pathID(0any)
+ SMART_EVENT_ESCORT_START = 39, // PointId(0any), pathID(0any)
+ SMART_EVENT_ESCORT_REACHED = 40, // PointId(0any), pathID(0any)
SMART_EVENT_TRANSPORT_ADDPLAYER = 41, // NONE
SMART_EVENT_TRANSPORT_ADDCREATURE = 42, // Entry (0 any)
SMART_EVENT_TRANSPORT_REMOVE_PLAYER = 43, // NONE
@@ -170,10 +151,10 @@ enum SMART_EVENT
SMART_EVENT_TEXT_OVER = 52, // GroupId from creature_text, creature entry who talks (0 any)
SMART_EVENT_RECEIVE_HEAL = 53, // MinHeal, MaxHeal, CooldownMin, CooldownMax
SMART_EVENT_JUST_SUMMONED = 54, // none
- SMART_EVENT_WAYPOINT_PAUSED = 55, // PointId(0any), pathID(0any)
- SMART_EVENT_WAYPOINT_RESUMED = 56, // PointId(0any), pathID(0any)
- SMART_EVENT_WAYPOINT_STOPPED = 57, // PointId(0any), pathID(0any)
- SMART_EVENT_WAYPOINT_ENDED = 58, // PointId(0any), pathID(0any)
+ SMART_EVENT_ESCORT_PAUSED = 55, // PointId(0any), pathID(0any)
+ SMART_EVENT_ESCORT_RESUMED = 56, // PointId(0any), pathID(0any)
+ SMART_EVENT_ESCORT_STOPPED = 57, // PointId(0any), pathID(0any)
+ SMART_EVENT_ESCORT_ENDED = 58, // PointId(0any), pathID(0any)
SMART_EVENT_TIMED_EVENT_TRIGGERED = 59, // id
SMART_EVENT_UPDATE = 60, // InitialMin, InitialMax, RepeatMin, RepeatMax
SMART_EVENT_LINK = 61, // INTERNAL USAGE, no params, used to link together multiple events, does not use any extra resources to iterate event lists needlessly
@@ -213,8 +194,8 @@ enum SMART_EVENT
SMART_EVENT_AREA_CASTING = 105, // min, max, repeatMin, repeatMax, rangeMin, rangeMax
SMART_EVENT_AREA_RANGE = 106, // min, max, repeatMin, repeatMax, rangeMin, rangeMax
SMART_EVENT_SUMMONED_UNIT_EVADE = 107, // CreatureId(0 all), CooldownMin, CooldownMax
- SMART_EVENT_WAYPOINT_DATA_REACHED = 108, // PointId (0: any), pathId (0: any)
- SMART_EVENT_WAYPOINT_DATA_ENDED = 109, // PointId (0: any), pathId (0: any)
+ SMART_EVENT_WAYPOINT_REACHED = 108, // PointId (0: any), pathId (0: any)
+ SMART_EVENT_WAYPOINT_ENDED = 109, // PointId (0: any), pathId (0: any)
SMART_EVENT_IS_IN_MELEE_RANGE = 110, // min, max, repeatMin, repeatMax, dist, invert (0: false, 1: true)
SMART_EVENT_AC_END = 111
@@ -356,6 +337,7 @@ struct SmartEvent
{
uint32 type;
uint32 id;
+ uint32 pathId;
} movementInform;
struct
@@ -608,9 +590,9 @@ enum SMART_ACTION
SMART_ACTION_SUMMON_GO = 50, // GameObjectID, DespawnTime, targetSummon, summonType (0 time or summoner dies/1 time)
SMART_ACTION_KILL_UNIT = 51, //
SMART_ACTION_ACTIVATE_TAXI = 52, // TaxiID
- SMART_ACTION_WP_START = 53, // run/walk, pathID, canRepeat, quest, despawntime, reactState
- SMART_ACTION_WP_PAUSE = 54, // time
- SMART_ACTION_WP_STOP = 55, // despawnTime, quest, fail?
+ SMART_ACTION_ESCORT_START = 53, // run/walk, pathID, canRepeat, quest, despawntime, reactState
+ SMART_ACTION_ESCORT_PAUSE = 54, // time
+ SMART_ACTION_ESCORT_STOP = 55, // despawnTime, quest, fail?
SMART_ACTION_ADD_ITEM = 56, // itemID, count
SMART_ACTION_REMOVE_ITEM = 57, // itemID, count
SMART_ACTION_INSTALL_AI_TEMPLATE = 58, // AITemplateID
@@ -620,7 +602,7 @@ enum SMART_ACTION
SMART_ACTION_TELEPORT = 62, // mapID,
SMART_ACTION_SET_COUNTER = 63, // id, value, reset (0/1)
SMART_ACTION_STORE_TARGET_LIST = 64, // varID,
- SMART_ACTION_WP_RESUME = 65, // none
+ SMART_ACTION_ESCORT_RESUME = 65, // none
SMART_ACTION_SET_ORIENTATION = 66, // quick change, random orientation? (0/1), turnAngle
SMART_ACTION_CREATE_TIMED_EVENT = 67, // id, InitialMin, InitialMax, RepeatMin(only if it repeats), RepeatMax(only if it repeats), chance
SMART_ACTION_PLAYMOVIE = 68, // entry
@@ -732,7 +714,7 @@ enum SMART_ACTION
SMART_ACTION_PLAY_SPELL_VISUAL = 229, // visualId, visualIdImpact
SMART_ACTION_FOLLOW_GROUP = 230, // followState, followType, dist
SMART_ACTION_SET_ORIENTATION_TARGET = 231, // type, target_type, target_param1, target_param2, target_param3, target_param4
- SMART_ACTION_WAYPOINT_DATA_START = 232, // pathId, repeat
+ SMART_ACTION_WAYPOINT_START = 232, // pathId, repeat, pathSource
SMART_ACTION_WAYPOINT_DATA_RANDOM = 233, // pathId1, pathId2, repeat
SMART_ACTION_MOVEMENT_STOP = 234, //
SMART_ACTION_MOVEMENT_PAUSE = 235, // timer
@@ -1041,7 +1023,7 @@ struct SmartAction
struct
{
- SAIBool run;
+ uint32 forcedMovement;
uint32 pathID;
SAIBool repeat;
uint32 quest;
@@ -1295,7 +1277,7 @@ struct SmartAction
uint32 pathId1;
uint32 pathId2;
uint32 repeat;
- uint32 run;
+ uint32 forcedMovement;
} startClosestWaypoint;
struct
@@ -1482,6 +1464,7 @@ struct SmartAction
{
uint32 pathId;
SAIBool repeat;
+ PathSource pathSource;
} wpData;
struct
@@ -1853,8 +1836,8 @@ const uint32 SmartAIEventMask[SMART_EVENT_AC_END][2] =
{SMART_EVENT_CORPSE_REMOVED, SMART_SCRIPT_TYPE_MASK_CREATURE },
{SMART_EVENT_AI_INIT, SMART_SCRIPT_TYPE_MASK_CREATURE + SMART_SCRIPT_TYPE_MASK_GAMEOBJECT },
{SMART_EVENT_DATA_SET, SMART_SCRIPT_TYPE_MASK_CREATURE + SMART_SCRIPT_TYPE_MASK_GAMEOBJECT },
- {SMART_EVENT_WAYPOINT_START, SMART_SCRIPT_TYPE_MASK_CREATURE },
- {SMART_EVENT_WAYPOINT_REACHED, SMART_SCRIPT_TYPE_MASK_CREATURE },
+ {SMART_EVENT_ESCORT_START, SMART_SCRIPT_TYPE_MASK_CREATURE },
+ {SMART_EVENT_ESCORT_REACHED, SMART_SCRIPT_TYPE_MASK_CREATURE },
{SMART_EVENT_TRANSPORT_ADDPLAYER, SMART_SCRIPT_TYPE_MASK_TRANSPORT },
{SMART_EVENT_TRANSPORT_ADDCREATURE, SMART_SCRIPT_TYPE_MASK_TRANSPORT },
{SMART_EVENT_TRANSPORT_REMOVE_PLAYER, SMART_SCRIPT_TYPE_MASK_TRANSPORT },
@@ -1869,10 +1852,10 @@ const uint32 SmartAIEventMask[SMART_EVENT_AC_END][2] =
{SMART_EVENT_TEXT_OVER, SMART_SCRIPT_TYPE_MASK_CREATURE + SMART_SCRIPT_TYPE_MASK_GAMEOBJECT },
{SMART_EVENT_RECEIVE_HEAL, SMART_SCRIPT_TYPE_MASK_CREATURE },
{SMART_EVENT_JUST_SUMMONED, SMART_SCRIPT_TYPE_MASK_CREATURE },
- {SMART_EVENT_WAYPOINT_PAUSED, SMART_SCRIPT_TYPE_MASK_CREATURE },
- {SMART_EVENT_WAYPOINT_RESUMED, SMART_SCRIPT_TYPE_MASK_CREATURE },
- {SMART_EVENT_WAYPOINT_STOPPED, SMART_SCRIPT_TYPE_MASK_CREATURE },
- {SMART_EVENT_WAYPOINT_ENDED, SMART_SCRIPT_TYPE_MASK_CREATURE },
+ {SMART_EVENT_ESCORT_PAUSED, SMART_SCRIPT_TYPE_MASK_CREATURE },
+ {SMART_EVENT_ESCORT_RESUMED, SMART_SCRIPT_TYPE_MASK_CREATURE },
+ {SMART_EVENT_ESCORT_STOPPED, SMART_SCRIPT_TYPE_MASK_CREATURE },
+ {SMART_EVENT_ESCORT_ENDED, SMART_SCRIPT_TYPE_MASK_CREATURE },
{SMART_EVENT_TIMED_EVENT_TRIGGERED, SMART_SCRIPT_TYPE_MASK_CREATURE + SMART_SCRIPT_TYPE_MASK_GAMEOBJECT },
{SMART_EVENT_UPDATE, SMART_SCRIPT_TYPE_MASK_CREATURE + SMART_SCRIPT_TYPE_MASK_GAMEOBJECT },
{SMART_EVENT_LINK, SMART_SCRIPT_TYPE_MASK_CREATURE + SMART_SCRIPT_TYPE_MASK_GAMEOBJECT + SMART_SCRIPT_TYPE_MASK_AREATRIGGER + SMART_SCRIPT_TYPE_MASK_EVENT + SMART_SCRIPT_TYPE_MASK_GOSSIP + SMART_SCRIPT_TYPE_MASK_QUEST + SMART_SCRIPT_TYPE_MASK_SPELL + SMART_SCRIPT_TYPE_MASK_TRANSPORT + SMART_SCRIPT_TYPE_MASK_INSTANCE },
@@ -1922,8 +1905,8 @@ const uint32 SmartAIEventMask[SMART_EVENT_AC_END][2] =
{SMART_EVENT_AREA_CASTING, SMART_SCRIPT_TYPE_MASK_CREATURE },
{SMART_EVENT_AREA_RANGE, SMART_SCRIPT_TYPE_MASK_CREATURE },
{SMART_EVENT_SUMMONED_UNIT_EVADE, SMART_SCRIPT_TYPE_MASK_CREATURE + SMART_SCRIPT_TYPE_MASK_GAMEOBJECT },
- {SMART_EVENT_WAYPOINT_DATA_REACHED, SMART_SCRIPT_TYPE_MASK_CREATURE },
- {SMART_EVENT_WAYPOINT_DATA_ENDED, SMART_SCRIPT_TYPE_MASK_CREATURE },
+ {SMART_EVENT_WAYPOINT_REACHED, SMART_SCRIPT_TYPE_MASK_CREATURE },
+ {SMART_EVENT_WAYPOINT_ENDED, SMART_SCRIPT_TYPE_MASK_CREATURE },
{SMART_EVENT_IS_IN_MELEE_RANGE, SMART_SCRIPT_TYPE_MASK_CREATURE },
};
@@ -1949,16 +1932,17 @@ enum SmartEventFlags
enum SmartCastFlags
{
- SMARTCAST_INTERRUPT_PREVIOUS = 0x001, // Interrupt any spell casting
- SMARTCAST_TRIGGERED = 0x002, // Triggered (this makes spell cost zero mana and have no cast time)
- //CAST_FORCE_CAST = 0x004, // Forces cast even if creature is out of mana or out of range
- //CAST_NO_MELEE_IF_OOM = 0x008, // Prevents creature from entering melee if out of mana or out of range
- //CAST_FORCE_TARGET_SELF = 0x010, // Forces the target to cast this spell on itself
- SMARTCAST_AURA_NOT_PRESENT = 0x020, // Only casts the spell if the target does not have an aura from the spell
- SMARTCAST_COMBAT_MOVE = 0x040, // Prevents combat movement if cast successful. Allows movement on range, OOM, LOS
- SMARTCAST_THREATLIST_NOT_SINGLE = 0x080, // Only cast if the source's threatlist is higher than one. This includes pets (see Skeram's True Fulfillment)
- SMARTCAST_TARGET_POWER_MANA = 0x100, // Only cast if the target has power type mana (e.g. Mana Drain)
- SMARTCAST_ENABLE_COMBAT_MOVE_ON_LOS = 0x200,
+ SMARTCAST_INTERRUPT_PREVIOUS = 0x001, // Interrupt any spell casting
+ SMARTCAST_TRIGGERED = 0x002, // Triggered (this makes spell cost zero mana and have no cast time)
+ //CAST_FORCE_CAST = 0x004, // Forces cast even if creature is out of mana or out of range
+ //CAST_NO_MELEE_IF_OOM = 0x008, // Prevents creature from entering melee if out of mana or out of range
+ //CAST_FORCE_TARGET_SELF = 0x010, // Forces the target to cast this spell on itself
+ SMARTCAST_AURA_NOT_PRESENT = 0x020, // Only casts the spell if the target does not have an aura from the spell
+ SMARTCAST_COMBAT_MOVE = 0x040, // Prevents combat movement if cast successful. Allows movement on range, OOM, LOS
+ SMARTCAST_THREATLIST_NOT_SINGLE = 0x080, // Only cast if the source's threatlist is higher than one. This includes pets (see Skeram's True Fulfillment)
+ SMARTCAST_TARGET_POWER_MANA = 0x100, // Only cast if the target has power type mana (e.g. Mana Drain)
+ SMARTCAST_ENABLE_COMBAT_MOVE_ON_LOS = 0x200, // Allows combat movement when not in line of sight
+ SMARTCAST_MAIN_SPELL = 0x400, // Sets this spell's max range as the creature's chase distance on spawn
};
enum SmartFollowType
@@ -2010,8 +1994,6 @@ public:
static constexpr uint32 DEFAULT_PRIORITY = std::numeric_limits<uint32>::max();
};
-typedef std::unordered_map<uint32, WayPoint*> WPPath;
-
typedef std::vector<WorldObject*> ObjectVector;
class ObjectGuidVector
@@ -2059,7 +2041,7 @@ public:
void LoadFromDB();
- WPPath* GetPath(uint32 id)
+ WaypointPath* GetPath(uint32 id)
{
if (waypoint_map.find(id) != waypoint_map.end())
return waypoint_map[id];
@@ -2067,7 +2049,7 @@ public:
}
private:
- std::unordered_map<uint32, WPPath*> waypoint_map;
+ std::unordered_map<uint32, WaypointPath*> waypoint_map;
};
// all events for a single entry
diff --git a/src/server/game/AI/enuminfo_CreatureAI.cpp b/src/server/game/AI/enuminfo_CreatureAI.cpp
index 12b2b20b89..785b80b373 100644
--- a/src/server/game/AI/enuminfo_CreatureAI.cpp
+++ b/src/server/game/AI/enuminfo_CreatureAI.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/game/Accounts/AccountMgr.cpp b/src/server/game/Accounts/AccountMgr.cpp
index 4129609db0..8be9d5168e 100644
--- a/src/server/game/Accounts/AccountMgr.cpp
+++ b/src/server/game/Accounts/AccountMgr.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/game/Accounts/AccountMgr.h b/src/server/game/Accounts/AccountMgr.h
index 3f2eb983e5..c6fbbea318 100644
--- a/src/server/game/Accounts/AccountMgr.h
+++ b/src/server/game/Accounts/AccountMgr.h
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/game/Achievements/AchievementMgr.cpp b/src/server/game/Achievements/AchievementMgr.cpp
index f96775eb44..2451aac3d9 100644
--- a/src/server/game/Achievements/AchievementMgr.cpp
+++ b/src/server/game/Achievements/AchievementMgr.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
@@ -1826,6 +1826,15 @@ bool AchievementMgr::IsCompletedCriteria(AchievementCriteriaEntry const* achieve
// someone on this realm has already completed that achievement
if (sAchievementMgr->IsRealmCompleted(achievement))
return false;
+
+ // A character may only have 1 race-specific 'Realm First!' achievement
+ // prevent clever use of the race/faction change service to obtain multiple 'Realm First!' achievements
+ constexpr std::array<uint32, 9> raceSpecificRealmFirstAchievements { 1405, 1406, 1407, 1408, 1409, 1410, 1411, 1412, 1413 };
+ bool isRaceSpecific = std::ranges::find(raceSpecificRealmFirstAchievements, achievement->ID) != std::ranges::end(raceSpecificRealmFirstAchievements);
+ if (isRaceSpecific)
+ for (uint32 raceAchievementId : raceSpecificRealmFirstAchievements)
+ if (raceAchievementId != achievement->ID && HasAchieved(raceAchievementId))
+ return false;
}
// pussywizard: progress will be deleted after getting the achievement (optimization)
@@ -2378,7 +2387,7 @@ void AchievementMgr::SendAllAchievementData() const
{
WorldPacket data(SMSG_ALL_ACHIEVEMENT_DATA, _completedAchievements.size() * 8 + 4 + _criteriaProgress.size() * 38 + 4);
BuildAllDataPacket(&data);
- GetPlayer()->GetSession()->SendPacket(&data);
+ GetPlayer()->SendDirectMessage(&data);
}
void AchievementMgr::SendRespondInspectAchievements(Player* player) const
@@ -2386,7 +2395,7 @@ void AchievementMgr::SendRespondInspectAchievements(Player* player) const
WorldPacket data(SMSG_RESPOND_INSPECT_ACHIEVEMENTS, 9 + _completedAchievements.size() * 8 + 4 + _criteriaProgress.size() * 38 + 4);
data << GetPlayer()->GetPackGUID();
BuildAllDataPacket(&data);
- player->GetSession()->SendPacket(&data);
+ player->SendDirectMessage(&data);
}
/**
diff --git a/src/server/game/Achievements/AchievementMgr.h b/src/server/game/Achievements/AchievementMgr.h
index adbb6ea3cd..268084e840 100644
--- a/src/server/game/Achievements/AchievementMgr.h
+++ b/src/server/game/Achievements/AchievementMgr.h
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/game/Addons/AddonMgr.cpp b/src/server/game/Addons/AddonMgr.cpp
index 650a26feaa..4e139b7481 100644
--- a/src/server/game/Addons/AddonMgr.cpp
+++ b/src/server/game/Addons/AddonMgr.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/game/Addons/AddonMgr.h b/src/server/game/Addons/AddonMgr.h
index e9bb2ebd5d..1c9037f89a 100644
--- a/src/server/game/Addons/AddonMgr.h
+++ b/src/server/game/Addons/AddonMgr.h
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/game/ArenaSpectator/ArenaSpectator.cpp b/src/server/game/ArenaSpectator/ArenaSpectator.cpp
index e1f0c76027..fe0e49c120 100644
--- a/src/server/game/ArenaSpectator/ArenaSpectator.cpp
+++ b/src/server/game/ArenaSpectator/ArenaSpectator.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
@@ -306,7 +306,7 @@ AC_GAME_API void ArenaSpectator::SendPacketTo(Player const* player, std::string&
{
WorldPacket data;
CreatePacket(data, message);
- player->GetSession()->SendPacket(&data);
+ player->SendDirectMessage(&data);
}
template<>
diff --git a/src/server/game/ArenaSpectator/ArenaSpectator.h b/src/server/game/ArenaSpectator/ArenaSpectator.h
index 7e050ab3cd..9bb2f20b25 100644
--- a/src/server/game/ArenaSpectator/ArenaSpectator.h
+++ b/src/server/game/ArenaSpectator/ArenaSpectator.h
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/game/AuctionHouse/AuctionHouseMgr.cpp b/src/server/game/AuctionHouse/AuctionHouseMgr.cpp
index dcc1b76621..2cf588a0d3 100644
--- a/src/server/game/AuctionHouse/AuctionHouseMgr.cpp
+++ b/src/server/game/AuctionHouse/AuctionHouseMgr.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/game/AuctionHouse/AuctionHouseMgr.h b/src/server/game/AuctionHouse/AuctionHouseMgr.h
index 6045d5a2c3..60ead26a32 100644
--- a/src/server/game/AuctionHouse/AuctionHouseMgr.h
+++ b/src/server/game/AuctionHouse/AuctionHouseMgr.h
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/game/AuctionHouse/AuctionHouseSearcher.cpp b/src/server/game/AuctionHouse/AuctionHouseSearcher.cpp
index 0d50d7eafa..909091d04b 100644
--- a/src/server/game/AuctionHouse/AuctionHouseSearcher.cpp
+++ b/src/server/game/AuctionHouse/AuctionHouseSearcher.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
@@ -354,7 +354,7 @@ void AuctionHouseSearcher::Update()
{
Player* player = ObjectAccessor::FindConnectedPlayer(response->playerGuid);
if (player)
- player->GetSession()->SendPacket(&response->packet);
+ player->SendDirectMessage(&response->packet);
delete response;
}
diff --git a/src/server/game/AuctionHouse/AuctionHouseSearcher.h b/src/server/game/AuctionHouse/AuctionHouseSearcher.h
index b1f547f426..d778633d2c 100644
--- a/src/server/game/AuctionHouse/AuctionHouseSearcher.h
+++ b/src/server/game/AuctionHouse/AuctionHouseSearcher.h
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/game/Autobroadcast/AutobroadcastMgr.cpp b/src/server/game/Autobroadcast/AutobroadcastMgr.cpp
index f41e27bb01..befbb4ba3f 100644
--- a/src/server/game/Autobroadcast/AutobroadcastMgr.cpp
+++ b/src/server/game/Autobroadcast/AutobroadcastMgr.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
@@ -203,6 +203,6 @@ void AutobroadcastMgr::SendNotificationAnnouncement(uint8 textId)
data << localizedMessage;
// Send packet to the player
- player->GetSession()->SendPacket(&data);
+ player->SendDirectMessage(&data);
});
}
diff --git a/src/server/game/Autobroadcast/AutobroadcastMgr.h b/src/server/game/Autobroadcast/AutobroadcastMgr.h
index 05dc6319ef..44ebca1d5c 100644
--- a/src/server/game/Autobroadcast/AutobroadcastMgr.h
+++ b/src/server/game/Autobroadcast/AutobroadcastMgr.h
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/game/Battlefield/Battlefield.cpp b/src/server/game/Battlefield/Battlefield.cpp
index f74aebff2f..9ad1a9c9a4 100644
--- a/src/server/game/Battlefield/Battlefield.cpp
+++ b/src/server/game/Battlefield/Battlefield.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
@@ -458,7 +458,7 @@ void Battlefield::BroadcastPacketToZone(WorldPacket const* data) const
for (uint8 team = 0; team < PVP_TEAMS_COUNT; ++team)
for (GuidUnorderedSet::const_iterator itr = m_players[team].begin(); itr != m_players[team].end(); ++itr)
if (Player* player = ObjectAccessor::FindPlayer(*itr))
- player->GetSession()->SendPacket(data);
+ player->SendDirectMessage(data);
}
void Battlefield::BroadcastPacketToQueue(WorldPacket const* data) const
@@ -466,7 +466,7 @@ void Battlefield::BroadcastPacketToQueue(WorldPacket const* data) const
for (uint8 team = 0; team < PVP_TEAMS_COUNT; ++team)
for (GuidUnorderedSet::const_iterator itr = m_PlayersInQueue[team].begin(); itr != m_PlayersInQueue[team].end(); ++itr)
if (Player* player = ObjectAccessor::FindPlayer(*itr))
- player->GetSession()->SendPacket(data);
+ player->SendDirectMessage(data);
}
void Battlefield::BroadcastPacketToWar(WorldPacket const* data) const
@@ -474,7 +474,7 @@ void Battlefield::BroadcastPacketToWar(WorldPacket const* data) const
for (uint8 team = 0; team < PVP_TEAMS_COUNT; ++team)
for (GuidUnorderedSet::const_iterator itr = m_PlayersInWar[team].begin(); itr != m_PlayersInWar[team].end(); ++itr)
if (Player* player = ObjectAccessor::FindPlayer(*itr))
- player->GetSession()->SendPacket(data);
+ player->SendDirectMessage(data);
}
void Battlefield::SendWarning(uint8 id, WorldObject const* target /*= nullptr*/)
@@ -663,7 +663,7 @@ void Battlefield::SendAreaSpiritHealerQueryOpcode(Player* player, const ObjectGu
data << guid << time;
ASSERT(player);
- player->GetSession()->SendPacket(&data);
+ player->SendDirectMessage(&data);
}
// ----------------------
@@ -855,7 +855,7 @@ GameObject* Battlefield::SpawnGameObject(uint32 entry, float x, float y, float z
return go;
}
-Creature* Battlefield::GetCreature(ObjectGuid const guid)
+Creature* Battlefield::GetCreature(ObjectGuid const& guid)
{
if (!m_Map)
return nullptr;
@@ -863,7 +863,7 @@ Creature* Battlefield::GetCreature(ObjectGuid const guid)
return m_Map->GetCreature(guid);
}
-GameObject* Battlefield::GetGameObject(ObjectGuid const guid)
+GameObject* Battlefield::GetGameObject(ObjectGuid const& guid)
{
if (!m_Map)
return nullptr;
diff --git a/src/server/game/Battlefield/Battlefield.h b/src/server/game/Battlefield/Battlefield.h
index ab00697c33..f67e168629 100644
--- a/src/server/game/Battlefield/Battlefield.h
+++ b/src/server/game/Battlefield/Battlefield.h
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
@@ -146,6 +146,7 @@ class BfGraveyard
{
public:
BfGraveyard(Battlefield* Bf);
+ virtual ~BfGraveyard() = default;
// Method to changing who controls the graveyard
void GiveControlTo(TeamId team);
@@ -302,8 +303,8 @@ public:
Creature* SpawnCreature(uint32 entry, Position pos, TeamId teamId);
GameObject* SpawnGameObject(uint32 entry, float x, float y, float z, float o);
- Creature* GetCreature(ObjectGuid const guid);
- GameObject* GetGameObject(ObjectGuid const guid);
+ Creature* GetCreature(ObjectGuid const& guid);
+ GameObject* GetGameObject(ObjectGuid const& guid);
// Script-methods
diff --git a/src/server/game/Battlefield/BattlefieldHandler.cpp b/src/server/game/Battlefield/BattlefieldHandler.cpp
index 5fcbd2b2b8..6d90c7ec1b 100644
--- a/src/server/game/Battlefield/BattlefieldHandler.cpp
+++ b/src/server/game/Battlefield/BattlefieldHandler.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/game/Battlefield/BattlefieldMgr.cpp b/src/server/game/Battlefield/BattlefieldMgr.cpp
index 57844197f7..3993d0bc77 100644
--- a/src/server/game/Battlefield/BattlefieldMgr.cpp
+++ b/src/server/game/Battlefield/BattlefieldMgr.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/game/Battlefield/BattlefieldMgr.h b/src/server/game/Battlefield/BattlefieldMgr.h
index 6eaaa5c047..3cb79d355d 100644
--- a/src/server/game/Battlefield/BattlefieldMgr.h
+++ b/src/server/game/Battlefield/BattlefieldMgr.h
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/game/Battlefield/Zones/BattlefieldWG.cpp b/src/server/game/Battlefield/Zones/BattlefieldWG.cpp
index c0a4f55362..6f61e1fa7c 100644
--- a/src/server/game/Battlefield/Zones/BattlefieldWG.cpp
+++ b/src/server/game/Battlefield/Zones/BattlefieldWG.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
@@ -415,7 +415,7 @@ void BattlefieldWG::OnBattleEnd(bool endByTimer)
{
for (GuidUnorderedSet::const_iterator itr = m_vehicles[team].begin(); itr != m_vehicles[team].end(); ++itr)
if (Creature* creature = GetCreature(*itr))
- creature->DespawnOrUnsummon(1);
+ creature->DespawnOrUnsummon(1ms);
m_vehicles[team].clear();
}
diff --git a/src/server/game/Battlefield/Zones/BattlefieldWG.h b/src/server/game/Battlefield/Zones/BattlefieldWG.h
index 3f285ef76f..ae0f0b3710 100644
--- a/src/server/game/Battlefield/Zones/BattlefieldWG.h
+++ b/src/server/game/Battlefield/Zones/BattlefieldWG.h
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/game/Battlegrounds/Arena.cpp b/src/server/game/Battlegrounds/Arena.cpp
index d3e70fc31c..92a97fa5a4 100644
--- a/src/server/game/Battlegrounds/Arena.cpp
+++ b/src/server/game/Battlegrounds/Arena.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/game/Battlegrounds/Arena.h b/src/server/game/Battlegrounds/Arena.h
index 165e2dc8e2..75fe9c2269 100644
--- a/src/server/game/Battlegrounds/Arena.h
+++ b/src/server/game/Battlegrounds/Arena.h
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/game/Battlegrounds/ArenaScore.h b/src/server/game/Battlegrounds/ArenaScore.h
index 4535b6c14d..6b466ebc0f 100644
--- a/src/server/game/Battlegrounds/ArenaScore.h
+++ b/src/server/game/Battlegrounds/ArenaScore.h
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/game/Battlegrounds/ArenaSeason/ArenaSeasonMgr.cpp b/src/server/game/Battlegrounds/ArenaSeason/ArenaSeasonMgr.cpp
index e466eb7185..2da4b128f8 100644
--- a/src/server/game/Battlegrounds/ArenaSeason/ArenaSeasonMgr.cpp
+++ b/src/server/game/Battlegrounds/ArenaSeason/ArenaSeasonMgr.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/game/Battlegrounds/ArenaSeason/ArenaSeasonMgr.h b/src/server/game/Battlegrounds/ArenaSeason/ArenaSeasonMgr.h
index 7a1ee97c72..f238b2a909 100644
--- a/src/server/game/Battlegrounds/ArenaSeason/ArenaSeasonMgr.h
+++ b/src/server/game/Battlegrounds/ArenaSeason/ArenaSeasonMgr.h
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/game/Battlegrounds/ArenaSeason/ArenaSeasonRewardsDistributor.cpp b/src/server/game/Battlegrounds/ArenaSeason/ArenaSeasonRewardsDistributor.cpp
index dff7961a2b..a575e61ff2 100644
--- a/src/server/game/Battlegrounds/ArenaSeason/ArenaSeasonRewardsDistributor.cpp
+++ b/src/server/game/Battlegrounds/ArenaSeason/ArenaSeasonRewardsDistributor.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/game/Battlegrounds/ArenaSeason/ArenaSeasonRewardsDistributor.h b/src/server/game/Battlegrounds/ArenaSeason/ArenaSeasonRewardsDistributor.h
index 144fae5fff..7a7864e7d3 100644
--- a/src/server/game/Battlegrounds/ArenaSeason/ArenaSeasonRewardsDistributor.h
+++ b/src/server/game/Battlegrounds/ArenaSeason/ArenaSeasonRewardsDistributor.h
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/game/Battlegrounds/ArenaSeason/ArenaTeamFilter.h b/src/server/game/Battlegrounds/ArenaSeason/ArenaTeamFilter.h
index 2ac66344fa..6bfb1cd118 100644
--- a/src/server/game/Battlegrounds/ArenaSeason/ArenaTeamFilter.h
+++ b/src/server/game/Battlegrounds/ArenaSeason/ArenaTeamFilter.h
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/game/Battlegrounds/ArenaTeam.cpp b/src/server/game/Battlegrounds/ArenaTeam.cpp
index 753fc9d481..985193f9d5 100644
--- a/src/server/game/Battlegrounds/ArenaTeam.cpp
+++ b/src/server/game/Battlegrounds/ArenaTeam.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
@@ -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<uint16>();
newMember.SeasonGames = fields[4].Get<uint16>();
newMember.SeasonWins = fields[5].Get<uint16>();
- //newMember.Name = fields[6].Get<std::string>();
+ newMember.Name = fields[6].Get<std::string>();
newMember.Class = fields[7].Get<uint8>();
newMember.PersonalRating = fields[8].Get<uint16>();
newMember.MatchMakerRating = fields[9].Get<uint16>() > 0 ? fields[9].Get<uint16>() : sWorld->getIntConfig(CONFIG_ARENA_START_MATCHMAKER_RATING);
@@ -349,7 +349,7 @@ void ArenaTeam::DelMember(ObjectGuid guid, bool cleanDb)
playerMember->RemoveBattlegroundQueueId(bgQueue);
sBattlegroundMgr->BuildBattlegroundStatusPacket(&data, nullptr, playerMember->GetBattlegroundQueueIndex(bgQueue), STATUS_NONE, 0, 0, 0, TEAM_NEUTRAL);
queue.RemovePlayer(playerMember->GetGUID(), true);
- playerMember->GetSession()->SendPacket(&data);
+ playerMember->SendDirectMessage(&data);
}
}
}
@@ -567,7 +567,7 @@ void ArenaTeam::BroadcastPacket(WorldPacket* packet)
{
for (MemberList::const_iterator itr = Members.begin(); itr != Members.end(); ++itr)
if (Player* player = ObjectAccessor::FindConnectedPlayer(itr->Guid))
- player->GetSession()->SendPacket(packet);
+ player->SendDirectMessage(packet);
}
void ArenaTeam::BroadcastEvent(ArenaTeamEvents event, ObjectGuid guid, uint8 strCount, std::string const& str1, std::string const& str2, std::string const& str3)
diff --git a/src/server/game/Battlegrounds/ArenaTeam.h b/src/server/game/Battlegrounds/ArenaTeam.h
index 3aa09b3e5c..33c47920e2 100644
--- a/src/server/game/Battlegrounds/ArenaTeam.h
+++ b/src/server/game/Battlegrounds/ArenaTeam.h
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/game/Battlegrounds/ArenaTeamMgr.cpp b/src/server/game/Battlegrounds/ArenaTeamMgr.cpp
index 8ba0e3cd4c..4eb240b3cc 100644
--- a/src/server/game/Battlegrounds/ArenaTeamMgr.cpp
+++ b/src/server/game/Battlegrounds/ArenaTeamMgr.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/game/Battlegrounds/ArenaTeamMgr.h b/src/server/game/Battlegrounds/ArenaTeamMgr.h
index 6ca67b5f30..0e8229c0c9 100644
--- a/src/server/game/Battlegrounds/ArenaTeamMgr.h
+++ b/src/server/game/Battlegrounds/ArenaTeamMgr.h
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/game/Battlegrounds/Battleground.cpp b/src/server/game/Battlegrounds/Battleground.cpp
index 7ddd4e87e2..70b8a90670 100644
--- a/src/server/game/Battlegrounds/Battleground.cpp
+++ b/src/server/game/Battlegrounds/Battleground.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
@@ -608,7 +608,7 @@ inline void Battleground::_ProcessJoin(uint32 diff)
{
WorldPacket status;
sBattlegroundMgr->BuildBattlegroundStatusPacket(&status, this, player->GetCurrentBattlegroundQueueSlot(), STATUS_IN_PROGRESS, 0, GetStartTime(), GetArenaType(), player->GetBgTeamId());
- player->GetSession()->SendPacket(&status);
+ player->SendDirectMessage(&status);
player->RemoveAurasDueToSpell(SPELL_ARENA_PREPARATION);
player->ResetAllPowers();
@@ -652,7 +652,7 @@ inline void Battleground::_ProcessJoin(uint32 diff)
data << t->GetGUID();
data << uint32(t->GetZoneId());
data << uint32(15 * IN_MILLISECONDS);
- p->GetSession()->SendPacket(&data);
+ p->SendDirectMessage(&data);
}
m_ToBeTeleported.clear();
}
@@ -713,14 +713,14 @@ Position const* Battleground::GetTeamStartPosition(TeamId teamId) const
void Battleground::SendPacketToAll(WorldPacket const* packet)
{
for (BattlegroundPlayerMap::const_iterator itr = m_Players.begin(); itr != m_Players.end(); ++itr)
- itr->second->GetSession()->SendPacket(packet);
+ itr->second->SendDirectMessage(packet);
}
void Battleground::SendPacketToTeam(TeamId teamId, WorldPacket const* packet, Player* sender, bool self)
{
for (BattlegroundPlayerMap::const_iterator itr = m_Players.begin(); itr != m_Players.end(); ++itr)
if (itr->second->GetBgTeamId() == teamId && (self || sender != itr->second))
- itr->second->GetSession()->SendPacket(packet);
+ itr->second->SendDirectMessage(packet);
}
void Battleground::SendChatMessage(Creature* source, uint8 textId, WorldObject* target /*= nullptr*/)
@@ -937,7 +937,7 @@ void Battleground::EndBattleground(PvPTeamId winnerTeamId)
BlockMovement(player);
- player->GetSession()->SendPacket(&pvpLogData);
+ player->SendDirectMessage(&pvpLogData);
if (isBattleground() && sWorld->getBoolConfig(CONFIG_BATTLEGROUND_STORE_STATISTICS_ENABLE))
{
@@ -964,7 +964,7 @@ void Battleground::EndBattleground(PvPTeamId winnerTeamId)
WorldPacket data;
sBattlegroundMgr->BuildBattlegroundStatusPacket(&data, this, player->GetCurrentBattlegroundQueueSlot(), STATUS_IN_PROGRESS, TIME_TO_AUTOREMOVE, GetStartTime(), GetArenaType(), player->GetBgTeamId());
- player->GetSession()->SendPacket(&data);
+ player->SendDirectMessage(&data);
player->UpdateAchievementCriteria(ACHIEVEMENT_CRITERIA_TYPE_COMPLETE_BATTLEGROUND, player->GetMapId());
}
@@ -1062,7 +1062,7 @@ void Battleground::RemovePlayerAtLeave(Player* player)
WorldPacket data;
sBattlegroundMgr->BuildBattlegroundStatusPacket(&data, this, player->GetCurrentBattlegroundQueueSlot(), STATUS_NONE, 0, 0, 0, TEAM_NEUTRAL);
- player->GetSession()->SendPacket(&data);
+ player->SendDirectMessage(&data);
BattlegroundQueueTypeId bgQueueTypeId = BattlegroundMgr::BGQueueTypeId(GetBgTypeID(), GetArenaType());
@@ -1178,16 +1178,19 @@ void Battleground::AddPlayer(Player* player)
sBattlegroundMgr->BuildPlayerJoinedBattlegroundPacket(&data, player);
SendPacketToTeam(teamId, &data, player, false);
- player->RemoveAurasByType(SPELL_AURA_MOUNTED);
-
// add arena specific auras
if (isArena())
{
// restore pets health before remove
- if (Pet* pet = player->GetPet())
+ Pet* pet = player->GetPet();
+ if (pet)
if (pet->IsAlive())
pet->SetHealth(pet->GetMaxHealth());
+ player->RemoveArenaAuras();
+ if (pet)
+ pet->RemoveArenaAuras();
+ player->RemoveArenaSpellCooldowns(true);
player->RemoveArenaEnchantments(TEMP_ENCHANTMENT_SLOT);
player->DestroyConjuredItems(true);
player->UnsummonPetTemporaryIfAny();
@@ -1338,7 +1341,7 @@ bool Battleground::HasFreeSlots() const
void Battleground::SpectatorsSendPacket(WorldPacket& data)
{
for (SpectatorList::const_iterator itr = m_Spectators.begin(); itr != m_Spectators.end(); ++itr)
- (*itr)->GetSession()->SendPacket(&data);
+ (*itr)->SendDirectMessage(&data);
}
void Battleground::ReadyMarkerClicked(Player* p)
@@ -1810,10 +1813,10 @@ void Battleground::PlayerAddedToBGCheckIfBGIsRunning(Player* player)
BlockMovement(player);
BuildPvPLogDataPacket(data);
- player->GetSession()->SendPacket(&data);
+ player->SendDirectMessage(&data);
sBattlegroundMgr->BuildBattlegroundStatusPacket(&data, this, player->GetCurrentBattlegroundQueueSlot(), STATUS_IN_PROGRESS, GetEndTime(), GetStartTime(), GetArenaType(), player->GetBgTeamId());
- player->GetSession()->SendPacket(&data);
+ player->SendDirectMessage(&data);
}
uint32 Battleground::GetAlivePlayersCountByTeam(TeamId teamId) const
diff --git a/src/server/game/Battlegrounds/Battleground.h b/src/server/game/Battlegrounds/Battleground.h
index 90b828e697..b22cdc143a 100644
--- a/src/server/game/Battlegrounds/Battleground.h
+++ b/src/server/game/Battlegrounds/Battleground.h
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/game/Battlegrounds/BattlegroundMgr.cpp b/src/server/game/Battlegrounds/BattlegroundMgr.cpp
index f447a47d41..e290c9b6b6 100644
--- a/src/server/game/Battlegrounds/BattlegroundMgr.cpp
+++ b/src/server/game/Battlegrounds/BattlegroundMgr.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
@@ -670,7 +670,7 @@ void BattlegroundMgr::SendAreaSpiritHealerQueryOpcode(Player* player, Battlegrou
if (time_ == uint32(-1))
time_ = 0;
data << guid << time_;
- player->GetSession()->SendPacket(&data);
+ player->SendDirectMessage(&data);
}
bool BattlegroundMgr::IsArenaType(BattlegroundTypeId bgTypeId)
diff --git a/src/server/game/Battlegrounds/BattlegroundMgr.h b/src/server/game/Battlegrounds/BattlegroundMgr.h
index 36c8a30c3d..313bee8f0d 100644
--- a/src/server/game/Battlegrounds/BattlegroundMgr.h
+++ b/src/server/game/Battlegrounds/BattlegroundMgr.h
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/game/Battlegrounds/BattlegroundQueue.cpp b/src/server/game/Battlegrounds/BattlegroundQueue.cpp
index 81832437b8..60da08d670 100644
--- a/src/server/game/Battlegrounds/BattlegroundQueue.cpp
+++ b/src/server/game/Battlegrounds/BattlegroundQueue.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
@@ -366,7 +366,7 @@ void BattlegroundQueue::RemovePlayer(ObjectGuid guid, bool decreaseInvitedCount)
void BattlegroundQueue::AddEvent(BasicEvent* Event, uint64 e_time)
{
- m_events.AddEvent(Event, m_events.CalculateTime(e_time));
+ m_events.AddEventAtOffset(Event, Milliseconds(e_time));
}
bool BattlegroundQueue::IsPlayerInvitedToRatedArena(ObjectGuid pl_guid)
@@ -1274,7 +1274,7 @@ void BattlegroundQueue::InviteGroupToBG(GroupQueueInfo* ginfo, Battleground* bg,
// send status packet
WorldPacket data;
sBattlegroundMgr->BuildBattlegroundStatusPacket(&data, bg, queueSlot, STATUS_WAIT_JOIN, INVITE_ACCEPT_WAIT_TIME, 0, ginfo->ArenaType, TEAM_NEUTRAL, bg->isRated());
- player->GetSession()->SendPacket(&data);
+ player->SendDirectMessage(&data);
// pussywizard:
if (bg->isArena() && bg->isRated())
@@ -1312,7 +1312,7 @@ bool BGQueueInviteEvent::Execute(uint64 /*e_time*/, uint32 /*p_time*/)
// send remaining time in queue
WorldPacket data;
sBattlegroundMgr->BuildBattlegroundStatusPacket(&data, bg, queueSlot, STATUS_WAIT_JOIN, INVITE_ACCEPT_WAIT_TIME - INVITATION_REMIND_TIME, 0, m_ArenaType, TEAM_NEUTRAL, bg->isRated(), m_BgTypeId);
- player->GetSession()->SendPacket(&data);
+ player->SendDirectMessage(&data);
}
}
diff --git a/src/server/game/Battlegrounds/BattlegroundQueue.h b/src/server/game/Battlegrounds/BattlegroundQueue.h
index d3589b3047..475fae9621 100644
--- a/src/server/game/Battlegrounds/BattlegroundQueue.h
+++ b/src/server/game/Battlegrounds/BattlegroundQueue.h
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/game/Battlegrounds/BattlegroundScore.h b/src/server/game/Battlegrounds/BattlegroundScore.h
index 33345bd8af..80ce87fe05 100644
--- a/src/server/game/Battlegrounds/BattlegroundScore.h
+++ b/src/server/game/Battlegrounds/BattlegroundScore.h
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/game/Battlegrounds/BattlegroundSpamProtect.cpp b/src/server/game/Battlegrounds/BattlegroundSpamProtect.cpp
index 2105960aa8..f917c61bc2 100644
--- a/src/server/game/Battlegrounds/BattlegroundSpamProtect.cpp
+++ b/src/server/game/Battlegrounds/BattlegroundSpamProtect.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/game/Battlegrounds/BattlegroundSpamProtect.h b/src/server/game/Battlegrounds/BattlegroundSpamProtect.h
index c08fa9825d..7990deb999 100644
--- a/src/server/game/Battlegrounds/BattlegroundSpamProtect.h
+++ b/src/server/game/Battlegrounds/BattlegroundSpamProtect.h
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/game/Battlegrounds/Zones/BattlegroundAB.cpp b/src/server/game/Battlegrounds/Zones/BattlegroundAB.cpp
index 10c0956e5d..cff3ec3ffc 100644
--- a/src/server/game/Battlegrounds/Zones/BattlegroundAB.cpp
+++ b/src/server/game/Battlegrounds/Zones/BattlegroundAB.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
@@ -101,7 +101,7 @@ void BattlegroundAB::PostUpdateImpl(uint32 diff)
uint8 controlledPoints = _controlledPoints[teamId];
if (controlledPoints == 0)
{
- _bgEvents.ScheduleEvent(eventId, 3000);
+ _bgEvents.ScheduleEvent(eventId, 3s);
break;
}
@@ -115,7 +115,7 @@ void BattlegroundAB::PostUpdateImpl(uint32 diff)
if (honorRewards < uint8(m_TeamScores[teamId] / _honorTics))
RewardHonorToTeam(GetBonusHonorFromKill(1), teamId);
if (reputationRewards < uint8(m_TeamScores[teamId] / _reputationTics))
- RewardReputationToTeam(teamId == TEAM_ALLIANCE ? 509 : 510, 10, teamId);
+ RewardReputationToTeam(teamId == TEAM_ALLIANCE ? 509 : 510, uint32(10 * _abReputationRate), teamId);
if (information < uint8(m_TeamScores[teamId] / BG_AB_WARNING_NEAR_VICTORY_SCORE))
{
if (teamId == TEAM_ALLIANCE)
@@ -170,8 +170,8 @@ void BattlegroundAB::StartingEventOpenDoors()
DoorOpen(BG_AB_OBJECT_GATE_A);
DoorOpen(BG_AB_OBJECT_GATE_H);
StartTimedAchievement(ACHIEVEMENT_TIMED_TYPE_EVENT, BG_AB_EVENT_START_BATTLE);
- _bgEvents.ScheduleEvent(BG_AB_EVENT_ALLIANCE_TICK, 3000);
- _bgEvents.ScheduleEvent(BG_AB_EVENT_HORDE_TICK, 3000);
+ _bgEvents.ScheduleEvent(BG_AB_EVENT_ALLIANCE_TICK, 3s);
+ _bgEvents.ScheduleEvent(BG_AB_EVENT_HORDE_TICK, 3s);
}
void BattlegroundAB::AddPlayer(Player* player)
@@ -421,6 +421,7 @@ bool BattlegroundAB::SetupBattleground()
{
_honorTics = BattlegroundMgr::IsBGWeekend(GetBgTypeID(true)) ? BG_AB_HONOR_TICK_WEEKEND : BG_AB_HONOR_TICK_NORMAL;
_reputationTics = BattlegroundMgr::IsBGWeekend(GetBgTypeID(true)) ? BG_AB_REP_TICK_WEEKEND : BG_AB_REP_TICK_NORMAL;
+ _abReputationRate = sWorld->getRate(RATE_REPUTATION_GAIN_AB);
for (uint32 i = 0; i < BG_AB_DYNAMIC_NODES_COUNT; ++i)
{
diff --git a/src/server/game/Battlegrounds/Zones/BattlegroundAB.h b/src/server/game/Battlegrounds/Zones/BattlegroundAB.h
index a250c9f16e..72932386a1 100644
--- a/src/server/game/Battlegrounds/Zones/BattlegroundAB.h
+++ b/src/server/game/Battlegrounds/Zones/BattlegroundAB.h
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
@@ -170,12 +170,11 @@ enum BG_AB_Misc
BG_AB_WARNING_NEAR_VICTORY_SCORE = 1400,
BG_AB_MAX_TEAM_SCORE = 1600,
-
- BG_AB_FLAG_CAPTURING_TIME = 60000,
- BG_AB_BANNER_UPDATE_TIME = 2000
};
+constexpr Milliseconds BG_AB_FLAG_CAPTURING_TIME = 60s;
+constexpr Milliseconds BG_AB_BANNER_UPDATE_TIME = 2s;
-const uint32 BG_AB_TickIntervals[BG_AB_DYNAMIC_NODES_COUNT + 1] = {0, 12000, 9000, 6000, 3000, 1000};
+const Milliseconds BG_AB_TickIntervals[BG_AB_DYNAMIC_NODES_COUNT + 1] = {0ms, 12s, 9s, 6s, 3s, 1s};
const uint32 BG_AB_TickPoints[BG_AB_DYNAMIC_NODES_COUNT + 1] = {0, 10, 10, 10, 10, 30};
const uint32 BG_AB_GraveyardIds[BG_AB_ALL_NODES_COUNT] = {895, 894, 893, 897, 896, 898, 899};
@@ -299,6 +298,7 @@ private:
EventMap _bgEvents;
uint32 _honorTics;
uint32 _reputationTics;
+ float _abReputationRate;
uint8 _controlledPoints[PVP_TEAMS_COUNT] {};
bool _teamScores500Disadvantage[PVP_TEAMS_COUNT] {};
uint32 _configurableMaxTeamScore;
diff --git a/src/server/game/Battlegrounds/Zones/BattlegroundAV.cpp b/src/server/game/Battlegrounds/Zones/BattlegroundAV.cpp
index 5b6a8b335f..d00a7cb83f 100644
--- a/src/server/game/Battlegrounds/Zones/BattlegroundAV.cpp
+++ b/src/server/game/Battlegrounds/Zones/BattlegroundAV.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
@@ -194,21 +194,21 @@ void BattlegroundAV::HandleQuestComplete(uint32 questid, Player* player)
case AV_QUEST_A_COMMANDER1:
case AV_QUEST_H_COMMANDER1:
m_Team_QuestStatus[teamId][1]++;
- RewardReputationToTeam(teamId, 1, teamId);
+ RewardReputationToTeam(teamId, uint32(1 * _avReputationRate), teamId);
if (m_Team_QuestStatus[teamId][1] == 30)
LOG_DEBUG("bg.battleground", "BG_AV Quest {} completed (need to implement some events here", questid);
break;
case AV_QUEST_A_COMMANDER2:
case AV_QUEST_H_COMMANDER2:
m_Team_QuestStatus[teamId][2]++;
- RewardReputationToTeam(teamId, 1, teamId);
+ RewardReputationToTeam(teamId, uint32(1 * _avReputationRate), teamId);
if (m_Team_QuestStatus[teamId][2] == 60)
LOG_DEBUG("bg.battleground", "BG_AV Quest {} completed (need to implement some events here", questid);
break;
case AV_QUEST_A_COMMANDER3:
case AV_QUEST_H_COMMANDER3:
m_Team_QuestStatus[teamId][3]++;
- RewardReputationToTeam(teamId, 1, teamId);
+ RewardReputationToTeam(teamId, uint32(1 * _avReputationRate), teamId);
if (m_Team_QuestStatus[teamId][3] == 120)
LOG_DEBUG("bg.battleground", "BG_AV Quest {} completed (need to implement some events here", questid);
break;
@@ -316,21 +316,21 @@ Creature* BattlegroundAV::AddAVCreature(uint16 cinfoid, uint16 type)
type -= AV_CPLACE_MAX;
cinfoid = uint16(BG_AV_StaticCreaturePos[type][4]);
creature = AddCreature(BG_AV_StaticCreatureInfo[cinfoid],
- type + AV_CPLACE_MAX,
- BG_AV_StaticCreaturePos[type][0],
- BG_AV_StaticCreaturePos[type][1],
- BG_AV_StaticCreaturePos[type][2],
- BG_AV_StaticCreaturePos[type][3]);
+ type + AV_CPLACE_MAX,
+ BG_AV_StaticCreaturePos[type][0],
+ BG_AV_StaticCreaturePos[type][1],
+ BG_AV_StaticCreaturePos[type][2],
+ BG_AV_StaticCreaturePos[type][3]);
isStatic = true;
}
else
{
creature = AddCreature(BG_AV_CreatureInfo[cinfoid],
- type,
- BG_AV_CreaturePos[type][0],
- BG_AV_CreaturePos[type][1],
- BG_AV_CreaturePos[type][2],
- BG_AV_CreaturePos[type][3]);
+ type,
+ BG_AV_CreaturePos[type][0],
+ BG_AV_CreaturePos[type][1],
+ BG_AV_CreaturePos[type][2],
+ BG_AV_CreaturePos[type][3]);
}
if (!creature)
return nullptr;
@@ -344,7 +344,7 @@ Creature* BattlegroundAV::AddAVCreature(uint16 cinfoid, uint16 type)
(cinfoid >= AV_NPC_H_GRAVEDEFENSE0 && cinfoid <= AV_NPC_H_GRAVEDEFENSE3))))
{
if (!isStatic && ((cinfoid >= AV_NPC_A_GRAVEDEFENSE0 && cinfoid <= AV_NPC_A_GRAVEDEFENSE3)
- || (cinfoid >= AV_NPC_H_GRAVEDEFENSE0 && cinfoid <= AV_NPC_H_GRAVEDEFENSE3)))
+ || (cinfoid >= AV_NPC_H_GRAVEDEFENSE0 && cinfoid <= AV_NPC_H_GRAVEDEFENSE3)))
{
CreatureData& data = sObjectMgr->NewOrExistCreatureData(creature->GetSpawnId());
data.wander_distance = 5;
@@ -814,11 +814,11 @@ void BattlegroundAV::PopulateNode(BG_AV_Nodes node)
if (!trigger)
{
trigger = AddCreature(WORLD_TRIGGER,
- node + 302,
- BG_AV_CreaturePos[node + 302][0],
- BG_AV_CreaturePos[node + 302][1],
- BG_AV_CreaturePos[node + 302][2],
- BG_AV_CreaturePos[node + 302][3]);
+ node + 302,
+ BG_AV_CreaturePos[node + 302][0],
+ BG_AV_CreaturePos[node + 302][1],
+ BG_AV_CreaturePos[node + 302][2],
+ BG_AV_CreaturePos[node + 302][3]);
}
//add bonus honor aura trigger creature when node is accupied
@@ -1240,25 +1240,28 @@ GraveyardStruct const* BattlegroundAV::GetClosestGraveyard(Player* player)
bool BattlegroundAV::SetupBattleground()
{
+ _avReputationRate = sWorld->getRate(RATE_REPUTATION_GAIN_AV);
+
if (sBattlegroundMgr->IsBGWeekend(GetBgTypeID(true)))
{
- _reputationTower = 18;
- _reputationCaptain = 185;
- _reputationBoss = 525;
- _reputationPerOwnedGraveyard = 18;
- _reputationSurvivingCaptain = 175;
- _reputationSurvivingTower = 18;
- _reputationPerOwnedMine = 36;
+ _reputationTower = uint32(18 * _avReputationRate);
+ _reputationCaptain = uint32(185 * _avReputationRate);
+ _reputationBoss = uint32(525 * _avReputationRate);
+ _reputationPerOwnedGraveyard = uint32(18 * _avReputationRate);
+ _reputationSurvivingCaptain = uint32(175 * _avReputationRate);
+ _reputationSurvivingTower = uint32(18 * _avReputationRate);
+ _reputationPerOwnedMine = uint32(36 * _avReputationRate);
}
else
{
- _reputationTower = 12;
- _reputationCaptain = 125;
- _reputationBoss = sWorld->getIntConfig(CONFIG_BATTLEGROUND_ALTERAC_REP_ONBOSSDEATH);
- _reputationPerOwnedGraveyard = 12;
- _reputationSurvivingCaptain = 125;
- _reputationSurvivingTower = 12;
- _reputationPerOwnedMine = 24;
+ _reputationTower = uint32(12 * _avReputationRate);
+ _reputationCaptain = uint32(125 * _avReputationRate);
+ // Special case: This value comes from another config setting, but we still apply our multiplier
+ _reputationBoss = uint32(sWorld->getIntConfig(CONFIG_BATTLEGROUND_ALTERAC_REP_ONBOSSDEATH) * _avReputationRate);
+ _reputationPerOwnedGraveyard = uint32(12 * _avReputationRate);
+ _reputationSurvivingCaptain = uint32(125 * _avReputationRate);
+ _reputationSurvivingTower = uint32(12 * _avReputationRate);
+ _reputationPerOwnedMine = uint32(24 * _avReputationRate);
}
// Create starting objects
diff --git a/src/server/game/Battlegrounds/Zones/BattlegroundAV.h b/src/server/game/Battlegrounds/Zones/BattlegroundAV.h
index a058f1d98c..57417dd1db 100644
--- a/src/server/game/Battlegrounds/Zones/BattlegroundAV.h
+++ b/src/server/game/Battlegrounds/Zones/BattlegroundAV.h
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
@@ -1846,6 +1846,7 @@ private:
uint32 _reputationSurvivingCaptain = 0; // 125, 175
uint32 _reputationSurvivingTower = 0; // 12, 18
uint32 _reputationPerOwnedMine = 0; // 24, 36
+ float _avReputationRate;
bool m_IsInformedNearVictory[2] {};
};
diff --git a/src/server/game/Battlegrounds/Zones/BattlegroundBE.cpp b/src/server/game/Battlegrounds/Zones/BattlegroundBE.cpp
index ae37785618..a467d30324 100644
--- a/src/server/game/Battlegrounds/Zones/BattlegroundBE.cpp
+++ b/src/server/game/Battlegrounds/Zones/BattlegroundBE.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/game/Battlegrounds/Zones/BattlegroundBE.h b/src/server/game/Battlegrounds/Zones/BattlegroundBE.h
index 77d5c34234..abb16edb2d 100644
--- a/src/server/game/Battlegrounds/Zones/BattlegroundBE.h
+++ b/src/server/game/Battlegrounds/Zones/BattlegroundBE.h
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/game/Battlegrounds/Zones/BattlegroundDS.cpp b/src/server/game/Battlegrounds/Zones/BattlegroundDS.cpp
index 8331451514..bd3a61f682 100644
--- a/src/server/game/Battlegrounds/Zones/BattlegroundDS.cpp
+++ b/src/server/game/Battlegrounds/Zones/BattlegroundDS.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/game/Battlegrounds/Zones/BattlegroundDS.h b/src/server/game/Battlegrounds/Zones/BattlegroundDS.h
index 2c8340f70e..103ec6cfe5 100644
--- a/src/server/game/Battlegrounds/Zones/BattlegroundDS.h
+++ b/src/server/game/Battlegrounds/Zones/BattlegroundDS.h
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/game/Battlegrounds/Zones/BattlegroundEY.cpp b/src/server/game/Battlegrounds/Zones/BattlegroundEY.cpp
index ed636bcf5e..da6bfb2898 100644
--- a/src/server/game/Battlegrounds/Zones/BattlegroundEY.cpp
+++ b/src/server/game/Battlegrounds/Zones/BattlegroundEY.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
@@ -68,7 +68,7 @@ void BattlegroundEY::PostUpdateImpl(uint32 diff)
AddPoints(TEAM_ALLIANCE, BG_EY_TickPoints[_ownedPointsCount[TEAM_ALLIANCE] - 1]);
if (_ownedPointsCount[TEAM_HORDE] > 0)
AddPoints(TEAM_HORDE, BG_EY_TickPoints[_ownedPointsCount[TEAM_HORDE] - 1]);
- _bgEvents.ScheduleEvent(BG_EY_EVENT_ADD_POINTS, BG_EY_FPOINTS_TICK_TIME - (GameTime::GetGameTimeMS().count() % BG_EY_FPOINTS_TICK_TIME));
+ _bgEvents.ScheduleEvent(BG_EY_EVENT_ADD_POINTS, BG_EY_FPOINTS_TICK_TIME - (GameTime::GetGameTimeMS() % BG_EY_FPOINTS_TICK_TIME));
break;
case BG_EY_EVENT_FLAG_ON_GROUND:
RespawnFlagAfterDrop();
@@ -78,7 +78,7 @@ void BattlegroundEY::PostUpdateImpl(uint32 diff)
break;
case BG_EY_EVENT_CHECK_CPOINTS:
UpdatePointsState();
- _bgEvents.ScheduleEvent(BG_EY_EVENT_CHECK_CPOINTS, BG_EY_FPOINTS_CHECK_TIME - (GameTime::GetGameTimeMS().count() % BG_EY_FPOINTS_CHECK_TIME));
+ _bgEvents.ScheduleEvent(BG_EY_EVENT_CHECK_CPOINTS, BG_EY_FPOINTS_CHECK_TIME - (GameTime::GetGameTimeMS() % BG_EY_FPOINTS_CHECK_TIME));
break;
}
}
@@ -106,8 +106,8 @@ void BattlegroundEY::StartingEventOpenDoors()
// Achievement: Flurry
StartTimedAchievement(ACHIEVEMENT_TIMED_TYPE_EVENT, BG_EY_EVENT_START_BATTLE);
- _bgEvents.ScheduleEvent(BG_EY_EVENT_ADD_POINTS, 0);
- _bgEvents.ScheduleEvent(BG_EY_EVENT_CHECK_CPOINTS, 0);
+ _bgEvents.ScheduleEvent(BG_EY_EVENT_ADD_POINTS, 0ms);
+ _bgEvents.ScheduleEvent(BG_EY_EVENT_CHECK_CPOINTS, 0ms);
}
void BattlegroundEY::AddPoints(TeamId teamId, uint32 points)
@@ -583,8 +583,8 @@ void BattlegroundEY::FillInitialWorldStates(WorldPackets::WorldState::InitWorldS
packet.Worldstates.emplace_back(WORLD_STATE_BATTLEGROUND_EY_DRAENEI_RUINS_HORDE_CONTROL, _capturePointInfo[POINT_DRAENEI_RUINS].IsUnderControl(TEAM_HORDE));
packet.Worldstates.emplace_back(WORLD_STATE_BATTLEGROUND_EY_DRAENEI_RUINS_ALLIANCE_CONTROL, _capturePointInfo[POINT_DRAENEI_RUINS].IsUnderControl(TEAM_ALLIANCE));
packet.Worldstates.emplace_back(WORLD_STATE_BATTLEGROUND_EY_DRAENEI_RUINS_UNCONTROL, _capturePointInfo[POINT_DRAENEI_RUINS].IsUncontrolled());
- packet.Worldstates.emplace_back(WORLD_STATE_BATTLEGROUND_EY_MAGE_TOWER_ALLIANCE_CONTROL, _capturePointInfo[POINT_MAGE_TOWER].IsUnderControl(TEAM_HORDE));
- packet.Worldstates.emplace_back(WORLD_STATE_BATTLEGROUND_EY_MAGE_TOWER_HORDE_CONTROL, _capturePointInfo[POINT_MAGE_TOWER].IsUnderControl(TEAM_ALLIANCE));
+ packet.Worldstates.emplace_back(WORLD_STATE_BATTLEGROUND_EY_MAGE_TOWER_ALLIANCE_CONTROL, _capturePointInfo[POINT_MAGE_TOWER].IsUnderControl(TEAM_ALLIANCE));
+ packet.Worldstates.emplace_back(WORLD_STATE_BATTLEGROUND_EY_MAGE_TOWER_HORDE_CONTROL, _capturePointInfo[POINT_MAGE_TOWER].IsUnderControl(TEAM_HORDE));
packet.Worldstates.emplace_back(WORLD_STATE_BATTLEGROUND_EY_MAGE_TOWER_UNCONTROL, _capturePointInfo[POINT_MAGE_TOWER].IsUncontrolled());
packet.Worldstates.emplace_back(WORLD_STATE_BATTLEGROUND_EY_FEL_REAVER_HORDE_CONTROL, _capturePointInfo[POINT_FEL_REAVER].IsUnderControl(TEAM_HORDE));
packet.Worldstates.emplace_back(WORLD_STATE_BATTLEGROUND_EY_FEL_REAVER_ALLIANCE_CONTROL, _capturePointInfo[POINT_FEL_REAVER].IsUnderControl(TEAM_ALLIANCE));
diff --git a/src/server/game/Battlegrounds/Zones/BattlegroundEY.h b/src/server/game/Battlegrounds/Zones/BattlegroundEY.h
index 1cdf29992b..2730a06041 100644
--- a/src/server/game/Battlegrounds/Zones/BattlegroundEY.h
+++ b/src/server/game/Battlegrounds/Zones/BattlegroundEY.h
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
@@ -31,13 +31,10 @@ enum BG_EY_Events
BG_EY_EVENT_CHECK_CPOINTS = 4
};
-enum BG_EY_Timers
-{
- BG_EY_FLAG_RESPAWN_TIME = 10 * IN_MILLISECONDS,
- BG_EY_FLAG_ON_GROUND_TIME = 10 * IN_MILLISECONDS,
- BG_EY_FPOINTS_CHECK_TIME = 2 * IN_MILLISECONDS,
- BG_EY_FPOINTS_TICK_TIME = 2 * IN_MILLISECONDS
-};
+constexpr Milliseconds BG_EY_FLAG_RESPAWN_TIME = 10s;
+constexpr Milliseconds BG_EY_FLAG_ON_GROUND_TIME = 10s;
+constexpr Milliseconds BG_EY_FPOINTS_CHECK_TIME = 2s;
+constexpr Milliseconds BG_EY_FPOINTS_TICK_TIME = 2s;
enum BG_EY_ProgressBarConsts
{
diff --git a/src/server/game/Battlegrounds/Zones/BattlegroundIC.cpp b/src/server/game/Battlegrounds/Zones/BattlegroundIC.cpp
index e1eb6b812f..50721aa037 100644
--- a/src/server/game/Battlegrounds/Zones/BattlegroundIC.cpp
+++ b/src/server/game/Battlegrounds/Zones/BattlegroundIC.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/game/Battlegrounds/Zones/BattlegroundIC.h b/src/server/game/Battlegrounds/Zones/BattlegroundIC.h
index 33bb9a776e..9f859ddfe0 100644
--- a/src/server/game/Battlegrounds/Zones/BattlegroundIC.h
+++ b/src/server/game/Battlegrounds/Zones/BattlegroundIC.h
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/game/Battlegrounds/Zones/BattlegroundNA.cpp b/src/server/game/Battlegrounds/Zones/BattlegroundNA.cpp
index fbc0eca1b2..fd1ec0bfae 100644
--- a/src/server/game/Battlegrounds/Zones/BattlegroundNA.cpp
+++ b/src/server/game/Battlegrounds/Zones/BattlegroundNA.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/game/Battlegrounds/Zones/BattlegroundNA.h b/src/server/game/Battlegrounds/Zones/BattlegroundNA.h
index e75b30d220..889b9ed0e2 100644
--- a/src/server/game/Battlegrounds/Zones/BattlegroundNA.h
+++ b/src/server/game/Battlegrounds/Zones/BattlegroundNA.h
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/game/Battlegrounds/Zones/BattlegroundRL.cpp b/src/server/game/Battlegrounds/Zones/BattlegroundRL.cpp
index 8f209d4d0e..ac845386ff 100644
--- a/src/server/game/Battlegrounds/Zones/BattlegroundRL.cpp
+++ b/src/server/game/Battlegrounds/Zones/BattlegroundRL.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/game/Battlegrounds/Zones/BattlegroundRL.h b/src/server/game/Battlegrounds/Zones/BattlegroundRL.h
index bfcf6f5ffa..3e273810c1 100644
--- a/src/server/game/Battlegrounds/Zones/BattlegroundRL.h
+++ b/src/server/game/Battlegrounds/Zones/BattlegroundRL.h
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/game/Battlegrounds/Zones/BattlegroundRV.cpp b/src/server/game/Battlegrounds/Zones/BattlegroundRV.cpp
index 39a7836ff8..5b77fc9a33 100644
--- a/src/server/game/Battlegrounds/Zones/BattlegroundRV.cpp
+++ b/src/server/game/Battlegrounds/Zones/BattlegroundRV.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/game/Battlegrounds/Zones/BattlegroundRV.h b/src/server/game/Battlegrounds/Zones/BattlegroundRV.h
index 722de1c79a..ffa3d58090 100644
--- a/src/server/game/Battlegrounds/Zones/BattlegroundRV.h
+++ b/src/server/game/Battlegrounds/Zones/BattlegroundRV.h
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/game/Battlegrounds/Zones/BattlegroundSA.cpp b/src/server/game/Battlegrounds/Zones/BattlegroundSA.cpp
index d02e6c03b7..0bfa0abec1 100644
--- a/src/server/game/Battlegrounds/Zones/BattlegroundSA.cpp
+++ b/src/server/game/Battlegrounds/Zones/BattlegroundSA.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
@@ -307,7 +307,7 @@ void BattlegroundSA::StartShips()
WorldPacket pkt;
GetBGObject(i)->BuildValuesUpdateBlockForPlayer(&data, itr->second);
data.BuildPacket(pkt);
- itr->second->GetSession()->SendPacket(&pkt);
+ itr->second->SendDirectMessage(&pkt);
}
}
ShipsStarted = true;
@@ -1141,7 +1141,7 @@ void BattlegroundSA::SendTransportInit(Player* player)
GetBGObject(BG_SA_BOAT_TWO)->BuildCreateUpdateBlockForPlayer(&transData, player);
WorldPacket packet;
transData.BuildPacket(packet);
- player->GetSession()->SendPacket(&packet);
+ player->SendDirectMessage(&packet);
}
}
@@ -1156,7 +1156,7 @@ void BattlegroundSA::SendTransportsRemove(Player* player)
GetBGObject(BG_SA_BOAT_TWO)->BuildOutOfRangeUpdateBlock(&transData);
WorldPacket packet;
transData.BuildPacket(packet);
- player->GetSession()->SendPacket(&packet);
+ player->SendDirectMessage(&packet);
}
}
diff --git a/src/server/game/Battlegrounds/Zones/BattlegroundSA.h b/src/server/game/Battlegrounds/Zones/BattlegroundSA.h
index 7b3197567c..e76f22da7e 100644
--- a/src/server/game/Battlegrounds/Zones/BattlegroundSA.h
+++ b/src/server/game/Battlegrounds/Zones/BattlegroundSA.h
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/game/Battlegrounds/Zones/BattlegroundWS.cpp b/src/server/game/Battlegrounds/Zones/BattlegroundWS.cpp
index 272f07fbad..f5bd8a84f8 100644
--- a/src/server/game/Battlegrounds/Zones/BattlegroundWS.cpp
+++ b/src/server/game/Battlegrounds/Zones/BattlegroundWS.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
@@ -63,7 +63,7 @@ void BattlegroundWS::PostUpdateImpl(uint32 diff)
{
case BG_WS_EVENT_UPDATE_GAME_TIME:
UpdateWorldState(WORLD_STATE_BATTLEGROUND_WS_STATE_TIMER, GetMatchTime());
- _bgEvents.ScheduleEvent(BG_WS_EVENT_UPDATE_GAME_TIME, ((BG_WS_TOTAL_GAME_TIME - GetStartTime()) % (MINUTE * IN_MILLISECONDS)) + 1);
+ _bgEvents.ScheduleEvent(BG_WS_EVENT_UPDATE_GAME_TIME, Milliseconds(((BG_WS_TOTAL_GAME_TIME - GetStartTime()) % (MINUTE * IN_MILLISECONDS)) + 1));
break;
case BG_WS_EVENT_NO_TIME_LEFT:
if (GetTeamScore(TEAM_ALLIANCE) == GetTeamScore(TEAM_HORDE))
@@ -137,8 +137,8 @@ void BattlegroundWS::StartingEventOpenDoors()
StartTimedAchievement(ACHIEVEMENT_TIMED_TYPE_EVENT, WS_EVENT_START_BATTLE);
UpdateWorldState(WORLD_STATE_BATTLEGROUND_WS_STATE_TIMER_ACTIVE, 1);
- _bgEvents.ScheduleEvent(BG_WS_EVENT_UPDATE_GAME_TIME, 0);
- _bgEvents.ScheduleEvent(BG_WS_EVENT_NO_TIME_LEFT, BG_WS_TOTAL_GAME_TIME - 2 * MINUTE * IN_MILLISECONDS); // 27 - 2 = 25 minutes
+ _bgEvents.ScheduleEvent(BG_WS_EVENT_UPDATE_GAME_TIME, 0ms);
+ _bgEvents.ScheduleEvent(BG_WS_EVENT_NO_TIME_LEFT, Milliseconds(BG_WS_TOTAL_GAME_TIME - 2 * MINUTE * IN_MILLISECONDS)); // 27 - 2 = 25 minutes
_bgEvents.ScheduleEvent(BG_WS_EVENT_DESPAWN_DOORS, BG_WS_DOOR_DESPAWN_TIME);
}
@@ -229,7 +229,7 @@ void BattlegroundWS::EventPlayerCapturedFlag(Player* player)
EndBattleground(GetTeamScore(TEAM_HORDE) == _configurableMaxTeamScore ? TEAM_HORDE : TEAM_ALLIANCE);
}
else
- _bgEvents.ScheduleEvent(BG_WS_EVENT_RESPAWN_BOTH_FLAGS, BG_WS_FLAG_RESPAWN_TIME);
+ _bgEvents.ScheduleEvent(BG_WS_EVENT_RESPAWN_BOTH_FLAGS, Milliseconds(BG_WS_FLAG_RESPAWN_TIME));
_bgEvents.CancelEvent(BG_WS_EVENT_BOTH_FLAGS_KEPT10);
_bgEvents.CancelEvent(BG_WS_EVENT_BOTH_FLAGS_KEPT15);
@@ -426,15 +426,17 @@ void BattlegroundWS::HandleAreaTrigger(Player* player, uint32 trigger)
bool BattlegroundWS::SetupBattleground()
{
+ _wsReputationRate = sWorld->getRate(RATE_REPUTATION_GAIN_WSG);
+
if (sBattlegroundMgr->IsBGWeekend(GetBgTypeID(true)))
{
- _reputationCapture = 45;
+ _reputationCapture = uint32(45 * _wsReputationRate);
_honorWinKills = 3;
_honorEndKills = 4;
}
else
{
- _reputationCapture = 35;
+ _reputationCapture = uint32(35 * _wsReputationRate);
_honorWinKills = 1;
_honorEndKills = 2;
}
@@ -578,10 +580,10 @@ uint32 BattlegroundWS::GetAssaultSpellId() const
{
if ((!GetFlagPickerGUID(TEAM_ALLIANCE) && GetFlagState(TEAM_ALLIANCE) != BG_WS_FLAG_STATE_ON_GROUND) ||
(!GetFlagPickerGUID(TEAM_HORDE) && GetFlagState(TEAM_HORDE) != BG_WS_FLAG_STATE_ON_GROUND) ||
- _bgEvents.GetNextEventTime(BG_WS_EVENT_BOTH_FLAGS_KEPT10) > 0)
+ _bgEvents.HasTimeUntilEvent(BG_WS_EVENT_BOTH_FLAGS_KEPT10))
return 0;
- return _bgEvents.GetNextEventTime(BG_WS_EVENT_BOTH_FLAGS_KEPT15) > 0 ? BG_WS_SPELL_FOCUSED_ASSAULT : BG_WS_SPELL_BRUTAL_ASSAULT;
+ return _bgEvents.HasTimeUntilEvent(BG_WS_EVENT_BOTH_FLAGS_KEPT15) ? BG_WS_SPELL_FOCUSED_ASSAULT : BG_WS_SPELL_BRUTAL_ASSAULT;
}
void BattlegroundWS::RemoveAssaultAuras()
diff --git a/src/server/game/Battlegrounds/Zones/BattlegroundWS.h b/src/server/game/Battlegrounds/Zones/BattlegroundWS.h
index 61fa2516ed..ff3dc64d61 100644
--- a/src/server/game/Battlegrounds/Zones/BattlegroundWS.h
+++ b/src/server/game/Battlegrounds/Zones/BattlegroundWS.h
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
@@ -39,12 +39,12 @@ enum BG_WS_TimerOrScore
BG_WS_MAX_TEAM_SCORE = 3,
BG_WS_TOTAL_GAME_TIME = 27 * MINUTE * IN_MILLISECONDS,
- BG_WS_FLAG_RESPAWN_TIME = 23 * IN_MILLISECONDS,
- BG_WS_FLAG_DROP_TIME = 10 * IN_MILLISECONDS,
- BG_WS_SPELL_FORCE_TIME = 10 * MINUTE * IN_MILLISECONDS,
- BG_WS_SPELL_BRUTAL_TIME = 15 * MINUTE * IN_MILLISECONDS,
- BG_WS_DOOR_DESPAWN_TIME = 5 * IN_MILLISECONDS
+ BG_WS_FLAG_RESPAWN_TIME = 23 * IN_MILLISECONDS
};
+constexpr Milliseconds BG_WS_FLAG_DROP_TIME = 10s;
+constexpr Milliseconds BG_WS_SPELL_FORCE_TIME = 600s;
+constexpr Milliseconds BG_WS_SPELL_BRUTAL_TIME = 900s;
+constexpr Milliseconds BG_WS_DOOR_DESPAWN_TIME = 5s;
enum BG_WS_BroadcastTexts
{
@@ -258,6 +258,7 @@ private:
ObjectGuid _droppedFlagGUID[2];
uint8 _flagState[2];
TeamId _lastFlagCaptureTeam;
+ float _wsReputationRate;
uint32 _reputationCapture;
uint32 _honorWinKills;
uint32 _honorEndKills;
diff --git a/src/server/game/Battlegrounds/enuminfo_ArenaTeam.cpp b/src/server/game/Battlegrounds/enuminfo_ArenaTeam.cpp
index 952a2458e4..042f267c2a 100644
--- a/src/server/game/Battlegrounds/enuminfo_ArenaTeam.cpp
+++ b/src/server/game/Battlegrounds/enuminfo_ArenaTeam.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/game/Cache/CharacterCache.cpp b/src/server/game/Cache/CharacterCache.cpp
index a46165c2d6..f940173dc4 100644
--- a/src/server/game/Cache/CharacterCache.cpp
+++ b/src/server/game/Cache/CharacterCache.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/game/Cache/CharacterCache.h b/src/server/game/Cache/CharacterCache.h
index 4c513a1158..c0f8572ac7 100644
--- a/src/server/game/Cache/CharacterCache.h
+++ b/src/server/game/Cache/CharacterCache.h
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/game/Cache/WhoListCacheMgr.cpp b/src/server/game/Cache/WhoListCacheMgr.cpp
index 6af42b662b..1c5bbefe87 100644
--- a/src/server/game/Cache/WhoListCacheMgr.cpp
+++ b/src/server/game/Cache/WhoListCacheMgr.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/game/Cache/WhoListCacheMgr.h b/src/server/game/Cache/WhoListCacheMgr.h
index 067c6246a3..cfa7f08ab2 100644
--- a/src/server/game/Cache/WhoListCacheMgr.h
+++ b/src/server/game/Cache/WhoListCacheMgr.h
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/game/Calendar/CalendarMgr.cpp b/src/server/game/Calendar/CalendarMgr.cpp
index 014d990560..e258e2420d 100644
--- a/src/server/game/Calendar/CalendarMgr.cpp
+++ b/src/server/game/Calendar/CalendarMgr.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/game/Calendar/CalendarMgr.h b/src/server/game/Calendar/CalendarMgr.h
index 79ea79712d..b33d74c32c 100644
--- a/src/server/game/Calendar/CalendarMgr.h
+++ b/src/server/game/Calendar/CalendarMgr.h
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/game/Chat/Channels/Channel.cpp b/src/server/game/Chat/Channels/Channel.cpp
index b072230304..05e887a6be 100644
--- a/src/server/game/Chat/Channels/Channel.cpp
+++ b/src/server/game/Chat/Channels/Channel.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
@@ -908,26 +908,26 @@ void Channel::SendToAll(WorldPacket* data, ObjectGuid guid)
{
for (PlayerContainer::const_iterator i = playersStore.begin(); i != playersStore.end(); ++i)
if (!guid || !i->second.plrPtr->GetSocial()->HasIgnore(guid))
- i->second.plrPtr->GetSession()->SendPacket(data);
+ i->second.plrPtr->SendDirectMessage(data);
}
void Channel::SendToAllButOne(WorldPacket* data, ObjectGuid who)
{
for (PlayerContainer::const_iterator i = playersStore.begin(); i != playersStore.end(); ++i)
if (i->first != who)
- i->second.plrPtr->GetSession()->SendPacket(data);
+ i->second.plrPtr->SendDirectMessage(data);
}
void Channel::SendToOne(WorldPacket* data, ObjectGuid who)
{
if (Player* player = ObjectAccessor::FindConnectedPlayer(who))
- player->GetSession()->SendPacket(data);
+ player->SendDirectMessage(data);
}
void Channel::SendToAllWatching(WorldPacket* data)
{
for (PlayersWatchingContainer::const_iterator i = playersWatchingStore.begin(); i != playersWatchingStore.end(); ++i)
- (*i)->GetSession()->SendPacket(data);
+ (*i)->SendDirectMessage(data);
}
bool Channel::ShouldAnnouncePlayer(Player const* player) const
diff --git a/src/server/game/Chat/Channels/Channel.h b/src/server/game/Chat/Channels/Channel.h
index e2d1bd9a15..32e9bec91a 100644
--- a/src/server/game/Chat/Channels/Channel.h
+++ b/src/server/game/Chat/Channels/Channel.h
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/game/Chat/Channels/ChannelMgr.cpp b/src/server/game/Chat/Channels/ChannelMgr.cpp
index 99f613b89e..8c651125a8 100644
--- a/src/server/game/Chat/Channels/ChannelMgr.cpp
+++ b/src/server/game/Chat/Channels/ChannelMgr.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
@@ -150,7 +150,7 @@ Channel* ChannelMgr::GetChannel(std::string const& name, Player* player, bool pk
{
WorldPacket data;
MakeNotOnPacket(&data, name);
- player->GetSession()->SendPacket(&data);
+ player->SendDirectMessage(&data);
}
return nullptr;
diff --git a/src/server/game/Chat/Channels/ChannelMgr.h b/src/server/game/Chat/Channels/ChannelMgr.h
index 5b42c4b8d4..daf595d2f6 100644
--- a/src/server/game/Chat/Channels/ChannelMgr.h
+++ b/src/server/game/Chat/Channels/ChannelMgr.h
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/game/Chat/Channels/enuminfo_Channel.cpp b/src/server/game/Chat/Channels/enuminfo_Channel.cpp
index b6ad0335dc..1d82c35739 100644
--- a/src/server/game/Chat/Channels/enuminfo_Channel.cpp
+++ b/src/server/game/Chat/Channels/enuminfo_Channel.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/game/Chat/Chat.cpp b/src/server/game/Chat/Chat.cpp
index 5b82ed2c53..a0dc7f090d 100644
--- a/src/server/game/Chat/Chat.cpp
+++ b/src/server/game/Chat/Chat.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/game/Chat/Chat.h b/src/server/game/Chat/Chat.h
index 90cbad152f..e2891a3b83 100644
--- a/src/server/game/Chat/Chat.h
+++ b/src/server/game/Chat/Chat.h
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/game/Chat/ChatCommands/ChatCommand.cpp b/src/server/game/Chat/ChatCommands/ChatCommand.cpp
index c15e4d9a8e..0e763f1b32 100644
--- a/src/server/game/Chat/ChatCommands/ChatCommand.cpp
+++ b/src/server/game/Chat/ChatCommands/ChatCommand.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/game/Chat/ChatCommands/ChatCommand.h b/src/server/game/Chat/ChatCommands/ChatCommand.h
index b7e81bc204..e0eb9ee7a2 100644
--- a/src/server/game/Chat/ChatCommands/ChatCommand.h
+++ b/src/server/game/Chat/ChatCommands/ChatCommand.h
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/game/Chat/ChatCommands/ChatCommandArgs.cpp b/src/server/game/Chat/ChatCommands/ChatCommandArgs.cpp
index da32757e69..4a67a24140 100644
--- a/src/server/game/Chat/ChatCommands/ChatCommandArgs.cpp
+++ b/src/server/game/Chat/ChatCommands/ChatCommandArgs.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/game/Chat/ChatCommands/ChatCommandArgs.h b/src/server/game/Chat/ChatCommands/ChatCommandArgs.h
index 35d38149c2..62d9bd6d89 100644
--- a/src/server/game/Chat/ChatCommands/ChatCommandArgs.h
+++ b/src/server/game/Chat/ChatCommands/ChatCommandArgs.h
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/game/Chat/ChatCommands/ChatCommandHelpers.cpp b/src/server/game/Chat/ChatCommands/ChatCommandHelpers.cpp
index 0c5f141479..fd87ab912c 100644
--- a/src/server/game/Chat/ChatCommands/ChatCommandHelpers.cpp
+++ b/src/server/game/Chat/ChatCommands/ChatCommandHelpers.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/game/Chat/ChatCommands/ChatCommandHelpers.h b/src/server/game/Chat/ChatCommands/ChatCommandHelpers.h
index a4bff85b9c..6ab9f01de9 100644
--- a/src/server/game/Chat/ChatCommands/ChatCommandHelpers.h
+++ b/src/server/game/Chat/ChatCommands/ChatCommandHelpers.h
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/game/Chat/ChatCommands/ChatCommandTags.cpp b/src/server/game/Chat/ChatCommands/ChatCommandTags.cpp
index 57e678d13b..4014bc6e02 100644
--- a/src/server/game/Chat/ChatCommands/ChatCommandTags.cpp
+++ b/src/server/game/Chat/ChatCommands/ChatCommandTags.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/game/Chat/ChatCommands/ChatCommandTags.h b/src/server/game/Chat/ChatCommands/ChatCommandTags.h
index 450be4cc24..ad1286a7ab 100644
--- a/src/server/game/Chat/ChatCommands/ChatCommandTags.h
+++ b/src/server/game/Chat/ChatCommands/ChatCommandTags.h
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/game/Chat/HyperlinkTags.cpp b/src/server/game/Chat/HyperlinkTags.cpp
index 2cb36b6983..bf33832298 100644
--- a/src/server/game/Chat/HyperlinkTags.cpp
+++ b/src/server/game/Chat/HyperlinkTags.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/game/Chat/Hyperlinks.cpp b/src/server/game/Chat/Hyperlinks.cpp
index af2ac277cf..8b20d961c8 100644
--- a/src/server/game/Chat/Hyperlinks.cpp
+++ b/src/server/game/Chat/Hyperlinks.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/game/Chat/Hyperlinks.h b/src/server/game/Chat/Hyperlinks.h
index d67342017a..e1f5bae5ea 100644
--- a/src/server/game/Chat/Hyperlinks.h
+++ b/src/server/game/Chat/Hyperlinks.h
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/game/Combat/HostileRefMgr.cpp b/src/server/game/Combat/HostileRefMgr.cpp
index 16fc944a52..e8a1ebebe1 100644
--- a/src/server/game/Combat/HostileRefMgr.cpp
+++ b/src/server/game/Combat/HostileRefMgr.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/game/Combat/HostileRefMgr.h b/src/server/game/Combat/HostileRefMgr.h
index 163c9a16cd..728f201bb8 100644
--- a/src/server/game/Combat/HostileRefMgr.h
+++ b/src/server/game/Combat/HostileRefMgr.h
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/game/Combat/ThreatMgr.cpp b/src/server/game/Combat/ThreatMgr.cpp
index 899eee48ec..a421b3ac9e 100644
--- a/src/server/game/Combat/ThreatMgr.cpp
+++ b/src/server/game/Combat/ThreatMgr.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/game/Combat/ThreatMgr.h b/src/server/game/Combat/ThreatMgr.h
index 8e02351e0e..3f31c9ac8e 100644
--- a/src/server/game/Combat/ThreatMgr.h
+++ b/src/server/game/Combat/ThreatMgr.h
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/game/Combat/UnitEvents.h b/src/server/game/Combat/UnitEvents.h
index 1f106898fb..da2c1a9651 100644
--- a/src/server/game/Combat/UnitEvents.h
+++ b/src/server/game/Combat/UnitEvents.h
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/game/Conditions/ConditionMgr.cpp b/src/server/game/Conditions/ConditionMgr.cpp
index bb6fa29c49..1d1bbec23f 100644
--- a/src/server/game/Conditions/ConditionMgr.cpp
+++ b/src/server/game/Conditions/ConditionMgr.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/game/Conditions/ConditionMgr.h b/src/server/game/Conditions/ConditionMgr.h
index eaa1d14e21..d8a29e4d1d 100644
--- a/src/server/game/Conditions/ConditionMgr.h
+++ b/src/server/game/Conditions/ConditionMgr.h
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/game/Conditions/DisableMgr.cpp b/src/server/game/Conditions/DisableMgr.cpp
index abb9681beb..c02c7c6819 100644
--- a/src/server/game/Conditions/DisableMgr.cpp
+++ b/src/server/game/Conditions/DisableMgr.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
@@ -388,30 +388,39 @@ bool DisableMgr::IsDisabledFor(DisableType type, uint32 entry, Unit const* unit,
}
case DISABLE_TYPE_MAP:
case DISABLE_TYPE_LFG_MAP:
- if (Player const* player = unit->ToPlayer())
+ {
+ MapEntry const* mapEntry = sMapStore.LookupEntry(entry);
+ if (!mapEntry)
+ return false;
+
+ if (!mapEntry->IsDungeon())
+ return mapEntry->map_type == MAP_COMMON;
+
+ uint8 disabledModes = itr->second.flags;
+
+ Difficulty targetDifficulty;
+ if (unit && unit->IsPlayer())
+ targetDifficulty = unit->ToPlayer()->GetDifficulty(mapEntry->IsRaid());
+ else
+ targetDifficulty = Difficulty(flags);
+
+ GetDownscaledMapDifficultyData(entry, targetDifficulty);
+
+ switch (targetDifficulty)
{
- MapEntry const* mapEntry = sMapStore.LookupEntry(entry);
- if (mapEntry->IsDungeon())
- {
- uint8 disabledModes = itr->second.flags;
- Difficulty targetDifficulty = player->GetDifficulty(mapEntry->IsRaid());
- GetDownscaledMapDifficultyData(entry, targetDifficulty);
- switch (targetDifficulty)
- {
- case DUNGEON_DIFFICULTY_NORMAL:
- return disabledModes & DUNGEON_STATUSFLAG_NORMAL;
- case DUNGEON_DIFFICULTY_HEROIC:
- return disabledModes & DUNGEON_STATUSFLAG_HEROIC;
- case RAID_DIFFICULTY_10MAN_HEROIC:
- return disabledModes & RAID_STATUSFLAG_10MAN_HEROIC;
- case RAID_DIFFICULTY_25MAN_HEROIC:
- return disabledModes & RAID_STATUSFLAG_25MAN_HEROIC;
- }
- }
- else if (mapEntry->map_type == MAP_COMMON)
- return true;
+ case DUNGEON_DIFFICULTY_NORMAL:
+ return disabledModes & DUNGEON_STATUSFLAG_NORMAL;
+ case DUNGEON_DIFFICULTY_HEROIC:
+ return disabledModes & DUNGEON_STATUSFLAG_HEROIC;
+ case RAID_DIFFICULTY_10MAN_HEROIC:
+ return disabledModes & RAID_STATUSFLAG_10MAN_HEROIC;
+ case RAID_DIFFICULTY_25MAN_HEROIC:
+ return disabledModes & RAID_STATUSFLAG_25MAN_HEROIC;
+ default:
+ return false;
}
return false;
+ }
case DISABLE_TYPE_VMAP:
return flags & itr->second.flags;
case DISABLE_TYPE_QUEST:
diff --git a/src/server/game/Conditions/DisableMgr.h b/src/server/game/Conditions/DisableMgr.h
index bfad29a4d6..8b0ae668b4 100644
--- a/src/server/game/Conditions/DisableMgr.h
+++ b/src/server/game/Conditions/DisableMgr.h
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/game/DataStores/DBCStores.cpp b/src/server/game/DataStores/DBCStores.cpp
index 2184bcd20e..7aa7413325 100644
--- a/src/server/game/DataStores/DBCStores.cpp
+++ b/src/server/game/DataStores/DBCStores.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/game/DataStores/DBCStores.h b/src/server/game/DataStores/DBCStores.h
index 0f71e25fdd..ec8cb68bbc 100644
--- a/src/server/game/DataStores/DBCStores.h
+++ b/src/server/game/DataStores/DBCStores.h
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/game/DataStores/M2Stores.cpp b/src/server/game/DataStores/M2Stores.cpp
index 598ff0fc63..edb7888a7e 100644
--- a/src/server/game/DataStores/M2Stores.cpp
+++ b/src/server/game/DataStores/M2Stores.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/game/DataStores/M2Stores.h b/src/server/game/DataStores/M2Stores.h
index 66de48de29..80488cab9c 100644
--- a/src/server/game/DataStores/M2Stores.h
+++ b/src/server/game/DataStores/M2Stores.h
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/game/DataStores/M2Structure.h b/src/server/game/DataStores/M2Structure.h
index 520cd50bf5..2ac6926d93 100644
--- a/src/server/game/DataStores/M2Structure.h
+++ b/src/server/game/DataStores/M2Structure.h
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/game/DungeonFinding/LFG.cpp b/src/server/game/DungeonFinding/LFG.cpp
index b22ece0962..63e2f61c15 100644
--- a/src/server/game/DungeonFinding/LFG.cpp
+++ b/src/server/game/DungeonFinding/LFG.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/game/DungeonFinding/LFG.h b/src/server/game/DungeonFinding/LFG.h
index 0d5124cdbf..260f29f089 100644
--- a/src/server/game/DungeonFinding/LFG.h
+++ b/src/server/game/DungeonFinding/LFG.h
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
@@ -100,6 +100,14 @@ namespace lfg
LFG_ANSWER_AGREE = 1
};
+ enum LfgRandomDungeonIds : uint32
+ {
+ RANDOM_DUNGEON_NORMAL_TBC = 259,
+ RANDOM_DUNGEON_HEROIC_TBC = 260,
+ RANDOM_DUNGEON_NORMAL_WOTLK = 261,
+ RANDOM_DUNGEON_HEROIC_WOTLK = 262
+ };
+
class Lfg5Guids;
typedef std::list<Lfg5Guids> Lfg5GuidsList;
diff --git a/src/server/game/DungeonFinding/LFGGroupData.cpp b/src/server/game/DungeonFinding/LFGGroupData.cpp
index eed5cef241..0f522d2782 100644
--- a/src/server/game/DungeonFinding/LFGGroupData.cpp
+++ b/src/server/game/DungeonFinding/LFGGroupData.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/game/DungeonFinding/LFGGroupData.h b/src/server/game/DungeonFinding/LFGGroupData.h
index 61220d02f8..281beaff47 100644
--- a/src/server/game/DungeonFinding/LFGGroupData.h
+++ b/src/server/game/DungeonFinding/LFGGroupData.h
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/game/DungeonFinding/LFGMgr.cpp b/src/server/game/DungeonFinding/LFGMgr.cpp
index 2449fada7a..cd3bd64650 100644
--- a/src/server/game/DungeonFinding/LFGMgr.cpp
+++ b/src/server/game/DungeonFinding/LFGMgr.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
@@ -408,11 +408,10 @@ namespace lfg
DungeonProgressionRequirements const* ar = sObjectMgr->GetAccessRequirement(dungeon->map, Difficulty(dungeon->difficulty));
uint32 lockData = 0;
+
if (dungeon->expansion > expansion || (onlySeasonalBosses && !dungeon->seasonal))
lockData = LFG_LOCKSTATUS_INSUFFICIENT_EXPANSION;
- else if (sDisableMgr->IsDisabledFor(DISABLE_TYPE_MAP, dungeon->map, player))
- lockData = LFG_LOCKSTATUS_RAID_LOCKED;
- else if (sDisableMgr->IsDisabledFor(DISABLE_TYPE_LFG_MAP, dungeon->map, player))
+ else if (IsDungeonDisabled(dungeon->map, dungeon->difficulty))
lockData = LFG_LOCKSTATUS_RAID_LOCKED;
else if (dungeon->difficulty > DUNGEON_DIFFICULTY_NORMAL && (!mapEntry || !mapEntry->IsRaid()) && sInstanceSaveMgr->PlayerIsPermBoundToInstance(player->GetGUID(), dungeon->map, Difficulty(dungeon->difficulty)))
lockData = LFG_LOCKSTATUS_RAID_LOCKED;
@@ -688,7 +687,7 @@ namespace lfg
// xinef: dont check compatibile dungeons for already running group (bind problems)
if (!isContinue)
{
- GetCompatibleDungeons(dungeons, players, joinData.lockmap);
+ GetCompatibleDungeons(dungeons, players, joinData.lockmap, rDungeonId);
if (dungeons.empty())
joinData.result = grp ? LFG_JOIN_PARTY_NOT_MEET_REQS : LFG_JOIN_NOT_MEET_REQS;
}
@@ -961,7 +960,7 @@ namespace lfg
RBCacheMap::iterator itr = RBCacheStore[player->GetTeamId()].find(dungeonId);
if (itr != RBCacheStore[player->GetTeamId()].end())
{
- player->GetSession()->SendPacket(&(itr->second));
+ player->SendDirectMessage(&(itr->second));
return;
}
// send empty packet if cache not found
@@ -973,7 +972,7 @@ namespace lfg
data << (uint32)0;
data << (uint32)0;
data << (uint32)0;
- player->GetSession()->SendPacket(&data);
+ player->SendDirectMessage(&data);
}
void LFGMgr::UpdateRaidBrowser(uint32 diff)
@@ -1220,7 +1219,7 @@ namespace lfg
for (RBSearchersMap::const_iterator sitr = RBSearchersStore[team].begin(); sitr != RBSearchersStore[team].end(); ++sitr)
if (sitr->second == dungeonId)
if (Player* p = ObjectAccessor::FindConnectedPlayer(sitr->first))
- p->GetSession()->SendPacket(&differencePacket);
+ p->SendDirectMessage(&differencePacket);
break; // one dungeon updated in one LFGMgr::UpdateRaidBrowser
}
@@ -1484,8 +1483,9 @@ namespace lfg
@param[in, out] dungeons Dungeons to check restrictions
@param[in] players Set of players to check their dungeon restrictions
@param[out] lockMap Map of players Lock status info of given dungeons (Empty if dungeons is not empty)
+ @param[in] randomDungeonId Random dungeon ID (0 for non-random selections), used to filter disabled maps
*/
- void LFGMgr::GetCompatibleDungeons(LfgDungeonSet& dungeons, LfgGuidSet const& players, LfgLockPartyMap& lockMap)
+ void LFGMgr::GetCompatibleDungeons(LfgDungeonSet& dungeons, LfgGuidSet const& players, LfgLockPartyMap& lockMap, uint32 randomDungeonId)
{
lockMap.clear();
for (LfgGuidSet::const_iterator it = players.begin(); it != players.end() && !dungeons.empty(); ++it)
@@ -1496,6 +1496,13 @@ namespace lfg
{
uint32 dungeonId = (it2->first & 0x00FFFFFF); // Compare dungeon ids
+ LFGDungeonData const* dungeon = GetLFGDungeon(dungeonId);
+
+ uint8 difficultyFlag = (randomDungeonId == RANDOM_DUNGEON_NORMAL_TBC || randomDungeonId == RANDOM_DUNGEON_NORMAL_WOTLK) ? 0 : 1;
+
+ if (dungeon && !IsDungeonDisabled(dungeon->map, (Difficulty)difficultyFlag) && it2->second == LFG_LOCKSTATUS_RAID_LOCKED && randomDungeonId && sWorld->getBoolConfig(CONFIG_LFG_ALLOW_COMPLETED))
+ continue;
+
LfgDungeonSet::iterator itDungeon = dungeons.find(dungeonId);
if (itDungeon != dungeons.end())
{
@@ -1508,7 +1515,7 @@ namespace lfg
lockMap.clear();
}
- uint8 LFGMgr::CheckGroupRoles(LfgRolesMap& groles, bool removeLeaderFlag /*= true*/)
+ uint8 LFGMgr::CheckGroupRoles(LfgRolesMap& groles)
{
if (groles.empty())
return 0;
@@ -1517,21 +1524,18 @@ namespace lfg
uint8 tank = 0;
uint8 healer = 0;
- if (removeLeaderFlag)
- for (LfgRolesMap::iterator it = groles.begin(); it != groles.end(); ++it)
- it->second &= ~PLAYER_ROLE_LEADER;
-
for (LfgRolesMap::iterator it = groles.begin(); it != groles.end(); ++it)
{
- if (it->second == PLAYER_ROLE_NONE)
+ uint8 const role = it->second & ~PLAYER_ROLE_LEADER;
+ if (role == PLAYER_ROLE_NONE)
return 0;
- if (it->second & PLAYER_ROLE_DAMAGE)
+ if (role & PLAYER_ROLE_DAMAGE)
{
- if (it->second != PLAYER_ROLE_DAMAGE)
+ if (role != PLAYER_ROLE_DAMAGE)
{
it->second -= PLAYER_ROLE_DAMAGE;
- if (uint8 x = CheckGroupRoles(groles, false))
+ if (uint8 x = CheckGroupRoles(groles))
return x;
it->second += PLAYER_ROLE_DAMAGE;
}
@@ -1541,12 +1545,12 @@ namespace lfg
damage++;
}
- if (it->second & PLAYER_ROLE_HEALER)
+ if (role & PLAYER_ROLE_HEALER)
{
- if (it->second != PLAYER_ROLE_HEALER)
+ if (role != PLAYER_ROLE_HEALER)
{
it->second -= PLAYER_ROLE_HEALER;
- if (uint8 x = CheckGroupRoles(groles, false))
+ if (uint8 x = CheckGroupRoles(groles))
return x;
it->second += PLAYER_ROLE_HEALER;
}
@@ -1556,12 +1560,12 @@ namespace lfg
healer++;
}
- if (it->second & PLAYER_ROLE_TANK)
+ if (role & PLAYER_ROLE_TANK)
{
- if (it->second != PLAYER_ROLE_TANK)
+ if (role != PLAYER_ROLE_TANK)
{
it->second -= PLAYER_ROLE_TANK;
- if (uint8 x = CheckGroupRoles(groles, false))
+ if (uint8 x = CheckGroupRoles(groles))
return x;
it->second += PLAYER_ROLE_TANK;
}
@@ -1765,10 +1769,8 @@ namespace lfg
else
{
// RDF removes all binds to that map
- if (randomDungeon && !sInstanceSaveMgr->PlayerIsPermBoundToInstance(player->GetGUID(), dungeon->map, player->GetDungeonDifficulty()))
- {
+ if (randomDungeon)
sInstanceSaveMgr->PlayerUnbindInstance(player->GetGUID(), dungeon->map, player->GetDungeonDifficulty(), true);
- }
}
playersTeleported.push_back(player);
@@ -2822,4 +2824,10 @@ namespace lfg
return randomDungeons;
}
+ bool LFGMgr::IsDungeonDisabled(uint32 mapId, Difficulty difficulty) const
+ {
+ return sDisableMgr->IsDisabledFor(DISABLE_TYPE_MAP, mapId, nullptr, difficulty) ||
+ sDisableMgr->IsDisabledFor(DISABLE_TYPE_LFG_MAP, mapId, nullptr);
+ }
+
} // namespace lfg
diff --git a/src/server/game/DungeonFinding/LFGMgr.h b/src/server/game/DungeonFinding/LFGMgr.h
index 0eb27e71c0..c96ae4f2a4 100644
--- a/src/server/game/DungeonFinding/LFGMgr.h
+++ b/src/server/game/DungeonFinding/LFGMgr.h
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
@@ -518,6 +518,8 @@ namespace lfg
LfgUpdateData GetLfgStatus(ObjectGuid guid);
/// Checks if Seasonal dungeon is active
bool IsSeasonActive(uint32 dungeonId);
+ /// Checks if given dungeon map is disabled
+ bool IsDungeonDisabled(uint32 mapId, Difficulty difficulty) const;
/// Gets the random dungeon reward corresponding to given dungeon and player level
LfgReward const* GetRandomDungeonReward(uint32 dungeon, uint8 level);
/// Returns all random and seasonal dungeons for given level and expansion
@@ -568,7 +570,7 @@ namespace lfg
/// Checks if all players are queued
bool AllQueued(Lfg5Guids const& check);
/// Checks if given roles match, modifies given roles map with new roles
- static uint8 CheckGroupRoles(LfgRolesMap& groles, bool removeLeaderFlag = true);
+ static uint8 CheckGroupRoles(LfgRolesMap& groles);
/// Checks if given players are ignoring each other
static bool HasIgnore(ObjectGuid guid1, ObjectGuid guid2);
/// Sends queue status to player
@@ -589,7 +591,7 @@ namespace lfg
void DecreaseKicksLeft(ObjectGuid guid);
void SetState(ObjectGuid guid, LfgState state);
void SetCanOverrideRBState(ObjectGuid guid, bool val);
- void GetCompatibleDungeons(LfgDungeonSet& dungeons, LfgGuidSet const& players, LfgLockPartyMap& lockMap);
+ void GetCompatibleDungeons(LfgDungeonSet& dungeons, LfgGuidSet const& players, LfgLockPartyMap& lockMap, uint32 randomDungeonId = 0);
void _SaveToDB(ObjectGuid guid);
LFGDungeonData const* GetLFGDungeon(uint32 id);
diff --git a/src/server/game/DungeonFinding/LFGPlayerData.cpp b/src/server/game/DungeonFinding/LFGPlayerData.cpp
index ddfeec2fcf..8328c22c8a 100644
--- a/src/server/game/DungeonFinding/LFGPlayerData.cpp
+++ b/src/server/game/DungeonFinding/LFGPlayerData.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/game/DungeonFinding/LFGPlayerData.h b/src/server/game/DungeonFinding/LFGPlayerData.h
index ad6e36e7a1..94d2b08012 100644
--- a/src/server/game/DungeonFinding/LFGPlayerData.h
+++ b/src/server/game/DungeonFinding/LFGPlayerData.h
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/game/DungeonFinding/LFGQueue.cpp b/src/server/game/DungeonFinding/LFGQueue.cpp
index 4c0b828980..aae5df67aa 100644
--- a/src/server/game/DungeonFinding/LFGQueue.cpp
+++ b/src/server/game/DungeonFinding/LFGQueue.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/game/DungeonFinding/LFGQueue.h b/src/server/game/DungeonFinding/LFGQueue.h
index 2cc49f645f..1ce7537306 100644
--- a/src/server/game/DungeonFinding/LFGQueue.h
+++ b/src/server/game/DungeonFinding/LFGQueue.h
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/game/DungeonFinding/LFGScripts.cpp b/src/server/game/DungeonFinding/LFGScripts.cpp
index c6a2d5c30d..b4faf18fa6 100644
--- a/src/server/game/DungeonFinding/LFGScripts.cpp
+++ b/src/server/game/DungeonFinding/LFGScripts.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/game/DungeonFinding/LFGScripts.h b/src/server/game/DungeonFinding/LFGScripts.h
index 918c7eac2a..0dbacd7aab 100644
--- a/src/server/game/DungeonFinding/LFGScripts.h
+++ b/src/server/game/DungeonFinding/LFGScripts.h
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/game/Entities/Corpse/Corpse.cpp b/src/server/game/Entities/Corpse/Corpse.cpp
index 249ac7adb9..b5344bda30 100644
--- a/src/server/game/Entities/Corpse/Corpse.cpp
+++ b/src/server/game/Entities/Corpse/Corpse.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
@@ -121,7 +121,7 @@ void Corpse::DeleteFromDB(CharacterDatabaseTransaction trans)
DeleteFromDB(GetOwnerGUID(), trans);
}
-void Corpse::DeleteFromDB(ObjectGuid const ownerGuid, CharacterDatabaseTransaction trans)
+void Corpse::DeleteFromDB(ObjectGuid const& ownerGuid, CharacterDatabaseTransaction trans)
{
CharacterDatabasePreparedStatement* stmt = CharacterDatabase.GetPreparedStatement(CHAR_DEL_CORPSE);
stmt->SetData(0, ownerGuid.GetCounter());
diff --git a/src/server/game/Entities/Corpse/Corpse.h b/src/server/game/Entities/Corpse/Corpse.h
index e74f2c9439..d0bf50c590 100644
--- a/src/server/game/Entities/Corpse/Corpse.h
+++ b/src/server/game/Entities/Corpse/Corpse.h
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
@@ -63,7 +63,7 @@ public:
bool LoadCorpseFromDB(ObjectGuid::LowType guid, Field* fields);
void DeleteFromDB(CharacterDatabaseTransaction trans);
- static void DeleteFromDB(ObjectGuid const ownerGuid, CharacterDatabaseTransaction trans);
+ static void DeleteFromDB(ObjectGuid const& ownerGuid, CharacterDatabaseTransaction trans);
[[nodiscard]] ObjectGuid GetOwnerGUID() const { return GetGuidValue(CORPSE_FIELD_OWNER); }
diff --git a/src/server/game/Entities/Creature/Creature.cpp b/src/server/game/Entities/Creature/Creature.cpp
index 19fe38a3c9..c0b78bd2ae 100644
--- a/src/server/game/Entities/Creature/Creature.cpp
+++ b/src/server/game/Entities/Creature/Creature.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
@@ -38,6 +38,7 @@
#include "PoolMgr.h"
#include "ScriptMgr.h"
#include "ScriptedGossip.h"
+#include "SpellAuraDefines.h"
#include "SpellAuraEffects.h"
#include "SpellMgr.h"
#include "TemporarySummon.h"
@@ -251,7 +252,7 @@ CreatureBaseStats const* CreatureBaseStats::GetBaseStats(uint8 level, uint8 unit
bool ForcedDespawnDelayEvent::Execute(uint64 /*e_time*/, uint32 /*p_time*/)
{
- m_owner.DespawnOrUnsummon(0s, m_respawnTimer); // since we are here, we are not TempSummon as object type cannot change during runtime
+ m_owner.DespawnOrUnsummon(0ms, m_respawnTimer); // since we are here, we are not TempSummon as object type cannot change during runtime
return true;
}
@@ -525,7 +526,8 @@ bool Creature::InitEntry(uint32 Entry, const CreatureData* data)
SetFloatValue(UNIT_FIELD_HOVERHEIGHT, cinfo->HoverHeight);
- SetCanDualWield(cinfo->HasFlagsExtra(CREATURE_FLAG_EXTRA_USE_OFFHAND_ATTACK));
+ if (cinfo->HasFlagsExtra(CREATURE_FLAG_EXTRA_USE_OFFHAND_ATTACK))
+ SetDualWieldMode(DualWieldMode::ENABLED);
// checked at loading
m_defaultMovementType = MovementGeneratorType(cinfo->MovementType);
@@ -571,7 +573,8 @@ bool Creature::UpdateEntry(uint32 Entry, const CreatureData* data, bool changele
ReplaceAllDynamicFlags(dynamicflags);
- SetCanDualWield(cInfo->HasFlagsExtra(CREATURE_FLAG_EXTRA_USE_OFFHAND_ATTACK));
+ if (cInfo->HasFlagsExtra(CREATURE_FLAG_EXTRA_USE_OFFHAND_ATTACK))
+ SetDualWieldMode(DualWieldMode::ENABLED);
SetAttackTime(BASE_ATTACK, cInfo->BaseAttackTime);
SetAttackTime(OFF_ATTACK, cInfo->BaseAttackTime);
@@ -599,13 +602,13 @@ bool Creature::UpdateEntry(uint32 Entry, const CreatureData* data, bool changele
SetMeleeDamageSchool(SpellSchools(cInfo->dmgschool));
CreatureBaseStats const* stats = sObjectMgr->GetCreatureBaseStats(GetLevel(), cInfo->unit_class);
float armor = stats->GenerateArmor(cInfo);
- SetModifierValue(UNIT_MOD_ARMOR, BASE_VALUE, armor);
- SetModifierValue(UNIT_MOD_RESISTANCE_HOLY, BASE_VALUE, float(cInfo->resistance[SPELL_SCHOOL_HOLY]));
- SetModifierValue(UNIT_MOD_RESISTANCE_FIRE, BASE_VALUE, float(cInfo->resistance[SPELL_SCHOOL_FIRE]));
- SetModifierValue(UNIT_MOD_RESISTANCE_NATURE, BASE_VALUE, float(cInfo->resistance[SPELL_SCHOOL_NATURE]));
- SetModifierValue(UNIT_MOD_RESISTANCE_FROST, BASE_VALUE, float(cInfo->resistance[SPELL_SCHOOL_FROST]));
- SetModifierValue(UNIT_MOD_RESISTANCE_SHADOW, BASE_VALUE, float(cInfo->resistance[SPELL_SCHOOL_SHADOW]));
- SetModifierValue(UNIT_MOD_RESISTANCE_ARCANE, BASE_VALUE, float(cInfo->resistance[SPELL_SCHOOL_ARCANE]));
+ SetStatFlatModifier(UNIT_MOD_ARMOR, BASE_VALUE, armor);
+ SetStatFlatModifier(UNIT_MOD_RESISTANCE_HOLY, BASE_VALUE, float(cInfo->resistance[SPELL_SCHOOL_HOLY]));
+ SetStatFlatModifier(UNIT_MOD_RESISTANCE_FIRE, BASE_VALUE, float(cInfo->resistance[SPELL_SCHOOL_FIRE]));
+ SetStatFlatModifier(UNIT_MOD_RESISTANCE_NATURE, BASE_VALUE, float(cInfo->resistance[SPELL_SCHOOL_NATURE]));
+ SetStatFlatModifier(UNIT_MOD_RESISTANCE_FROST, BASE_VALUE, float(cInfo->resistance[SPELL_SCHOOL_FROST]));
+ SetStatFlatModifier(UNIT_MOD_RESISTANCE_SHADOW, BASE_VALUE, float(cInfo->resistance[SPELL_SCHOOL_SHADOW]));
+ SetStatFlatModifier(UNIT_MOD_RESISTANCE_ARCANE, BASE_VALUE, float(cInfo->resistance[SPELL_SCHOOL_ARCANE]));
SetCanModifyStats(true);
UpdateAllStats();
@@ -769,7 +772,7 @@ void Creature::Update(uint32 diff)
}
Unit* owner = GetCharmerOrOwner();
- if (IsCharmed() && !IsWithinDistInMap(owner, GetMap()->GetVisibilityRange(), true, false))
+ if (IsCharmed() && !IsWithinDistInMap(owner, GetMap()->GetVisibilityRange(), true, false, false))
{
RemoveCharmAuras();
}
@@ -1015,10 +1018,7 @@ void Creature::Regenerate(Powers power)
}
// Apply modifiers (if any).
- AuraEffectList const& ModPowerRegenPCTAuras = GetAuraEffectsByType(SPELL_AURA_MOD_POWER_REGEN_PERCENT);
- for (AuraEffectList::const_iterator i = ModPowerRegenPCTAuras.begin(); i != ModPowerRegenPCTAuras.end(); ++i)
- if (Powers((*i)->GetMiscValue()) == power)
- AddPct(addvalue, (*i)->GetAmount());
+ addvalue *= GetTotalAuraMultiplierByMiscValue(SPELL_AURA_MOD_POWER_REGEN_PERCENT, power);
addvalue += GetTotalAuraModifierByMiscValue(SPELL_AURA_MOD_POWER_REGEN, power) * (power == POWER_FOCUS ? PET_FOCUS_REGEN_INTERVAL.count() : CREATURE_REGEN_INTERVAL) / (5 * IN_MILLISECONDS);
@@ -1054,9 +1054,7 @@ void Creature::RegenerateHealth()
}
// Apply modifiers (if any).
- AuraEffectList const& ModPowerRegenPCTAuras = GetAuraEffectsByType(SPELL_AURA_MOD_HEALTH_REGEN_PERCENT);
- for (AuraEffectList::const_iterator i = ModPowerRegenPCTAuras.begin(); i != ModPowerRegenPCTAuras.end(); ++i)
- AddPct(addvalue, (*i)->GetAmount());
+ addvalue *= GetTotalAuraMultiplier(SPELL_AURA_MOD_HEALTH_REGEN_PERCENT);
addvalue += GetTotalAuraModifier(SPELL_AURA_MOD_REGEN) * CREATURE_REGEN_INTERVAL / (5 * IN_MILLISECONDS);
@@ -1556,8 +1554,8 @@ void Creature::SelectLevel(bool changelevel)
/// @todo: set UNIT_FIELD_POWER*, for some creature class case (energy, etc)
- SetModifierValue(UNIT_MOD_HEALTH, BASE_VALUE, (float)health);
- SetModifierValue(UNIT_MOD_MANA, BASE_VALUE, (float)mana);
+ SetStatFlatModifier(UNIT_MOD_HEALTH, BASE_VALUE, (float)health);
+ SetStatFlatModifier(UNIT_MOD_MANA, BASE_VALUE, (float)mana);
// damage
@@ -1575,8 +1573,8 @@ void Creature::SelectLevel(bool changelevel)
SetBaseWeaponDamage(RANGED_ATTACK, MINDAMAGE, weaponBaseMinDamage);
SetBaseWeaponDamage(RANGED_ATTACK, MAXDAMAGE, weaponBaseMaxDamage);
- SetModifierValue(UNIT_MOD_ATTACK_POWER, BASE_VALUE, stats->AttackPower);
- SetModifierValue(UNIT_MOD_ATTACK_POWER_RANGED, BASE_VALUE, stats->RangedAttackPower);
+ SetStatFlatModifier(UNIT_MOD_ATTACK_POWER, BASE_VALUE, stats->AttackPower);
+ SetStatFlatModifier(UNIT_MOD_ATTACK_POWER_RANGED, BASE_VALUE, stats->RangedAttackPower);
sScriptMgr->OnCreatureSelectLevel(cInfo, this);
}
@@ -1942,7 +1940,7 @@ bool Creature::CanStartAttack(Unit const* who) const
if (!_IsTargetAcceptable(who))
return false;
- if (IsNeutralToAll() || !IsWithinDistInMap(who, GetAggroRange(who) + m_CombatDistance, true, false)) // pussywizard: +m_combatDistance for turrets and similar
+ if (IsNeutralToAll() || !IsWithinDistInMap(who, GetAggroRange(who) + m_CombatDistance, true, false, false)) // pussywizard: +m_combatDistance for turrets and similar
return false;
if (!CanCreatureAttack(who))
@@ -1996,8 +1994,8 @@ void Creature::setDeathState(DeathState state, bool despawn)
m_formation->FormationReset(true, false);
bool needsFalling = !despawn && (IsFlying() || IsHovering()) && !IsUnderWater();
- SetHover(false, false, false);
- SetDisableGravity(false, false, false);
+ SetHover(false);
+ SetDisableGravity(false);
if (needsFalling)
GetMotionMaster()->MoveFall(0, true);
@@ -2157,12 +2155,12 @@ void Creature::Respawn(bool force)
}
}
-void Creature::ForcedDespawn(uint32 timeMSToDespawn, Seconds forceRespawnTimer)
+void Creature::ForcedDespawn(Milliseconds timeMSToDespawn, Seconds forceRespawnTimer)
{
- if (timeMSToDespawn)
+ if (timeMSToDespawn > 0ms)
{
ForcedDespawnDelayEvent* pEvent = new ForcedDespawnDelayEvent(*this, forceRespawnTimer);
- m_Events.AddEvent(pEvent, m_Events.CalculateTime(timeMSToDespawn));
+ m_Events.AddEventAtOffset(pEvent, timeMSToDespawn);
return;
}
@@ -2172,17 +2170,17 @@ void Creature::ForcedDespawn(uint32 timeMSToDespawn, Seconds forceRespawnTimer)
// Xinef: Set new respawn time, ignore corpse decay time...
RemoveCorpse(true);
- if (forceRespawnTimer > Seconds::zero())
+ if (forceRespawnTimer > 0s)
if (GetMap())
GetMap()->ScheduleCreatureRespawn(GetGUID(), forceRespawnTimer);
}
-void Creature::DespawnOrUnsummon(Milliseconds msTimeToDespawn /*= 0*/, Seconds forcedRespawnTimer)
+void Creature::DespawnOrUnsummon(Milliseconds msTimeToDespawn /*= 0ms*/, Seconds forcedRespawnTimer /*= 0s*/)
{
if (TempSummon* summon = this->ToTempSummon())
- summon->UnSummon(msTimeToDespawn.count());
+ summon->UnSummon(msTimeToDespawn);
else
- ForcedDespawn(msTimeToDespawn.count(), forcedRespawnTimer);
+ ForcedDespawn(msTimeToDespawn, forcedRespawnTimer);
}
void Creature::DespawnOnEvade(Seconds respawnDelay)
@@ -2202,7 +2200,7 @@ void Creature::DespawnOnEvade(Seconds respawnDelay)
return;
}
- DespawnOrUnsummon(Milliseconds(0), respawnDelay);
+ DespawnOrUnsummon(0ms, respawnDelay);
}
void Creature::InitializeReactState()
@@ -2462,7 +2460,7 @@ void Creature::CallAssistance(Unit* target /*= nullptr*/)
e->AddAssistant((*assistList.begin())->GetGUID());
assistList.pop_front();
}
- m_Events.AddEvent(e, m_Events.CalculateTime(sWorld->getIntConfig(CONFIG_CREATURE_FAMILY_ASSISTANCE_DELAY)));
+ m_Events.AddEventAtOffset(e, Milliseconds(sWorld->getIntConfig(CONFIG_CREATURE_FAMILY_ASSISTANCE_DELAY)));
}
}
}
@@ -3195,10 +3193,23 @@ bool Creature::IsImmuneToKnockback() const
bool Creature::HasWeapon(WeaponAttackType type) const
{
+ if (type == OFF_ATTACK)
+ {
+ switch (_dualWieldMode)
+ {
+ case DualWieldMode::ENABLED:
+ return true;
+ case DualWieldMode::DISABLED:
+ return false;
+ case DualWieldMode::AUTO:
+ default:
+ break;
+ }
+ }
+
const uint8 slot = uint8(type);
ItemEntry const* item = sItemStore.LookupEntry(GetUInt32Value(UNIT_VIRTUAL_ITEM_SLOT_ID + slot));
-
- return ((item && item->ClassID == ITEM_CLASS_WEAPON) || (type == OFF_ATTACK && CanDualWield()));
+ return (item && item->ClassID == ITEM_CLASS_WEAPON);
}
/**
@@ -3215,46 +3226,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 << uint32(0); //! movement counter
- m_movedByPlayer->ToPlayer()->SendDirectMessage(&data);
-
- 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))
@@ -3303,107 +3274,6 @@ void Creature::RefreshSwimmingFlag(bool recheck)
SetUnitFlag(UNIT_FLAG_SWIMMING);
}
-bool Creature::SetCanFly(bool enable, bool /*packetOnly*/ /* = false */)
-{
- if (!Unit::SetCanFly(enable))
- return false;
-
- if (m_movedByPlayer)
- {
- sScriptMgr->AnticheatSetCanFlybyServer(m_movedByPlayer->ToPlayer(), enable);
-
- if (!enable)
- m_movedByPlayer->ToPlayer()->SetFallInformation(GameTime::GetGameTime().count(), m_movedByPlayer->ToPlayer()->GetPositionZ());
-
- WorldPacket data(enable ? SMSG_MOVE_SET_CAN_FLY : SMSG_MOVE_UNSET_CAN_FLY, 12);
- data << GetPackGUID();
- data << uint32(0); //! movement counter
- m_movedByPlayer->ToPlayer()->SendDirectMessage(&data);
-
- data.Initialize(MSG_MOVE_UPDATE_CAN_FLY, 64);
- data << GetPackGUID();
- BuildMovementPacket(&data);
- m_movedByPlayer->ToPlayer()->SendMessageToSet(&data, false);
- return true;
- }
-
- WorldPacket data(enable ? SMSG_SPLINE_MOVE_SET_FLYING : SMSG_SPLINE_MOVE_UNSET_FLYING, 9);
- data << GetPackGUID();
- SendMessageToSet(&data, false);
- return true;
-}
-
-bool Creature::SetWaterWalking(bool enable, bool packetOnly /* = false */)
-{
- if (!packetOnly && !Unit::SetWaterWalking(enable))
- return false;
-
- if (m_movedByPlayer)
- {
- WorldPacket data(enable ? SMSG_MOVE_WATER_WALK : SMSG_MOVE_LAND_WALK, 12);
- data << GetPackGUID();
- data << uint32(0); //! movement counter
- m_movedByPlayer->ToPlayer()->SendDirectMessage(&data);
-
- data.Initialize(MSG_MOVE_WATER_WALK, 64);
- data << GetPackGUID();
- BuildMovementPacket(&data);
- m_movedByPlayer->ToPlayer()->SendMessageToSet(&data, false);
- return true;
- }
-
- WorldPacket data(enable ? SMSG_SPLINE_MOVE_WATER_WALK : SMSG_SPLINE_MOVE_LAND_WALK, 9);
- data << GetPackGUID();
- SendMessageToSet(&data, true);
- return true;
-}
-
-bool Creature::SetFeatherFall(bool enable, bool packetOnly /* = false */)
-{
- if (!packetOnly && !Unit::SetFeatherFall(enable))
- return false;
-
- if (m_movedByPlayer)
- {
- WorldPacket data(enable ? SMSG_MOVE_FEATHER_FALL : SMSG_MOVE_NORMAL_FALL, 12);
- data << GetPackGUID();
- data << uint32(0); //! movement counter
- m_movedByPlayer->ToPlayer()->SendDirectMessage(&data);
-
- data.Initialize(MSG_MOVE_FEATHER_FALL, 64);
- data << GetPackGUID();
- BuildMovementPacket(&data);
- m_movedByPlayer->ToPlayer()->SendMessageToSet(&data, false);
- return true;
- }
-
- WorldPacket data(enable ? SMSG_SPLINE_MOVE_FEATHER_FALL : SMSG_SPLINE_MOVE_NORMAL_FALL, 9);
- data << GetPackGUID();
- SendMessageToSet(&data, true);
- return true;
-}
-
-bool Creature::SetHover(bool enable, bool packetOnly /*= false*/, bool updateAnimationTier /*= true*/)
-{
- if (!packetOnly && !Unit::SetHover(enable))
- return false;
-
- 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(enable ? SMSG_SPLINE_MOVE_SET_HOVER : SMSG_SPLINE_MOVE_UNSET_HOVER, 9);
- data << GetPackGUID();
- SendMessageToSet(&data, false);
- return true;
-}
-
float Creature::GetAggroRange(Unit const* target) const
{
// Determines the aggro range for creatures
@@ -3470,19 +3340,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);
}
@@ -3798,6 +3672,33 @@ bool Creature::CanGeneratePickPocketLoot() const
return (lootPickPocketRestoreTime == 0 || lootPickPocketRestoreTime < GameTime::GetGameTime().count());
}
+void Creature::SetTextRepeatId(uint8 textGroup, uint8 id)
+{
+ CreatureTextRepeatIds& repeats = m_textRepeat[textGroup];
+ if (std::find(repeats.begin(), repeats.end(), id) == repeats.end())
+ repeats.push_back(id);
+ else
+ LOG_ERROR("sql.sql", "CreatureTextMgr: TextGroup {} for Creature({}) {}, id {} already added", uint32(textGroup), GetName(), GetGUID().ToString(), uint32(id));
+}
+
+CreatureTextRepeatIds const& Creature::GetTextRepeatGroup(uint8 textGroup)
+{
+ static CreatureTextRepeatIds const emptyIds;
+
+ CreatureTextRepeatGroup::const_iterator groupItr = m_textRepeat.find(textGroup);
+ if (groupItr != m_textRepeat.end())
+ return groupItr->second;
+
+ return emptyIds;
+}
+
+void Creature::ClearTextRepeatGroup(uint8 textGroup)
+{
+ CreatureTextRepeatGroup::iterator groupItr = m_textRepeat.find(textGroup);
+ if (groupItr != m_textRepeat.end())
+ groupItr->second.clear();
+}
+
void Creature::SetRespawnTime(uint32 respawn)
{
m_respawnTime = respawn ? GameTime::GetGameTime().count() + respawn : 0;
@@ -3820,7 +3721,7 @@ void Creature::ModifyThreatPercentTemp(Unit* victim, int32 percent, Milliseconds
}
TemporaryThreatModifierEvent* pEvent = new TemporaryThreatModifierEvent(*this, victim->GetGUID(), currentThreat);
- m_Events.AddEvent(pEvent, m_Events.CalculateTime(duration.count()));
+ m_Events.AddEventAtOffset(pEvent, duration);
}
}
diff --git a/src/server/game/Entities/Creature/Creature.h b/src/server/game/Entities/Creature/Creature.h
index a2c2947020..11db152ac4 100644
--- a/src/server/game/Entities/Creature/Creature.h
+++ b/src/server/game/Entities/Creature/Creature.h
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
@@ -39,6 +39,10 @@ class CreatureGroup;
#define MAX_VENDOR_ITEMS 150 // Limitation in 3.x.x item count in SMSG_LIST_INVENTORY
+//used for handling non-repeatable random texts
+typedef std::vector<uint8> CreatureTextRepeatIds;
+typedef std::unordered_map<uint8, CreatureTextRepeatIds> CreatureTextRepeatGroup;
+
class Creature : public Unit, public GridObject<Creature>, public MovableMapObject, public UpdatableMapObject
{
public:
@@ -79,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(); }
@@ -141,12 +145,7 @@ 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 SetCanFly(bool enable, bool packetOnly = false) override;
- bool SetWaterWalking(bool enable, bool packetOnly = false) override;
- bool SetFeatherFall(bool enable, bool packetOnly = false) override;
- bool SetHover(bool enable, bool packetOnly = false, bool updateAnimationTier = true) override;
bool HasSpellFocus(Spell const* focusSpell = nullptr) const;
struct
@@ -283,8 +282,7 @@ public:
void RemoveCorpse(bool setSpawnTime = true, bool skipVisibility = false);
- void DespawnOrUnsummon(Milliseconds msTimeToDespawn, Seconds forcedRespawnTimer);
- void DespawnOrUnsummon(uint32 msTimeToDespawn = 0) { DespawnOrUnsummon(Milliseconds(msTimeToDespawn), 0s); };
+ void DespawnOrUnsummon(Milliseconds msTimeToDespawn = 0ms, Seconds forcedRespawnTimer = 0s);
void DespawnOnEvade(Seconds respawnDelay = 20s);
[[nodiscard]] time_t const& GetRespawnTime() const { return m_respawnTime; }
@@ -392,6 +390,10 @@ public:
void UpdateLeashExtensionTime();
uint8 GetLeashTimer() const;
+ CreatureTextRepeatIds const& GetTextRepeatGroup(uint8 textGroup);
+ void SetTextRepeatId(uint8 textGroup, uint8 id);
+ void ClearTextRepeatGroup(uint8 textGroup);
+
bool IsFreeToMove();
static constexpr uint32 MOVE_CIRCLE_CHECK_INTERVAL = 3000;
static constexpr uint32 MOVE_BACKWARDS_CHECK_INTERVAL = 2000;
@@ -502,7 +504,7 @@ protected:
bool IsAlwaysDetectableFor(WorldObject const* seer) const override;
private:
- void ForcedDespawn(uint32 timeMSToDespawn = 0, Seconds forcedRespawnTimer = 0s);
+ void ForcedDespawn(Milliseconds timeMSToDespawn = 0ms, Seconds forcedRespawnTimer = 0s);
[[nodiscard]] bool CanPeriodicallyCallForAssistance() const;
@@ -523,6 +525,8 @@ private:
Spell const* _focusSpell; ///> Locks the target during spell cast for proper facing
+ CreatureTextRepeatGroup m_textRepeat;
+
bool _isMissingSwimmingFlagOutOfCombat;
uint32 m_assistanceTimer;
diff --git a/src/server/game/Entities/Creature/CreatureData.h b/src/server/game/Entities/Creature/CreatureData.h
index 4ca6cda4ab..2c8b4eb22a 100644
--- a/src/server/game/Entities/Creature/CreatureData.h
+++ b/src/server/game/Entities/Creature/CreatureData.h
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
@@ -99,18 +99,18 @@ enum class CreatureFlightMovementType : uint8
enum class CreatureChaseMovementType : uint8
{
- Run,
- CanWalk,
- AlwaysWalk,
+ Run = 0,
+ CanWalk = 1,
+ AlwaysWalk = 2,
Max
};
enum class CreatureRandomMovementType : uint8
{
- Walk,
- CanRun,
- AlwaysRun,
+ Walk = 0,
+ CanRun = 1,
+ AlwaysRun = 2,
Max
};
diff --git a/src/server/game/Entities/Creature/CreatureGroups.cpp b/src/server/game/Entities/Creature/CreatureGroups.cpp
index c603b51da6..8afb585e09 100644
--- a/src/server/game/Entities/Creature/CreatureGroups.cpp
+++ b/src/server/game/Entities/Creature/CreatureGroups.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/game/Entities/Creature/CreatureGroups.h b/src/server/game/Entities/Creature/CreatureGroups.h
index 54b01c08ce..3e52ad00ed 100644
--- a/src/server/game/Entities/Creature/CreatureGroups.h
+++ b/src/server/game/Entities/Creature/CreatureGroups.h
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/game/Entities/Creature/GossipDef.cpp b/src/server/game/Entities/Creature/GossipDef.cpp
index bd0b472d41..8fa590e109 100644
--- a/src/server/game/Entities/Creature/GossipDef.cpp
+++ b/src/server/game/Entities/Creature/GossipDef.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/game/Entities/Creature/GossipDef.h b/src/server/game/Entities/Creature/GossipDef.h
index 7c306c0291..b6a06092c5 100644
--- a/src/server/game/Entities/Creature/GossipDef.h
+++ b/src/server/game/Entities/Creature/GossipDef.h
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/game/Entities/Creature/TemporarySummon.cpp b/src/server/game/Entities/Creature/TemporarySummon.cpp
index 0b0c17a1ed..6d90495585 100644
--- a/src/server/game/Entities/Creature/TemporarySummon.cpp
+++ b/src/server/game/Entities/Creature/TemporarySummon.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
@@ -284,13 +284,12 @@ void TempSummon::SetTempSummonType(TempSummonType type)
m_type = type;
}
-void TempSummon::UnSummon(uint32 msTime)
+void TempSummon::UnSummon(Milliseconds msTime)
{
- if (msTime)
+ if (msTime > 0ms)
{
ForcedUnsummonDelayEvent* pEvent = new ForcedUnsummonDelayEvent(*this);
-
- m_Events.AddEvent(pEvent, m_Events.CalculateTime(msTime));
+ m_Events.AddEventAtOffset(pEvent, msTime);
return;
}
diff --git a/src/server/game/Entities/Creature/TemporarySummon.h b/src/server/game/Entities/Creature/TemporarySummon.h
index 72a1993270..4140d37c7d 100644
--- a/src/server/game/Entities/Creature/TemporarySummon.h
+++ b/src/server/game/Entities/Creature/TemporarySummon.h
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
@@ -44,7 +44,7 @@ public:
void Update(uint32 time) override;
virtual void InitStats(uint32 lifetime);
virtual void InitSummon();
- virtual void UnSummon(uint32 msTime = 0);
+ virtual void UnSummon(Milliseconds msTime = 0ms);
void UpdateObjectVisibilityOnCreate() override;
void RemoveFromWorld() override;
void SetTempSummonType(TempSummonType type);
@@ -133,4 +133,5 @@ public:
private:
TempSummon& m_owner;
};
+
#endif
diff --git a/src/server/game/Entities/Creature/enuminfo_CreatureData.cpp b/src/server/game/Entities/Creature/enuminfo_CreatureData.cpp
index a2efe7bcc7..2f0aebebae 100644
--- a/src/server/game/Entities/Creature/enuminfo_CreatureData.cpp
+++ b/src/server/game/Entities/Creature/enuminfo_CreatureData.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/game/Entities/DynamicObject/DynamicObject.cpp b/src/server/game/Entities/DynamicObject/DynamicObject.cpp
index f712691b15..5a64654045 100644
--- a/src/server/game/Entities/DynamicObject/DynamicObject.cpp
+++ b/src/server/game/Entities/DynamicObject/DynamicObject.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/game/Entities/DynamicObject/DynamicObject.h b/src/server/game/Entities/DynamicObject/DynamicObject.h
index 7ccd31f2f5..b5ff4b1c7d 100644
--- a/src/server/game/Entities/DynamicObject/DynamicObject.h
+++ b/src/server/game/Entities/DynamicObject/DynamicObject.h
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/game/Entities/GameObject/GameObject.cpp b/src/server/game/Entities/GameObject/GameObject.cpp
index f258db1caf..aa07590f65 100644
--- a/src/server/game/Entities/GameObject/GameObject.cpp
+++ b/src/server/game/Entities/GameObject/GameObject.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
@@ -517,7 +517,7 @@ void GameObject::Update(uint32 diff)
WorldPacket packet;
BuildValuesUpdateBlockForPlayer(&udata, caster->ToPlayer());
udata.BuildPacket(packet);
- caster->ToPlayer()->GetSession()->SendPacket(&packet);
+ caster->ToPlayer()->SendDirectMessage(&packet);
SendCustomAnim(GetGoAnimProgress());
}
@@ -637,7 +637,7 @@ void GameObject::Update(uint32 diff)
caster->ToPlayer()->RemoveGameObject(this, false);
WorldPacket data(SMSG_FISH_ESCAPED, 0);
- caster->ToPlayer()->GetSession()->SendPacket(&data);
+ caster->ToPlayer()->SendDirectMessage(&data);
}
// can be delete
m_lootState = GO_JUST_DEACTIVATED;
@@ -929,7 +929,7 @@ void GameObject::AddUniqueUse(Player* player)
m_unique_users.insert(player->GetGUID());
}
-void GameObject::DespawnOrUnsummon(Milliseconds delay, Seconds forceRespawnTime)
+void GameObject::DespawnOrUnsummon(Milliseconds delay /*= 0ms*/, Seconds forceRespawnTime /*= 0s*/)
{
if (delay > 0ms)
{
@@ -1466,7 +1466,7 @@ void GameObject::Use(Unit* user)
// by default spell caster is user
Unit* spellCaster = user;
uint32 spellId = 0;
- bool triggered = false;
+ uint32 triggeredFlags = TRIGGERED_NONE;
if (Player* playerUser = user->ToPlayer())
{
@@ -1486,6 +1486,10 @@ void GameObject::Use(Unit* user)
m_cooldownTime = GameTime::GetGameTimeMS().count() + cooldown * IN_MILLISECONDS;
}
+ if (user->IsPlayer() && GetGoType() != GAMEOBJECT_TYPE_TRAP) // workaround for GO casting
+ if (!m_goInfo->IsUsableMounted())
+ user->RemoveAurasByType(SPELL_AURA_MOUNTED);
+
switch (GetGoType())
{
case GAMEOBJECT_TYPE_DOOR: //0
@@ -1624,7 +1628,7 @@ void GameObject::Use(Unit* user)
{
WorldPacket data(SMSG_GAMEOBJECT_PAGETEXT, 8);
data << GetGUID();
- player->GetSession()->SendPacket(&data);
+ player->SendDirectMessage(&data);
}
else if (info->goober.gossipID)
{
@@ -1731,34 +1735,40 @@ void GameObject::Use(Unit* user)
uint32 zone, subzone;
GetZoneAndAreaId(zone, subzone);
- int32 zone_skill = sObjectMgr->GetFishingBaseSkillLevel(subzone);
- if (!zone_skill)
- zone_skill = sObjectMgr->GetFishingBaseSkillLevel(zone);
+ int32 zoneSkill = sObjectMgr->GetFishingBaseSkillLevel(subzone);
+ if (!zoneSkill)
+ zoneSkill = sObjectMgr->GetFishingBaseSkillLevel(zone);
//provide error, no fishable zone or area should be 0
- if (!zone_skill)
+ if (!zoneSkill)
LOG_ERROR("sql.sql", "Fishable areaId {} are not properly defined in `skill_fishing_base_level`.", subzone);
- int32 skill = player->GetSkillValue(SKILL_FISHING);
+ // no miss skill is zone skill + 95 since at least patch 2.1
+ int32 const noMissSkill = zoneSkill + 95;
+
+ int32 const skill = player->GetSkillValue(SKILL_FISHING);
int32 chance;
- if (skill < zone_skill)
+ // fishing pool catches are 100%
+ //TODO: find reasonable value for fishing hole search
+ GameObject* fishingHole = LookupFishingHoleAround(20.0f + CONTACT_DISTANCE);
+ if (fishingHole)
+ chance = 100;
+ else if (skill < noMissSkill)
{
- chance = int32(pow((double)skill / zone_skill, 2) * 100);
+ chance = int32(pow((double)skill / noMissSkill, 2) * 100);
if (chance < 1)
chance = 1;
}
else
chance = 100;
- int32 roll = irand(1, 100);
+ int32 const roll = irand(1, 100);
- LOG_DEBUG("entities.gameobject", "Fishing check (skill: {} zone min skill: {} chance {} roll: {}", skill, zone_skill, chance, roll);
+ LOG_DEBUG("entities.gameobject", "Fishing check (skill: {} zone min skill: {} no-miss skill: {} chance {} roll: {})", skill, zoneSkill, noMissSkill, chance, roll);
- if (sScriptMgr->OnPlayerUpdateFishingSkill(player, skill, zone_skill, chance, roll))
- {
+ if (sScriptMgr->OnPlayerUpdateFishingSkill(player, skill, zoneSkill, chance, roll))
player->UpdateFishingSkill();
- }
// but you will likely cause junk in areas that require a high fishing skill (not yet implemented)
if (chance >= roll)
{
@@ -1768,11 +1778,10 @@ void GameObject::Use(Unit* user)
SetOwnerGUID(player->GetGUID());
SetSpellId(0); // prevent removing unintended auras at Unit::RemoveGameObject
- //TODO: find reasonable value for fishing hole search
- GameObject* ok = LookupFishingHoleAround(20.0f + CONTACT_DISTANCE);
- if (ok)
+ // fishing pool catch
+ if (fishingHole)
{
- ok->Use(player);
+ fishingHole->Use(player);
SetLootState(GO_JUST_DEACTIVATED);
}
else
@@ -1789,7 +1798,7 @@ void GameObject::Use(Unit* user)
SetLootState(GO_JUST_DEACTIVATED);
WorldPacket data(SMSG_FISH_NOT_HOOKED, 0);
- player->GetSession()->SendPacket(&data);
+ player->SendDirectMessage(&data);
break;
}
}
@@ -1881,7 +1890,6 @@ void GameObject::Use(Unit* user)
}
}
- user->RemoveAurasByType(SPELL_AURA_MOUNTED);
spellId = info->spellcaster.spellId;
break;
}
@@ -2026,7 +2034,7 @@ void GameObject::Use(Unit* user)
player->TeleportTo(GetMapId(), GetPositionX(), GetPositionY(), GetPositionZ(), GetOrientation(), TELE_TO_NOT_LEAVE_TRANSPORT | TELE_TO_NOT_LEAVE_COMBAT | TELE_TO_NOT_UNSUMMON_PET);
WorldPacket data(SMSG_ENABLE_BARBER_SHOP, 0);
- player->GetSession()->SendPacket(&data);
+ player->SendDirectMessage(&data);
player->SetStandState(UNIT_STAND_STATE_SIT_LOW_CHAIR + info->barberChair.chairheight);
return;
@@ -2051,12 +2059,15 @@ void GameObject::Use(Unit* user)
return;
}
+ if (m_goInfo->IsUsableMounted())
+ triggeredFlags |= TRIGGERED_IGNORE_CASTER_MOUNTED_OR_ON_VEHICLE;
+
if (Player* player = user->ToPlayer())
sOutdoorPvPMgr->HandleCustomSpell(player, spellId, this);
if (spellCaster)
{
- if ((spellCaster->CastSpell(user, spellInfo, triggered) == SPELL_CAST_OK) && GetGoType() == GAMEOBJECT_TYPE_SPELLCASTER)
+ if ((spellCaster->CastSpell(user, spellInfo, TriggerCastFlags(triggeredFlags)) == SPELL_CAST_OK) && GetGoType() == GAMEOBJECT_TYPE_SPELLCASTER)
AddUse();
}
else
@@ -2300,7 +2311,7 @@ void GameObject::ModifyHealth(int32 change, Unit* attackerOrHealer /*= nullptr*/
data << uint32(-change); // change < 0 triggers SPELL_BUILDING_HEAL combat log event
// change >= 0 triggers SPELL_BUILDING_DAMAGE event
data << uint32(spellId);
- player->GetSession()->SendPacket(&data);
+ player->SendDirectMessage(&data);
}
GameObjectDestructibleState newState = GetDestructibleState();
@@ -3046,13 +3057,13 @@ SpellInfo const* GameObject::GetSpellForLock(Player const* player) const
return nullptr;
}
-void GameObject::AddToSkillupList(ObjectGuid playerGuid)
+void GameObject::AddToSkillupList(ObjectGuid const& playerGuid)
{
int32 timer = GetMap()->IsDungeon() ? -1 : 10 * MINUTE * IN_MILLISECONDS;
m_SkillupList[playerGuid] = timer;
}
-bool GameObject::IsInSkillupList(ObjectGuid playerGuid) const
+bool GameObject::IsInSkillupList(ObjectGuid const& playerGuid) const
{
for (auto const& itr : m_SkillupList)
{
diff --git a/src/server/game/Entities/GameObject/GameObject.h b/src/server/game/Entities/GameObject/GameObject.h
index 1b8ccd0477..12154547e3 100644
--- a/src/server/game/Entities/GameObject/GameObject.h
+++ b/src/server/game/Entities/GameObject/GameObject.h
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
@@ -231,8 +231,8 @@ public:
void RemoveLootMode(uint16 lootMode) { m_LootMode &= ~lootMode; }
void ResetLootMode() { m_LootMode = LOOT_MODE_DEFAULT; }
- void AddToSkillupList(ObjectGuid playerGuid);
- [[nodiscard]] bool IsInSkillupList(ObjectGuid playerGuid) const;
+ void AddToSkillupList(ObjectGuid const& playerGuid);
+ [[nodiscard]] bool IsInSkillupList(ObjectGuid const& playerGuid) const;
void AddUniqueUse(Player* player);
void AddUse() { ++m_usetimes; }
@@ -414,7 +414,7 @@ private:
void UpdatePackedRotation();
//! Object distance/size - overridden from Object::_IsWithinDist. Needs to take in account proper GO size.
- bool _IsWithinDist(WorldObject const* obj, float dist2compare, bool /*is3D*/, bool /*useBoundingRadius = true*/) const override
+ bool _IsWithinDist(WorldObject const* obj, float dist2compare, bool /*is3D*/, bool /*incOwnRadius = true*/, bool /*incTargetRadius = true*/) const override
{
//! Following check does check 3d distance
dist2compare += obj->GetObjectSize();
diff --git a/src/server/game/Entities/GameObject/GameObjectData.h b/src/server/game/Entities/GameObject/GameObjectData.h
index fd95aa5149..7615dbbbe8 100644
--- a/src/server/game/Entities/GameObject/GameObjectData.h
+++ b/src/server/game/Entities/GameObject/GameObjectData.h
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/game/Entities/Item/Container/Bag.cpp b/src/server/game/Entities/Item/Container/Bag.cpp
index 100df46046..4dfa6208ac 100644
--- a/src/server/game/Entities/Item/Container/Bag.cpp
+++ b/src/server/game/Entities/Item/Container/Bag.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/game/Entities/Item/Container/Bag.h b/src/server/game/Entities/Item/Container/Bag.h
index 071f4d9023..dff1d41437 100644
--- a/src/server/game/Entities/Item/Container/Bag.h
+++ b/src/server/game/Entities/Item/Container/Bag.h
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/game/Entities/Item/Item.cpp b/src/server/game/Entities/Item/Item.cpp
index 9b58746e95..9aea0ea743 100644
--- a/src/server/game/Entities/Item/Item.cpp
+++ b/src/server/game/Entities/Item/Item.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
@@ -1066,7 +1066,7 @@ void Item::SendUpdateSockets()
for (uint32 i = SOCK_ENCHANTMENT_SLOT; i <= BONUS_ENCHANTMENT_SLOT; ++i)
data << uint32(GetEnchantmentId(EnchantmentSlot(i)));
- GetOwner()->GetSession()->SendPacket(&data);
+ GetOwner()->SendDirectMessage(&data);
}
// Though the client has the information in the item's data field,
@@ -1081,7 +1081,7 @@ void Item::SendTimeUpdate(Player* owner)
WorldPacket data(SMSG_ITEM_TIME_UPDATE, (8 + 4));
data << GetGUID();
data << uint32(duration);
- owner->GetSession()->SendPacket(&data);
+ owner->SendDirectMessage(&data);
}
Item* Item::CreateItem(uint32 item, uint32 count, Player const* player, bool clone, uint32 randomPropertyId)
diff --git a/src/server/game/Entities/Item/Item.h b/src/server/game/Entities/Item/Item.h
index a4ce99fdd0..51289594b9 100644
--- a/src/server/game/Entities/Item/Item.h
+++ b/src/server/game/Entities/Item/Item.h
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/game/Entities/Item/ItemEnchantmentMgr.cpp b/src/server/game/Entities/Item/ItemEnchantmentMgr.cpp
index dd781062ea..c50d0991eb 100644
--- a/src/server/game/Entities/Item/ItemEnchantmentMgr.cpp
+++ b/src/server/game/Entities/Item/ItemEnchantmentMgr.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/game/Entities/Item/ItemEnchantmentMgr.h b/src/server/game/Entities/Item/ItemEnchantmentMgr.h
index 68e992490d..0634bccc2a 100644
--- a/src/server/game/Entities/Item/ItemEnchantmentMgr.h
+++ b/src/server/game/Entities/Item/ItemEnchantmentMgr.h
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/game/Entities/Item/ItemTemplate.h b/src/server/game/Entities/Item/ItemTemplate.h
index 40cc6f38e1..b41616c112 100644
--- a/src/server/game/Entities/Item/ItemTemplate.h
+++ b/src/server/game/Entities/Item/ItemTemplate.h
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/game/Entities/Item/enuminfo_Item.cpp b/src/server/game/Entities/Item/enuminfo_Item.cpp
index 54edf959bc..9bb99651c7 100644
--- a/src/server/game/Entities/Item/enuminfo_Item.cpp
+++ b/src/server/game/Entities/Item/enuminfo_Item.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/game/Entities/Object/Object.cpp b/src/server/game/Entities/Object/Object.cpp
index a183d14672..73ced58747 100644
--- a/src/server/game/Entities/Object/Object.cpp
+++ b/src/server/game/Entities/Object/Object.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
@@ -240,7 +240,7 @@ void Object::SendUpdateToPlayer(Player* player)
BuildCreateUpdateBlockForPlayer(&upd, player);
upd.BuildPacket(packet);
- player->GetSession()->SendPacket(&packet);
+ player->SendDirectMessage(&packet);
}
void Object::BuildValuesUpdateBlockForPlayer(UpdateData* data, Player* target)
@@ -272,7 +272,7 @@ void Object::DestroyForPlayer(Player* target, bool onDeath) const
{
WorldPacket data(SMSG_ARENA_UNIT_DESTROYED, 8);
data << GetGUID();
- target->GetSession()->SendPacket(&data);
+ target->SendDirectMessage(&data);
}
}
}
@@ -282,7 +282,7 @@ void Object::DestroyForPlayer(Player* target, bool onDeath) const
//! If the following bool is true, the client will call "void CGUnit_C::OnDeath()" for this object.
//! OnDeath() does for eg trigger death animation and interrupts certain spells/missiles/auras/sounds...
data << uint8(onDeath ? 1 : 0);
- target->GetSession()->SendPacket(&data);
+ target->SendDirectMessage(&data);
}
[[nodiscard]] int32 Object::GetInt32Value(uint16 index) const
@@ -815,13 +815,6 @@ void Object::ApplyModSignedFloatValue(uint16 index, float val, bool apply)
SetFloatValue(index, cur);
}
-void Object::ApplyPercentModFloatValue(uint16 index, float val, bool apply)
-{
- float value = GetFloatValue(index);
- ApplyPercentModFloatVar(value, val, apply);
- SetFloatValue(index, value);
-}
-
void Object::ApplyModPositiveFloatValue(uint16 index, float val, bool apply)
{
float cur = GetFloatValue(index);
@@ -1095,23 +1088,45 @@ void WorldObject::SetVisibilityDistanceOverride(VisibilityDistanceType type)
if (type == GetVisibilityOverrideType())
return;
- if (IsPlayer())
+ if (!IsCreature() && !IsGameObject() && !IsDynamicObject())
return;
- if (IsVisibilityOverridden())
- {
- if (IsFarVisible())
- GetMap()->RemoveWorldObjectFromFarVisibleMap(this);
- else if (IsZoneWideVisible())
- GetMap()->RemoveWorldObjectFromZoneWideVisibleMap(GetZoneId(), this);
- }
-
- if (type == VisibilityDistanceType::Large || type == VisibilityDistanceType::Gigantic)
- GetMap()->AddWorldObjectToFarVisibleMap(this);
- else if (type == VisibilityDistanceType::Infinite)
- GetMap()->AddWorldObjectToZoneWideVisibleMap(GetZoneId(), this);
+ // Important to remove from old visibility override containers first
+ RemoveFromMapVisibilityOverrideContainers();
+ // Always update _visibilityDistanceOverrideType, even when not in world
_visibilityDistanceOverrideType = type;
+
+ // Finally, add to new visibility override containers
+ AddToMapVisibilityOverrideContainers();
+}
+
+void WorldObject::RemoveFromMapVisibilityOverrideContainers()
+{
+ if (!IsVisibilityOverridden())
+ return;
+
+ if (!IsInWorld())
+ return;
+
+ if (IsFarVisible())
+ GetMap()->RemoveWorldObjectFromFarVisibleMap(this);
+ else if (IsZoneWideVisible())
+ GetMap()->RemoveWorldObjectFromZoneWideVisibleMap(_zoneId, this);
+}
+
+void WorldObject::AddToMapVisibilityOverrideContainers()
+{
+ if (!IsVisibilityOverridden())
+ return;
+
+ if (!IsInWorld())
+ return;
+
+ if (IsFarVisible())
+ GetMap()->AddWorldObjectToFarVisibleMap(this);
+ else if (IsZoneWideVisible())
+ GetMap()->AddWorldObjectToZoneWideVisibleMap(_zoneId, this);
}
void WorldObject::CleanupsBeforeDelete(bool /*finalCleanup*/)
@@ -1177,6 +1192,9 @@ void WorldObject::AddToWorld()
Object::AddToWorld();
GetMap()->GetZoneAndAreaId(GetPhaseMask(), _zoneId, _areaId, GetPositionX(), GetPositionY(), GetPositionZ());
GetMap()->AddObjectToPendingUpdateList(this);
+
+ if (IsZoneWideVisible())
+ GetMap()->AddWorldObjectToZoneWideVisibleMap(_zoneId, this);
}
void WorldObject::RemoveFromWorld()
@@ -1184,8 +1202,7 @@ void WorldObject::RemoveFromWorld()
if (!IsInWorld())
return;
- if (IsZoneWideVisible())
- GetMap()->RemoveWorldObjectFromZoneWideVisibleMap(GetZoneId(), this);
+ RemoveFromMapVisibilityOverrideContainers();
DestroyForVisiblePlayers();
@@ -1208,10 +1225,14 @@ float WorldObject::GetDistanceZ(WorldObject const* obj) const
return (dist > 0 ? dist : 0);
}
-bool WorldObject::_IsWithinDist(WorldObject const* obj, float dist2compare, bool is3D, bool useBoundingRadius) const
+bool WorldObject::_IsWithinDist(WorldObject const* obj, float dist2compare, bool is3D, bool incOwnRadius, bool incTargetRadius) const
{
- float sizefactor = useBoundingRadius ? GetObjectSize() + obj->GetObjectSize() : 0.0f;
- float maxdist = dist2compare + sizefactor;
+ float maxdist = dist2compare;
+ if (incOwnRadius)
+ maxdist += GetObjectSize();
+
+ if (incTargetRadius)
+ maxdist += obj->GetObjectSize();
if (m_transport && obj->GetTransport() && obj->GetTransport()->GetGUID() == m_transport->GetGUID())
{
@@ -1318,14 +1339,14 @@ bool WorldObject::IsWithinDist2d(const Position* pos, float dist) const
}
// use only if you will sure about placing both object at same map
-bool WorldObject::IsWithinDist(WorldObject const* obj, float dist2compare, bool is3D, bool useBoundingRadius) const
+bool WorldObject::IsWithinDist(WorldObject const* obj, float dist2compare, bool is3D, bool incOwnRadius, bool incTargetRadius) const
{
- return obj && _IsWithinDist(obj, dist2compare, is3D, useBoundingRadius);
+ return obj && _IsWithinDist(obj, dist2compare, is3D, incOwnRadius, incTargetRadius);
}
-bool WorldObject::IsWithinDistInMap(WorldObject const* obj, float dist2compare, bool is3D, bool useBoundingRadius) const
+bool WorldObject::IsWithinDistInMap(WorldObject const* obj, float dist2compare, bool is3D, bool incOwnRadius, bool incTargetRadius) const
{
- return obj && IsInMap(obj) && InSamePhase(obj) && _IsWithinDist(obj, dist2compare, is3D, useBoundingRadius);
+ return obj && IsInMap(obj) && InSamePhase(obj) && _IsWithinDist(obj, dist2compare, is3D, incOwnRadius, incTargetRadius);
}
bool WorldObject::IsWithinLOS(float ox, float oy, float oz, VMAP::ModelIgnoreFlags ignoreFlags, LineOfSightChecks checks) const
@@ -1752,6 +1773,8 @@ bool WorldObject::CanSeeOrDetect(WorldObject const* obj, bool ignoreStealth, boo
WorldObject const* viewpoint = this;
if (Player const* thisPlayer = ToPlayer())
{
+ viewpoint = thisPlayer->GetSeer();
+
if (Creature const* creature = obj->ToCreature())
{
if (TempSummon const* tempSummon = creature->ToTempSummon())
@@ -1791,13 +1814,8 @@ bool WorldObject::CanSeeOrDetect(WorldObject const* obj, bool ignoreStealth, boo
return false;
}
- if (thisPlayer->GetViewpoint())
- viewpoint = thisPlayer->GetViewpoint();
-
if (thisPlayer->GetFarSightDistance() && !thisPlayer->isInFront(obj))
- {
return false;
- }
}
// Xinef: check reversely obj vs viewpoint, object could be a gameObject which overrides _IsWithinDist function to include gameobject size
@@ -2044,7 +2062,7 @@ void WorldObject::SendPlayMusic(uint32 Music, bool OnlySelf)
WorldPacket data(SMSG_PLAY_MUSIC, 4);
data << Music;
if (OnlySelf && IsPlayer())
- this->ToPlayer()->GetSession()->SendPacket(&data);
+ ToPlayer()->SendDirectMessage(&data);
else
SendMessageToSet(&data, true); // ToSelf ignored in this case
}
diff --git a/src/server/game/Entities/Object/Object.h b/src/server/game/Entities/Object/Object.h
index 23784c9c63..02d38a2f5a 100644
--- a/src/server/game/Entities/Object/Object.h
+++ b/src/server/game/Entities/Object/Object.h
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
@@ -41,7 +41,7 @@
#include "UpdateFields.h"
-class ElunaEventProcessor;
+class ALEEventProcessor;
enum TempSummonType
{
@@ -165,7 +165,6 @@ public:
void ApplyModUInt64Value(uint16 index, int32 val, bool apply);
void ApplyModPositiveFloatValue(uint16 index, float val, bool apply);
void ApplyModSignedFloatValue(uint16 index, float val, bool apply);
- void ApplyPercentModFloatValue(uint16 index, float val, bool apply);
void SetFlag(uint16 index, uint32 newFlag);
void RemoveFlag(uint16 index, uint32 oldFlag);
@@ -541,8 +540,8 @@ public:
[[nodiscard]] bool IsWithinDist2d(float x, float y, float dist) const;
bool IsWithinDist2d(const Position* pos, float dist) const;
// use only if you will sure about placing both object at same map
- bool IsWithinDist(WorldObject const* obj, float dist2compare, bool is3D = true, bool useBoundingRadius = true) const;
- bool IsWithinDistInMap(WorldObject const* obj, float dist2compare, bool is3D = true, bool useBoundingRadius = true) const;
+ bool IsWithinDist(WorldObject const* obj, float dist2compare, bool is3D = true, bool incOwnRadius = true, bool incTargetRadius = true) const;
+ bool IsWithinDistInMap(WorldObject const* obj, float dist2compare, bool is3D = true, bool incOwnRadius = true, bool incTargetRadius = true) const;
[[nodiscard]] bool IsWithinLOS(float x, float y, float z, VMAP::ModelIgnoreFlags ignoreFlags = VMAP::ModelIgnoreFlags::Nothing, LineOfSightChecks checks = LINEOFSIGHT_ALL_CHECKS) const;
[[nodiscard]] bool IsWithinLOSInMap(WorldObject const* obj, VMAP::ModelIgnoreFlags ignoreFlags = VMAP::ModelIgnoreFlags::Nothing, LineOfSightChecks checks = LINEOFSIGHT_ALL_CHECKS, Optional<float> collisionHeight = { }, Optional<float> combatReach = { }) const;
[[nodiscard]] Position GetHitSpherePointFor(Position const& dest, Optional<float> collisionHeight = { }, Optional<float> combatReach = { }) const;
@@ -727,7 +726,7 @@ public:
ObjectVisibilityContainer const& GetObjectVisibilityContainer() const { return _objectVisibilityContainer; }
// Event handler
- ElunaEventProcessor* elunaEvents;
+ ALEEventProcessor* ALEEvents;
EventProcessor m_Events;
protected:
@@ -770,7 +769,7 @@ private:
uint16 m_notifyflags;
uint16 m_executed_notifies;
- virtual bool _IsWithinDist(WorldObject const* obj, float dist2compare, bool is3D, bool useBoundingRadius = true) const;
+ virtual bool _IsWithinDist(WorldObject const* obj, float dist2compare, bool is3D, bool incOwnRadius = true, bool incTargetRadius = true) const;
bool CanNeverSee(WorldObject const* obj) const;
virtual bool CanAlwaysSee(WorldObject const* /*obj*/) const { return false; }
@@ -780,6 +779,9 @@ private:
//bool CanDetectStealthOf(WorldObject const* obj) const;
bool CanDetectStealthOf(WorldObject const* obj, bool checkAlert = false) const;
+ void RemoveFromMapVisibilityOverrideContainers();
+ void AddToMapVisibilityOverrideContainers();
+
GuidUnorderedSet _allowedLooters;
ObjectVisibilityContainer _objectVisibilityContainer;
diff --git a/src/server/game/Entities/Object/ObjectDefines.h b/src/server/game/Entities/Object/ObjectDefines.h
index fb0daa500b..89c773a397 100644
--- a/src/server/game/Entities/Object/ObjectDefines.h
+++ b/src/server/game/Entities/Object/ObjectDefines.h
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/game/Entities/Object/ObjectGuid.cpp b/src/server/game/Entities/Object/ObjectGuid.cpp
index f14a967bcd..2a6e230723 100644
--- a/src/server/game/Entities/Object/ObjectGuid.cpp
+++ b/src/server/game/Entities/Object/ObjectGuid.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/game/Entities/Object/ObjectGuid.h b/src/server/game/Entities/Object/ObjectGuid.h
index a8d99fe80e..f92229e99f 100644
--- a/src/server/game/Entities/Object/ObjectGuid.h
+++ b/src/server/game/Entities/Object/ObjectGuid.h
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
@@ -269,7 +269,7 @@ class PackedGuid
explicit PackedGuid(ObjectGuid guid) : _packedGuid(PACKED_GUID_MIN_BUFFER_SIZE) { _packedGuid.appendPackGUID(guid.GetRawValue()); }
void Set(uint64 guid) { _packedGuid.wpos(0); _packedGuid.appendPackGUID(guid); }
- void Set(ObjectGuid guid) { _packedGuid.wpos(0); _packedGuid.appendPackGUID(guid.GetRawValue()); }
+ void Set(ObjectGuid const& guid) { _packedGuid.wpos(0); _packedGuid.appendPackGUID(guid.GetRawValue()); }
[[nodiscard]] std::size_t size() const { return _packedGuid.size(); }
diff --git a/src/server/game/Entities/Object/ObjectPosSelector.cpp b/src/server/game/Entities/Object/ObjectPosSelector.cpp
index 849a777e95..91d79ccbf3 100644
--- a/src/server/game/Entities/Object/ObjectPosSelector.cpp
+++ b/src/server/game/Entities/Object/ObjectPosSelector.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/game/Entities/Object/ObjectPosSelector.h b/src/server/game/Entities/Object/ObjectPosSelector.h
index 1f24c7b221..466957bf7e 100644
--- a/src/server/game/Entities/Object/ObjectPosSelector.h
+++ b/src/server/game/Entities/Object/ObjectPosSelector.h
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/game/Entities/Object/ObjectVisibilityContainer.cpp b/src/server/game/Entities/Object/ObjectVisibilityContainer.cpp
index 358626180b..7ab7104456 100644
--- a/src/server/game/Entities/Object/ObjectVisibilityContainer.cpp
+++ b/src/server/game/Entities/Object/ObjectVisibilityContainer.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/game/Entities/Object/ObjectVisibilityContainer.h b/src/server/game/Entities/Object/ObjectVisibilityContainer.h
index 07444c6356..bb289e7a8e 100644
--- a/src/server/game/Entities/Object/ObjectVisibilityContainer.h
+++ b/src/server/game/Entities/Object/ObjectVisibilityContainer.h
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/game/Entities/Object/Position.cpp b/src/server/game/Entities/Object/Position.cpp
index 65c2ede216..77f17ea544 100644
--- a/src/server/game/Entities/Object/Position.cpp
+++ b/src/server/game/Entities/Object/Position.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/game/Entities/Object/Position.h b/src/server/game/Entities/Object/Position.h
index baeff5a80d..8ffb41928a 100644
--- a/src/server/game/Entities/Object/Position.h
+++ b/src/server/game/Entities/Object/Position.h
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/game/Entities/Object/Updates/UpdateData.cpp b/src/server/game/Entities/Object/Updates/UpdateData.cpp
index 00c565c665..361d50d4a2 100644
--- a/src/server/game/Entities/Object/Updates/UpdateData.cpp
+++ b/src/server/game/Entities/Object/Updates/UpdateData.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/game/Entities/Object/Updates/UpdateData.h b/src/server/game/Entities/Object/Updates/UpdateData.h
index 6a795bd7e0..dbf54b7206 100644
--- a/src/server/game/Entities/Object/Updates/UpdateData.h
+++ b/src/server/game/Entities/Object/Updates/UpdateData.h
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/game/Entities/Object/Updates/UpdateFieldFlags.cpp b/src/server/game/Entities/Object/Updates/UpdateFieldFlags.cpp
index 5946c90590..149ca6da4a 100644
--- a/src/server/game/Entities/Object/Updates/UpdateFieldFlags.cpp
+++ b/src/server/game/Entities/Object/Updates/UpdateFieldFlags.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/game/Entities/Object/Updates/UpdateFieldFlags.h b/src/server/game/Entities/Object/Updates/UpdateFieldFlags.h
index 4675f11db5..4b499b11e7 100644
--- a/src/server/game/Entities/Object/Updates/UpdateFieldFlags.h
+++ b/src/server/game/Entities/Object/Updates/UpdateFieldFlags.h
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/game/Entities/Object/Updates/UpdateFields.h b/src/server/game/Entities/Object/Updates/UpdateFields.h
index a22602824d..7f57183af4 100644
--- a/src/server/game/Entities/Object/Updates/UpdateFields.h
+++ b/src/server/game/Entities/Object/Updates/UpdateFields.h
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/game/Entities/Object/Updates/UpdateMask.h b/src/server/game/Entities/Object/Updates/UpdateMask.h
index 906209c639..11250f13a3 100644
--- a/src/server/game/Entities/Object/Updates/UpdateMask.h
+++ b/src/server/game/Entities/Object/Updates/UpdateMask.h
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/game/Entities/Pet/Pet.cpp b/src/server/game/Entities/Pet/Pet.cpp
index dc33162260..55ebf72afd 100644
--- a/src/server/game/Entities/Pet/Pet.cpp
+++ b/src/server/game/Entities/Pet/Pet.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
@@ -692,7 +692,7 @@ void Pet::Update(uint32 diff)
}
}
- if (m_duration > 0s)
+ if (m_duration > 0ms)
{
if (m_duration > _diff)
m_duration -= _diff;
@@ -708,7 +708,7 @@ void Pet::Update(uint32 diff)
if (getPowerType() == POWER_FOCUS)
{
m_petRegenTimer -= _diff;
- if (m_petRegenTimer <= 0s)
+ if (m_petRegenTimer <= 0ms)
{
m_petRegenTimer += PET_FOCUS_REGEN_INTERVAL;
Regenerate(POWER_FOCUS);
@@ -1026,7 +1026,7 @@ bool Guardian::InitStatsForLevel(uint8 petlevel)
Unit* owner = GetOwner();
if (!owner) // just to be sure, asynchronous now
{
- DespawnOrUnsummon(1000);
+ DespawnOrUnsummon(1s);
return false;
}
@@ -1075,7 +1075,7 @@ bool Guardian::InitStatsForLevel(uint8 petlevel)
SetMeleeDamageSchool(SpellSchools(cinfo->dmgschool));
}
- SetModifierValue(UNIT_MOD_ARMOR, BASE_VALUE, float(petlevel * 50));
+ SetStatFlatModifier(UNIT_MOD_ARMOR, BASE_VALUE, float(petlevel * 50));
uint32 attackTime = BASE_ATTACK_TIME;
if (!owner->IsClass(CLASS_HUNTER, CLASS_CONTEXT_PET) && cinfo->BaseAttackTime >= 1000)
@@ -1094,7 +1094,7 @@ bool Guardian::InitStatsForLevel(uint8 petlevel)
// xinef: hunter pets should not inherit template resistances
if (!IsHunterPet())
for (uint8 i = SPELL_SCHOOL_HOLY; i < MAX_SPELL_SCHOOL; ++i)
- SetModifierValue(UnitMods(UNIT_MOD_RESISTANCE_START + i), BASE_VALUE, float(cinfo->resistance[i]));
+ SetStatFlatModifier(UnitMods(UNIT_MOD_RESISTANCE_START + i), BASE_VALUE, float(cinfo->resistance[i]));
//health, mana, armor and resistance
PetLevelInfo const* pInfo = sObjectMgr->GetPetLevelInfo(creature_ID, petlevel);
@@ -1111,15 +1111,15 @@ bool Guardian::InitStatsForLevel(uint8 petlevel)
}
SetCreateHealth(pInfo->health*factorHealth);
- SetModifierValue(UNIT_MOD_HEALTH, BASE_VALUE, (float)pInfo->health);
+ SetStatFlatModifier(UNIT_MOD_HEALTH, BASE_VALUE, (float)pInfo->health);
if (petType != HUNTER_PET) //hunter pet use focus
{
SetCreateMana(pInfo->mana);
- SetModifierValue(UNIT_MOD_MANA, BASE_VALUE, (float)pInfo->mana);
+ SetStatFlatModifier(UNIT_MOD_MANA, BASE_VALUE, (float)pInfo->mana);
}
if (pInfo->armor > 0)
- SetModifierValue(UNIT_MOD_ARMOR, BASE_VALUE, float(pInfo->armor));
+ SetStatFlatModifier(UNIT_MOD_ARMOR, BASE_VALUE, float(pInfo->armor));
for (uint8 stat = 0; stat < MAX_STATS; ++stat)
SetCreateStat(Stats(stat), float(pInfo->stats[stat]));
@@ -1138,9 +1138,9 @@ bool Guardian::InitStatsForLevel(uint8 petlevel)
}
SetCreateHealth(std::max<uint32>(1, stats->BaseHealth[cinfo->expansion]*factorHealth));
- SetModifierValue(UNIT_MOD_HEALTH, BASE_VALUE, GetCreateHealth());
+ SetStatFlatModifier(UNIT_MOD_HEALTH, BASE_VALUE, GetCreateHealth());
SetCreateMana(stats->BaseMana * factorMana);
- SetModifierValue(UNIT_MOD_MANA, BASE_VALUE, GetCreateMana());
+ SetStatFlatModifier(UNIT_MOD_MANA, BASE_VALUE, GetCreateMana());
// xinef: added some multipliers so debuffs can affect pets in any way...
SetCreateStat(STAT_STRENGTH, 22);
@@ -1174,24 +1174,6 @@ bool Guardian::InitStatsForLevel(uint8 petlevel)
switch (GetEntry())
{
- case NPC_FELGUARD:
- {
- // xinef: Glyph of Felguard, so ugly im crying... no appropriate spell
- if (AuraEffect* aurEff = owner->GetAuraEffectDummy(SPELL_GLYPH_OF_FELGUARD))
- {
- HandleStatModifier(UNIT_MOD_ATTACK_POWER, TOTAL_PCT, aurEff->GetAmount(), true);
- }
-
- break;
- }
- case NPC_VOIDWALKER:
- {
- if (AuraEffect* aurEff = owner->GetAuraEffectDummy(SPELL_GLYPH_OF_VOIDWALKER))
- {
- HandleStatModifier(UNIT_MOD_STAT_STAMINA, TOTAL_PCT, aurEff->GetAmount(), true);
- }
- break;
- }
case NPC_WATER_ELEMENTAL_PERM:
{
AddAura(SPELL_PET_AVOIDANCE, this);
@@ -1512,7 +1494,7 @@ void Pet::_LoadSpellCooldowns(PreparedQueryResult result)
if (!cooldowns.empty() && GetOwner())
{
BuildCooldownPacket(data, SPELL_COOLDOWN_FLAG_NONE, cooldowns);
- GetOwner()->GetSession()->SendPacket(&data);
+ GetOwner()->SendDirectMessage(&data);
}
}
}
diff --git a/src/server/game/Entities/Pet/Pet.h b/src/server/game/Entities/Pet/Pet.h
index e737bab11f..5639fff43d 100644
--- a/src/server/game/Entities/Pet/Pet.h
+++ b/src/server/game/Entities/Pet/Pet.h
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
@@ -52,7 +52,7 @@ public:
PetType getPetType() const { return m_petType; }
void setPetType(PetType type) { m_petType = type; }
bool isControlled() const { return getPetType() == SUMMON_PET || getPetType() == HUNTER_PET; }
- bool isTemporarySummoned() const { return m_duration > 0s; }
+ bool isTemporarySummoned() const { return m_duration > 0ms; }
bool IsPermanentPetFor(Player* owner) const; // pet have tab in character windows and set UNIT_FIELD_PETNUMBER
diff --git a/src/server/game/Entities/Pet/PetDefines.h b/src/server/game/Entities/Pet/PetDefines.h
index 6bb873258e..3721cce89d 100644
--- a/src/server/game/Entities/Pet/PetDefines.h
+++ b/src/server/game/Entities/Pet/PetDefines.h
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
@@ -23,6 +23,7 @@
#include <array>
#include <string>
#include <vector>
+#include <numbers>
enum ReactStates : uint8;
@@ -75,10 +76,10 @@ enum ActionFeedback
FEEDBACK_CANT_ATT_TARGET = 3
};
-enum PetTalk
+enum PetAction : int32
{
- PET_TALK_SPECIAL_SPELL = 0,
- PET_TALK_ATTACK = 1
+ PET_ACTION_SPECIAL_SPELL = 0,
+ PET_ACTION_ATTACK = 1
};
enum PetLoadState
@@ -202,8 +203,10 @@ enum PetScalingSpells
SPELL_RISEN_GHOUL_SELF_STUN = 47466,
};
-#define PET_FOLLOW_DIST 1.0f
-#define PET_FOLLOW_ANGLE (M_PI/2)
+constexpr float PET_FOLLOW_DIST = 2.0f;
+constexpr float PET_FOLLOW_ANGLE = std::numbers::pi_v<float> / 2;
+constexpr float MINI_PET_SUMMON_ANGLE = std::numbers::pi_v<float> / 4;
+constexpr float MINI_PET_FOLLOW_ANGLE = std::numbers::pi_v<float>;
class PetStable
{
diff --git a/src/server/game/Entities/Player/CinematicMgr.cpp b/src/server/game/Entities/Player/CinematicMgr.cpp
index 8dbe3fb416..d8091d9180 100644
--- a/src/server/game/Entities/Player/CinematicMgr.cpp
+++ b/src/server/game/Entities/Player/CinematicMgr.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/game/Entities/Player/CinematicMgr.h b/src/server/game/Entities/Player/CinematicMgr.h
index 2baeb54bf1..1dffe9957f 100644
--- a/src/server/game/Entities/Player/CinematicMgr.h
+++ b/src/server/game/Entities/Player/CinematicMgr.h
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/game/Entities/Player/KillRewarder.cpp b/src/server/game/Entities/Player/KillRewarder.cpp
index 606dd15476..78d24b4dbc 100644
--- a/src/server/game/Entities/Player/KillRewarder.cpp
+++ b/src/server/game/Entities/Player/KillRewarder.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
@@ -21,6 +21,7 @@
#include "Pet.h"
#include "Player.h"
#include "ScriptMgr.h"
+#include "SpellAuraDefines.h"
#include "SpellAuraEffects.h"
// KillRewarder incapsulates logic of rewarding player upon kill with:
@@ -162,9 +163,7 @@ void KillRewarder::_RewardXP(Player* player, float rate)
if (xp)
{
// 4.2.2. Apply auras modifying rewarded XP (SPELL_AURA_MOD_XP_PCT).
- Unit::AuraEffectList const& auras = player->GetAuraEffectsByType(SPELL_AURA_MOD_XP_PCT);
- for (Unit::AuraEffectList::const_iterator i = auras.begin(); i != auras.end(); ++i)
- AddPct(xp, (*i)->GetAmount());
+ xp *= player->GetTotalAuraMultiplier(SPELL_AURA_MOD_XP_PCT);
// 4.2.3. Give XP to player.
sScriptMgr->OnPlayerGiveXP(player, xp, _victim, PlayerXPSource::XPSOURCE_KILL);
diff --git a/src/server/game/Entities/Player/KillRewarder.h b/src/server/game/Entities/Player/KillRewarder.h
index 3efc3cc62b..a91a2a0452 100644
--- a/src/server/game/Entities/Player/KillRewarder.h
+++ b/src/server/game/Entities/Player/KillRewarder.h
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/game/Entities/Player/Player.cpp b/src/server/game/Entities/Player/Player.cpp
index 02adb9ef0c..70e03af3c6 100644
--- a/src/server/game/Entities/Player/Player.cpp
+++ b/src/server/game/Entities/Player/Player.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
@@ -69,8 +69,10 @@
#include "Realm.h"
#include "ReputationMgr.h"
#include "ScriptMgr.h"
+#include "SharedDefines.h"
#include "SocialMgr.h"
#include "Spell.h"
+#include "SpellAuraDefines.h"
#include "SpellAuraEffects.h"
#include "SpellAuras.h"
#include "SpellMgr.h"
@@ -78,6 +80,7 @@
#include "TicketMgr.h"
#include "Tokenize.h"
#include "Transport.h"
+#include "Unit.h"
#include "UpdateData.h"
#include "Util.h"
#include "Vehicle.h"
@@ -90,6 +93,7 @@
#include "WorldStateDefines.h"
#include "WorldStatePackets.h"
#include <cmath>
+#include <queue>
/// @todo: this import is not necessary for compilation and marked as unused by the IDE
// however, for some reasons removing it would cause a damn linking issue
@@ -310,8 +314,8 @@ Player::Player(WorldSession* session): Unit(), m_mover(this)
for (uint8 i = 0; i < BASEMOD_END; ++i)
{
- m_auraBaseMod[i][FLAT_MOD] = 0.0f;
- m_auraBaseMod[i][PCT_MOD] = 1.0f;
+ m_auraBaseFlatMod[i] = 0.0f;
+ m_auraBasePctMod[i] = 1.0f;
}
for (uint8 i = 0; i < MAX_COMBAT_RATING; i++)
@@ -416,6 +420,10 @@ Player::Player(WorldSession* session): Unit(), m_mover(this)
GetObjectVisibilityContainer().InitForPlayer();
sScriptMgr->OnConstructPlayer(this);
+
+ _expectingChangeTransport = false;
+ _pendingFlightChangeCounter = 0;
+ _mapChangeOrderCounter = 0;
}
Player::~Player()
@@ -825,9 +833,7 @@ int32 Player::getMaxTimer(MirrorTimerType timer)
if (!IsAlive() || HasWaterBreathingAura() || GetSession()->GetSecurity() >= AccountTypes(sWorld->getIntConfig(CONFIG_DISABLE_BREATHING)))
return DISABLED_MIRROR_TIMER;
int32 UnderWaterTime = sWorld->getIntConfig(CONFIG_WATER_BREATH_TIMER);
- AuraEffectList const& mModWaterBreathing = GetAuraEffectsByType(SPELL_AURA_MOD_WATER_BREATHING);
- for (AuraEffectList::const_iterator i = mModWaterBreathing.begin(); i != mModWaterBreathing.end(); ++i)
- AddPct(UnderWaterTime, (*i)->GetAmount());
+ UnderWaterTime *= GetTotalAuraMultiplier(SPELL_AURA_MOD_WATER_BREATHING);
return UnderWaterTime;
}
case FIRE_TIMER:
@@ -1337,9 +1343,10 @@ void Player::SendTeleportAckPacket()
{
WorldPacket data(MSG_MOVE_TELEPORT_ACK, 41);
data << GetPackGUID();
- data << uint32(0); // this value increments every time
+ data << GetSession()->GetOrderCounter(); // movement counter
BuildMovementPacket(&data);
- GetSession()->SendPacket(&data);
+ SendDirectMessage(&data);
+ GetSession()->IncrementOrderCounter();
}
bool Player::TeleportTo(uint32 mapid, float x, float y, float z, float orientation, uint32 options /*= 0*/, Unit* target /*= nullptr*/, bool newInstance /*= false*/)
@@ -1529,17 +1536,6 @@ bool Player::TeleportTo(uint32 mapid, float x, float y, float z, float orientati
CombatStop();
- // remove arena spell coldowns/buffs now to also remove pet's cooldowns before it's temporarily unsummoned
- if (mEntry->IsBattleArena() && (HasPendingSpectatorForBG(0) || !HasPendingSpectatorForBG(GetBattlegroundId())))
- {
- // KEEP THIS ORDER!
- RemoveArenaAuras();
- if (pet)
- pet->RemoveArenaAuras();
-
- RemoveArenaSpellCooldowns(true);
- }
-
// remove pet on map change
if (pet)
UnsummonPetTemporaryIfAny();
@@ -1556,6 +1552,8 @@ bool Player::TeleportTo(uint32 mapid, float x, float y, float z, float orientati
//remove auras before removing from map...
RemoveAurasWithInterruptFlags(AURA_INTERRUPT_FLAG_CHANGE_MAP | AURA_INTERRUPT_FLAG_MOVE | AURA_INTERRUPT_FLAG_TURNING);
+ SetMapChangeOrderCounter();
+
if (!GetSession()->PlayerLogout())
{
// send transfer packets
@@ -1564,24 +1562,13 @@ bool Player::TeleportTo(uint32 mapid, float x, float y, float z, float orientati
if (m_transport)
data << m_transport->GetEntry() << GetMapId();
- GetSession()->SendPacket(&data);
+ SendDirectMessage(&data);
}
// remove from old map now
if (oldmap)
oldmap->RemovePlayerFromMap(this, false);
- // xinef: do this before setting fall information!
- if (IsMounted() && (!GetMap()->GetEntry()->IsDungeon() && !GetMap()->GetEntry()->IsBattlegroundOrArena()) && !m_transport)
- {
- AuraEffectList const& auras = GetAuraEffectsByType(SPELL_AURA_MOUNTED);
- if (!auras.empty())
- {
- SetMountBlockId((*auras.begin())->GetId());
- RemoveAurasByType(SPELL_AURA_MOUNTED);
- }
- }
-
teleportStore_dest = WorldLocation(mapid, x, y, z, orientation);
SetFallInformation(GameTime::GetGameTime().count(), z);
// if the player is saved before worldportack (at logout for example)
@@ -1597,7 +1584,7 @@ bool Player::TeleportTo(uint32 mapid, float x, float y, float z, float orientati
else
data << teleportStore_dest.PositionXYZOStream();
- GetSession()->SendPacket(&data);
+ SendDirectMessage(&data);
SendSavedInstances();
}
@@ -1935,10 +1922,7 @@ void Player::Regenerate(Powers power)
// Mana regen calculated in Player::UpdateManaRegen(), energy regen calculated in Player::UpdateEnergyRegen()
if (power != POWER_MANA && power != POWER_ENERGY)
{
- AuraEffectList const& ModPowerRegenPCTAuras = GetAuraEffectsByType(SPELL_AURA_MOD_POWER_REGEN_PERCENT);
- for (AuraEffectList::const_iterator i = ModPowerRegenPCTAuras.begin(); i != ModPowerRegenPCTAuras.end(); ++i)
- if (Powers((*i)->GetMiscValue()) == power)
- AddPct(addvalue, (*i)->GetAmount());
+ addvalue *= GetTotalAuraMultiplierByMiscValue(SPELL_AURA_MOD_POWER_REGEN_PERCENT, power);
// Butchery requires combat for this effect
if (power != POWER_RUNIC_POWER || IsInCombat())
@@ -2021,11 +2005,7 @@ void Player::RegenerateHealth()
addvalue *= 1.33f;
}
- AuraEffectList const& mModHealthRegenPct = GetAuraEffectsByType(SPELL_AURA_MOD_HEALTH_REGEN_PERCENT);
- for (AuraEffectList::const_iterator i = mModHealthRegenPct.begin(); i != mModHealthRegenPct.end(); ++i)
- {
- AddPct(addvalue, (*i)->GetAmount());
- }
+ addvalue *= GetTotalAuraMultiplier(SPELL_AURA_MOD_HEALTH_REGEN_PERCENT);
if (!IsInCombat())
{
@@ -2086,7 +2066,7 @@ bool Player::CanInteractWithQuestGiver(Object* questGiver)
return false;
}
-Creature* Player::GetNPCIfCanInteractWith(ObjectGuid guid, uint32 npcflagmask)
+Creature* Player::GetNPCIfCanInteractWith(ObjectGuid const& guid, uint32 npcflagmask)
{
// unit checks
if (!guid)
@@ -2143,7 +2123,7 @@ Creature* Player::GetNPCIfCanInteractWith(ObjectGuid guid, uint32 npcflagmask)
return creature;
}
-GameObject* Player::GetGameObjectIfCanInteractWith(ObjectGuid guid, GameobjectTypes type) const
+GameObject* Player::GetGameObjectIfCanInteractWith(ObjectGuid const& guid, GameobjectTypes type) const
{
if (GameObject* go = GetMap()->GetGameObject(guid))
{
@@ -2379,7 +2359,7 @@ void Player::SendLogXPGain(uint32 GivenXP, Unit* victim, uint32 BonusXP, bool re
}
data << uint8(recruitAFriend ? 1 : 0); // does the GivenXP include a RaF bonus?
- GetSession()->SendPacket(&data);
+ SendDirectMessage(&data);
}
void Player::GiveXP(uint32 xp, Unit* victim, float group_rate, bool isLFGReward)
@@ -2499,6 +2479,7 @@ void Player::GiveLevel(uint8 level)
m_Played_time[PLAYED_TIME_LEVEL] = 0; // Level Played Time reset
_ApplyAllLevelScaleItemMods(false);
+ _RemoveAllAuraStatMods();
SetLevel(level);
@@ -2521,6 +2502,7 @@ void Player::GiveLevel(uint8 level)
UpdateSkillsToMaxSkillsForLevel();
_ApplyAllLevelScaleItemMods(true);
+ _ApplyAllAuraStatMods();
if (!isDead())
{
@@ -2677,14 +2659,14 @@ void Player::InitStatsForLevel(bool reapplyMods)
// set armor (resistance 0) to original value (create_agility*2)
SetArmor(int32(m_createStats[STAT_AGILITY] * 2));
- SetResistanceBuffMods(SpellSchools(0), true, 0.0f);
- SetResistanceBuffMods(SpellSchools(0), false, 0.0f);
+ SetFloatValue(UNIT_FIELD_RESISTANCEBUFFMODSPOSITIVE + AsUnderlyingType(SPELL_SCHOOL_NORMAL), 0.0f);
+ SetFloatValue(UNIT_FIELD_RESISTANCEBUFFMODSNEGATIVE + AsUnderlyingType(SPELL_SCHOOL_NORMAL), 0.0f);
// set other resistance to original value (0)
for (uint8 i = 1; i < MAX_SPELL_SCHOOL; ++i)
{
SetResistance(SpellSchools(i), 0);
- SetResistanceBuffMods(SpellSchools(i), true, 0.0f);
- SetResistanceBuffMods(SpellSchools(i), false, 0.0f);
+ SetFloatValue(UNIT_FIELD_RESISTANCEBUFFMODSPOSITIVE + i, 0.0f);
+ SetFloatValue(UNIT_FIELD_RESISTANCEBUFFMODSNEGATIVE + i, 0.0f);
}
SetUInt32Value(PLAYER_FIELD_MOD_TARGET_RESISTANCE, 0);
@@ -2854,7 +2836,7 @@ void Player::SendInitialSpells()
data << uint32(itr->second.category ? cooldown : 0); // category cooldown
}
- GetSession()->SendPacket(&data);
+ SendDirectMessage(&data);
}
void Player::RemoveMail(uint32 id)
@@ -2883,7 +2865,7 @@ void Player::SendMailResult(uint32 mailId, MailResponseType mailAction, MailResp
data << (uint32) item_guid; // item guid low?
data << (uint32) item_count; // item count?
}
- GetSession()->SendPacket(&data);
+ SendDirectMessage(&data);
}
void Player::SendNewMail()
@@ -2891,7 +2873,7 @@ void Player::SendNewMail()
// deliver undelivered mail
WorldPacket data(SMSG_RECEIVED_MAIL, 4);
data << (uint32) 0;
- GetSession()->SendPacket(&data);
+ SendDirectMessage(&data);
}
void Player::AddNewMailDeliverTime(time_t deliver_time)
@@ -3049,13 +3031,13 @@ void Player::SendLearnPacket(uint32 spellId, bool learn)
WorldPacket data(SMSG_LEARNED_SPELL, 6);
data << uint32(spellId);
data << uint16(0);
- GetSession()->SendPacket(&data);
+ SendDirectMessage(&data);
}
else
{
WorldPacket data(SMSG_REMOVED_SPELL, 4);
data << uint32(spellId);
- GetSession()->SendPacket(&data);
+ SendDirectMessage(&data);
}
}
@@ -3087,7 +3069,7 @@ bool Player::addSpell(uint32 spellId, uint8 addSpecMask, bool updateActive, bool
WorldPacket data(SMSG_SUPERCEDED_SPELL, 4 + 4);
data << uint32(nextSpellInfo->Id);
data << uint32(spellInfo->Id);
- GetSession()->SendPacket(&data);
+ SendDirectMessage(&data);
}
return false;
}
@@ -3800,7 +3782,7 @@ bool Player::resetTalents(bool noResetCost)
if (m_canTitanGrip)
SetCanTitanGrip(false);
// xinef: remove dual wield if player does not have dual wield spell (shamans)
- if (!HasSpell(674) && m_canDualWield)
+ if (!HasSpell(674) && CanDualWield())
SetCanDualWield(false);
AutoUnequipOffhandIfNeed();
@@ -4422,32 +4404,6 @@ void Player::DeleteOldRecoveryItems(uint32 keepDays)
}
}
-void Player::SetMovement(PlayerMovementType pType)
-{
- WorldPacket data;
- switch (pType)
- {
- case MOVE_ROOT:
- data.Initialize(SMSG_FORCE_MOVE_ROOT, GetPackGUID().size() + 4);
- break;
- case MOVE_UNROOT:
- data.Initialize(SMSG_FORCE_MOVE_UNROOT, GetPackGUID().size() + 4);
- break;
- case MOVE_WATER_WALK:
- data.Initialize(SMSG_MOVE_WATER_WALK, GetPackGUID().size() + 4);
- break;
- case MOVE_LAND_WALK:
- data.Initialize(SMSG_MOVE_LAND_WALK, GetPackGUID().size() + 4);
- break;
- default:
- LOG_ERROR("entities.player", "Player::SetMovement: Unsupported move type ({}), data not sent to client.", pType);
- return;
- }
- data << GetPackGUID();
- data << uint32(0);
- GetSession()->SendPacket(&data);
-}
-
/* Preconditions:
- a resurrectable corpse must not be loaded for the player (only bones)
- the player must be in world
@@ -4456,7 +4412,7 @@ void Player::BuildPlayerRepop()
{
WorldPacket data(SMSG_PRE_RESURRECT, GetPackGUID().size());
data << GetPackGUID();
- GetSession()->SendPacket(&data);
+ SendDirectMessage(&data);
if (getRace(true) == RACE_NIGHTELF)
{
CastSpell(this, 20584, true);
@@ -4483,12 +4439,11 @@ void Player::BuildPlayerRepop()
}
GetMap()->AddToMap(corpse);
SetHealth(1); // convert player body to ghost
- SetMovement(MOVE_WATER_WALK);
SetWaterWalking(true);
- if (!GetSession()->isLogingOut())
- {
- SetMovement(MOVE_UNROOT);
- }
+
+ if (!IsImmobilizedState())
+ SendMoveRoot(false);
+
RemoveUnitFlag(UNIT_FLAG_SKINNABLE); // BG - remove insignia related
int32 corpseReclaimDelay = CalculateCorpseReclaimDelay();
if (corpseReclaimDelay >= 0)
@@ -4511,7 +4466,7 @@ void Player::ResurrectPlayer(float restore_percent, bool applySickness)
data << float(0);
data << float(0);
data << float(0);
- GetSession()->SendPacket(&data);
+ SendDirectMessage(&data);
// speed change, land walk
@@ -4524,8 +4479,7 @@ void Player::ResurrectPlayer(float restore_percent, bool applySickness)
SetDynamicFlag(UNIT_DYNFLAG_REFER_A_FRIEND);
setDeathState(DeathState::Alive);
- SetMovement(MOVE_LAND_WALK);
- SetMovement(MOVE_UNROOT);
+ SendMoveRoot(false);
SetWaterWalking(false);
m_deathTimer = 0;
@@ -4589,7 +4543,7 @@ void Player::KillPlayer()
if (IsFlying() && !GetTransport())
GetMotionMaster()->MoveFall();
- SetMovement(MOVE_ROOT);
+ SendMoveRoot(true);
StopMirrorTimers(); //disable timers(bars)
@@ -4616,7 +4570,7 @@ void Player::KillPlayer()
//UpdateObjectVisibility(); // pussywizard: not needed
}
-void Player::OfflineResurrect(ObjectGuid const guid, CharacterDatabaseTransaction trans)
+void Player::OfflineResurrect(ObjectGuid const& guid, CharacterDatabaseTransaction trans)
{
Corpse::DeleteFromDB(guid, trans);
CharacterDatabasePreparedStatement* stmt = CharacterDatabase.GetPreparedStatement(CHAR_UPD_ADD_AT_LOGIN_FLAG);
@@ -4998,7 +4952,7 @@ void Player::RepopAtGraveyard()
data << ClosestGrave->x;
data << ClosestGrave->y;
data << ClosestGrave->z;
- GetSession()->SendPacket(&data);
+ SendDirectMessage(&data);
}
}
else if (GetPositionZ() < GetMap()->GetMinHeight(GetPositionX(), GetPositionY()))
@@ -5051,24 +5005,107 @@ void Player::ClearChannelWatch()
(*itr)->RemoveWatching(this);
}
-void Player::HandleBaseModValue(BaseModGroup modGroup, BaseModType modType, float amount, bool apply)
+void Player::HandleBaseModFlatValue(BaseModGroup modGroup, float amount, bool apply)
{
if (modGroup >= BASEMOD_END)
{
- LOG_ERROR("entities.player", "ERROR in HandleBaseModValue(): non existed BaseModGroup!");
+ LOG_ERROR("entities.player", "Player::HandleBaseModFlatValue: Invalid BaseModGroup/BaseModType ({}/{}) for player '{}' ({})",
+ modGroup, FLAT_MOD, GetName(), GetGUID().ToString());
return;
}
- switch (modType)
+ m_auraBaseFlatMod[modGroup] += apply ? amount : -amount;
+ UpdateBaseModGroup(modGroup);
+}
+
+void Player::ApplyBaseModPctValue(BaseModGroup modGroup, float pct)
+{
+ if (modGroup >= BASEMOD_END)
{
- case FLAT_MOD:
- m_auraBaseMod[modGroup][modType] += apply ? amount : -amount;
+ LOG_ERROR("entities.player", "Player::ApplyBaseModPctValue: Invalid BaseModGroup/BaseModType ({}/{}) for player '{}' ({})",
+ modGroup, PCT_MOD, GetName(), GetGUID().ToString());
+ return;
+ }
+
+ m_auraBasePctMod[modGroup] += CalculatePct(1.0f, pct);
+ UpdateBaseModGroup(modGroup);
+}
+
+void Player::SetBaseModFlatValue(BaseModGroup modGroup, float val)
+{
+ if (m_auraBaseFlatMod[modGroup] == val)
+ return;
+
+ m_auraBaseFlatMod[modGroup] = val;
+ UpdateBaseModGroup(modGroup);
+}
+
+void Player::SetBaseModPctValue(BaseModGroup modGroup, float val)
+{
+ if (m_auraBasePctMod[modGroup] == val)
+ return;
+
+ m_auraBasePctMod[modGroup] = val;
+ UpdateBaseModGroup(modGroup);
+}
+
+void Player::UpdateDamageDoneMods(WeaponAttackType attackType, int32 skipEnchantSlot /*= -1*/)
+{
+ Unit::UpdateDamageDoneMods(attackType, skipEnchantSlot);
+
+ UnitMods unitMod;
+ switch (attackType)
+ {
+ case BASE_ATTACK:
+ unitMod = UNIT_MOD_DAMAGE_MAINHAND;
+ break;
+ case OFF_ATTACK:
+ unitMod = UNIT_MOD_DAMAGE_OFFHAND;
+ break;
+ case RANGED_ATTACK:
+ unitMod = UNIT_MOD_DAMAGE_RANGED;
break;
- case PCT_MOD:
- ApplyPercentModFloatVar(m_auraBaseMod[modGroup][modType], amount, apply);
+ default:
+ ABORT();
break;
}
+ float amount = 0.0f;
+ Item* item = GetWeaponForAttack(attackType, true);
+ if (!item)
+ return;
+
+ for (uint8 slot = 0; slot < MAX_ENCHANTMENT_SLOT; ++slot)
+ {
+ if (skipEnchantSlot == slot)
+ continue;
+
+ SpellItemEnchantmentEntry const* enchantmentEntry = sSpellItemEnchantmentStore.LookupEntry(item->GetEnchantmentId(EnchantmentSlot(slot)));
+ if (!enchantmentEntry)
+ continue;
+
+ for (uint8 i = 0; i < MAX_SPELL_ITEM_ENCHANTMENT_EFFECTS; ++i)
+ {
+ switch (enchantmentEntry->type[i])
+ {
+ case ITEM_ENCHANTMENT_TYPE_DAMAGE:
+ amount += enchantmentEntry->amount[i];
+ break;
+ case ITEM_ENCHANTMENT_TYPE_TOTEM:
+ if (IsClass(CLASS_SHAMAN, CLASS_CONTEXT_ABILITY))
+ amount += enchantmentEntry->amount[i] * item->GetTemplate()->Delay / 1000.0f;
+ break;
+ default:
+ break;
+ }
+ }
+ }
+
+ HandleStatFlatModifier(unitMod, TOTAL_VALUE, amount, true);
+}
+
+void Player::UpdateBaseModGroup(BaseModGroup modGroup)
+{
if (!CanModifyStats())
return;
@@ -5099,10 +5136,7 @@ float Player::GetBaseModValue(BaseModGroup modGroup, BaseModType modType) const
return 0.0f;
}
- if (modType == PCT_MOD && m_auraBaseMod[modGroup][PCT_MOD] <= 0.0f)
- return 0.0f;
-
- return m_auraBaseMod[modGroup][modType];
+ return (modType == FLAT_MOD ? m_auraBaseFlatMod[modGroup] : m_auraBasePctMod[modGroup]);
}
float Player::GetTotalBaseModValue(BaseModGroup modGroup) const
@@ -5113,15 +5147,15 @@ float Player::GetTotalBaseModValue(BaseModGroup modGroup) const
return 0.0f;
}
- if (m_auraBaseMod[modGroup][PCT_MOD] <= 0.0f)
+ if (m_auraBasePctMod[modGroup] <= 0.0f)
return 0.0f;
- return m_auraBaseMod[modGroup][FLAT_MOD] * m_auraBaseMod[modGroup][PCT_MOD];
+ return m_auraBaseFlatMod[modGroup] * m_auraBasePctMod[modGroup];
}
uint32 Player::GetShieldBlockValue() const
{
- float value = (m_auraBaseMod[SHIELD_BLOCK_VALUE][FLAT_MOD] + GetStat(STAT_STRENGTH) * 0.5f - 10) * m_auraBaseMod[SHIELD_BLOCK_VALUE][PCT_MOD];
+ float value = (m_auraBaseFlatMod[SHIELD_BLOCK_VALUE] + GetStat(STAT_STRENGTH) * 0.5f - 10) * m_auraBasePctMod[SHIELD_BLOCK_VALUE];
value = (value < 0) ? 0 : value;
@@ -5190,7 +5224,7 @@ void Player::GetDodgeFromAgility(float& diminishing, float& nondiminishing)
return;
/// @todo: research if talents/effects that increase total agility by x% should increase non-diminishing part
- float base_agility = GetCreateStat(STAT_AGILITY) * m_auraModifiersGroup[UNIT_MOD_STAT_START + static_cast<uint16>(STAT_AGILITY)][BASE_PCT];
+ float base_agility = GetCreateStat(STAT_AGILITY) * GetPctModifierValue(UnitMods(UNIT_MOD_STAT_START + AsUnderlyingType(STAT_AGILITY)), BASE_PCT);
float bonus_agility = GetStat(STAT_AGILITY) - base_agility;
// calculate diminishing (green in char screen) and non-diminishing (white) contribution
@@ -5608,7 +5642,7 @@ void Player::SendActionButtons(uint32 state) const
}
}
- GetSession()->SendPacket(&data);
+ SendDirectMessage(&data);
LOG_DEBUG("entities.player", "Action Buttons for {} spec {} Sent", GetGUID().ToString(), m_activeSpec);
}
@@ -6235,7 +6269,7 @@ bool Player::RewardHonor(Unit* uVictim, uint32 groupsize, int32 honor, bool awar
// Xinef: non quest case, quest honor obtain is send in quest reward packet
if (uVictim || groupsize > 0)
- GetSession()->SendPacket(&data);
+ SendDirectMessage(&data);
// add honor points
ModifyHonorPoints(honor);
@@ -6428,7 +6462,7 @@ void Player::CheckDuelDistance(time_t currTime)
duel->OutOfBoundsTime = currTime + 10;
WorldPacket data(SMSG_DUEL_OUTOFBOUNDS, 0);
- GetSession()->SendPacket(&data);
+ SendDirectMessage(&data);
}
}
else
@@ -6438,7 +6472,7 @@ void Player::CheckDuelDistance(time_t currTime)
duel->OutOfBoundsTime = 0;
WorldPacket data(SMSG_DUEL_INBOUNDS, 0);
- GetSession()->SendPacket(&data);
+ SendDirectMessage(&data);
}
else if (currTime >= duel->OutOfBoundsTime)
DuelComplete(DUEL_FLED);
@@ -6613,20 +6647,22 @@ void Player::_ApplyItemMods(Item* item, uint8 slot, bool apply)
LOG_DEBUG("entities.player", "applying mods for item {} ", item->GetGUID().ToString());
- uint8 attacktype = Player::GetAttackBySlot(slot);
-
if (item->HasSocket()) //only (un)equipping of items with sockets can influence metagems, so no need to waste time with normal items
CorrectMetaGemEnchants(slot, apply);
- if (attacktype < MAX_ATTACK)
- _ApplyWeaponDependentAuraMods(item, WeaponAttackType(attacktype), apply);
-
_ApplyItemBonuses(proto, slot, apply);
if (slot == EQUIPMENT_SLOT_RANGED)
_ApplyAmmoBonuses();
ApplyItemEquipSpell(item, apply);
+
+ ApplyItemDependentAuras(item, apply);
+
+ WeaponAttackType const attackType = Player::GetAttackBySlot(slot);
+ if (attackType != MAX_ATTACK)
+ UpdateWeaponDependentAuras(attackType);
+
ApplyEnchantment(item, apply);
LOG_DEBUG("entities.player.items", "_ApplyItemMods complete.");
@@ -6697,30 +6733,30 @@ void Player::_ApplyItemBonuses(ItemTemplate const* proto, uint8 slot, bool apply
switch (statType)
{
case ITEM_MOD_MANA:
- HandleStatModifier(UNIT_MOD_MANA, BASE_VALUE, float(val), apply);
+ HandleStatFlatModifier(UNIT_MOD_MANA, BASE_VALUE, float(val), apply);
break;
case ITEM_MOD_HEALTH: // modify HP
- HandleStatModifier(UNIT_MOD_HEALTH, BASE_VALUE, float(val), apply);
+ HandleStatFlatModifier(UNIT_MOD_HEALTH, BASE_VALUE, float(val), apply);
break;
case ITEM_MOD_AGILITY: // modify agility
- HandleStatModifier(UNIT_MOD_STAT_AGILITY, BASE_VALUE, float(val), apply);
- ApplyStatBuffMod(STAT_AGILITY, float(val), apply);
+ HandleStatFlatModifier(UNIT_MOD_STAT_AGILITY, BASE_VALUE, float(val), apply);
+ UpdateStatBuffMod(STAT_AGILITY);
break;
case ITEM_MOD_STRENGTH: //modify strength
- HandleStatModifier(UNIT_MOD_STAT_STRENGTH, BASE_VALUE, float(val), apply);
- ApplyStatBuffMod(STAT_STRENGTH, float(val), apply);
+ HandleStatFlatModifier(UNIT_MOD_STAT_STRENGTH, BASE_VALUE, float(val), apply);
+ UpdateStatBuffMod(STAT_STRENGTH);
break;
case ITEM_MOD_INTELLECT: //modify intellect
- HandleStatModifier(UNIT_MOD_STAT_INTELLECT, BASE_VALUE, float(val), apply);
- ApplyStatBuffMod(STAT_INTELLECT, float(val), apply);
+ HandleStatFlatModifier(UNIT_MOD_STAT_INTELLECT, BASE_VALUE, float(val), apply);
+ UpdateStatBuffMod(STAT_INTELLECT);
break;
case ITEM_MOD_SPIRIT: //modify spirit
- HandleStatModifier(UNIT_MOD_STAT_SPIRIT, BASE_VALUE, float(val), apply);
- ApplyStatBuffMod(STAT_SPIRIT, float(val), apply);
+ HandleStatFlatModifier(UNIT_MOD_STAT_SPIRIT, BASE_VALUE, float(val), apply);
+ UpdateStatBuffMod(STAT_SPIRIT);
break;
case ITEM_MOD_STAMINA: //modify stamina
- HandleStatModifier(UNIT_MOD_STAT_STAMINA, BASE_VALUE, float(val), apply);
- ApplyStatBuffMod(STAT_STAMINA, float(val), apply);
+ HandleStatFlatModifier(UNIT_MOD_STAT_STAMINA, BASE_VALUE, float(val), apply);
+ UpdateStatBuffMod(STAT_STAMINA);
break;
case ITEM_MOD_DEFENSE_SKILL_RATING:
ApplyRatingMod(CR_DEFENSE_SKILL, int32(val), apply);
@@ -6809,11 +6845,11 @@ void Player::_ApplyItemBonuses(ItemTemplate const* proto, uint8 slot, bool apply
ApplyRatingMod(CR_EXPERTISE, int32(val), apply);
break;
case ITEM_MOD_ATTACK_POWER:
- HandleStatModifier(UNIT_MOD_ATTACK_POWER, TOTAL_VALUE, float(val), apply);
- HandleStatModifier(UNIT_MOD_ATTACK_POWER_RANGED, TOTAL_VALUE, float(val), apply);
+ HandleStatFlatModifier(UNIT_MOD_ATTACK_POWER, TOTAL_VALUE, float(val), apply);
+ HandleStatFlatModifier(UNIT_MOD_ATTACK_POWER_RANGED, TOTAL_VALUE, float(val), apply);
break;
case ITEM_MOD_RANGED_ATTACK_POWER:
- HandleStatModifier(UNIT_MOD_ATTACK_POWER_RANGED, TOTAL_VALUE, float(val), apply);
+ HandleStatFlatModifier(UNIT_MOD_ATTACK_POWER_RANGED, TOTAL_VALUE, float(val), apply);
break;
// case ITEM_MOD_FERAL_ATTACK_POWER:
// ApplyFeralAPBonus(int32(val), apply);
@@ -6834,7 +6870,7 @@ void Player::_ApplyItemBonuses(ItemTemplate const* proto, uint8 slot, bool apply
ApplySpellPenetrationBonus(val, apply);
break;
case ITEM_MOD_BLOCK_VALUE:
- HandleBaseModValue(SHIELD_BLOCK_VALUE, FLAT_MOD, float(val), apply);
+ HandleBaseModFlatValue(SHIELD_BLOCK_VALUE, float(val), apply);
break;
/// @deprecated item mods
case ITEM_MOD_SPELL_HEALING_DONE:
@@ -6864,7 +6900,7 @@ void Player::_ApplyItemBonuses(ItemTemplate const* proto, uint8 slot, bool apply
if (armor)
{
- UnitModifierType modType = TOTAL_VALUE;
+ UnitModifierFlatType modType = TOTAL_VALUE;
if (proto->Class == ITEM_CLASS_ARMOR)
{
switch (proto->SubClass)
@@ -6878,35 +6914,35 @@ void Player::_ApplyItemBonuses(ItemTemplate const* proto, uint8 slot, bool apply
break;
}
}
- HandleStatModifier(UNIT_MOD_ARMOR, modType, float(armor), apply);
+ HandleStatFlatModifier(UNIT_MOD_ARMOR, modType, float(armor), apply);
}
// Add armor bonus from ArmorDamageModifier if > 0
if (proto->ArmorDamageModifier > 0 && sScriptMgr->OnPlayerCanArmorDamageModifier(this))
- HandleStatModifier(UNIT_MOD_ARMOR, TOTAL_VALUE, float(proto->ArmorDamageModifier), apply);
+ HandleStatFlatModifier(UNIT_MOD_ARMOR, TOTAL_VALUE, float(proto->ArmorDamageModifier), apply);
if (proto->Block)
- HandleBaseModValue(SHIELD_BLOCK_VALUE, FLAT_MOD, float(proto->Block), apply);
+ HandleBaseModFlatValue(SHIELD_BLOCK_VALUE, float(proto->Block), apply);
if (proto->HolyRes)
- HandleStatModifier(UNIT_MOD_RESISTANCE_HOLY, BASE_VALUE, float(proto->HolyRes), apply);
+ HandleStatFlatModifier(UNIT_MOD_RESISTANCE_HOLY, BASE_VALUE, float(proto->HolyRes), apply);
if (proto->FireRes)
- HandleStatModifier(UNIT_MOD_RESISTANCE_FIRE, BASE_VALUE, float(proto->FireRes), apply);
+ HandleStatFlatModifier(UNIT_MOD_RESISTANCE_FIRE, BASE_VALUE, float(proto->FireRes), apply);
if (proto->NatureRes)
- HandleStatModifier(UNIT_MOD_RESISTANCE_NATURE, BASE_VALUE, float(proto->NatureRes), apply);
+ HandleStatFlatModifier(UNIT_MOD_RESISTANCE_NATURE, BASE_VALUE, float(proto->NatureRes), apply);
if (proto->FrostRes)
- HandleStatModifier(UNIT_MOD_RESISTANCE_FROST, BASE_VALUE, float(proto->FrostRes), apply);
+ HandleStatFlatModifier(UNIT_MOD_RESISTANCE_FROST, BASE_VALUE, float(proto->FrostRes), apply);
if (proto->ShadowRes)
- HandleStatModifier(UNIT_MOD_RESISTANCE_SHADOW, BASE_VALUE, float(proto->ShadowRes), apply);
+ HandleStatFlatModifier(UNIT_MOD_RESISTANCE_SHADOW, BASE_VALUE, float(proto->ShadowRes), apply);
if (proto->ArcaneRes)
- HandleStatModifier(UNIT_MOD_RESISTANCE_ARCANE, BASE_VALUE, float(proto->ArcaneRes), apply);
+ HandleStatFlatModifier(UNIT_MOD_RESISTANCE_ARCANE, BASE_VALUE, float(proto->ArcaneRes), apply);
- uint8 attType = Player::GetAttackBySlot(slot);
+ WeaponAttackType attType = Player::GetAttackBySlot(slot);
if (attType != MAX_ATTACK)
{
_ApplyWeaponDamage(slot, proto, ssv, apply);
@@ -6953,7 +6989,7 @@ void Player::_ApplyWeaponDamage(uint8 slot, ItemTemplate const* proto, ScalingSt
ssv = ScalingStatValue ? sScalingStatValuesStore.LookupEntry(ssd_level) : nullptr;
}
- uint8 attType = Player::GetAttackBySlot(slot);
+ WeaponAttackType attType = Player::GetAttackBySlot(slot);
if (!IsInFeralForm() && apply && !CanUseAttackType(attType))
{
return;
@@ -6984,12 +7020,12 @@ void Player::_ApplyWeaponDamage(uint8 slot, ItemTemplate const* proto, ScalingSt
if (minDamage > 0.f)
{
- SetBaseWeaponDamage(WeaponAttackType(attType), MINDAMAGE, minDamage, i);
+ SetBaseWeaponDamage(attType, MINDAMAGE, minDamage, i);
}
if (maxDamage > 0.f)
{
- SetBaseWeaponDamage(WeaponAttackType(attType), MAXDAMAGE, maxDamage, i);
+ SetBaseWeaponDamage(attType, MAXDAMAGE, maxDamage, i);
}
}
}
@@ -6998,8 +7034,8 @@ void Player::_ApplyWeaponDamage(uint8 slot, ItemTemplate const* proto, ScalingSt
{
for (uint8 i = 0; i < MAX_ITEM_PROTO_DAMAGES; ++i)
{
- SetBaseWeaponDamage(WeaponAttackType(attType), MINDAMAGE, 0.f, i);
- SetBaseWeaponDamage(WeaponAttackType(attType), MAXDAMAGE, 0.f, i);
+ SetBaseWeaponDamage(attType, MINDAMAGE, 0.f, i);
+ SetBaseWeaponDamage(attType, MAXDAMAGE, 0.f, i);
}
if (attType == BASE_ATTACK)
@@ -7023,8 +7059,8 @@ void Player::_ApplyWeaponDamage(uint8 slot, ItemTemplate const* proto, ScalingSt
if (IsInFeralForm())
return;
- if (CanModifyStats() && (GetWeaponDamageRange(WeaponAttackType(attType), MAXDAMAGE) || proto->Delay))
- UpdateDamagePhysical(WeaponAttackType(attType));
+ if (CanModifyStats() && (GetWeaponDamageRange(attType, MAXDAMAGE) || proto->Delay))
+ UpdateDamagePhysical(attType);
}
void Player::CastAllObtainSpells()
@@ -7075,118 +7111,108 @@ void Player::UpdateItemObtainSpells(Item* item, uint8 bag, uint8 slot)
ApplyItemObtainSpells(item, true);
}
-SpellSchoolMask Player::GetMeleeDamageSchoolMask(WeaponAttackType attackType /*= BASE_ATTACK*/, uint8 damageIndex /*= 0*/) const
+// this one rechecks weapon auras and stores them in BaseModGroup container
+// needed for things like axe specialization applying only to axe weapons in case of dual-wield
+void Player::UpdateWeaponDependentCritAuras(WeaponAttackType attackType)
{
- if (Item const* weapon = GetWeaponForAttack(attackType, true))
+ BaseModGroup modGroup;
+ switch (attackType)
{
- return SpellSchoolMask(1 << weapon->GetTemplate()->Damage[damageIndex].DamageType);
+ case BASE_ATTACK:
+ modGroup = CRIT_PERCENTAGE;
+ break;
+ case OFF_ATTACK:
+ modGroup = OFFHAND_CRIT_PERCENTAGE;
+ break;
+ case RANGED_ATTACK:
+ modGroup = RANGED_CRIT_PERCENTAGE;
+ break;
+ default:
+ ABORT();
+ break;
}
- return SPELL_SCHOOL_MASK_NORMAL;
+ float amount = 0.0f;
+ amount += GetTotalAuraModifier(SPELL_AURA_MOD_WEAPON_CRIT_PERCENT, std::bind(&Unit::CheckAttackFitToAuraRequirement, this, attackType, std::placeholders::_1));
+
+ // these auras don't have item requirement (only Combat Expertise in 3.3.5a)
+ amount += GetTotalAuraModifier(SPELL_AURA_MOD_CRIT_PCT);
+
+ SetBaseModFlatValue(modGroup, amount);
}
-void Player::_ApplyWeaponDependentAuraMods(Item* item, WeaponAttackType attackType, bool apply)
+void Player::UpdateAllWeaponDependentCritAuras()
{
- AuraEffectList const& auraCritList = GetAuraEffectsByType(SPELL_AURA_MOD_WEAPON_CRIT_PERCENT);
- for (AuraEffectList::const_iterator itr = auraCritList.begin(); itr != auraCritList.end(); ++itr)
- _ApplyWeaponDependentAuraCritMod(item, attackType, *itr, apply);
-
- AuraEffectList const& auraDamageFlatList = GetAuraEffectsByType(SPELL_AURA_MOD_DAMAGE_DONE);
- for (AuraEffectList::const_iterator itr = auraDamageFlatList.begin(); itr != auraDamageFlatList.end(); ++itr)
- _ApplyWeaponDependentAuraDamageMod(item, attackType, *itr, apply);
+ for (uint8 i = BASE_ATTACK; i < MAX_ATTACK; ++i)
+ UpdateWeaponDependentCritAuras(WeaponAttackType(i));
+}
- AuraEffectList const& auraDamagePctList = GetAuraEffectsByType(SPELL_AURA_MOD_DAMAGE_PERCENT_DONE);
- for (AuraEffectList::const_iterator itr = auraDamagePctList.begin(); itr != auraDamagePctList.end(); ++itr)
- _ApplyWeaponDependentAuraDamageMod(item, attackType, *itr, apply);
+void Player::UpdateWeaponDependentAuras(WeaponAttackType attackType)
+{
+ UpdateWeaponDependentCritAuras(attackType);
+ UpdateDamageDoneMods(attackType);
+ UpdateDamagePctDoneMods(attackType);
}
-void Player::_ApplyWeaponDependentAuraCritMod(Item* item, WeaponAttackType attackType, AuraEffect const* aura, bool apply)
+void Player::ApplyItemDependentAuras(Item* item, bool apply)
{
- // don't apply mod if item is broken or cannot be used
- if (item->IsBroken() || !CanUseAttackType(attackType))
- return;
+ if (apply)
+ {
+ for (auto [spellId, playerSpell]: GetSpellMap())
+ {
+ if (playerSpell->State == PLAYERSPELL_REMOVED)
+ continue;
- // generic not weapon specific case processes in aura code
- if (aura->GetSpellInfo()->EquippedItemClass == -1)
- return;
+ SpellInfo const* spellInfo = sSpellMgr->GetSpellInfo(spellId);
+ if (!spellInfo || !spellInfo->IsPassive() || spellInfo->EquippedItemClass < 0)
+ continue;
- if (!sScriptMgr->OnPlayerCanApplyWeaponDependentAuraDamageMod(this, item, attackType, aura, apply))
- return;
+ if (!HasAura(spellId) && HasItemFitToSpellRequirements(spellInfo))
+ AddAura(spellId, this); // no SMSG_SPELL_GO in sniff found
+ }
- BaseModGroup mod = BASEMOD_END;
- switch (attackType)
- {
- case BASE_ATTACK:
- mod = CRIT_PERCENTAGE;
- break;
- case OFF_ATTACK:
- mod = OFFHAND_CRIT_PERCENTAGE;
- break;
- case RANGED_ATTACK:
- mod = RANGED_CRIT_PERCENTAGE;
- break;
- default:
- return;
- }
+ // Check talents (they are stored separately from regular spells)
+ for (auto [spellId, playerTalent] : GetTalentMap())
+ {
+ if (playerTalent->State == PLAYERSPELL_REMOVED)
+ continue;
+
+ if (!(playerTalent->IsInSpec(GetActiveSpec())))
+ continue;
- if (item->IsFitToSpellRequirements(aura->GetSpellInfo()))
- HandleBaseModValue(mod, FLAT_MOD, float (aura->GetAmount()), apply);
+ SpellInfo const* spellInfo = sSpellMgr->GetSpellInfo(spellId);
+ if (!spellInfo || !spellInfo->IsPassive() || spellInfo->EquippedItemClass < 0)
+ continue;
+
+ if (!HasAura(spellId) && HasItemFitToSpellRequirements(spellInfo))
+ AddAura(spellId, this);
+ }
+ }
+ else
+ RemoveItemDependentAurasAndCasts(item);
}
-void Player::_ApplyWeaponDependentAuraDamageMod(Item* item, WeaponAttackType attackType, AuraEffect const* aura, bool apply)
+bool Player::CheckAttackFitToAuraRequirement(WeaponAttackType attackType, AuraEffect const* aurEff) const
{
- // don't apply mod if item is broken or cannot be used
- if (item->IsBroken() || !CanUseAttackType(attackType))
- return;
-
- // ignore spell mods for not wands
- if ((aura->GetMiscValue() & SPELL_SCHOOL_MASK_NORMAL) == 0 && (getClassMask() & CLASSMASK_WAND_USERS) == 0)
- return;
+ SpellInfo const* spellInfo = aurEff->GetSpellInfo();
+ if (spellInfo->EquippedItemClass == -1)
+ return true;
- // generic not weapon specific case processes in aura code
- if (aura->GetSpellInfo()->EquippedItemClass == -1)
- return;
+ Item* item = GetWeaponForAttack(attackType, true);
+ if (!item || !item->IsFitToSpellRequirements(spellInfo))
+ return false;
- UnitMods unitMod = UNIT_MOD_END;
- switch (attackType)
- {
- case BASE_ATTACK:
- unitMod = UNIT_MOD_DAMAGE_MAINHAND;
- break;
- case OFF_ATTACK:
- unitMod = UNIT_MOD_DAMAGE_OFFHAND;
- break;
- case RANGED_ATTACK:
- unitMod = UNIT_MOD_DAMAGE_RANGED;
- break;
- default:
- return;
- }
+ return true;
+}
- UnitModifierType unitModType = TOTAL_VALUE;
- switch (aura->GetAuraType())
+SpellSchoolMask Player::GetMeleeDamageSchoolMask(WeaponAttackType attackType /*= BASE_ATTACK*/, uint8 damageIndex /*= 0*/) const
+{
+ if (Item const* weapon = GetWeaponForAttack(attackType, true))
{
- case SPELL_AURA_MOD_DAMAGE_DONE:
- unitModType = TOTAL_VALUE;
- break;
- case SPELL_AURA_MOD_DAMAGE_PERCENT_DONE:
- unitModType = TOTAL_PCT;
- break;
- default:
- return;
+ return SpellSchoolMask(1 << weapon->GetTemplate()->Damage[damageIndex].DamageType);
}
- if (item->IsFitToSpellRequirements(aura->GetSpellInfo()))
- {
- HandleStatModifier(unitMod, unitModType, float(aura->GetAmount()), apply);
- if (unitModType == TOTAL_VALUE)
- {
- if (aura->GetAmount() > 0)
- ApplyModUInt32Value(PLAYER_FIELD_MOD_DAMAGE_DONE_POS, aura->GetAmount(), apply);
- else
- ApplyModUInt32Value(PLAYER_FIELD_MOD_DAMAGE_DONE_NEG, aura->GetAmount(), apply);
- }
- }
+ return SPELL_SCHOOL_MASK_NORMAL;
}
void Player::ApplyItemEquipSpell(Item* item, bool apply, bool form_change)
@@ -7503,12 +7529,6 @@ void Player::CastItemUseSpell(Item* item, SpellCastTargets const& targets, uint8
continue;
}
- if (!spellInfo->CheckElixirStacking(this))
- {
- Spell::SendCastResult(this, spellInfo, cast_count, SPELL_FAILED_AURA_BOUNCED);
- continue;
- }
-
Spell* spell = new Spell(this, spellInfo, (count > 0) ? TRIGGERED_FULL_MASK : TRIGGERED_NONE);
spell->m_CastItem = item;
spell->m_cast_count = cast_count; // set count of casts
@@ -7617,10 +7637,7 @@ void Player::_RemoveAllItemMods()
if (!proto)
continue;
- uint32 attacktype = Player::GetAttackBySlot(i);
- if (attacktype < MAX_ATTACK)
- _ApplyWeaponDependentAuraMods(m_items[i], WeaponAttackType(attacktype), false);
-
+ ApplyItemDependentAuras(m_items[i], false);
_ApplyItemBonuses(proto, i, false);
if (i == EQUIPMENT_SLOT_RANGED)
@@ -7646,12 +7663,13 @@ void Player::_ApplyAllItemMods()
if (!proto)
continue;
- uint32 attacktype = Player::GetAttackBySlot(i);
- if (attacktype < MAX_ATTACK)
- _ApplyWeaponDependentAuraMods(m_items[i], WeaponAttackType(attacktype), true);
-
+ ApplyItemDependentAuras(m_items[i], true);
_ApplyItemBonuses(proto, i, true);
+ WeaponAttackType const attackType = Player::GetAttackBySlot(i);
+ if (attackType != MAX_ATTACK)
+ UpdateWeaponDependentAuras(attackType);
+
if (i == EQUIPMENT_SLOT_RANGED)
_ApplyAmmoBonuses();
}
@@ -7801,7 +7819,7 @@ void Player::SendQuestGiverStatusMultiple()
});
data.put<uint32>(0, count); // write real count
- GetSession()->SendPacket(&data);
+ SendDirectMessage(&data);
}
/* If in a battleground a player dies, and an enemy removes the insignia, the player's bones is lootable
@@ -7876,7 +7894,9 @@ void Player::SendLoot(ObjectGuid guid, LootType loot_type)
// And permit out of range GO with no owner in case fishing hole
if (!go || (loot_type != LOOT_FISHINGHOLE && ((loot_type != LOOT_FISHING && loot_type != LOOT_FISHING_JUNK) || go->GetOwnerGUID() != GetGUID()) && !go->IsWithinDistInMap(this)) || (loot_type == LOOT_CORPSE && go->GetRespawnTime() && go->isSpawnedByDefault()))
{
- go->ForceValuesUpdateAtIndex(GAMEOBJECT_BYTES_1);
+ if (go)
+ go->ForceValuesUpdateAtIndex(GAMEOBJECT_BYTES_1);
+
SendLootRelease(guid);
return;
}
@@ -8248,14 +8268,14 @@ void Player::SendLootError(ObjectGuid guid, LootError error)
void Player::SendNotifyLootMoneyRemoved()
{
WorldPacket data(SMSG_LOOT_CLEAR_MONEY, 0);
- GetSession()->SendPacket(&data);
+ SendDirectMessage(&data);
}
void Player::SendNotifyLootItemRemoved(uint8 lootSlot)
{
WorldPacket data(SMSG_LOOT_REMOVED, 1);
data << uint8(lootSlot);
- GetSession()->SendPacket(&data);
+ SendDirectMessage(&data);
}
// TODO - InitWorldStates should NOT always send the same states
@@ -8960,7 +8980,7 @@ void Player::SetBindPoint(ObjectGuid guid)
{
WorldPacket data(SMSG_BINDER_CONFIRM, 8);
data << guid;
- GetSession()->SendPacket(&data);
+ SendDirectMessage(&data);
}
void Player::SendTalentWipeConfirm(ObjectGuid guid)
@@ -8969,7 +8989,7 @@ void Player::SendTalentWipeConfirm(ObjectGuid guid)
data << guid;
uint32 cost = sWorld->getBoolConfig(CONFIG_NO_RESET_TALENT_COST) ? 0 : resetTalentsCost();
data << cost;
- GetSession()->SendPacket(&data);
+ SendDirectMessage(&data);
}
void Player::ResetPetTalents()
@@ -9014,7 +9034,7 @@ Pet* Player::GetPet() const
return nullptr;
}
-Pet* Player::SummonPet(uint32 entry, float x, float y, float z, float ang, PetType petType, Milliseconds duration /*= 0s*/, uint32 healthPct /*= 0*/)
+Pet* Player::SummonPet(uint32 entry, float x, float y, float z, float ang, PetType petType, Milliseconds duration /*= 0ms*/, uint32 healthPct /*= 0*/)
{
PetStable& petStable = GetOrInitPetStable();
@@ -9035,7 +9055,7 @@ Pet* Player::SummonPet(uint32 entry, float x, float y, float z, float ang, PetTy
++itr;
}
- if (duration > 0s)
+ if (duration > 0ms)
pet->SetDuration(duration);
// Generate a new name for the newly summoned ghoul
@@ -9129,7 +9149,7 @@ Pet* Player::SummonPet(uint32 entry, float x, float y, float z, float ang, PetTy
}
}
- if (duration > 0s)
+ if (duration > 0ms)
pet->SetDuration(duration);
if (NeedSendSpectatorData() && pet->GetCreatureTemplate()->family)
@@ -9232,7 +9252,7 @@ void Player::RemovePet(Pet* pet, PetSaveMode mode, bool returnreagent)
{
WorldPacket data(SMSG_PET_SPELLS, 8);
data << uint64(0);
- GetSession()->SendPacket(&data);
+ SendDirectMessage(&data);
if (GetGroup())
SetGroupUpdateFlag(GROUP_UPDATE_PET);
@@ -9426,11 +9446,7 @@ void Player::Say(std::string_view text, Language language, WorldObject const* /*
{
std::string _text(text);
if (!sScriptMgr->OnPlayerCanUseChat(this, CHAT_MSG_SAY, language, _text))
- {
return;
- }
-
- sScriptMgr->OnPlayerChat(this, CHAT_MSG_SAY, language, _text);
WorldPacket data;
ChatHandler::BuildChatPacket(data, CHAT_MSG_SAY, language, this, this, _text);
@@ -9452,11 +9468,7 @@ void Player::Yell(std::string_view text, Language language, WorldObject const* /
std::string _text(text);
if (!sScriptMgr->OnPlayerCanUseChat(this, CHAT_MSG_YELL, language, _text))
- {
return;
- }
-
- sScriptMgr->OnPlayerChat(this, CHAT_MSG_YELL, language, _text);
WorldPacket data;
ChatHandler::BuildChatPacket(data, CHAT_MSG_YELL, language, this, this, _text);
@@ -9478,11 +9490,7 @@ void Player::TextEmote(std::string_view text, WorldObject const* /*= nullptr*/,
std::string _text(text);
if (!sScriptMgr->OnPlayerCanUseChat(this, CHAT_MSG_EMOTE, LANG_UNIVERSAL, _text))
- {
return;
- }
-
- sScriptMgr->OnPlayerChat(this, CHAT_MSG_EMOTE, LANG_UNIVERSAL, _text);
WorldPacket data;
ChatHandler::BuildChatPacket(data, CHAT_MSG_EMOTE, LANG_UNIVERSAL, this, this, _text);
@@ -9511,22 +9519,18 @@ void Player::Whisper(std::string_view text, Language language, Player* target, b
std::string _text(text);
if (!sScriptMgr->OnPlayerCanUseChat(this, CHAT_MSG_WHISPER, language, _text, target))
- {
return;
- }
-
- sScriptMgr->OnPlayerChat(this, CHAT_MSG_WHISPER, language, _text, target);
WorldPacket data;
ChatHandler::BuildChatPacket(data, CHAT_MSG_WHISPER, language, this, this, _text);
- target->GetSession()->SendPacket(&data);
+ target->SendDirectMessage(&data);
// rest stuff shouldn't happen in case of addon message
if (isAddonMessage)
return;
ChatHandler::BuildChatPacket(data, CHAT_MSG_WHISPER_INFORM, Language(language), target, target, _text);
- GetSession()->SendPacket(&data);
+ SendDirectMessage(&data);
if (!isAcceptWhispers() && !IsGameMaster() && !target->IsGameMaster())
{
@@ -9635,7 +9639,7 @@ void Player::PetSpellInitialize()
data << uint32(category ? cooldown : 0); // category cooldown
}
- GetSession()->SendPacket(&data);
+ SendDirectMessage(&data);
}
void Player::PossessSpellInitialize()
@@ -9663,7 +9667,7 @@ void Player::PossessSpellInitialize()
data << uint8(0); // spells count
data << uint8(0); // cooldowns count
- GetSession()->SendPacket(&data);
+ SendDirectMessage(&data);
}
void Player::VehicleSpellInitialize()
@@ -9738,7 +9742,7 @@ void Player::VehicleSpellInitialize()
data << uint32(category ? cooldown : 0); // category cooldown
}
- GetSession()->SendPacket(&data);
+ SendDirectMessage(&data);
}
void Player::CharmSpellInitialize()
@@ -9792,14 +9796,14 @@ void Player::CharmSpellInitialize()
data << uint8(0); // cooldowns count
- GetSession()->SendPacket(&data);
+ SendDirectMessage(&data);
}
void Player::SendRemoveControlBar()
{
WorldPacket data(SMSG_PET_SPELLS, 8);
data << uint64(0);
- GetSession()->SendPacket(&data);
+ SendDirectMessage(&data);
}
bool Player::HasSpellMod(SpellModifier* mod, Spell* spell)
@@ -10149,7 +10153,7 @@ void Player::SendProficiency(ItemClass itemClass, uint32 itemSubclassMask)
{
WorldPacket data(SMSG_SET_PROFICIENCY, 1 + 4);
data << uint8(itemClass) << uint32(itemSubclassMask);
- GetSession()->SendPacket(&data);
+ SendDirectMessage(&data);
}
void Player::RemovePetitionsAndSigns(ObjectGuid guid, uint32 type)
@@ -10601,7 +10605,7 @@ void Player::ProhibitSpellSchool(SpellSchoolMask idSchoolMask, uint32 unTimeMs)
if (!cooldowns.empty())
{
BuildCooldownPacket(data, SPELL_COOLDOWN_FLAG_NONE, cooldowns);
- GetSession()->SendPacket(&data);
+ SendDirectMessage(&data);
}
}
@@ -10721,7 +10725,7 @@ inline bool Player::_StoreOrEquipNewItem(uint32 vendorslot, uint32 item, uint8 c
data << uint32(vendorslot + 1); // numbered from 1 at client
data << int32(crItem->maxcount > 0 ? new_count : 0xFFFFFFFF);
data << uint32(count);
- GetSession()->SendPacket(&data);
+ SendDirectMessage(&data);
SendNewItem(it, pProto->BuyCount * count, true, false, false);
if (!bStore)
@@ -11138,7 +11142,7 @@ void Player::ModifySpellCooldown(uint32 spellId, int32 cooldown)
data << uint32(spellId); // Spell ID
data << GetGUID(); // Player GUID
data << int32(cooldown); // Cooldown mod in milliseconds
- GetSession()->SendPacket(&data);
+ SendDirectMessage(&data);
}
void Player::SendCooldownEvent(SpellInfo const* spellInfo, uint32 itemId /*= 0*/, Spell* spell /*= nullptr*/, bool setCooldown /*= true*/)
@@ -11614,7 +11618,7 @@ void Player::SendInitialPacketsBeforeAddToMap()
data << m_homebindX << m_homebindY << m_homebindZ;
data << (uint32) m_homebindMapId;
data << (uint32) m_homebindAreaId;
- GetSession()->SendPacket(&data);
+ SendDirectMessage(&data);
// SMSG_SET_PROFICIENCY
// SMSG_SET_PCT_SPELL_MODIFIER
@@ -11627,13 +11631,13 @@ void Player::SendInitialPacketsBeforeAddToMap()
data.Initialize(SMSG_INSTANCE_DIFFICULTY, 4 + 4);
data << uint32(GetMap()->GetDifficulty());
data << uint32(GetMap()->GetEntry()->IsDynamicDifficultyMap() && GetMap()->IsHeroic()); // Raid dynamic difficulty
- GetSession()->SendPacket(&data);
+ SendDirectMessage(&data);
SendInitialSpells();
data.Initialize(SMSG_SEND_UNLEARN_SPELLS, 4);
data << uint32(0); // count, for (count) uint32;
- GetSession()->SendPacket(&data);
+ SendDirectMessage(&data);
SendInitialActionButtons();
m_reputationMgr->SendInitialReputations();
@@ -11645,7 +11649,7 @@ void Player::SendInitialPacketsBeforeAddToMap()
data.AppendPackedTime(GameTime::GetGameTime().count());
data << float(0.01666667f); // game speed
data << uint32(0); // added in 3.1.2
- GetSession()->SendPacket(&data);
+ SendDirectMessage(&data);
GetReputationMgr().SendForceReactions(); // SMSG_SET_FORCED_REACTIONS
@@ -11698,16 +11702,56 @@ void Player::SendInitialPacketsAfterAddToMap()
GetZoneAndAreaId(newzone, newarea);
UpdateZone(newzone, newarea); // also call SendInitWorldStates();
- if (HasStunAura())
- SetMovement(MOVE_ROOT);
+ WorldPacket setCompoundState(SMSG_MULTIPLE_MOVES, 100);
+ setCompoundState << uint32(0); // size placeholder
// manual send package (have code in HandleEffect(this, AURA_EFFECT_HANDLE_SEND_FOR_CLIENT, true); that must not be re-applied.
- if (HasRootAura())
+ if (IsImmobilizedState())
+ {
+ uint32 const counter = GetSession()->GetOrderCounter();
+ setCompoundState << uint8(2 + GetPackGUID().size() + 4);
+ setCompoundState << uint16(SMSG_FORCE_MOVE_ROOT);
+ setCompoundState << GetPackGUID();
+ setCompoundState << uint32(counter);
+ GetSession()->IncrementOrderCounter();
+ }
+
+ if (HasAuraType(SPELL_AURA_FEATHER_FALL))
+ {
+ uint32 const counter = GetSession()->GetOrderCounter();
+ setCompoundState << uint8(2 + GetPackGUID().size() + 4);
+ setCompoundState << uint16(SMSG_MOVE_FEATHER_FALL);
+ setCompoundState << GetPackGUID();
+ setCompoundState << uint32(counter);
+ GetSession()->IncrementOrderCounter();
+ }
+
+ if (HasAuraType(SPELL_AURA_WATER_WALK) || HasAura(8326))
+ {
+ uint32 const counter = GetSession()->GetOrderCounter();
+ setCompoundState << uint8(2 + GetPackGUID().size() + 4);
+ setCompoundState << uint16(SMSG_MOVE_WATER_WALK);
+ setCompoundState << GetPackGUID();
+ setCompoundState << uint32(counter);
+ GetSession()->IncrementOrderCounter();
+ }
+
+ if (HasAuraType(SPELL_AURA_HOVER))
{
- WorldPacket data2(SMSG_FORCE_MOVE_ROOT, 10);
- data2 << GetPackGUID();
- data2 << (uint32)2;
- SendMessageToSet(&data2, true);
+ uint32 const counter = GetSession()->GetOrderCounter();
+ setCompoundState << uint8(2 + GetPackGUID().size() + 4);
+ setCompoundState << uint16(SMSG_MOVE_SET_HOVER);
+ setCompoundState << GetPackGUID();
+ setCompoundState << uint32(counter);
+ GetSession()->IncrementOrderCounter();
+ }
+
+ // TODO: Pending mount protocol
+
+ if (setCompoundState.size() > 4)
+ {
+ setCompoundState.put<uint32>(0, setCompoundState.size() - 4);
+ SendDirectMessage(&setCompoundState);
}
SendEnchantmentDurations(); // must be after add to map
@@ -11757,7 +11801,7 @@ void Player::SendTransferAborted(uint32 mapid, TransferAbortReason reason, uint8
default:
break;
}
- GetSession()->SendPacket(&data);
+ SendDirectMessage(&data);
}
void Player::SendInstanceResetWarning(uint32 mapid, Difficulty difficulty, uint32 time, bool onEnterMap)
@@ -11792,7 +11836,7 @@ void Player::SendInstanceResetWarning(uint32 mapid, Difficulty difficulty, uint3
data << uint8(bind && bind->perm); // is locked
data << uint8(bind && bind->extended); // is extended, ignored if prev field is 0
}
- GetSession()->SendPacket(&data);
+ SendDirectMessage(&data);
}
void Player::ApplyEquipCooldown(Item* pItem)
@@ -11839,7 +11883,7 @@ void Player::ApplyEquipCooldown(Item* pItem)
WorldPacket data(SMSG_ITEM_COOLDOWN, 12);
data << pItem->GetGUID();
data << uint32(spellData.SpellId);
- GetSession()->SendPacket(&data);
+ SendDirectMessage(&data);
}
}
@@ -12089,18 +12133,6 @@ void Player::GetAurasForTarget(Unit* target, bool force /*= false*/)
if (!target || (!force && target->GetVisibleAuras()->empty())) // speedup things
return;
- /*! Blizz sends certain movement packets sometimes even before CreateObject
- These movement packets are usually found in SMSG_COMPRESSED_MOVES
- */
- if (target->HasFeatherFallAura())
- target->SendMovementFeatherFall(this);
-
- if (target->HasWaterWalkAura())
- target->SendMovementWaterWalking(this);
-
- if (target->HasHoverAura())
- target->SendMovementHover(this);
-
WorldPacket data(SMSG_AURA_UPDATE_ALL);
data<< target->GetPackGUID();
@@ -12111,7 +12143,7 @@ void Player::GetAurasForTarget(Unit* target, bool force /*= false*/)
auraApp->BuildUpdatePacket(data, false);
}
- GetSession()->SendPacket(&data);
+ SendDirectMessage(&data);
}
void Player::SetDailyQuestStatus(uint32 quest_id)
@@ -12610,9 +12642,9 @@ void Player::RemoveItemDependentAurasAndCasts(Item* pItem)
{
Aura* aura = itr->second;
- // skip passive (passive item dependent spells work in another way) and not self applied auras
+ // skip not self applied auras
SpellInfo const* spellInfo = aura->GetSpellInfo();
- if (aura->IsPassive() || aura->GetCasterGUID() != GetGUID())
+ if (aura->GetCasterGUID() != GetGUID())
{
++itr;
continue;
@@ -12881,7 +12913,7 @@ void Player::SetClientControl(Unit* target, bool allowMove, bool packetOnly /*=
WorldPacket data(SMSG_CLIENT_CONTROL_UPDATE, target->GetPackGUID().size() + 1);
data << target->GetPackGUID();
data << uint8((allowMove && !target->HasUnitState(UNIT_STATE_FLEEING | UNIT_STATE_CONFUSED)) ? 1 : 0);
- GetSession()->SendPacket(&data);
+ SendDirectMessage(&data);
// We want to set the packet only
if (packetOnly)
@@ -13002,7 +13034,7 @@ void Player::SendCorpseReclaimDelay(uint32 delay)
{
WorldPacket data(SMSG_CORPSE_RECLAIM_DELAY, 4);
data << uint32(delay);
- GetSession()->SendPacket(&data);
+ SendDirectMessage(&data);
}
Player* Player::GetNextRandomRaidMember(float radius)
@@ -13229,7 +13261,7 @@ void Player::SetViewpoint(WorldObject* target, bool apply)
SetSeer(this);
//WorldPacket data(SMSG_CLEAR_FAR_SIGHT_IMMEDIATE, 0);
- //GetSession()->SendPacket(&data);
+ //SendDirectMessage(&data);
}
}
@@ -13385,7 +13417,7 @@ void Player::SetTitle(CharTitlesEntry const* title, bool lost)
WorldPacket data(SMSG_TITLE_EARNED, 4 + 4);
data << uint32(title->bit_index);
data << uint32(lost ? 0 : 1); // 1 - earned, 0 - lost
- GetSession()->SendPacket(&data);
+ SendDirectMessage(&data);
UpdateAchievementCriteria(ACHIEVEMENT_CRITERIA_TYPE_OWN_RANK);
}
@@ -13445,7 +13477,7 @@ void Player::ConvertRune(uint8 index, RuneType newType)
WorldPacket data(SMSG_CONVERT_RUNE, 2);
data << uint8(index);
data << uint8(newType);
- GetSession()->SendPacket(&data);
+ SendDirectMessage(&data);
}
void Player::ResyncRunes(uint8 count)
@@ -13457,14 +13489,14 @@ void Player::ResyncRunes(uint8 count)
data << uint8(GetCurrentRune(i)); // rune type
data << uint8(255 - (GetRuneCooldown(i) * 51)); // passed cooldown time (0-255)
}
- GetSession()->SendPacket(&data);
+ SendDirectMessage(&data);
}
void Player::AddRunePower(uint8 index)
{
WorldPacket data(SMSG_ADD_RUNE_POWER, 4);
data << uint32(1 << index); // mask (0x00-0x3F probably)
- GetSession()->SendPacket(&data);
+ SendDirectMessage(&data);
}
static RuneType runeSlotTypes[MAX_RUNES] =
@@ -14325,6 +14357,73 @@ bool Player::CanSeeSpellClickOn(Creature const* c) const
return false;
}
+/**
+ * @brief Checks if any vendor option is available in the gossip menu tree for a given creature.
+ *
+ * @param menuId The starting gossip menu ID to check.
+ * @param creature Pointer to the creature whose gossip menus are being checked.
+ * @return true if a vendor option is available in any accessible menu; false otherwise.
+ */
+bool Player::AnyVendorOptionAvailable(uint32 menuId, Creature const* creature) const
+{
+ {
+ GossipMenuItemsMapBounds menuItemBounds = sObjectMgr->GetGossipMenuItemsMapBounds(menuId);
+ if (menuItemBounds.first == menuItemBounds.second)
+ return true;
+ }
+
+ std::set<uint32> visitedMenus;
+ std::queue<uint32> menusToCheck;
+ menusToCheck.push(menuId);
+
+ while (!menusToCheck.empty())
+ {
+ uint32 const currentMenuId = menusToCheck.front();
+ menusToCheck.pop();
+
+ if (visitedMenus.find(currentMenuId) != visitedMenus.end())
+ continue;
+
+ visitedMenus.insert(currentMenuId);
+
+ GossipMenuItemsMapBounds menuItemBounds = sObjectMgr->GetGossipMenuItemsMapBounds(currentMenuId);
+
+ if (menuItemBounds.first == menuItemBounds.second && currentMenuId != 0)
+ continue;
+
+ for (auto itr = menuItemBounds.first; itr != menuItemBounds.second; ++itr)
+ {
+ if (!sConditionMgr->IsObjectMeetToConditions(const_cast<Player*>(this), const_cast<Creature*>(creature), itr->second.Conditions))
+ continue;
+
+ if (itr->second.OptionType == GOSSIP_OPTION_VENDOR)
+ return true;
+ else if (itr->second.ActionMenuID)
+ {
+ GossipMenusMapBounds menuBounds = sObjectMgr->GetGossipMenusMapBounds(itr->second.ActionMenuID);
+ bool menuAccessible = false;
+
+ if (menuBounds.first == menuBounds.second)
+ menuAccessible = true;
+ else
+ {
+ for (auto menuItr = menuBounds.first; menuItr != menuBounds.second; ++menuItr)
+ if (sConditionMgr->IsObjectMeetToConditions(const_cast<Player*>(this), const_cast<Creature*>(creature), menuItr->second.Conditions))
+ {
+ menuAccessible = true;
+ break;
+ }
+ }
+
+ if (menuAccessible)
+ menusToCheck.push(itr->second.ActionMenuID);
+ }
+ }
+ }
+
+ return false;
+}
+
bool Player::CanSeeVendor(Creature const* creature) const
{
if (!creature->HasNpcFlag(UNIT_NPC_FLAG_VENDOR))
@@ -14332,9 +14431,11 @@ bool Player::CanSeeVendor(Creature const* creature) const
ConditionList conditions = sConditionMgr->GetConditionsForNpcVendorEvent(creature->GetEntry(), 0);
if (!sConditionMgr->IsObjectMeetToConditions(const_cast<Player*>(this), const_cast<Creature*>(creature), conditions))
- {
return false;
- }
+
+ uint32 const menuId = creature->GetCreatureTemplate()->GossipMenuId;
+ if (!AnyVendorOptionAvailable(menuId, creature))
+ return false;
return true;
}
@@ -14453,7 +14554,7 @@ void Player::SendTalentsInfoData(bool pet)
BuildPetTalentsInfoData(&data);
else
BuildPlayerTalentsInfoData(&data);
- GetSession()->SendPacket(&data);
+ SendDirectMessage(&data);
}
void Player::BuildEnchantmentsInfoData(WorldPacket* data)
@@ -14526,7 +14627,7 @@ void Player::SendEquipmentSetList()
++count; // client have limit but it checked at loading and set
}
data.put<uint32>(count_pos, count);
- GetSession()->SendPacket(&data);
+ SendDirectMessage(&data);
}
void Player::SetEquipmentSet(uint32 index, EquipmentSet eqset)
@@ -14564,7 +14665,7 @@ void Player::SetEquipmentSet(uint32 index, EquipmentSet eqset)
WorldPacket data(SMSG_EQUIPMENT_SET_SAVED, 4 + 1);
data << uint32(index);
data.appendPackGUID(eqslot.Guid);
- GetSession()->SendPacket(&data);
+ SendDirectMessage(&data);
}
eqslot.state = old_state == EQUIPMENT_SET_NEW ? EQUIPMENT_SET_NEW : EQUIPMENT_SET_CHANGED;
@@ -15270,7 +15371,7 @@ void Player::ActivateSpec(uint8 spec)
if (!HasTalent(46917, GetActiveSpec()) && m_canTitanGrip)
SetCanTitanGrip(false);
// xinef: remove dual wield if player does not have dual wield spell (shamans)
- if (!HasSpell(674) && m_canDualWield)
+ if (!HasSpell(674) && CanDualWield())
SetCanDualWield(false);
AutoUnequipOffhandIfNeed();
@@ -15375,7 +15476,7 @@ void Player::SendDuelCountdown(uint32 counter)
{
WorldPacket data(SMSG_DUEL_COUNTDOWN, 4);
data << uint32(counter); // seconds
- GetSession()->SendPacket(&data);
+ SendDirectMessage(&data);
}
void Player::SetIsSpectator(bool on)
@@ -15579,7 +15680,7 @@ void Player::SendRefundInfo(Item* item)
}
data << uint32(0);
data << uint32(GetTotalPlayedTime() - item->GetPlayedTime());
- GetSession()->SendPacket(&data);
+ SendDirectMessage(&data);
}
bool Player::AddItem(uint32 itemId, uint32 count)
@@ -15627,7 +15728,7 @@ void Player::RefundItem(Item* item)
WorldPacket data(SMSG_ITEM_REFUND_RESULT, 8 + 4);
data << item->GetGUID(); // Guid
data << uint32(10); // Error!
- GetSession()->SendPacket(&data);
+ SendDirectMessage(&data);
return;
}
@@ -15668,7 +15769,7 @@ void Player::RefundItem(Item* item)
WorldPacket data(SMSG_ITEM_REFUND_RESULT, 8 + 4);
data << item->GetGUID(); // Guid
data << uint32(10); // Error!
- GetSession()->SendPacket(&data);
+ SendDirectMessage(&data);
return;
}
@@ -15683,7 +15784,7 @@ void Player::RefundItem(Item* item)
data << uint32(iece->reqitem[i]);
data << uint32(iece->reqitemcount[i]);
}
- GetSession()->SendPacket(&data);
+ SendDirectMessage(&data);
uint32 moneyRefund = item->GetPaidMoney(); // item-> will be invalidated in DestroyItem
@@ -15925,108 +16026,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 << uint32(0); //! movement counter
- SendDirectMessage(&data);
-
- data.Initialize(MSG_MOVE_GRAVITY_CHNG, 64);
- data << GetPackGUID();
- BuildMovementPacket(&data);
- SendMessageToSet(&data, false);
- return true;
-}
-
-bool Player::SetCanFly(bool apply, bool packetOnly /*= false*/)
-{
- sScriptMgr->AnticheatSetCanFlybyServer(this, apply);
-
- if (!packetOnly && !Unit::SetCanFly(apply))
- return false;
-
- if (!apply)
- SetFallInformation(GameTime::GetGameTime().count(), GetPositionZ());
-
- WorldPacket data(apply ? SMSG_MOVE_SET_CAN_FLY : SMSG_MOVE_UNSET_CAN_FLY, 12);
- data << GetPackGUID();
- data << uint32(0); //! movement counter
- SendDirectMessage(&data);
-
- data.Initialize(MSG_MOVE_UPDATE_CAN_FLY, 64);
- data << GetPackGUID();
- BuildMovementPacket(&data);
- SendMessageToSet(&data, false);
- return true;
-}
-
-bool Player::SetHover(bool apply, bool packetOnly /*= false*/, bool /*updateAnimationTier = true*/)
-{
- // moved inside, flag can be removed on landing and wont send appropriate packet to client when aura is removed
- if (!packetOnly /* && !Unit::SetHover(apply)*/)
- {
- Unit::SetHover(apply);
- // return false;
- }
-
- WorldPacket data(apply ? SMSG_MOVE_SET_HOVER : SMSG_MOVE_UNSET_HOVER, 12);
- data << GetPackGUID();
- data << uint32(0); //! movement counter
- SendDirectMessage(&data);
-
- data.Initialize(MSG_MOVE_HOVER, 64);
- data << GetPackGUID();
- BuildMovementPacket(&data);
- SendMessageToSet(&data, false);
- return true;
-}
-
-bool Player::SetWaterWalking(bool apply, bool packetOnly /*= false*/)
-{
- // moved inside, flag can be removed on landing and wont send appropriate packet to client when aura is removed
- if (!packetOnly /* && !Unit::SetWaterWalking(apply)*/)
- {
- Unit::SetWaterWalking(apply);
- // return false;
- }
-
- WorldPacket data(apply ? SMSG_MOVE_WATER_WALK : SMSG_MOVE_LAND_WALK, 12);
- data << GetPackGUID();
- data << uint32(0); //! movement counter
- SendDirectMessage(&data);
-
- data.Initialize(MSG_MOVE_WATER_WALK, 64);
- data << GetPackGUID();
- BuildMovementPacket(&data);
- SendMessageToSet(&data, false);
- return true;
-}
-
-bool Player::SetFeatherFall(bool apply, bool packetOnly /*= false*/)
-{
- // Xinef: moved inside, flag can be removed on landing and wont send appropriate packet to client when aura is removed
- if (!packetOnly/* && !Unit::SetFeatherFall(apply)*/)
- {
- Unit::SetFeatherFall(apply);
- //return false;
- }
-
- WorldPacket data(apply ? SMSG_MOVE_FEATHER_FALL : SMSG_MOVE_NORMAL_FALL, 12);
- data << GetPackGUID();
- data << uint32(0); //! movement counter
- SendDirectMessage(&data);
-
- data.Initialize(MSG_MOVE_FEATHER_FALL, 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 3204f42417..4e29cd5f5e 100644
--- a/src/server/game/Entities/Player/Player.h
+++ b/src/server/game/Entities/Player/Player.h
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
@@ -41,6 +41,7 @@
#include "TradeData.h"
#include "Unit.h"
#include "WorldSession.h"
+#include <set>
#include <string>
#include <vector>
@@ -448,8 +449,6 @@ typedef std::list<Item*> ItemDurationList;
enum PlayerMovementType
{
- MOVE_ROOT = 1,
- MOVE_UNROOT = 2,
MOVE_WATER_WALK = 3,
MOVE_LAND_WALK = 4
};
@@ -1090,11 +1089,6 @@ public:
SetFloatValue(UNIT_FIELD_COMBATREACH, scale * DEFAULT_COMBAT_REACH);
}
- [[nodiscard]] bool hasSpanishClient()
- {
- return GetSession()->GetSessionDbLocaleIndex() == LOCALE_esES || GetSession()->GetSessionDbLocaleIndex() == LOCALE_esMX;
- }
-
bool TeleportTo(uint32 mapid, float x, float y, float z, float orientation, uint32 options = 0, Unit* target = nullptr, bool newInstance = false);
bool TeleportTo(WorldLocation const& loc, uint32 options = 0, Unit* target = nullptr)
{
@@ -1134,8 +1128,8 @@ public:
void SendInstanceResetWarning(uint32 mapid, Difficulty difficulty, uint32 time, bool onEnterMap);
bool CanInteractWithQuestGiver(Object* questGiver);
- Creature* GetNPCIfCanInteractWith(ObjectGuid guid, uint32 npcflagmask);
- [[nodiscard]] GameObject* GetGameObjectIfCanInteractWith(ObjectGuid guid, GameobjectTypes type) const;
+ Creature* GetNPCIfCanInteractWith(ObjectGuid const& guid, uint32 npcflagmask);
+ [[nodiscard]] GameObject* GetGameObjectIfCanInteractWith(ObjectGuid const& guid, GameobjectTypes type) const;
void ToggleAFK();
void ToggleDND();
@@ -1161,6 +1155,7 @@ public:
void SetCommentator(bool on) { ApplyModFlag(PLAYER_FLAGS, PLAYER_FLAGS_COMMENTATOR2, on); }
[[nodiscard]] bool IsDeveloper() const { return HasPlayerFlag(PLAYER_FLAGS_DEVELOPER); }
void SetDeveloper(bool on) { ApplyModFlag(PLAYER_FLAGS, PLAYER_FLAGS_DEVELOPER, on); }
+ void SetBeastMaster(bool on) { if (on) SetUnitFlag(UNIT_FLAG_NON_ATTACKABLE); else RemoveUnitFlag(UNIT_FLAG_NON_ATTACKABLE); }
[[nodiscard]] bool isAcceptWhispers() const { return m_ExtraFlags & PLAYER_EXTRA_ACCEPT_WHISPERS; }
void SetAcceptWhispers(bool on) { if (on) m_ExtraFlags |= PLAYER_EXTRA_ACCEPT_WHISPERS; else m_ExtraFlags &= ~PLAYER_EXTRA_ACCEPT_WHISPERS; }
[[nodiscard]] bool IsGameMaster() const { return m_ExtraFlags & PLAYER_EXTRA_GM_ON; }
@@ -1215,7 +1210,7 @@ public:
[[nodiscard]] PetStable const* GetPetStable() const { return m_petStable.get(); }
[[nodiscard]] Pet* GetPet() const;
- Pet* SummonPet(uint32 entry, float x, float y, float z, float ang, PetType petType, Milliseconds duration = 0s, uint32 healthPct = 0);
+ Pet* SummonPet(uint32 entry, float x, float y, float z, float ang, PetType petType, Milliseconds duration = 0ms, uint32 healthPct = 0);
void RemovePet(Pet* pet, PetSaveMode mode, bool returnreagent = false);
bool CanPetResurrect();
bool IsExistPet();
@@ -1262,7 +1257,7 @@ public:
bool HasWeapon(WeaponAttackType type) const override { return GetWeaponForAttack(type, false); }
bool HasWeaponForAttack(WeaponAttackType type) const override { return (Unit::HasWeaponForAttack(type) && GetWeaponForAttack(type, true)); }
[[nodiscard]] Item* GetShield(bool useable = false) const;
- static uint8 GetAttackBySlot(uint8 slot); // MAX_ATTACK if not weapon slot
+ static WeaponAttackType GetAttackBySlot(uint8 slot); // MAX_ATTACK if not weapon slot
std::vector<Item*>& GetItemUpdateQueue() { return m_itemUpdateQueue; }
static bool IsInventoryPos(uint16 pos) { return IsInventoryPos(pos >> 8, pos & 255); }
static bool IsInventoryPos(uint8 bag, uint8 slot);
@@ -1339,8 +1334,7 @@ public:
{
return StoreItem(dest, pItem, update);
}
- Item* BankItem(uint16 pos, Item* pItem, bool update);
- void RemoveItem(uint8 bag, uint8 slot, bool update, bool swap = false);
+ void RemoveItem(uint8 bag, uint8 slot, bool update);
void MoveItemFromInventory(uint8 bag, uint8 slot, bool update);
// in trade, auction, guild bank, mail....
void MoveItemToInventory(ItemPosCountVec const& dest, Item* pItem, bool update, bool in_characterInventoryDB = false);
@@ -1600,7 +1594,6 @@ public:
void SetBindPoint(ObjectGuid guid);
void SendTalentWipeConfirm(ObjectGuid guid);
void ResetPetTalents();
- void CalcRage(uint32 damage, bool attacker);
void RegenerateAll();
void Regenerate(Powers power);
void RegenerateHealth();
@@ -2040,7 +2033,7 @@ public:
Corpse* CreateCorpse();
void RemoveCorpse();
void KillPlayer();
- static void OfflineResurrect(ObjectGuid const guid, CharacterDatabaseTransaction trans);
+ static void OfflineResurrect(ObjectGuid const& guid, CharacterDatabaseTransaction trans);
[[nodiscard]] bool HasCorpse() const { return _corpseLocation.GetMapId() != MAPID_INVALID; }
[[nodiscard]] WorldLocation GetCorpseLocation() const { return _corpseLocation; }
uint32 GetResurrectionSpellId();
@@ -2066,8 +2059,6 @@ public:
}
bool IsMirrorTimerActive(MirrorTimerType type) { return m_MirrorTimer[type] == getMaxTimer(type); }
- void SetMovement(PlayerMovementType pType);
-
bool CanJoinConstantChannelInZone(ChatChannelsEntry const* channel, AreaTableEntry const* zone);
void JoinedChannel(Channel* c);
@@ -2196,11 +2187,19 @@ public:
[[nodiscard]] bool CanTameExoticPets() const { return IsGameMaster() || HasAuraType(SPELL_AURA_ALLOW_TAME_PET_TYPE); }
void SetRegularAttackTime();
- void SetBaseModValue(BaseModGroup modGroup, BaseModType modType, float value) { m_auraBaseMod[modGroup][modType] = value; }
- void HandleBaseModValue(BaseModGroup modGroup, BaseModType modType, float amount, bool apply);
+
+ void HandleBaseModFlatValue(BaseModGroup modGroup, float amount, bool apply);
+ void ApplyBaseModPctValue(BaseModGroup modGroup, float pct);
+
+ void SetBaseModFlatValue(BaseModGroup modGroup, float val);
+ void SetBaseModPctValue(BaseModGroup modGroup, float val);
+
+ void UpdateDamageDoneMods(WeaponAttackType attackType, int32 skipEnchantSlot = -1) override;
+ void UpdateBaseModGroup(BaseModGroup modGroup);
+
[[nodiscard]] float GetBaseModValue(BaseModGroup modGroup, BaseModType modType) const;
[[nodiscard]] float GetTotalBaseModValue(BaseModGroup modGroup) const;
- [[nodiscard]] float GetTotalPercentageModValue(BaseModGroup modGroup) const { return m_auraBaseMod[modGroup][FLAT_MOD] + m_auraBaseMod[modGroup][PCT_MOD]; }
+
void _ApplyAllStatBonuses();
void _RemoveAllStatBonuses();
@@ -2212,9 +2211,13 @@ public:
SpellSchoolMask GetMeleeDamageSchoolMask(WeaponAttackType attackType = BASE_ATTACK, uint8 damageIndex = 0) const override;
- void _ApplyWeaponDependentAuraMods(Item* item, WeaponAttackType attackType, bool apply);
- void _ApplyWeaponDependentAuraCritMod(Item* item, WeaponAttackType attackType, AuraEffect const* aura, bool apply);
- void _ApplyWeaponDependentAuraDamageMod(Item* item, WeaponAttackType attackType, AuraEffect const* aura, bool apply);
+ void UpdateWeaponDependentAuras(WeaponAttackType attackType);
+ void ApplyItemDependentAuras(Item* item, bool apply);
+
+ bool CheckAttackFitToAuraRequirement(WeaponAttackType attackType, AuraEffect const* aurEff) const override;
+
+ void UpdateWeaponDependentCritAuras(WeaponAttackType attackType);
+ void UpdateAllWeaponDependentCritAuras();
void _ApplyItemMods(Item* item, uint8 slot, bool apply);
void _RemoveAllItemMods();
@@ -2358,6 +2361,7 @@ public:
void SetMover(Unit* target);
void SetSeer(WorldObject* target) { m_seer = target; }
+ WorldObject* GetSeer() const { return m_seer; }
void SetViewpoint(WorldObject* target, bool apply);
[[nodiscard]] WorldObject* GetViewpoint() const;
void StopCastingCharm(Aura* except = nullptr);
@@ -2556,7 +2560,9 @@ public:
//bool isActiveObject() const { return true; }
bool CanSeeSpellClickOn(Creature const* creature) const;
[[nodiscard]] bool CanSeeVendor(Creature const* creature) const;
-
+private:
+ [[nodiscard]] bool AnyVendorOptionAvailable(uint32 menuId, Creature const* creature) const;
+public:
[[nodiscard]] uint32 GetChampioningFaction() const { return m_ChampioningFaction; }
void SetChampioningFaction(uint32 faction) { m_ChampioningFaction = faction; }
Spell* m_spellModTakingSpell;
@@ -2570,14 +2576,9 @@ public:
bool IsInWhisperWhiteList(ObjectGuid guid);
void RemoveFromWhisperWhiteList(ObjectGuid guid) { WhisperList.remove(guid); }
- bool SetDisableGravity(bool disable, bool packetOnly = false, bool updateAnimationTier = true) override;
- bool SetCanFly(bool apply, bool packetOnly = false) override;
- bool SetWaterWalking(bool apply, bool packetOnly = false) override;
- bool SetFeatherFall(bool apply, bool packetOnly = false) override;
- bool SetHover(bool enable, 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); }
// saving
void AdditionalSavingAddMask(uint8 mask) { m_additionalSaveTimer = 2000; m_additionalSaveMask |= mask; }
@@ -2642,6 +2643,15 @@ public:
std::string GetDebugInfo() const override;
+ bool IsExpectingChangeTransport() const { return _expectingChangeTransport; }
+ void SetExpectingChangeTransport(bool state) { _expectingChangeTransport = state; }
+
+ uint32 GetPendingFlightChange() const { return _pendingFlightChangeCounter; }
+ void SetPendingFlightChange(uint32 counter) { _pendingFlightChangeCounter = counter; }
+
+ void SetMapChangeOrderCounter() { _mapChangeOrderCounter = GetSession()->GetOrderCounter(); }
+ uint32 GetMapChangeOrderCounter() { return _mapChangeOrderCounter; }
+
/*********************************************************/
/*** SPELL QUEUE SYSTEM ***/
/*********************************************************/
@@ -2831,7 +2841,8 @@ protected:
ActionButtonList m_actionButtons;
- float m_auraBaseMod[BASEMOD_END][MOD_END];
+ float m_auraBaseFlatMod[BASEMOD_END];
+ float m_auraBasePctMod[BASEMOD_END];
int32 m_baseRatingValue[MAX_COMBAT_RATING];
uint32 m_baseSpellPower;
uint32 m_baseSpellDamage;
@@ -3022,6 +3033,10 @@ private:
PlayerSettingMap m_charSettingsMap;
Seconds m_creationTime;
+
+ bool _expectingChangeTransport;
+ uint32 _pendingFlightChangeCounter;
+ uint32 _mapChangeOrderCounter;
};
void AddItemsSetItem(Player* player, Item* item);
diff --git a/src/server/game/Entities/Player/PlayerGossip.cpp b/src/server/game/Entities/Player/PlayerGossip.cpp
index 609d9776dd..806a8c9afa 100644
--- a/src/server/game/Entities/Player/PlayerGossip.cpp
+++ b/src/server/game/Entities/Player/PlayerGossip.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/game/Entities/Player/PlayerMisc.cpp b/src/server/game/Entities/Player/PlayerMisc.cpp
index 715e20fec5..0d3311a6c5 100644
--- a/src/server/game/Entities/Player/PlayerMisc.cpp
+++ b/src/server/game/Entities/Player/PlayerMisc.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
@@ -78,7 +78,7 @@ bool Player::CanSpeak() const
void Player::SendAttackSwingNotInRange()
{
WorldPacket data(SMSG_ATTACKSWING_NOTINRANGE, 0);
- GetSession()->SendPacket(&data);
+ SendDirectMessage(&data);
}
void Player::SavePositionInDB(uint32 mapid, float x, float y, float z, float o, uint32 zone, ObjectGuid guid)
@@ -128,25 +128,25 @@ void Player::Customize(CharacterCustomizeInfo const* customizeInfo, CharacterDat
void Player::SendAttackSwingDeadTarget()
{
WorldPacket data(SMSG_ATTACKSWING_DEADTARGET, 0);
- GetSession()->SendPacket(&data);
+ SendDirectMessage(&data);
}
void Player::SendAttackSwingCantAttack()
{
WorldPacket data(SMSG_ATTACKSWING_CANT_ATTACK, 0);
- GetSession()->SendPacket(&data);
+ SendDirectMessage(&data);
}
void Player::SendAttackSwingCancelAttack()
{
WorldPacket data(SMSG_CANCEL_COMBAT, 0);
- GetSession()->SendPacket(&data);
+ SendDirectMessage(&data);
}
void Player::SendAttackSwingBadFacingAttack()
{
WorldPacket data(SMSG_ATTACKSWING_BADFACING, 0);
- GetSession()->SendPacket(&data);
+ SendDirectMessage(&data);
}
void Player::SendAutoRepeatCancel(Unit* target)
@@ -161,7 +161,7 @@ void Player::SendExplorationExperience(uint32 Area, uint32 Experience)
WorldPacket data(SMSG_EXPLORATION_EXPERIENCE, 8);
data << uint32(Area);
data << uint32(Experience);
- GetSession()->SendPacket(&data);
+ SendDirectMessage(&data);
}
void Player::SendDungeonDifficulty(bool IsInGroup)
@@ -171,7 +171,7 @@ void Player::SendDungeonDifficulty(bool IsInGroup)
data << (uint32)GetDungeonDifficulty();
data << uint32(val);
data << uint32(IsInGroup);
- GetSession()->SendPacket(&data);
+ SendDirectMessage(&data);
}
void Player::SendRaidDifficulty(bool IsInGroup, int32 forcedDifficulty)
@@ -181,14 +181,14 @@ void Player::SendRaidDifficulty(bool IsInGroup, int32 forcedDifficulty)
data << uint32(forcedDifficulty == -1 ? GetRaidDifficulty() : forcedDifficulty);
data << uint32(val);
data << uint32(IsInGroup);
- GetSession()->SendPacket(&data);
+ SendDirectMessage(&data);
}
void Player::SendResetFailedNotify(uint32 mapid)
{
WorldPacket data(SMSG_RESET_FAILED_NOTIFY, 4);
data << uint32(mapid);
- GetSession()->SendPacket(&data);
+ SendDirectMessage(&data);
}
/// Reset all solo instances and optionally send a message on success for each
@@ -327,7 +327,7 @@ void Player::SendResetInstanceSuccess(uint32 MapId)
{
WorldPacket data(SMSG_INSTANCE_RESET, 4);
data << uint32(MapId);
- GetSession()->SendPacket(&data);
+ SendDirectMessage(&data);
}
void Player::SendResetInstanceFailed(uint32 reason, uint32 MapId)
@@ -340,7 +340,7 @@ void Player::SendResetInstanceFailed(uint32 reason, uint32 MapId)
WorldPacket data(SMSG_INSTANCE_RESET_FAILED, 4);
data << uint32(reason);
data << uint32(MapId);
- GetSession()->SendPacket(&data);
+ SendDirectMessage(&data);
}
/*********************************************************/
diff --git a/src/server/game/Entities/Player/PlayerQuest.cpp b/src/server/game/Entities/Player/PlayerQuest.cpp
index 9f663ff2fa..a2a99a4bd9 100644
--- a/src/server/game/Entities/Player/PlayerQuest.cpp
+++ b/src/server/game/Entities/Player/PlayerQuest.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
@@ -740,9 +740,9 @@ void Player::RewardQuest(Quest const* quest, uint32 reward, Object* questGiver,
if (log_slot < MAX_QUEST_LOG_SIZE)
SetQuestSlot(log_slot, 0);
- bool rewarded = IsQuestRewarded(quest_id) && !quest->IsDFQuest();
+ bool const rewarded = IsQuestRewarded(quest_id) && !quest->IsDFQuest() && !(quest->IsDaily() || quest->IsWeekly() || quest->IsMonthly());
- // Not give XP in case already completed once repeatable quest
+ // Repeatable quests (not time-based reset ones) should not give XP on subsequent completions
uint32 XP = rewarded ? 0 : CalculateQuestRewardXP(quest);
sScriptMgr->OnPlayerQuestComputeXP(this, quest, XP);
@@ -990,7 +990,7 @@ bool Player::SatisfyQuestLog(bool msg)
if (msg)
{
WorldPacket data(SMSG_QUESTLOG_FULL, 0);
- GetSession()->SendPacket(&data);
+ SendDirectMessage(&data);
LOG_DEBUG("network", "WORLD: Sent SMSG_QUESTLOG_FULL");
}
return false;
@@ -1405,9 +1405,7 @@ uint32 Player::CalculateQuestRewardXP(Quest const* quest)
uint32 xp = uint32(quest->XPValue(GetLevel()) * GetQuestRate(quest->IsDFQuest()));
// handle SPELL_AURA_MOD_XP_QUEST_PCT auras
- Unit::AuraEffectList const& ModXPPctAuras = GetAuraEffectsByType(SPELL_AURA_MOD_XP_QUEST_PCT);
- for (Unit::AuraEffectList::const_iterator i = ModXPPctAuras.begin(); i != ModXPPctAuras.end(); ++i)
- AddPct(xp, (*i)->GetAmount());
+ xp *= GetTotalAuraMultiplier(SPELL_AURA_MOD_XP_QUEST_PCT);
return xp;
}
@@ -2349,7 +2347,7 @@ void Player::SendQuestComplete(uint32 quest_id)
{
WorldPacket data(SMSG_QUESTUPDATE_COMPLETE, 4);
data << uint32(quest_id);
- GetSession()->SendPacket(&data);
+ SendDirectMessage(&data);
LOG_DEBUG("network", "WORLD: Sent SMSG_QUESTUPDATE_COMPLETE quest = {}", quest_id);
}
}
@@ -2376,7 +2374,7 @@ void Player::SendQuestReward(Quest const* quest, uint32 XP)
data << uint32(10 * quest->CalculateHonorGain(GetQuestLevel(quest)));
data << uint32(quest->GetBonusTalents()); // bonus talents
data << uint32(quest->GetRewArenaPoints());
- GetSession()->SendPacket(&data);
+ SendDirectMessage(&data);
}
void Player::SendQuestFailed(uint32 questId, InventoryResult reason)
@@ -2386,7 +2384,7 @@ void Player::SendQuestFailed(uint32 questId, InventoryResult reason)
WorldPacket data(SMSG_QUESTGIVER_QUEST_FAILED, 4 + 4);
data << uint32(questId);
data << uint32(reason); // failed reason (valid reasons: 4, 16, 50, 17, 74, other values show default message)
- GetSession()->SendPacket(&data);
+ SendDirectMessage(&data);
LOG_DEBUG("network", "WORLD: Sent SMSG_QUESTGIVER_QUEST_FAILED");
}
}
@@ -2397,7 +2395,7 @@ void Player::SendQuestTimerFailed(uint32 quest_id)
{
WorldPacket data(SMSG_QUESTUPDATE_FAILEDTIMER, 4);
data << uint32(quest_id);
- GetSession()->SendPacket(&data);
+ SendDirectMessage(&data);
LOG_DEBUG("network", "WORLD: Sent SMSG_QUESTUPDATE_FAILEDTIMER");
}
}
@@ -2406,7 +2404,7 @@ void Player::SendCanTakeQuestResponse(uint32 msg) const
{
WorldPacket data(SMSG_QUESTGIVER_QUEST_INVALID, 4);
data << uint32(msg);
- GetSession()->SendPacket(&data);
+ SendDirectMessage(&data);
LOG_DEBUG("network", "WORLD: Sent SMSG_QUESTGIVER_QUEST_INVALID");
}
@@ -2426,7 +2424,7 @@ void Player::SendQuestConfirmAccept(const Quest* quest, Player* pReceiver)
data << uint32(quest->GetQuestId());
data << quest->GetTitle();
data << GetGUID();
- pReceiver->GetSession()->SendPacket(&data);
+ pReceiver->SendDirectMessage(&data);
LOG_DEBUG("network", "WORLD: Sent SMSG_QUEST_CONFIRM_ACCEPT");
}
@@ -2439,7 +2437,7 @@ void Player::SendPushToPartyResponse(Player const* player, uint8 msg) const
WorldPacket data(MSG_QUEST_PUSH_RESULT, (8 + 1));
data << player->GetGUID();
data << uint8(msg); // valid values: 0-8
- GetSession()->SendPacket(&data);
+ SendDirectMessage(&data);
LOG_DEBUG("network", "WORLD: Sent MSG_QUEST_PUSH_RESULT");
}
}
@@ -2450,7 +2448,7 @@ void Player::SendQuestUpdateAddItem(Quest const* /*quest*/, uint32 /*item_idx*/,
LOG_DEBUG("network", "WORLD: Sent SMSG_QUESTUPDATE_ADD_ITEM");
//data << quest->RequiredItemId[item_idx];
//data << count;
- GetSession()->SendPacket(&data);
+ SendDirectMessage(&data);
}
void Player::SendQuestUpdateAddCreatureOrGo(Quest const* quest, ObjectGuid guid, uint32 creatureOrGO_idx, uint16 old_count, uint16 add_count)
@@ -2469,7 +2467,7 @@ void Player::SendQuestUpdateAddCreatureOrGo(Quest const* quest, ObjectGuid guid,
data << uint32(old_count + add_count);
data << uint32(quest->RequiredNpcOrGoCount[ creatureOrGO_idx ]);
data << guid;
- GetSession()->SendPacket(&data);
+ SendDirectMessage(&data);
uint16 log_slot = FindQuestSlot(quest->GetQuestId());
if (log_slot < MAX_QUEST_LOG_SIZE)
@@ -2485,7 +2483,7 @@ void Player::SendQuestUpdateAddPlayer(Quest const* quest, uint16 old_count, uint
data << uint32(quest->GetQuestId());
data << uint32(old_count + add_count);
data << uint32(quest->GetPlayersSlain());
- GetSession()->SendPacket(&data);
+ SendDirectMessage(&data);
uint16 log_slot = FindQuestSlot(quest->GetQuestId());
if (log_slot < MAX_QUEST_LOG_SIZE)
diff --git a/src/server/game/Entities/Player/PlayerSettings.cpp b/src/server/game/Entities/Player/PlayerSettings.cpp
index 65e84d52f6..f1eb86367c 100644
--- a/src/server/game/Entities/Player/PlayerSettings.cpp
+++ b/src/server/game/Entities/Player/PlayerSettings.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/game/Entities/Player/PlayerSettings.h b/src/server/game/Entities/Player/PlayerSettings.h
index 221303ee33..496685e230 100644
--- a/src/server/game/Entities/Player/PlayerSettings.h
+++ b/src/server/game/Entities/Player/PlayerSettings.h
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/game/Entities/Player/PlayerStorage.cpp b/src/server/game/Entities/Player/PlayerStorage.cpp
index 78c1ad0ef0..46d964e819 100644
--- a/src/server/game/Entities/Player/PlayerStorage.cpp
+++ b/src/server/game/Entities/Player/PlayerStorage.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
@@ -51,6 +51,7 @@
#include "QuestDef.h"
#include "ReputationMgr.h"
#include "ScriptMgr.h"
+#include "ScriptObjectFwd.h"
#include "SocialMgr.h"
#include "Spell.h"
#include "SpellAuraEffects.h"
@@ -59,6 +60,7 @@
#include "StringConvert.h"
#include "Tokenize.h"
#include "Transport.h"
+#include "Unit.h"
#include "UpdateFieldFlags.h"
#include "Util.h"
#include "World.h"
@@ -539,7 +541,7 @@ Item* Player::GetShield(bool useable) const
return item;
}
-uint8 Player::GetAttackBySlot(uint8 slot)
+WeaponAttackType Player::GetAttackBySlot(uint8 slot)
{
switch (slot)
{
@@ -1536,7 +1538,7 @@ InventoryResult Player::CanStoreItem(uint8 bag, uint8 slot, ItemPosCountVec& des
}
//////////////////////////////////////////////////////////////////////////
-InventoryResult Player::CanStoreItems(Item** pItems, int count) const
+InventoryResult Player::CanStoreItems(Item** pItems, int32 count) const
{
Item* pItem2;
@@ -1847,8 +1849,13 @@ InventoryResult Player::CanEquipItem(uint8 slot, uint16& dest, Item* pItem, bool
return EQUIP_ERR_NOT_DURING_ARENA_MATCH;
}
- if (IsInCombat() && (pProto->Class == ITEM_CLASS_WEAPON || pProto->InventoryType == INVTYPE_RELIC) && m_weaponChangeTimer != 0)
- return EQUIP_ERR_CANT_DO_RIGHT_NOW; // maybe exist better err
+ if (IsInCombat() && (pProto->Class == ITEM_CLASS_WEAPON || pProto->InventoryType == INVTYPE_RELIC))
+ {
+ uint32 cooldownSpell = IsClass(CLASS_ROGUE, CLASS_CONTEXT_WEAPON_SWAP) ? 6123 : 6119;
+ uint32 startRecoveryTime = sSpellMgr->GetSpellInfo(cooldownSpell)->StartRecoveryTime;
+ if (m_weaponChangeTimer != 0 && m_weaponChangeTimer != startRecoveryTime)
+ return EQUIP_ERR_CANT_DO_RIGHT_NOW; // maybe exist better err
+ }
if (IsNonMeleeSpellCast(false))
return EQUIP_ERR_CANT_DO_RIGHT_NOW;
@@ -2757,7 +2764,7 @@ Item* Player::EquipItem(uint16 pos, Item* pItem, bool update)
WorldPacket data;
BuildCooldownPacket(data, SPELL_COOLDOWN_FLAG_INCLUDE_GCD, cooldownSpell, 0);
- GetSession()->SendPacket(&data);
+ SendDirectMessage(&data);
}
}
}
@@ -2890,7 +2897,7 @@ void Player::VisualizeItem(uint8 slot, Item* pItem)
pItem->SetState(ITEM_CHANGED, this);
}
-void Player::RemoveItem(uint8 bag, uint8 slot, bool update, bool swap)
+void Player::RemoveItem(uint8 bag, uint8 slot, bool update)
{
// note: removeitem does not actually change the item
// it only takes the item out of storage temporarily
@@ -2925,12 +2932,6 @@ void Player::RemoveItem(uint8 bag, uint8 slot, bool update, bool swap)
// remove item dependent auras and casts (only weapon and armor slots)
if (slot < INVENTORY_SLOT_BAG_END && slot < EQUIPMENT_SLOT_END)
{
- // Xinef: Ensure that this function is called for places with swap=true
- if (!swap)
- {
- RemoveItemDependentAurasAndCasts(pItem);
- }
-
// remove held enchantments, update expertise
if (slot == EQUIPMENT_SLOT_MAINHAND)
{
@@ -3065,9 +3066,6 @@ void Player::DestroyItem(uint8 bag, uint8 slot, bool update)
if (slot < EQUIPMENT_SLOT_END)
{
- // remove item dependent auras and casts (only weapon and armor slots)
- RemoveItemDependentAurasAndCasts(pItem);
-
// update expertise and armor penetration - passive auras may need it
switch (slot)
{
@@ -3859,8 +3857,8 @@ void Player::SwapItem(uint16 src, uint16 dst)
}
// now do moves, remove...
- RemoveItem(dstbag, dstslot, false, true);
- RemoveItem(srcbag, srcslot, false, true);
+ RemoveItem(dstbag, dstslot, false);
+ RemoveItem(srcbag, srcslot, false);
// add to dest
if (IsInventoryPos(dst))
@@ -4051,7 +4049,7 @@ void Player::SendEquipError(InventoryResult msg, Item* pItem, Item* pItem2, uint
break;
}
}
- GetSession()->SendPacket(&data);
+ SendDirectMessage(&data);
}
void Player::SendBuyError(BuyResult msg, Creature* creature, uint32 item, uint32 param)
@@ -4063,7 +4061,7 @@ void Player::SendBuyError(BuyResult msg, Creature* creature, uint32 item, uint32
if (param > 0)
data << uint32(param);
data << uint8(msg);
- GetSession()->SendPacket(&data);
+ SendDirectMessage(&data);
}
void Player::SendSellError(SellResult msg, Creature* creature, ObjectGuid guid, uint32 param)
@@ -4075,7 +4073,7 @@ void Player::SendSellError(SellResult msg, Creature* creature, ObjectGuid guid,
if (param > 0)
data << uint32(param);
data << uint8(msg);
- GetSession()->SendPacket(&data);
+ SendDirectMessage(&data);
}
void Player::TradeCancel(bool sendback, TradeStatus status /*= TRADE_STATUS_TRADE_CANCELED*/)
@@ -4349,13 +4347,12 @@ void Player::ApplyEnchantment(Item* item, EnchantmentSlot slot, bool apply, bool
// processed in Player::CastItemCombatSpell
break;
case ITEM_ENCHANTMENT_TYPE_DAMAGE:
- if (item->GetSlot() == EQUIPMENT_SLOT_MAINHAND)
- HandleStatModifier(UNIT_MOD_DAMAGE_MAINHAND, TOTAL_VALUE, float(enchant_amount), apply);
- else if (item->GetSlot() == EQUIPMENT_SLOT_OFFHAND)
- HandleStatModifier(UNIT_MOD_DAMAGE_OFFHAND, TOTAL_VALUE, float(enchant_amount), apply);
- else if (item->GetSlot() == EQUIPMENT_SLOT_RANGED)
- HandleStatModifier(UNIT_MOD_DAMAGE_RANGED, TOTAL_VALUE, float(enchant_amount), apply);
+ {
+ WeaponAttackType const attackType = Player::GetAttackBySlot(item->GetSlot());
+ if (attackType != MAX_ATTACK)
+ UpdateDamageDoneMods(attackType, apply ? -1 : slot);
break;
+ }
case ITEM_ENCHANTMENT_TYPE_EQUIP_SPELL:
if (enchant_spell_id)
{
@@ -4406,7 +4403,7 @@ void Player::ApplyEnchantment(Item* item, EnchantmentSlot slot, bool apply, bool
}
}
- HandleStatModifier(UnitMods(UNIT_MOD_RESISTANCE_START + enchant_spell_id), TOTAL_VALUE, float(enchant_amount), apply);
+ HandleStatFlatModifier(UnitMods(UNIT_MOD_RESISTANCE_START + enchant_spell_id), TOTAL_VALUE, float(enchant_amount), apply);
break;
case ITEM_ENCHANTMENT_TYPE_STAT:
{
@@ -4433,36 +4430,36 @@ void Player::ApplyEnchantment(Item* item, EnchantmentSlot slot, bool apply, bool
{
case ITEM_MOD_MANA:
LOG_DEBUG("entities.player.items", "+ {} MANA", enchant_amount);
- HandleStatModifier(UNIT_MOD_MANA, BASE_VALUE, float(enchant_amount), apply);
+ HandleStatFlatModifier(UNIT_MOD_MANA, BASE_VALUE, float(enchant_amount), apply);
break;
case ITEM_MOD_HEALTH:
LOG_DEBUG("entities.player.items", "+ {} HEALTH", enchant_amount);
- HandleStatModifier(UNIT_MOD_HEALTH, BASE_VALUE, float(enchant_amount), apply);
+ HandleStatFlatModifier(UNIT_MOD_HEALTH, BASE_VALUE, float(enchant_amount), apply);
break;
case ITEM_MOD_AGILITY:
LOG_DEBUG("entities.player.items", "+ {} AGILITY", enchant_amount);
- HandleStatModifier(UNIT_MOD_STAT_AGILITY, TOTAL_VALUE, float(enchant_amount), apply);
- ApplyStatBuffMod(STAT_AGILITY, (float)enchant_amount, apply);
+ HandleStatFlatModifier(UNIT_MOD_STAT_AGILITY, TOTAL_VALUE, float(enchant_amount), apply);
+ UpdateStatBuffMod(STAT_AGILITY);
break;
case ITEM_MOD_STRENGTH:
LOG_DEBUG("entities.player.items", "+ {} STRENGTH", enchant_amount);
- HandleStatModifier(UNIT_MOD_STAT_STRENGTH, TOTAL_VALUE, float(enchant_amount), apply);
- ApplyStatBuffMod(STAT_STRENGTH, (float)enchant_amount, apply);
+ HandleStatFlatModifier(UNIT_MOD_STAT_STRENGTH, TOTAL_VALUE, float(enchant_amount), apply);
+ UpdateStatBuffMod(STAT_STRENGTH);
break;
case ITEM_MOD_INTELLECT:
LOG_DEBUG("entities.player.items", "+ {} INTELLECT", enchant_amount);
- HandleStatModifier(UNIT_MOD_STAT_INTELLECT, TOTAL_VALUE, float(enchant_amount), apply);
- ApplyStatBuffMod(STAT_INTELLECT, (float)enchant_amount, apply);
+ HandleStatFlatModifier(UNIT_MOD_STAT_INTELLECT, TOTAL_VALUE, float(enchant_amount), apply);
+ UpdateStatBuffMod(STAT_INTELLECT);
break;
case ITEM_MOD_SPIRIT:
LOG_DEBUG("entities.player.items", "+ {} SPIRIT", enchant_amount);
- HandleStatModifier(UNIT_MOD_STAT_SPIRIT, TOTAL_VALUE, float(enchant_amount), apply);
- ApplyStatBuffMod(STAT_SPIRIT, (float)enchant_amount, apply);
+ HandleStatFlatModifier(UNIT_MOD_STAT_SPIRIT, TOTAL_VALUE, float(enchant_amount), apply);
+ UpdateStatBuffMod(STAT_SPIRIT);
break;
case ITEM_MOD_STAMINA:
LOG_DEBUG("entities.player.items", "+ {} STAMINA", enchant_amount);
- HandleStatModifier(UNIT_MOD_STAT_STAMINA, TOTAL_VALUE, float(enchant_amount), apply);
- ApplyStatBuffMod(STAT_STAMINA, (float)enchant_amount, apply);
+ HandleStatFlatModifier(UNIT_MOD_STAT_STAMINA, TOTAL_VALUE, float(enchant_amount), apply);
+ UpdateStatBuffMod(STAT_STAMINA);
break;
case ITEM_MOD_DEFENSE_SKILL_RATING:
ApplyRatingMod(CR_DEFENSE_SKILL, enchant_amount, apply);
@@ -4573,12 +4570,12 @@ void Player::ApplyEnchantment(Item* item, EnchantmentSlot slot, bool apply, bool
LOG_DEBUG("entities.player.items", "+ {} EXPERTISE", enchant_amount);
break;
case ITEM_MOD_ATTACK_POWER:
- HandleStatModifier(UNIT_MOD_ATTACK_POWER, TOTAL_VALUE, float(enchant_amount), apply);
- HandleStatModifier(UNIT_MOD_ATTACK_POWER_RANGED, TOTAL_VALUE, float(enchant_amount), apply);
+ HandleStatFlatModifier(UNIT_MOD_ATTACK_POWER, TOTAL_VALUE, float(enchant_amount), apply);
+ HandleStatFlatModifier(UNIT_MOD_ATTACK_POWER_RANGED, TOTAL_VALUE, float(enchant_amount), apply);
LOG_DEBUG("entities.player.items", "+ {} ATTACK_POWER", enchant_amount);
break;
case ITEM_MOD_RANGED_ATTACK_POWER:
- HandleStatModifier(UNIT_MOD_ATTACK_POWER_RANGED, TOTAL_VALUE, float(enchant_amount), apply);
+ HandleStatFlatModifier(UNIT_MOD_ATTACK_POWER_RANGED, TOTAL_VALUE, float(enchant_amount), apply);
LOG_DEBUG("entities.player.items", "+ {} RANGED_ATTACK_POWER", enchant_amount);
break;
// case ITEM_MOD_FERAL_ATTACK_POWER:
@@ -4606,7 +4603,7 @@ void Player::ApplyEnchantment(Item* item, EnchantmentSlot slot, bool apply, bool
LOG_DEBUG("entities.player.items", "+ {} SPELL_PENETRATION", enchant_amount);
break;
case ITEM_MOD_BLOCK_VALUE:
- HandleBaseModValue(SHIELD_BLOCK_VALUE, FLAT_MOD, float(enchant_amount), apply);
+ HandleBaseModFlatValue(SHIELD_BLOCK_VALUE, float(enchant_amount), apply);
LOG_DEBUG("entities.player.items", "+ {} BLOCK_VALUE", enchant_amount);
break;
/// @deprecated item mods
@@ -4625,20 +4622,9 @@ void Player::ApplyEnchantment(Item* item, EnchantmentSlot slot, bool apply, bool
}
case ITEM_ENCHANTMENT_TYPE_TOTEM: // Shaman Rockbiter Weapon
{
- if (IsClass(CLASS_SHAMAN, CLASS_CONTEXT_ABILITY))
- {
- float addValue = 0.0f;
- if (item->GetSlot() == EQUIPMENT_SLOT_MAINHAND)
- {
- addValue = float(enchant_amount * item->GetTemplate()->Delay / 1000.0f);
- HandleStatModifier(UNIT_MOD_DAMAGE_MAINHAND, TOTAL_VALUE, addValue, apply);
- }
- else if (item->GetSlot() == EQUIPMENT_SLOT_OFFHAND)
- {
- addValue = float(enchant_amount * item->GetTemplate()->Delay / 1000.0f);
- HandleStatModifier(UNIT_MOD_DAMAGE_OFFHAND, TOTAL_VALUE, addValue, apply);
- }
- }
+ WeaponAttackType const attackType = Player::GetAttackBySlot(item->GetSlot());
+ if (attackType != MAX_ATTACK)
+ UpdateDamageDoneMods(attackType);
break;
}
case ITEM_ENCHANTMENT_TYPE_USE_SPELL:
@@ -4770,7 +4756,7 @@ void Player::SendNewItem(Item* item, uint32 count, bool received, bool created,
if (broadcast && GetGroup())
GetGroup()->BroadcastPacket(&data, true);
else
- GetSession()->SendPacket(&data);
+ SendDirectMessage(&data);
}
/*********************************************************/
@@ -6302,7 +6288,7 @@ void Player::_LoadQuestStatus(PreparedQueryResult result)
++slot;
}
- LOG_DEBUG("entities.player.loading", "Quest status is {{}} for quest {{}} for player ({})", questStatusData.Status, quest_id, GetGUID().ToString());
+ LOG_DEBUG("entities.player.loading", "Quest status is ({}) for quest ({}) for player ({})", questStatusData.Status, quest_id, GetGUID().ToString());
}
} while (result->NextRow());
}
@@ -6413,7 +6399,7 @@ void Player::_LoadWeeklyQuestStatus(PreparedQueryResult result)
continue;
m_weeklyquests.insert(quest_id);
- LOG_DEBUG("entities.player.loading", "Weekly quest {{}} cooldown for player ({})", quest_id, GetGUID().ToString());
+ LOG_DEBUG("entities.player.loading", "Weekly quest ({}) cooldown for player ({})", quest_id, GetGUID().ToString());
} while (result->NextRow());
}
@@ -6436,7 +6422,7 @@ void Player::_LoadSeasonalQuestStatus(PreparedQueryResult result)
continue;
m_seasonalquests[event_id].insert(quest_id);
- LOG_DEBUG("entities.player.loading", "Seasonal quest {{}} cooldown for player ({})", quest_id, GetGUID().ToString());
+ LOG_DEBUG("entities.player.loading", "Seasonal quest ({}) cooldown for player ({})", quest_id, GetGUID().ToString());
} while (result->NextRow());
}
@@ -6458,7 +6444,7 @@ void Player::_LoadMonthlyQuestStatus(PreparedQueryResult result)
continue;
m_monthlyquests.insert(quest_id);
- LOG_DEBUG("entities.player.loading", "Monthly quest {{}} cooldown for player ({})", quest_id, GetGUID().ToString());
+ LOG_DEBUG("entities.player.loading", "Monthly quest ({}) cooldown for player ({})", quest_id, GetGUID().ToString());
} while (result->NextRow());
}
@@ -6520,7 +6506,7 @@ void Player::BindToInstance()
WorldPacket data(SMSG_INSTANCE_SAVE_CREATED, 4);
data << uint32(0);
- GetSession()->SendPacket(&data);
+ SendDirectMessage(&data);
sInstanceSaveMgr->PlayerBindToInstance(this->GetGUID(), mapSave, true, this);
}
@@ -6555,7 +6541,7 @@ void Player::SendRaidInfo()
}
}
data.put<uint32>(p_counter, counter);
- GetSession()->SendPacket(&data);
+ SendDirectMessage(&data);
}
/*
@@ -6582,7 +6568,7 @@ void Player::SendSavedInstances()
//Send opcode 811. true or false means, whether you have current raid/heroic instances
data.Initialize(SMSG_UPDATE_INSTANCE_OWNERSHIP);
data << uint32(hasBeenSaved);
- GetSession()->SendPacket(&data);
+ SendDirectMessage(&data);
if (!hasBeenSaved)
return;
@@ -6596,7 +6582,7 @@ void Player::SendSavedInstances()
{
data.Initialize(SMSG_UPDATE_LAST_INSTANCE);
data << uint32(itr->second.save->GetMapId());
- GetSession()->SendPacket(&data);
+ SendDirectMessage(&data);
}
}
}
@@ -6833,7 +6819,7 @@ bool Player::Satisfy(DungeonProgressionRequirements const* ar, uint32 target_map
|| missingPlayerItems.size() || missingPlayerQuests.size() || missingPlayerAchievements.size()
|| missingLeaderItems.size() || missingLeaderQuests.size() || missingLeaderAchievements.size())
{
- if (!sScriptMgr->OnPlayerNotAvoidSatisfy(partyLeader, ar, target_map, report))
+ if (!sScriptMgr->OnPlayerNotAvoidSatisfy(this, ar, target_map, report))
return true;
if (report)
diff --git a/src/server/game/Entities/Player/PlayerTaxi.cpp b/src/server/game/Entities/Player/PlayerTaxi.cpp
index 9c56f58243..29afc666e7 100644
--- a/src/server/game/Entities/Player/PlayerTaxi.cpp
+++ b/src/server/game/Entities/Player/PlayerTaxi.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/game/Entities/Player/PlayerTaxi.h b/src/server/game/Entities/Player/PlayerTaxi.h
index 3b064ba7af..e8041cb090 100644
--- a/src/server/game/Entities/Player/PlayerTaxi.h
+++ b/src/server/game/Entities/Player/PlayerTaxi.h
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/game/Entities/Player/PlayerUpdates.cpp b/src/server/game/Entities/Player/PlayerUpdates.cpp
index fd41f73aac..9a4427ce49 100644
--- a/src/server/game/Entities/Player/PlayerUpdates.cpp
+++ b/src/server/game/Entities/Player/PlayerUpdates.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
@@ -701,7 +701,7 @@ void Player::UpdateRating(CombatRating cr)
void Player::UpdateAllRatings()
{
- for (int cr = 0; cr < MAX_COMBAT_RATING; ++cr)
+ for (uint8 cr = 0; cr < MAX_COMBAT_RATING; ++cr)
UpdateRating(CombatRating(cr));
}
@@ -1289,13 +1289,9 @@ void Player::UpdateZone(uint32 newZone, uint32 newArea, bool force)
return;
if (sWorld->getBoolConfig(CONFIG_WEATHER))
- {
- if (Weather* weather = WeatherMgr::FindWeather(zone->ID))
- weather->SendWeatherUpdateToPlayer(this);
- else if (!WeatherMgr::AddWeather(zone->ID))
- // send fine weather packet to remove old zone's weather
- WeatherMgr::SendFineWeatherUpdateToPlayer(this);
- }
+ GetMap()->GetOrGenerateZoneDefaultWeather(newZone);
+
+ GetMap()->SendZoneDynamicInfo(newZone, this);
sScriptMgr->OnPlayerUpdateZone(this, newZone, newArea);
@@ -1405,7 +1401,7 @@ void Player::UpdateHomebindTime(uint32 time)
WorldPacket data(SMSG_RAID_GROUP_ONLY, 4 + 4);
data << uint32(0);
data << uint32(0);
- GetSession()->SendPacket(&data);
+ SendDirectMessage(&data);
}
// instance is valid, reset homebind timer
m_HomebindTimer = 0;
@@ -1428,7 +1424,7 @@ void Player::UpdateHomebindTime(uint32 time)
WorldPacket data(SMSG_RAID_GROUP_ONLY, 4 + 4);
data << uint32(m_HomebindTimer);
data << uint32(1);
- GetSession()->SendPacket(&data);
+ SendDirectMessage(&data);
LOG_DEBUG(
"maps",
"PLAYER: Player '{}' ({}) will be teleported to homebind in 60 "
@@ -1443,6 +1439,9 @@ void Player::UpdatePvPState()
if (pvpInfo.IsHostile) // in hostile area
{
+ if (IsInFlight()) // on taxi
+ return;
+
if (!IsPvP() || pvpInfo.EndTimer != 0)
UpdatePvP(true, true);
}
@@ -1775,7 +1774,7 @@ void Player::UpdateTriggerVisibility()
WorldPacket packet;
udata.BuildPacket(packet);
- GetSession()->SendPacket(&packet);
+ SendDirectMessage(&packet);
}
void Player::UpdateForQuestWorldObjects()
@@ -1828,7 +1827,7 @@ void Player::UpdateForQuestWorldObjects()
WorldPacket packet;
udata.BuildPacket(packet);
- GetSession()->SendPacket(&packet);
+ SendDirectMessage(&packet);
}
void Player::UpdateTitansGrip()
@@ -1972,10 +1971,7 @@ void Player::UpdateCharmedAI()
Unit* target = GetVictim();
if (target)
- {
SetInFront(target);
- SendMovementFlagUpdate(true);
- }
if (HasUnitState(UNIT_STATE_CASTING))
return;
diff --git a/src/server/game/Entities/Player/SocialMgr.cpp b/src/server/game/Entities/Player/SocialMgr.cpp
index d5b5fdf59a..ed59470ddd 100644
--- a/src/server/game/Entities/Player/SocialMgr.cpp
+++ b/src/server/game/Entities/Player/SocialMgr.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
@@ -37,7 +37,7 @@ uint32 PlayerSocial::GetNumberOfSocialsWithFlag(SocialFlag flag) const
return counter;
}
-bool PlayerSocial::AddToSocialList(ObjectGuid friendGuid, SocialFlag flag)
+bool PlayerSocial::AddToSocialList(ObjectGuid const& friendGuid, SocialFlag flag)
{
// check client limits
if (GetNumberOfSocialsWithFlag(flag) >= (((flag & SOCIAL_FLAG_FRIEND) != 0) ? SOCIALMGR_FRIEND_LIMIT : SOCIALMGR_IGNORE_LIMIT))
@@ -71,7 +71,7 @@ bool PlayerSocial::AddToSocialList(ObjectGuid friendGuid, SocialFlag flag)
return true;
}
-void PlayerSocial::RemoveFromSocialList(ObjectGuid friendGuid, SocialFlag flag)
+void PlayerSocial::RemoveFromSocialList(ObjectGuid const& friendGuid, SocialFlag flag)
{
auto itr = m_playerSocialMap.find(friendGuid);
if (itr == m_playerSocialMap.end()) // not exist
@@ -102,7 +102,7 @@ void PlayerSocial::RemoveFromSocialList(ObjectGuid friendGuid, SocialFlag flag)
}
}
-void PlayerSocial::SetFriendNote(ObjectGuid friendGuid, std::string note)
+void PlayerSocial::SetFriendNote(ObjectGuid const& friendGuid, std::string note)
{
auto itr = m_playerSocialMap.find(friendGuid);
if (itr == m_playerSocialMap.end()) // not exist
@@ -172,11 +172,11 @@ void PlayerSocial::SendSocialList(Player* player, uint32 flags)
}
data.put<uint32>(countPos, totalCount);
- player->GetSession()->SendPacket(&data);
+ player->SendDirectMessage(&data);
LOG_DEBUG("network", "WORLD: Sent SMSG_CONTACT_LIST");
}
-bool PlayerSocial::_checkContact(ObjectGuid guid, SocialFlag flags) const
+bool PlayerSocial::_checkContact(ObjectGuid const& guid, SocialFlag flags) const
{
auto const& itr = m_playerSocialMap.find(guid);
if (itr != m_playerSocialMap.end())
@@ -185,12 +185,12 @@ bool PlayerSocial::_checkContact(ObjectGuid guid, SocialFlag flags) const
return false;
}
-bool PlayerSocial::HasFriend(ObjectGuid friend_guid) const
+bool PlayerSocial::HasFriend(ObjectGuid const& friend_guid) const
{
return _checkContact(friend_guid, SOCIAL_FLAG_FRIEND);
}
-bool PlayerSocial::HasIgnore(ObjectGuid ignore_guid) const
+bool PlayerSocial::HasIgnore(ObjectGuid const& ignore_guid) const
{
return _checkContact(ignore_guid, SOCIAL_FLAG_IGNORED);
}
@@ -209,7 +209,7 @@ SocialMgr* SocialMgr::instance()
return &instance;
}
-void SocialMgr::GetFriendInfo(Player* player, ObjectGuid friendGUID, FriendInfo& friendInfo)
+void SocialMgr::GetFriendInfo(Player* player, ObjectGuid const& friendGUID, FriendInfo& friendInfo)
{
if (!player)
return;
@@ -247,14 +247,14 @@ void SocialMgr::GetFriendInfo(Player* player, ObjectGuid friendGUID, FriendInfo&
}
}
-void SocialMgr::MakeFriendStatusPacket(FriendsResult result, ObjectGuid guid, WorldPacket* data)
+void SocialMgr::MakeFriendStatusPacket(FriendsResult result, ObjectGuid const& guid, WorldPacket* data)
{
data->Initialize(SMSG_FRIEND_STATUS, 9);
*data << uint8(result);
*data << guid;
}
-void SocialMgr::SendFriendStatus(Player* player, FriendsResult result, ObjectGuid friendGuid, bool broadcast)
+void SocialMgr::SendFriendStatus(Player* player, FriendsResult result, ObjectGuid const& friendGuid, bool broadcast)
{
FriendInfo fi;
GetFriendInfo(player, friendGuid, fi);
@@ -288,7 +288,7 @@ void SocialMgr::SendFriendStatus(Player* player, FriendsResult result, ObjectGui
if (broadcast)
BroadcastToFriendListers(player, &data);
else
- player->GetSession()->SendPacket(&data);
+ player->SendDirectMessage(&data);
}
void SocialMgr::BroadcastToFriendListers(Player* player, WorldPacket* packet)
@@ -311,12 +311,12 @@ void SocialMgr::BroadcastToFriendListers(Player* player, WorldPacket* packet)
// PLAYER see his team only and PLAYER can't see MODERATOR, GAME MASTER, ADMINISTRATOR characters
// MODERATOR, GAME MASTER, ADMINISTRATOR can see all
if (pFriend && (!AccountMgr::IsPlayerAccount(pFriend->GetSession()->GetSecurity()) || ((pFriend->GetTeamId() == teamId || allowTwoSideWhoList) && security <= gmLevelInWhoList)) && player->IsVisibleGloballyFor(pFriend))
- pFriend->GetSession()->SendPacket(packet);
+ pFriend->SendDirectMessage(packet);
}
}
}
-PlayerSocial* SocialMgr::LoadFromDB(PreparedQueryResult result, ObjectGuid guid)
+PlayerSocial* SocialMgr::LoadFromDB(PreparedQueryResult result, ObjectGuid const& guid)
{
PlayerSocial* social = &m_socialMap[guid];
social->SetPlayerGUID(guid);
diff --git a/src/server/game/Entities/Player/SocialMgr.h b/src/server/game/Entities/Player/SocialMgr.h
index a35187b6fb..ff1208a2e9 100644
--- a/src/server/game/Entities/Player/SocialMgr.h
+++ b/src/server/game/Entities/Player/SocialMgr.h
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
@@ -104,19 +104,19 @@ class PlayerSocial
public:
PlayerSocial();
// adding/removing
- bool AddToSocialList(ObjectGuid friend_guid, SocialFlag flag);
- void RemoveFromSocialList(ObjectGuid friend_guid, SocialFlag flag);
- void SetFriendNote(ObjectGuid friendGuid, std::string note);
+ bool AddToSocialList(ObjectGuid const& friend_guid, SocialFlag flag);
+ void RemoveFromSocialList(ObjectGuid const& friend_guid, SocialFlag flag);
+ void SetFriendNote(ObjectGuid const& friendGuid, std::string note);
// Packet send's
void SendSocialList(Player* player, uint32 flags);
// Misc
- bool HasFriend(ObjectGuid friend_guid) const;
- bool HasIgnore(ObjectGuid ignore_guid) const;
- ObjectGuid GetPlayerGUID() const { return m_playerGUID; }
- void SetPlayerGUID(ObjectGuid guid) { m_playerGUID = guid; }
+ bool HasFriend(ObjectGuid const& friend_guid) const;
+ bool HasIgnore(ObjectGuid const& ignore_guid) const;
+ ObjectGuid const& GetPlayerGUID() const { return m_playerGUID; }
+ void SetPlayerGUID(ObjectGuid const& guid) { m_playerGUID = guid; }
uint32 GetNumberOfSocialsWithFlag(SocialFlag flag) const;
private:
- bool _checkContact(ObjectGuid guid, SocialFlag flags) const;
+ bool _checkContact(ObjectGuid const& guid, SocialFlag flags) const;
typedef std::map<ObjectGuid, FriendInfo> PlayerSocialMap;
PlayerSocialMap m_playerSocialMap;
ObjectGuid m_playerGUID;
@@ -131,14 +131,14 @@ class SocialMgr
public:
static SocialMgr* instance();
// Misc
- void RemovePlayerSocial(ObjectGuid guid) { m_socialMap.erase(guid); }
- static void GetFriendInfo(Player* player, ObjectGuid friendGUID, FriendInfo& friendInfo);
+ void RemovePlayerSocial(ObjectGuid const& guid) { m_socialMap.erase(guid); }
+ static void GetFriendInfo(Player* player, ObjectGuid const& friendGUID, FriendInfo& friendInfo);
// Packet management
- void MakeFriendStatusPacket(FriendsResult result, ObjectGuid friend_guid, WorldPacket* data);
- void SendFriendStatus(Player* player, FriendsResult result, ObjectGuid friend_guid, bool broadcast);
+ void MakeFriendStatusPacket(FriendsResult result, ObjectGuid const& friend_guid, WorldPacket* data);
+ void SendFriendStatus(Player* player, FriendsResult result, ObjectGuid const& friend_guid, bool broadcast);
void BroadcastToFriendListers(Player* player, WorldPacket* packet);
// Loading
- PlayerSocial* LoadFromDB(PreparedQueryResult result, ObjectGuid guid);
+ PlayerSocial* LoadFromDB(PreparedQueryResult result, ObjectGuid const& guid);
private:
typedef std::map<ObjectGuid, PlayerSocial> SocialMap;
SocialMap m_socialMap;
diff --git a/src/server/game/Entities/Player/TradeData.cpp b/src/server/game/Entities/Player/TradeData.cpp
index 363e338e6f..7f0fca7f19 100644
--- a/src/server/game/Entities/Player/TradeData.cpp
+++ b/src/server/game/Entities/Player/TradeData.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/game/Entities/Player/TradeData.h b/src/server/game/Entities/Player/TradeData.h
index 997726140f..5eb57e5fbc 100644
--- a/src/server/game/Entities/Player/TradeData.h
+++ b/src/server/game/Entities/Player/TradeData.h
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/game/Entities/Totem/Totem.cpp b/src/server/game/Entities/Totem/Totem.cpp
index db4fae0e62..f0e71d231f 100644
--- a/src/server/game/Entities/Totem/Totem.cpp
+++ b/src/server/game/Entities/Totem/Totem.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
@@ -119,11 +119,11 @@ void Totem::InitSummon()
}
}
-void Totem::UnSummon(uint32 msTime)
+void Totem::UnSummon(Milliseconds msTime)
{
- if (msTime)
+ if (msTime > 0ms)
{
- m_Events.AddEvent(new ForcedUnsummonDelayEvent(*this), m_Events.CalculateTime(msTime));
+ m_Events.AddEventAtOffset(new ForcedUnsummonDelayEvent(*this), msTime);
return;
}
diff --git a/src/server/game/Entities/Totem/Totem.h b/src/server/game/Entities/Totem/Totem.h
index 5265435d53..3149e63984 100644
--- a/src/server/game/Entities/Totem/Totem.h
+++ b/src/server/game/Entities/Totem/Totem.h
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
@@ -55,7 +55,7 @@ public:
void Update(uint32 time) override;
void InitStats(uint32 duration) override;
void InitSummon() override;
- void UnSummon(uint32 msTime = 0) override;
+ void UnSummon(Milliseconds msTime = 0ms) override;
uint32 GetSpell(uint8 slot = 0) const { return m_spells[slot]; }
uint32 GetTotemDuration() const { return m_duration; }
void SetTotemDuration(uint32 duration) { m_duration = duration; }
diff --git a/src/server/game/Entities/Transport/Transport.cpp b/src/server/game/Entities/Transport/Transport.cpp
index ee87af41d5..cb19879200 100644
--- a/src/server/game/Entities/Transport/Transport.cpp
+++ b/src/server/game/Entities/Transport/Transport.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/game/Entities/Transport/Transport.h b/src/server/game/Entities/Transport/Transport.h
index 9b50775afb..8287699df1 100644
--- a/src/server/game/Entities/Transport/Transport.h
+++ b/src/server/game/Entities/Transport/Transport.h
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/game/Entities/Unit/CharmInfo.cpp b/src/server/game/Entities/Unit/CharmInfo.cpp
index 6a7cde11aa..da08245c4a 100644
--- a/src/server/game/Entities/Unit/CharmInfo.cpp
+++ b/src/server/game/Entities/Unit/CharmInfo.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/game/Entities/Unit/CharmInfo.h b/src/server/game/Entities/Unit/CharmInfo.h
index 1b22d5fac2..10b86eb265 100644
--- a/src/server/game/Entities/Unit/CharmInfo.h
+++ b/src/server/game/Entities/Unit/CharmInfo.h
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/game/Entities/Unit/StatSystem.cpp b/src/server/game/Entities/Unit/StatSystem.cpp
index d9dce3c37d..24c025ac6d 100644
--- a/src/server/game/Entities/Unit/StatSystem.cpp
+++ b/src/server/game/Entities/Unit/StatSystem.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
@@ -157,7 +157,7 @@ bool Player::UpdateStats(Stats stat)
mask |= (*i)->GetMiscValue();
if (mask)
{
- for (uint32 rating = 0; rating < MAX_COMBAT_RATING; ++rating)
+ for (uint8 rating = 0; rating < MAX_COMBAT_RATING; ++rating)
if (mask & (1 << rating))
ApplyRatingMod(CombatRating(rating), 0, true);
}
@@ -204,7 +204,7 @@ void Player::UpdateSpellDamageAndHealingBonus()
bool Player::UpdateAllStats()
{
- for (int8 i = STAT_STRENGTH; i < MAX_STATS; ++i)
+ for (uint8 i = STAT_STRENGTH; i < MAX_STATS; ++i)
{
float value = GetTotalStatValue(Stats(i));
SetStat(Stats(i), int32(value));
@@ -247,9 +247,9 @@ void Player::UpdateResistances(uint32 school)
float value = 0.0f;
UnitMods unitMod = UnitMods(UNIT_MOD_RESISTANCE_START + school);
- value = GetModifierValue(unitMod, BASE_VALUE);
- value *= GetModifierValue(unitMod, BASE_PCT);
- value += GetModifierValue(unitMod, TOTAL_VALUE);
+ value = GetFlatModifierValue(unitMod, BASE_VALUE);
+ value *= GetPctModifierValue(unitMod, BASE_PCT);
+ value += GetFlatModifierValue(unitMod, TOTAL_VALUE);
AuraEffectList const& mResbyIntellect = GetAuraEffectsByType(SPELL_AURA_MOD_RESISTANCE_OF_STAT_PERCENT);
for(AuraEffectList::const_iterator i = mResbyIntellect.begin(); i != mResbyIntellect.end(); ++i)
@@ -258,7 +258,7 @@ void Player::UpdateResistances(uint32 school)
value += int32(GetStat(Stats((*i)->GetMiscValueB())) * (*i)->GetAmount() / 100.0f);
}
- value *= GetModifierValue(unitMod, TOTAL_PCT);
+ value *= GetPctModifierValue(unitMod, TOTAL_PCT);
SetResistance(SpellSchools(school), int32(value));
}
@@ -270,10 +270,10 @@ void Player::UpdateArmor()
{
UnitMods unitMod = UNIT_MOD_ARMOR;
- float value = GetModifierValue(unitMod, BASE_VALUE); // base armor (from items)
- value *= GetModifierValue(unitMod, BASE_PCT); // armor percent from items
- value += GetStat(STAT_AGILITY) * 2.0f; // armor bonus from stats
- value += GetModifierValue(unitMod, TOTAL_VALUE);
+ float value = GetFlatModifierValue(unitMod, BASE_VALUE); // base armor (from items)
+ value *= GetPctModifierValue(unitMod, BASE_PCT); // armor percent from items
+ value += GetStat(STAT_AGILITY) * 2.0f; // armor bonus from stats
+ value += GetFlatModifierValue(unitMod, TOTAL_VALUE);
//add dynamic flat mods
AuraEffectList const& mResbyIntellect = GetAuraEffectsByType(SPELL_AURA_MOD_RESISTANCE_OF_STAT_PERCENT);
@@ -283,7 +283,7 @@ void Player::UpdateArmor()
value += CalculatePct(GetStat(Stats((*i)->GetMiscValueB())), (*i)->GetAmount());
}
- value *= GetModifierValue(unitMod, TOTAL_PCT);
+ value *= GetPctModifierValue(unitMod, TOTAL_PCT);
SetArmor(int32(value));
@@ -314,10 +314,10 @@ void Player::UpdateMaxHealth()
{
UnitMods unitMod = UNIT_MOD_HEALTH;
- float value = GetModifierValue(unitMod, BASE_VALUE) + GetCreateHealth();
- value *= GetModifierValue(unitMod, BASE_PCT);
- value += GetModifierValue(unitMod, TOTAL_VALUE) + GetHealthBonusFromStamina();
- value *= GetModifierValue(unitMod, TOTAL_PCT);
+ float value = GetFlatModifierValue(unitMod, BASE_VALUE) + GetCreateHealth();
+ value *= GetPctModifierValue(unitMod, BASE_PCT);
+ value += GetFlatModifierValue(unitMod, TOTAL_VALUE) + GetHealthBonusFromStamina();
+ value *= GetPctModifierValue(unitMod, TOTAL_PCT);
sScriptMgr->OnPlayerAfterUpdateMaxHealth(this, value);
SetMaxHealth((uint32)value);
@@ -329,10 +329,10 @@ void Player::UpdateMaxPower(Powers power)
float bonusPower = (power == POWER_MANA && GetCreatePowers(power) > 0) ? GetManaBonusFromIntellect() : 0;
- float value = GetModifierValue(unitMod, BASE_VALUE) + GetCreatePowers(power);
- value *= GetModifierValue(unitMod, BASE_PCT);
- value += GetModifierValue(unitMod, TOTAL_VALUE) + bonusPower;
- value *= GetModifierValue(unitMod, TOTAL_PCT);
+ float value = GetFlatModifierValue(unitMod, BASE_VALUE) + GetCreatePowers(power);
+ value *= GetPctModifierValue(unitMod, BASE_PCT);
+ value += GetFlatModifierValue(unitMod, TOTAL_VALUE) + bonusPower;
+ value *= GetPctModifierValue(unitMod, TOTAL_PCT);
sScriptMgr->OnPlayerAfterUpdateMaxPower(this, power, value);
SetMaxPower(power, uint32(value));
@@ -487,10 +487,10 @@ void Player::UpdateAttackPowerAndDamage(bool ranged)
}
}
- SetModifierValue(unitMod, BASE_VALUE, val2);
+ SetStatFlatModifier(unitMod, BASE_VALUE, val2);
- float base_attPower = GetModifierValue(unitMod, BASE_VALUE) * GetModifierValue(unitMod, BASE_PCT);
- float attPowerMod = GetModifierValue(unitMod, TOTAL_VALUE);
+ float base_attPower = GetFlatModifierValue(unitMod, BASE_VALUE) * GetPctModifierValue(unitMod, BASE_PCT);
+ float attPowerMod = GetFlatModifierValue(unitMod, TOTAL_VALUE);
//add dynamic flat mods
if (ranged)
@@ -514,7 +514,7 @@ void Player::UpdateAttackPowerAndDamage(bool ranged)
attPowerMod += int32(GetArmor() / (*iter)->GetAmount());
}
- float attPowerMultiplier = GetModifierValue(unitMod, TOTAL_PCT) - 1.0f;
+ float attPowerMultiplier = GetPctModifierValue(unitMod, TOTAL_PCT) - 1.0f;
sScriptMgr->OnPlayerAfterUpdateAttackPowerAndDamage(this, level, base_attPower, attPowerMod, attPowerMultiplier, ranged);
SetInt32Value(index, (uint32)base_attPower); //UNIT_FIELD_(RANGED)_ATTACK_POWER field
@@ -576,10 +576,10 @@ void Player::CalculateMinMaxDamage(WeaponAttackType attType, bool normalized, bo
float attackSpeedMod = GetAPMultiplier(attType, normalized);
- float baseValue = GetModifierValue(unitMod, BASE_VALUE) + GetTotalAttackPowerValue(attType) / 14.0f * attackSpeedMod;
- float basePct = GetModifierValue(unitMod, BASE_PCT);
- float totalValue = GetModifierValue(unitMod, TOTAL_VALUE);
- float totalPct = addTotalPct ? GetModifierValue(unitMod, TOTAL_PCT) : 1.0f;
+ float baseValue = GetFlatModifierValue(unitMod, BASE_VALUE) + GetTotalAttackPowerValue(attType) / 14.0f * attackSpeedMod;
+ float basePct = GetPctModifierValue(unitMod, BASE_PCT);
+ float totalValue = GetFlatModifierValue(unitMod, TOTAL_VALUE);
+ float totalPct = addTotalPct ? GetPctModifierValue(unitMod, TOTAL_PCT) : 1.0f;
float weaponMinDamage = GetWeaponDamageRange(attType, MINDAMAGE);
float weaponMaxDamage = GetWeaponDamageRange(attType, MAXDAMAGE);
@@ -681,7 +681,8 @@ void Player::UpdateCritPercentage(WeaponAttackType attType)
break;
}
- float value = GetTotalPercentageModValue(modGroup) + GetRatingBonusValue(cr);
+ // flat = bonus from crit auras, pct = bonus from agility, combat rating = mods from items
+ float value = GetBaseModValue(modGroup, FLAT_MOD) + GetBaseModValue(modGroup, PCT_MOD) + GetRatingBonusValue(cr);
// Modify crit from weapon skill and maximized defense skill of same level victim difference
value += (int32(GetWeaponSkillValue(attType)) - int32(GetMaxSkillValueForLevel())) * 0.04f;
@@ -698,9 +699,9 @@ void Player::UpdateAllCritPercentages()
{
float value = GetMeleeCritFromAgility();
- SetBaseModValue(CRIT_PERCENTAGE, PCT_MOD, value);
- SetBaseModValue(OFFHAND_CRIT_PERCENTAGE, PCT_MOD, value);
- SetBaseModValue(RANGED_CRIT_PERCENTAGE, PCT_MOD, value);
+ SetBaseModPctValue(CRIT_PERCENTAGE, value);
+ SetBaseModPctValue(OFFHAND_CRIT_PERCENTAGE, value);
+ SetBaseModPctValue(RANGED_CRIT_PERCENTAGE, value);
UpdateCritPercentage(BASE_ATTACK);
UpdateCritPercentage(OFF_ATTACK);
@@ -849,7 +850,7 @@ void Player::UpdateSpellCritChance(uint32 school)
// Crit from Intellect
crit += GetSpellCritFromIntellect();
// Increase crit from SPELL_AURA_MOD_SPELL_CRIT_CHANCE
- crit += GetTotalAuraModifierAreaExclusive(SPELL_AURA_MOD_SPELL_CRIT_CHANCE);
+ crit += GetTotalAuraModifier(SPELL_AURA_MOD_SPELL_CRIT_CHANCE);
// Increase crit from SPELL_AURA_MOD_CRIT_PCT
crit += GetTotalAuraModifier(SPELL_AURA_MOD_CRIT_PCT);
// Increase crit by school from SPELL_AURA_MOD_SPELL_CRIT_CHANCE_SCHOOL
@@ -900,16 +901,11 @@ void Player::UpdateExpertise(WeaponAttackType attack)
Item* weapon = GetWeaponForAttack(attack, true);
- AuraEffectList const& expAuras = GetAuraEffectsByType(SPELL_AURA_MOD_EXPERTISE);
- for (AuraEffectList::const_iterator itr = expAuras.begin(); itr != expAuras.end(); ++itr)
+ expertise += GetTotalAuraModifier(SPELL_AURA_MOD_EXPERTISE, [weapon](AuraEffect const* aurEff)
{
- // item neutral spell
- if ((*itr)->GetSpellInfo()->EquippedItemClass == -1)
- expertise += (*itr)->GetAmount();
- // item dependent spell
- else if (weapon && weapon->IsFitToSpellRequirements((*itr)->GetSpellInfo()))
- expertise += (*itr)->GetAmount();
- }
+ return aurEff->GetSpellInfo()->EquippedItemClass == -1 || // item neutral spell
+ (weapon && weapon->IsFitToSpellRequirements(aurEff->GetSpellInfo())); // item dependent spell
+ });
if (expertise < 0)
expertise = 0;
@@ -1100,9 +1096,9 @@ void Creature::UpdateAttackPowerAndDamage(bool ranged)
indexMulti = UNIT_FIELD_RANGED_ATTACK_POWER_MULTIPLIER;
}
- float baseAttackPower = GetModifierValue(unitMod, BASE_VALUE) * GetModifierValue(unitMod, BASE_PCT);
- float attackPowerMod = GetModifierValue(unitMod, TOTAL_VALUE);
- float attackPowerMultiplier = GetModifierValue(unitMod, TOTAL_PCT) - 1.0f;
+ float baseAttackPower = GetFlatModifierValue(unitMod, BASE_VALUE) * GetPctModifierValue(unitMod, BASE_PCT);
+ float attackPowerMod = GetFlatModifierValue(unitMod, TOTAL_VALUE);
+ float attackPowerMultiplier = GetPctModifierValue(unitMod, TOTAL_PCT) - 1.0f;
SetInt32Value(index, uint32(baseAttackPower)); // UNIT_FIELD_(RANGED)_ATTACK_POWER
SetInt32Value(indexMod, uint32(attackPowerMod)); // UNIT_FIELD_(RANGED)_ATTACK_POWER_MODS
@@ -1166,10 +1162,10 @@ void Creature::CalculateMinMaxDamage(WeaponAttackType attType, bool normalized,
float attackPower = GetTotalAttackPowerValue(attType);
float attackSpeedMulti = GetAPMultiplier(attType, normalized);
- float baseValue = GetModifierValue(unitMod, BASE_VALUE) + (attackPower / 14.0f) * variance;
- float basePct = GetModifierValue(unitMod, BASE_PCT) * attackSpeedMulti;
- float totalValue = GetModifierValue(unitMod, TOTAL_VALUE);
- float totalPct = addTotalPct ? GetModifierValue(unitMod, TOTAL_PCT) : 1.0f;
+ float baseValue = GetFlatModifierValue(unitMod, BASE_VALUE) + (attackPower / 14.0f) * variance;
+ float basePct = GetPctModifierValue(unitMod, BASE_PCT) * attackSpeedMulti;
+ float totalValue = GetFlatModifierValue(unitMod, TOTAL_VALUE);
+ float totalPct = addTotalPct ? GetPctModifierValue(unitMod, TOTAL_PCT) : 1.0f;
float dmgMultiplier = GetCreatureTemplate()->DamageModifier; // = DamageModifier * _GetDamageMod(rank);
minDamage = ((weaponMinDamage + baseValue) * dmgMultiplier * basePct + totalValue) * totalPct;
@@ -1233,11 +1229,11 @@ bool Guardian::UpdateAllStats()
void Guardian::UpdateArmor()
{
- float value = GetModifierValue(UNIT_MOD_ARMOR, BASE_VALUE);
- value *= GetModifierValue(UNIT_MOD_ARMOR, BASE_PCT);
+ float value = GetFlatModifierValue(UNIT_MOD_ARMOR, BASE_VALUE);
+ value *= GetPctModifierValue(UNIT_MOD_ARMOR, BASE_PCT);
value += std::max<float>(GetStat(STAT_AGILITY) - GetCreateStat(STAT_AGILITY), 0.0f) * 2.0f;
- value += GetModifierValue(UNIT_MOD_ARMOR, TOTAL_VALUE);
- value *= GetModifierValue(UNIT_MOD_ARMOR, TOTAL_PCT);
+ value += GetFlatModifierValue(UNIT_MOD_ARMOR, TOTAL_VALUE);
+ value *= GetPctModifierValue(UNIT_MOD_ARMOR, TOTAL_PCT);
SetArmor(int32(value));
}
@@ -1278,10 +1274,10 @@ void Guardian::UpdateMaxHealth()
break;
}
- float value = GetModifierValue(unitMod, BASE_VALUE);// xinef: Do NOT add base health TWICE + GetCreateHealth();
- value *= GetModifierValue(unitMod, BASE_PCT);
- value += GetModifierValue(unitMod, TOTAL_VALUE) + stamina * multiplicator;
- value *= GetModifierValue(unitMod, TOTAL_PCT);
+ float value = GetFlatModifierValue(unitMod, BASE_VALUE);// xinef: Do NOT add base health TWICE + GetCreateHealth();
+ value *= GetPctModifierValue(unitMod, BASE_PCT);
+ value += GetFlatModifierValue(unitMod, TOTAL_VALUE) + stamina * multiplicator;
+ value *= GetPctModifierValue(unitMod, TOTAL_PCT);
SetMaxHealth((uint32)value);
}
@@ -1311,11 +1307,11 @@ void Guardian::UpdateMaxPower(Powers power)
break;
}
- // xinef: Do NOT add base mana TWICE
- float value = GetModifierValue(unitMod, BASE_VALUE) + (power != POWER_MANA ? GetCreatePowers(power) : 0);
- value *= GetModifierValue(unitMod, BASE_PCT);
- value += GetModifierValue(unitMod, TOTAL_VALUE) + addValue * multiplicator;
- value *= GetModifierValue(unitMod, TOTAL_PCT);
+ // Do NOT add base mana TWICE
+ float value = GetFlatModifierValue(unitMod, BASE_VALUE) + (power != POWER_MANA ? GetCreatePowers(power) : 0);
+ value *= GetPctModifierValue(unitMod, BASE_PCT);
+ value += GetFlatModifierValue(unitMod, TOTAL_VALUE) + addValue * multiplicator;
+ value *= GetPctModifierValue(unitMod, TOTAL_PCT);
SetMaxPower(power, uint32(value));
}
@@ -1335,12 +1331,12 @@ void Guardian::UpdateAttackPowerAndDamage(bool ranged)
else
val = 2 * GetStat(STAT_STRENGTH) - 20.0f;
- SetModifierValue(unitMod, BASE_VALUE, val);
+ SetStatFlatModifier(unitMod, BASE_VALUE, val);
//in BASE_VALUE of UNIT_MOD_ATTACK_POWER for creatures we store data of meleeattackpower field in DB
- float base_attPower = GetModifierValue(unitMod, BASE_VALUE) * GetModifierValue(unitMod, BASE_PCT);
- float attPowerMod = GetModifierValue(unitMod, TOTAL_VALUE);
- float attPowerMultiplier = GetModifierValue(unitMod, TOTAL_PCT) - 1.0f;
+ float base_attPower = GetFlatModifierValue(unitMod, BASE_VALUE) * GetPctModifierValue(unitMod, BASE_PCT);
+ float attPowerMod = GetFlatModifierValue(unitMod, TOTAL_VALUE);
+ float attPowerMultiplier = GetPctModifierValue(unitMod, TOTAL_PCT) - 1.0f;
//UNIT_FIELD_(RANGED)_ATTACK_POWER field
SetInt32Value(UNIT_FIELD_ATTACK_POWER, (int32)base_attPower);
@@ -1362,10 +1358,10 @@ void Guardian::UpdateDamagePhysical(WeaponAttackType attType)
float att_speed = float(GetAttackTime(BASE_ATTACK)) / 1000.0f;
- float base_value = GetModifierValue(unitMod, BASE_VALUE) + GetTotalAttackPowerValue(attType) / 14.0f * att_speed;
- float base_pct = GetModifierValue(unitMod, BASE_PCT);
- float total_value = GetModifierValue(unitMod, TOTAL_VALUE);
- float total_pct = GetModifierValue(unitMod, TOTAL_PCT);
+ float base_value = GetFlatModifierValue(unitMod, BASE_VALUE) + GetTotalAttackPowerValue(attType) / 14.0f * att_speed;
+ float base_pct = GetPctModifierValue(unitMod, BASE_PCT);
+ float total_value = GetFlatModifierValue(unitMod, TOTAL_VALUE);
+ float total_pct = GetPctModifierValue(unitMod, TOTAL_PCT);
float weapon_mindamage = GetWeaponDamageRange(BASE_ATTACK, MINDAMAGE);
float weapon_maxdamage = GetWeaponDamageRange(BASE_ATTACK, MAXDAMAGE);
diff --git a/src/server/game/Entities/Unit/Unit.cpp b/src/server/game/Entities/Unit/Unit.cpp
index 7963773799..9f0023450e 100644
--- a/src/server/game/Entities/Unit/Unit.cpp
+++ b/src/server/game/Entities/Unit/Unit.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
@@ -16,7 +16,6 @@
*/
#include "Unit.h"
-#include "AccountMgr.h"
#include "AreaDefines.h"
#include "ArenaSpectator.h"
#include "Battlefield.h"
@@ -35,6 +34,7 @@
#include "CreatureGroups.h"
#include "DisableMgr.h"
#include "DynamicVisibility.h"
+#include "Errors.h"
#include "GameObjectAI.h"
#include "GameTime.h"
#include "GridNotifiersImpl.h"
@@ -50,22 +50,23 @@
#include "PassiveAI.h"
#include "Pet.h"
#include "PetAI.h"
+#include "PetPackets.h"
#include "Player.h"
#include "ReputationMgr.h"
#include "ScriptMgr.h"
-#include "SmartAI.h"
+#include "SharedDefines.h"
#include "Spell.h"
+#include "SpellAuraDefines.h"
#include "SpellAuraEffects.h"
#include "SpellAuras.h"
#include "SpellInfo.h"
#include "SpellMgr.h"
-#include "TargetedMovementGenerator.h"
#include "TemporarySummon.h"
-#include "Tokenize.h"
#include "Totem.h"
#include "TotemAI.h"
#include "Transport.h"
#include "UpdateFieldFlags.h"
+#include "UpdateFields.h"
#include "Util.h"
#include "Vehicle.h"
#include "World.h"
@@ -242,9 +243,7 @@ Unit::Unit() : WorldObject(),
m_modAttackSpeedPct[OFF_ATTACK] = 1.0f;
m_modAttackSpeedPct[RANGED_ATTACK] = 1.0f;
- m_canDualWield = false;
-
- m_rootTimes = 0;
+ _dualWieldMode = DualWieldMode::AUTO;
m_state = 0;
m_deathState = DeathState::Alive;
@@ -269,13 +268,13 @@ Unit::Unit() : WorldObject(),
for (uint8 i = 0; i < UNIT_MOD_END; ++i)
{
- m_auraModifiersGroup[i][BASE_VALUE] = 0.0f;
- m_auraModifiersGroup[i][BASE_PCT] = 1.0f;
- m_auraModifiersGroup[i][TOTAL_VALUE] = 0.0f;
- m_auraModifiersGroup[i][TOTAL_PCT] = 1.0f;
+ m_auraFlatModifiersGroup[i][BASE_VALUE] = 0.0f;
+ m_auraFlatModifiersGroup[i][TOTAL_VALUE] = 0.0f;
+ m_auraPctModifiersGroup[i][BASE_PCT] = 1.0f;
+ m_auraPctModifiersGroup[i][TOTAL_PCT] = 1.0f;
}
// implement 50% base damage from offhand
- m_auraModifiersGroup[UNIT_MOD_DAMAGE_OFFHAND][TOTAL_PCT] = 0.5f;
+ m_auraPctModifiersGroup[UNIT_MOD_DAMAGE_OFFHAND][TOTAL_PCT] = 0.5f;
for (uint8 i = 0; i < MAX_ATTACK; ++i)
{
@@ -597,7 +596,7 @@ void Unit::UpdateSplineMovement(uint32 t_diff)
DisableSpline();
if (movespline->HasAnimation() && IsCreature() && IsAlive())
- SetByteValue(UNIT_FIELD_BYTES_1, UNIT_BYTES_1_OFFSET_ANIM_TIER, movespline->GetAnimationType());
+ SetAnimTier(AnimTier(movespline->GetAnimationType()));
}
// pussywizard: update always! not every 400ms, because movement generators need the actual position
@@ -629,7 +628,7 @@ void Unit::UpdateSplinePosition()
//if (HasUnitState(UNIT_STATE_CANNOT_TURN))
// loc.orientation = GetOrientation();
- if (IsPlayer())
+ if (IsPlayer() || IsPet())
UpdatePosition(loc.x, loc.y, loc.z, loc.orientation);
else
ToCreature()->SetPosition(loc.x, loc.y, loc.z, loc.orientation);
@@ -868,6 +867,9 @@ uint32 Unit::DealDamage(Unit* attacker, Unit* victim, uint32 damage, CleanDamage
// interrupting auras with AURA_INTERRUPT_FLAG_DAMAGE before checking !damage (absorbed damage breaks that type of auras)
if (spellProto)
{
+ if (attacker && damagetype != DOT && spellProto->DmgClass == SPELL_DAMAGE_CLASS_MELEE && !(spellProto->GetSchoolMask() & SPELL_SCHOOL_MASK_HOLY))
+ attacker->DealDamageShieldDamage(victim);
+
if (!spellProto->HasAttribute(SPELL_ATTR4_REACTIVE_DAMAGE_PROC))
victim->RemoveAurasWithInterruptFlags(AURA_INTERRUPT_FLAG_TAKE_DAMAGE, spellProto->Id);
}
@@ -1085,12 +1087,10 @@ uint32 Unit::DealDamage(Unit* attacker, Unit* victim, uint32 damage, CleanDamage
if (damagetype != DOT && damage > 0 && !victim->GetOwnerGUID().IsPlayer() && (!spellProto || !spellProto->HasAura(SPELL_AURA_DAMAGE_SHIELD)))
victim->ToCreature()->UpdateLeashExtensionTime();
- if (attacker)
+ if (attacker && attacker != victim)
{
if (spellProto && victim->CanHaveThreatList() && !victim->HasUnitState(UNIT_STATE_EVADE) && !victim->IsInCombatWith(attacker))
- {
victim->CombatStart(attacker, !(spellProto->AttributesEx3 & SPELL_ATTR3_SUPPRESS_TARGET_PROCS));
- }
victim->AddThreat(attacker, float(damage), damageSchoolMask, spellProto);
}
@@ -1864,7 +1864,7 @@ void Unit::DealMeleeDamage(CalcDamageInfo* damageInfo, bool durabilityLoss)
auto canTakeMeleeDamage = [&]()
{
- return victim->IsAlive() && !victim->HasUnitState(UNIT_STATE_IN_FLIGHT) && (!victim->IsCreature() || !victim->ToCreature()->IsEvadingAttacks());
+ return victim->IsAlive() && !victim->IsInFlight() && (!victim->IsCreature() || !victim->ToCreature()->IsEvadingAttacks());
};
if (!canTakeMeleeDamage())
@@ -1956,10 +1956,11 @@ void Unit::DealMeleeDamage(CalcDamageInfo* damageInfo, bool durabilityLoss)
Probability = 0.65f * victim->GetLevel() + 0.5f;
uint32 VictimDefense = victim->GetDefenseSkillValue();
+ uint32 VictimAuraDefense = -victim->GetTotalAuraModifier(SPELL_AURA_MOD_ATTACKER_MELEE_CRIT_CHANCE) * 25;
uint32 AttackerMeleeSkill = GetUnitMeleeSkill();
// xinef: fix daze mechanics
- Probability -= ((float)VictimDefense - AttackerMeleeSkill) * 0.1428f;
+ Probability -= ((float)VictimDefense + (float)VictimAuraDefense - AttackerMeleeSkill) * 0.1428f;
if (Probability > 40.0f)
Probability = 40.0f;
@@ -1975,57 +1976,60 @@ void Unit::DealMeleeDamage(CalcDamageInfo* damageInfo, bool durabilityLoss)
// Do effect if any damage done to target
if (damageInfo->damages[0].damage + damageInfo->damages[1].damage)
+ DealDamageShieldDamage(victim);
+}
+
+void Unit::DealDamageShieldDamage(Unit* victim)
+{
+ // We're going to call functions which can modify content of the list during iteration over it's elements
+ // Let's copy the list so we can prevent iterator invalidation
+ AuraEffectList vDamageShieldsCopy(victim->GetAuraEffectsByType(SPELL_AURA_DAMAGE_SHIELD));
+ for (AuraEffectList::const_iterator dmgShieldItr = vDamageShieldsCopy.begin(); dmgShieldItr != vDamageShieldsCopy.end(); ++dmgShieldItr)
{
- // We're going to call functions which can modify content of the list during iteration over it's elements
- // Let's copy the list so we can prevent iterator invalidation
- AuraEffectList vDamageShieldsCopy(victim->GetAuraEffectsByType(SPELL_AURA_DAMAGE_SHIELD));
- for (AuraEffectList::const_iterator dmgShieldItr = vDamageShieldsCopy.begin(); dmgShieldItr != vDamageShieldsCopy.end(); ++dmgShieldItr)
+ SpellInfo const* i_spellProto = (*dmgShieldItr)->GetSpellInfo();
+ // Damage shield can be resisted...
+ if (SpellMissInfo missInfo = victim->SpellHitResult(this, i_spellProto, false))
{
- SpellInfo const* i_spellProto = (*dmgShieldItr)->GetSpellInfo();
- // Damage shield can be resisted...
- if (SpellMissInfo missInfo = victim->SpellHitResult(this, i_spellProto, false))
- {
- victim->SendSpellMiss(this, i_spellProto->Id, missInfo);
- continue;
- }
+ victim->SendSpellMiss(this, i_spellProto->Id, missInfo);
+ continue;
+ }
- // ...or immuned
- if (IsImmunedToDamageOrSchool(i_spellProto))
- {
- victim->SendSpellDamageImmune(this, i_spellProto->Id);
- continue;
- }
+ // ...or immuned
+ if (IsImmunedToDamageOrSchool(i_spellProto))
+ {
+ victim->SendSpellDamageImmune(this, i_spellProto->Id);
+ continue;
+ }
- uint32 damage = uint32(std::max(0, (*dmgShieldItr)->GetAmount())); // xinef: done calculated at amount calculation
+ uint32 damage = uint32(std::max(0, (*dmgShieldItr)->GetAmount())); // xinef: done calculated at amount calculation
- if (Unit* caster = (*dmgShieldItr)->GetCaster())
- {
- damage = caster->SpellDamageBonusDone(this, i_spellProto, damage, SPELL_DIRECT_DAMAGE, (*dmgShieldItr)->GetEffIndex());
- damage = this->SpellDamageBonusTaken(caster, i_spellProto, damage, SPELL_DIRECT_DAMAGE);
- }
+ if (Unit* caster = (*dmgShieldItr)->GetCaster())
+ {
+ damage = caster->SpellDamageBonusDone(this, i_spellProto, damage, SPELL_DIRECT_DAMAGE, (*dmgShieldItr)->GetEffIndex());
+ damage = this->SpellDamageBonusTaken(caster, i_spellProto, damage, SPELL_DIRECT_DAMAGE);
+ }
- uint32 absorb = 0;
+ uint32 absorb = 0;
- DamageInfo dmgInfo(victim, this, damage, i_spellProto, i_spellProto->GetSchoolMask(), SPELL_DIRECT_DAMAGE);
- Unit::CalcAbsorbResist(dmgInfo);
- absorb = dmgInfo.GetAbsorb();
- damage = dmgInfo.GetDamage();
+ DamageInfo dmgInfo(victim, this, damage, i_spellProto, i_spellProto->GetSchoolMask(), SPELL_DIRECT_DAMAGE);
+ Unit::CalcAbsorbResist(dmgInfo);
+ absorb = dmgInfo.GetAbsorb();
+ damage = dmgInfo.GetDamage();
- Unit::DealDamageMods(this, damage, &absorb);
+ Unit::DealDamageMods(this, damage, &absorb);
- /// @todo: Move this to a packet handler
- WorldPacket data(SMSG_SPELLDAMAGESHIELD, (8 + 8 + 4 + 4 + 4 + 4));
- data << victim->GetGUID();
- data << GetGUID();
- data << uint32(i_spellProto->Id);
- data << uint32(damage); // Damage
- int32 overkill = int32(damage) - int32(GetHealth());
- data << uint32(overkill > 0 ? overkill : 0); // Overkill
- data << uint32(i_spellProto->GetSchoolMask());
- victim->SendMessageToSet(&data, true);
+ /// @todo: Move this to a packet handler
+ WorldPacket data(SMSG_SPELLDAMAGESHIELD, (8 + 8 + 4 + 4 + 4 + 4));
+ data << victim->GetGUID();
+ data << GetGUID();
+ data << uint32(i_spellProto->Id);
+ data << uint32(damage); // Damage
+ int32 overkill = int32(damage) - int32(GetHealth());
+ data << uint32(overkill > 0 ? overkill : 0); // Overkill
+ data << uint32(i_spellProto->GetSchoolMask());
+ victim->SendMessageToSet(&data, true);
- Unit::DealDamage(victim, this, damage, 0, SPELL_DIRECT_DAMAGE, i_spellProto->GetSchoolMask(), i_spellProto, true);
- }
+ Unit::DealDamage(victim, this, damage, 0, SPELL_DIRECT_DAMAGE, i_spellProto->GetSchoolMask(), i_spellProto, true);
}
}
@@ -2092,22 +2096,22 @@ uint32 Unit::CalcArmorReducedDamage(Unit const* attacker, Unit const* victim, co
if (attacker->IsPlayer())
{
float bonusPct = 0;
- AuraEffectList const& armorPenAuras = attacker->GetAuraEffectsByType(SPELL_AURA_MOD_ARMOR_PENETRATION_PCT);
- for (AuraEffectList::const_iterator itr = armorPenAuras.begin(); itr != armorPenAuras.end(); ++itr)
+ bonusPct += attacker->GetTotalAuraModifier(SPELL_AURA_MOD_ARMOR_PENETRATION_PCT, [spellInfo,attacker](AuraEffect const* aurEff)
{
- if ((*itr)->GetSpellInfo()->EquippedItemClass == -1)
+ if (aurEff->GetSpellInfo()->EquippedItemClass == -1)
{
- if (!spellInfo || (*itr)->IsAffectedOnSpell(spellInfo) || (*itr)->GetMiscValue() & spellInfo->GetSchoolMask())
- bonusPct += (*itr)->GetAmount();
- else if (!(*itr)->GetMiscValue() && !(*itr)->HasSpellClassMask())
- bonusPct += (*itr)->GetAmount();
+ if (!spellInfo || aurEff->IsAffectedOnSpell(spellInfo) || aurEff->GetMiscValue() & spellInfo->GetSchoolMask())
+ return true;
+ else if (!aurEff->GetMiscValue() && !aurEff->HasSpellClassMask())
+ return true;
}
else
{
- if (attacker->ToPlayer()->HasItemFitToSpellRequirements((*itr)->GetSpellInfo()))
- bonusPct += (*itr)->GetAmount();
+ if (attacker->ToPlayer()->HasItemFitToSpellRequirements(aurEff->GetSpellInfo()))
+ return true;
}
- }
+ return false;
+ });
float maxArmorPen = 0;
if (victim->GetLevel() < 60)
@@ -3530,10 +3534,8 @@ SpellMissInfo Unit::SpellHitResult(Unit* victim, SpellInfo const* spell, bool Ca
if (CanReflect)
{
int32 reflectchance = victim->GetTotalAuraModifier(SPELL_AURA_REFLECT_SPELLS);
- Unit::AuraEffectList const& mReflectSpellsSchool = victim->GetAuraEffectsByType(SPELL_AURA_REFLECT_SPELLS_SCHOOL);
- for (Unit::AuraEffectList::const_iterator i = mReflectSpellsSchool.begin(); i != mReflectSpellsSchool.end(); ++i)
- if ((*i)->GetMiscValue() & spell->GetSchoolMask())
- reflectchance += (*i)->GetAmount();
+ reflectchance += victim->GetTotalAuraModifierByMiscMask(SPELL_AURA_REFLECT_SPELLS_SCHOOL, spell->GetSchoolMask());
+
if (reflectchance > 0 && roll_chance_i(reflectchance))
{
// Start triggers for remove charges if need (trigger only for victim, and mark as active spell)
@@ -3607,14 +3609,7 @@ SpellMissInfo Unit::SpellHitResult(Unit* victim, Spell const* spell, bool CanRef
if (CanReflect)
{
int32 reflectchance = victim->GetTotalAuraModifier(SPELL_AURA_REFLECT_SPELLS);
- Unit::AuraEffectList const& mReflectSpellsSchool = victim->GetAuraEffectsByType(SPELL_AURA_REFLECT_SPELLS_SCHOOL);
- for (Unit::AuraEffectList::const_iterator i = mReflectSpellsSchool.begin(); i != mReflectSpellsSchool.end(); ++i)
- {
- if ((*i)->GetMiscValue() & spell->GetSpellSchoolMask())
- {
- reflectchance += (*i)->GetAmount();
- }
- }
+ reflectchance += victim->GetTotalAuraModifierByMiscMask(SPELL_AURA_REFLECT_SPELLS_SCHOOL, spellInfo->GetSchoolMask());
if (reflectchance > 0 && roll_chance_i(reflectchance))
{
@@ -3795,14 +3790,10 @@ float Unit::GetUnitCriticalChance(WeaponAttackType attackType, Unit const* victi
else
crit += victim->GetTotalAuraModifier(SPELL_AURA_MOD_ATTACKER_MELEE_CRIT_CHANCE);
- AuraEffectList const& mTotalAuraList = victim->GetAuraEffectsByType(SPELL_AURA_MOD_CRIT_CHANCE_FOR_CASTER);
- for (AuraEffectList::const_iterator i = mTotalAuraList.begin(); i != mTotalAuraList.end(); ++i)
+ crit += victim->GetTotalAuraModifier(SPELL_AURA_MOD_CRIT_CHANCE_FOR_CASTER, [this](AuraEffect const* aurEff)
{
- if (GetGUID() != (*i)->GetCasterGUID())
- continue;
-
- crit += (*i)->GetAmount();
- }
+ return GetGUID() == aurEff->GetCasterGUID();
+ });
// reduce crit chance from Rating for players
if (attackType != RANGED_ATTACK)
@@ -4332,10 +4323,10 @@ void Unit::ProcessTerrainStatusUpdate()
LiquidData const& liquidData = GetLiquidData();
- // remove appropriate auras if we are swimming/not swimming respectively
- if (liquidData.Status & MAP_LIQUID_STATUS_SWIMMING)
+ // remove appropriate auras if we are swimming/not swimming respectively - exact mirror of client logic
+ if (liquidData.Status & MAP_LIQUID_STATUS_SWIMMING && (liquidData.Level - GetPositionZ()) > GetCollisionHeight() * 0.75f) // Shallow water at ~75% of collision height)
RemoveAurasWithInterruptFlags(AURA_INTERRUPT_FLAG_NOT_ABOVEWATER);
- else if (!isSwimming())
+ else
RemoveAurasWithInterruptFlags(AURA_INTERRUPT_FLAG_NOT_UNDERWATER);
// liquid aura handling
@@ -4416,16 +4407,85 @@ void Unit::DeMorph()
SetDisplayId(GetNativeDisplayId());
}
+int32 Unit::GetHighestExclusiveSameEffectSpellGroupValue(AuraEffect const* aurEff, AuraType auraType, bool checkMiscValue /*= false*/, int32 miscValue /*= 0*/) const
+{
+ int32 val = 0;
+ SpellSpellGroupMapBounds spellGroup = sSpellMgr->GetSpellSpellGroupMapBounds(aurEff->GetSpellInfo()->GetFirstRankSpell()->Id);
+ for (SpellSpellGroupMap::const_iterator itr = spellGroup.first; itr != spellGroup.second ; ++itr)
+ {
+ if (sSpellMgr->GetSpellGroupStackRule(itr->second) == SPELL_GROUP_STACK_RULE_EXCLUSIVE_SAME_EFFECT)
+ {
+ AuraEffectList const& auraEffList = GetAuraEffectsByType(auraType);
+ for (AuraEffectList::const_iterator auraItr = auraEffList.begin(); auraItr != auraEffList.end(); ++auraItr)
+ {
+ if (aurEff != (*auraItr) && (!checkMiscValue || (*auraItr)->GetMiscValue() == miscValue) &&
+ sSpellMgr->IsSpellMemberOfSpellGroup((*auraItr)->GetSpellInfo()->Id, itr->second))
+ {
+ // absolute value only
+ if (abs(val) < abs((*auraItr)->GetAmount()))
+ val = (*auraItr)->GetAmount();
+ }
+ }
+ }
+ }
+ return val;
+}
+
+bool Unit::IsHighestExclusiveAura(Aura const* aura, bool removeOtherAuraApplications /*= false*/)
+{
+ for (uint32 i = 0 ; i < MAX_SPELL_EFFECTS; ++i)
+ if (AuraEffect const* aurEff = aura->GetEffect(i))
+ if (!IsHighestExclusiveAuraEffect(aura->GetSpellInfo(), aurEff->GetAuraType(), aurEff->GetAmount(), aura->GetEffectMask(), removeOtherAuraApplications))
+ return false;
+
+ return true;
+}
+
+bool Unit::IsHighestExclusiveAuraEffect(SpellInfo const* spellInfo, AuraType auraType, int32 effectAmount, uint8 auraEffectMask, bool removeOtherAuraApplications /*= false*/)
+{
+ AuraEffectList const& auras = GetAuraEffectsByType(auraType);
+ for (Unit::AuraEffectList::const_iterator itr = auras.begin(); itr != auras.end();)
+ {
+ AuraEffect const* existingAurEff = (*itr);
+ ++itr;
+
+ if (sSpellMgr->CheckSpellGroupStackRules(spellInfo, existingAurEff->GetSpellInfo()) == SPELL_GROUP_STACK_RULE_EXCLUSIVE_HIGHEST)
+ {
+ int32 diff = abs(effectAmount) - abs(existingAurEff->GetAmount());
+ if (!diff)
+ for (int32 i = 0; i < MAX_SPELL_EFFECTS; ++i)
+ diff += int32((auraEffectMask & (1 << i)) >> i) - int32((existingAurEff->GetBase()->GetEffectMask() & (1 << i)) >> i);
+
+ if (diff > 0)
+ {
+ Aura const* base = existingAurEff->GetBase();
+ // no removing of area auras from the original owner, as that completely cancels them
+ if (removeOtherAuraApplications && (!base->IsArea() || base->GetOwner() != this))
+ {
+ if (AuraApplication* aurApp = existingAurEff->GetBase()->GetApplicationOfTarget(GetGUID()))
+ {
+ bool hasMoreThanOneEffect = base->HasMoreThanOneEffectForType(auraType);
+ uint32 removedAuras = m_removedAurasCount;
+ RemoveAura(aurApp);
+ if (hasMoreThanOneEffect || m_removedAurasCount > removedAuras)
+ itr = auras.begin();
+ }
+ }
+ }
+ else if (diff < 0)
+ return false;
+ }
+ }
+
+ return true;
+}
+
Aura* Unit::_TryStackingOrRefreshingExistingAura(SpellInfo const* newAura, uint8 effMask, Unit* caster, int32* baseAmount /*= nullptr*/, Item* castItem /*= nullptr*/, ObjectGuid casterGUID /*= ObjectGuid::Empty*/, bool periodicReset /*= false*/)
{
ASSERT(casterGUID || caster);
if (!casterGUID)
casterGUID = caster->GetGUID();
- // Xinef: Hax for mixology, best solution qq
- if (sSpellMgr->GetSpellGroup(newAura->Id) == 1)
- return nullptr;
-
// passive and Incanter's Absorption and auras with different type can stack with themselves any number of times
if (!newAura->IsMultiSlotAura())
{
@@ -4481,7 +4541,7 @@ void Unit::_AddAura(UnitAura* aura, Unit* caster)
ASSERT(!m_cleanupDone);
m_ownedAuras.insert(AuraMap::value_type(aura->GetId(), aura));
- _RemoveNoStackAurasDueToAura(aura);
+ _RemoveNoStackAurasDueToAura(aura, true);
if (aura->IsRemoved())
return;
@@ -4571,7 +4631,7 @@ void Unit::_ApplyAura(AuraApplication* aurApp, uint8 effMask)
{
Aura* aura = aurApp->GetBase();
- _RemoveNoStackAurasDueToAura(aura);
+ _RemoveNoStackAurasDueToAura(aura, false);
if (aurApp->GetRemoveMode())
return;
@@ -4729,7 +4789,7 @@ void Unit::_UnapplyAura(AuraApplication* aurApp, AuraRemoveMode removeMode)
ABORT();
}
-void Unit::_RemoveNoStackAurasDueToAura(Aura* aura)
+void Unit::_RemoveNoStackAurasDueToAura(Aura* aura, bool owned)
{
//SpellInfo const* spellProto = aura->GetSpellInfo();
@@ -4739,23 +4799,17 @@ void Unit::_RemoveNoStackAurasDueToAura(Aura* aura)
// if (spellProto->IsPassiveStackableWithRanks())
// return;
- bool remove = false;
- for (AuraApplicationMap::iterator i = m_appliedAuras.begin(); i != m_appliedAuras.end(); ++i)
+ ASSERT(aura);
+ if (!IsHighestExclusiveAura(aura))
{
- if (remove)
- {
- remove = false;
- i = m_appliedAuras.begin();
- }
-
- if (aura->CanStackWith(i->second->GetBase(), true))
- continue;
-
- RemoveAura(i, AURA_REMOVE_BY_DEFAULT);
- if (i == m_appliedAuras.end())
- break;
- remove = true;
+ aura->Remove();
+ return;
}
+
+ if (owned)
+ RemoveOwnedAuras([aura](Aura const* ownedAura) { return !aura->CanStackWith(ownedAura); });
+ else
+ RemoveAppliedAuras([aura](AuraApplication const* appliedAura) { return !aura->CanStackWith(appliedAura->GetBase()); });
}
void Unit::_RegisterAuraEffect(AuraEffect* aurEff, bool apply)
@@ -5983,232 +6037,309 @@ uint32 Unit::GetDoTsByCaster(ObjectGuid casterGUID) const
return dots;
}
-int32 Unit::GetTotalAuraModifierAreaExclusive(AuraType auratype) const
+int32 Unit::GetTotalAuraModifier(AuraType auraType, std::function<bool(AuraEffect const*)> const& predicate) const
{
+ AuraEffectList const& mTotalAuraList = GetAuraEffectsByType(auraType);
+ if (mTotalAuraList.empty())
+ return 0;
+
+ std::map<SpellGroup, int32> sameEffectSpellGroup;
int32 modifier = 0;
- int32 areaModifier = 0;
- AuraEffectList const& mTotalAuraList = GetAuraEffectsByType(auratype);
- for (AuraEffectList::const_iterator i = mTotalAuraList.begin(); i != mTotalAuraList.end(); ++i)
+ for (AuraEffect const* aurEff : mTotalAuraList)
{
- if ((*i)->GetSpellInfo()->HasAreaAuraEffect())
+ if (predicate(aurEff))
{
- if (areaModifier < (*i)->GetAmount())
- areaModifier = (*i)->GetAmount();
+ // Check if the Aura Effect has a the Same Effect Stack Rule and if so, use the highest amount of that SpellGroup
+ // If the Aura Effect does not have this Stack Rule, it returns false so we can add to the multiplier as usual
+ if (!sSpellMgr->AddSameEffectStackRuleSpellGroups(aurEff->GetSpellInfo(), static_cast<uint32>(auraType), aurEff->GetAmount(), sameEffectSpellGroup))
+ modifier += aurEff->GetAmount();
}
- else
- modifier += (*i)->GetAmount();
}
- return modifier + areaModifier;
-}
-
-int32 Unit::GetTotalAuraModifier(AuraType auratype) const
-{
- AuraEffectList const& mTotalAuraList = GetAuraEffectsByType(auratype);
- if (mTotalAuraList.empty())
- return 0;
-
- int32 modifier = 0;
-
- for (AuraEffectList::const_iterator i = mTotalAuraList.begin(); i != mTotalAuraList.end(); ++i)
- modifier += (*i)->GetAmount();
+ // Add the highest of the Same Effect Stack Rule SpellGroups to the accumulator
+ for (auto const& [_, amount] : sameEffectSpellGroup)
+ modifier += amount;
return modifier;
}
-float Unit::GetTotalAuraMultiplier(AuraType auratype) const
+float Unit::GetTotalAuraMultiplier(AuraType auraType, std::function<bool(AuraEffect const*)> const& predicate) const
{
+ AuraEffectList const& mTotalAuraList = GetAuraEffectsByType(auraType);
+ if (mTotalAuraList.empty())
+ return 1.0f;
+
+ std::map<SpellGroup, int32> sameEffectSpellGroup;
float multiplier = 1.0f;
- AuraEffectList const& mTotalAuraList = GetAuraEffectsByType(auratype);
- for (AuraEffectList::const_iterator i = mTotalAuraList.begin(); i != mTotalAuraList.end(); ++i)
- AddPct(multiplier, (*i)->GetAmount());
+ for (AuraEffect const* aurEff : mTotalAuraList)
+ {
+ if (predicate(aurEff))
+ {
+ // Check if the Aura Effect has a the Same Effect Stack Rule and if so, use the highest amount of that SpellGroup
+ // If the Aura Effect does not have this Stack Rule, it returns false so we can add to the multiplier as usual
+ if (!sSpellMgr->AddSameEffectStackRuleSpellGroups(aurEff->GetSpellInfo(), static_cast<uint32>(auraType), aurEff->GetAmount(), sameEffectSpellGroup))
+ AddPct(multiplier, aurEff->GetAmount());
+ }
+ }
+
+ // Add the highest of the Same Effect Stack Rule SpellGroups to the multiplier
+ for (auto itr = sameEffectSpellGroup.begin(); itr != sameEffectSpellGroup.end(); ++itr)
+ AddPct(multiplier, itr->second);
return multiplier;
}
-int32 Unit::GetMaxPositiveAuraModifier(AuraType auratype)
+int32 Unit::GetMaxPositiveAuraModifier(AuraType auraType, std::function<bool(AuraEffect const*)> const& predicate) const
{
- int32 modifier = 0;
+ AuraEffectList const& mTotalAuraList = GetAuraEffectsByType(auraType);
+ if (mTotalAuraList.empty())
+ return 0;
- AuraEffectList const& mTotalAuraList = GetAuraEffectsByType(auratype);
- for (AuraEffectList::const_iterator i = mTotalAuraList.begin(); i != mTotalAuraList.end(); ++i)
+ int32 modifier = 0;
+ for (AuraEffect const* aurEff : mTotalAuraList)
{
- if ((*i)->GetAmount() > modifier)
- modifier = (*i)->GetAmount();
+ if (predicate(aurEff))
+ modifier = std::max(modifier, aurEff->GetAmount());
}
return modifier;
}
-int32 Unit::GetMaxNegativeAuraModifier(AuraType auratype) const
+int32 Unit::GetMaxNegativeAuraModifier(AuraType auraType, std::function<bool(AuraEffect const*)> const& predicate) const
{
- int32 modifier = 0;
-
- AuraEffectList const& mTotalAuraList = GetAuraEffectsByType(auratype);
- for (AuraEffectList::const_iterator i = mTotalAuraList.begin(); i != mTotalAuraList.end(); ++i)
- if ((*i)->GetAmount() < modifier)
- modifier = (*i)->GetAmount();
-
- return modifier;
-}
+ AuraEffectList const& mTotalAuraList = GetAuraEffectsByType(auraType);
+ if (mTotalAuraList.empty())
+ return 0;
-int32 Unit::GetTotalAuraModifierByMiscMask(AuraType auratype, uint32 misc_mask) const
-{
int32 modifier = 0;
-
- AuraEffectList const& mTotalAuraList = GetAuraEffectsByType(auratype);
- for (AuraEffectList::const_iterator i = mTotalAuraList.begin(); i != mTotalAuraList.end(); ++i)
+ for (AuraEffect const* aurEff : mTotalAuraList)
{
- if ((*i)->GetMiscValue()& misc_mask)
- modifier += (*i)->GetAmount();
+ if (predicate(aurEff))
+ modifier = std::min(modifier, aurEff->GetAmount());
}
+
return modifier;
}
-float Unit::GetTotalAuraMultiplierByMiscMask(AuraType auratype, uint32 misc_mask) const
+int32 Unit::GetTotalAuraModifier(AuraType auraType) const
{
- float multiplier = 1.0f;
+ return GetTotalAuraModifier(auraType, [](AuraEffect const* /*aurEff*/) { return true; });
+}
- AuraEffectList const& mTotalAuraList = GetAuraEffectsByType(auratype);
- for (AuraEffectList::const_iterator i = mTotalAuraList.begin(); i != mTotalAuraList.end(); ++i)
- if (((*i)->GetMiscValue() & misc_mask))
- AddPct(multiplier, (*i)->GetAmount());
+float Unit::GetTotalAuraMultiplier(AuraType auraType) const
+{
+ return GetTotalAuraMultiplier(auraType, [](AuraEffect const* /*aurEff*/) { return true; });
+}
- return multiplier;
+int32 Unit::GetMaxPositiveAuraModifier(AuraType auraType) const
+{
+ return GetMaxPositiveAuraModifier(auraType, [](AuraEffect const* /*aurEff*/) { return true; });
}
-int32 Unit::GetMaxPositiveAuraModifierByMiscMask(AuraType auratype, uint32 misc_mask, const AuraEffect* except) const
+int32 Unit::GetMaxNegativeAuraModifier(AuraType auraType) const
{
- int32 modifier = 0;
+ return GetMaxNegativeAuraModifier(auraType, [](AuraEffect const* /*aurEff*/) { return true; });
+}
- AuraEffectList const& mTotalAuraList = GetAuraEffectsByType(auratype);
- for (AuraEffectList::const_iterator i = mTotalAuraList.begin(); i != mTotalAuraList.end(); ++i)
+int32 Unit::GetTotalAuraModifierByMiscMask(AuraType auraType, uint32 miscMask) const
+{
+ return GetTotalAuraModifier(auraType, [miscMask](AuraEffect const* aurEff) -> bool
{
- if (except != (*i) && (*i)->GetMiscValue()& misc_mask && (*i)->GetAmount() > modifier)
- modifier = (*i)->GetAmount();
- }
-
- return modifier;
+ if ((aurEff->GetMiscValue() & miscMask) != 0)
+ return true;
+ return false;
+ });
}
-int32 Unit::GetMaxNegativeAuraModifierByMiscMask(AuraType auratype, uint32 misc_mask) const
+float Unit::GetTotalAuraMultiplierByMiscMask(AuraType auraType, uint32 miscMask) const
{
- int32 modifier = 0;
-
- AuraEffectList const& mTotalAuraList = GetAuraEffectsByType(auratype);
- for (AuraEffectList::const_iterator i = mTotalAuraList.begin(); i != mTotalAuraList.end(); ++i)
+ return GetTotalAuraMultiplier(auraType, [miscMask](AuraEffect const* aurEff) -> bool
{
- if ((*i)->GetMiscValue()& misc_mask && (*i)->GetAmount() < modifier)
- modifier = (*i)->GetAmount();
- }
-
- return modifier;
+ if ((aurEff->GetMiscValue() & miscMask) != 0)
+ return true;
+ return false;
+ });
}
-int32 Unit::GetTotalAuraModifierByMiscValue(AuraType auratype, int32 misc_value) const
+int32 Unit::GetMaxPositiveAuraModifierByMiscMask(AuraType auraType, uint32 miscMask, AuraEffect const* except /*= nullptr*/) const
{
- int32 modifier = 0;
-
- AuraEffectList const& mTotalAuraList = GetAuraEffectsByType(auratype);
- for (AuraEffectList::const_iterator i = mTotalAuraList.begin(); i != mTotalAuraList.end(); ++i)
- if ((*i)->GetMiscValue() == misc_value)
- modifier += (*i)->GetAmount();
-
- return modifier;
+ return GetMaxPositiveAuraModifier(auraType, [miscMask, except](AuraEffect const* aurEff) -> bool
+ {
+ if (except != aurEff && (aurEff->GetMiscValue() & miscMask) != 0)
+ return true;
+ return false;
+ });
}
-float Unit::GetTotalAuraMultiplierByMiscValue(AuraType auratype, int32 misc_value) const
+int32 Unit::GetMaxNegativeAuraModifierByMiscMask(AuraType auraType, uint32 miscMask) const
{
- float multiplier = 1.0f;
-
- AuraEffectList const& mTotalAuraList = GetAuraEffectsByType(auratype);
- for (AuraEffectList::const_iterator i = mTotalAuraList.begin(); i != mTotalAuraList.end(); ++i)
- if ((*i)->GetMiscValue() == misc_value)
- AddPct(multiplier, (*i)->GetAmount());
-
- return multiplier;
+ return GetMaxNegativeAuraModifier(auraType, [miscMask](AuraEffect const* aurEff) -> bool
+ {
+ if ((aurEff->GetMiscValue() & miscMask) != 0)
+ return true;
+ return false;
+ });
}
-int32 Unit::GetMaxPositiveAuraModifierByMiscValue(AuraType auratype, int32 misc_value) const
+int32 Unit::GetTotalAuraModifierByMiscValue(AuraType auraType, int32 miscValue) const
{
- int32 modifier = 0;
-
- AuraEffectList const& mTotalAuraList = GetAuraEffectsByType(auratype);
- for (AuraEffectList::const_iterator i = mTotalAuraList.begin(); i != mTotalAuraList.end(); ++i)
+ return GetTotalAuraModifier(auraType, [miscValue](AuraEffect const* aurEff) -> bool
{
- if ((*i)->GetMiscValue() == misc_value && (*i)->GetAmount() > modifier)
- modifier = (*i)->GetAmount();
- }
+ if (aurEff->GetMiscValue() == miscValue)
+ return true;
+ return false;
+ });
+}
- return modifier;
+float Unit::GetTotalAuraMultiplierByMiscValue(AuraType auraType, int32 miscValue) const
+{
+ return GetTotalAuraMultiplier(auraType, [miscValue](AuraEffect const* aurEff) -> bool
+ {
+ if (aurEff->GetMiscValue() == miscValue)
+ return true;
+ return false;
+ });
}
-int32 Unit::GetMaxNegativeAuraModifierByMiscValue(AuraType auratype, int32 misc_value) const
+int32 Unit::GetMaxPositiveAuraModifierByMiscValue(AuraType auraType, int32 miscValue) const
{
- int32 modifier = 0;
+ return GetMaxPositiveAuraModifier(auraType, [miscValue](AuraEffect const* aurEff) -> bool
+ {
+ if (aurEff->GetMiscValue() == miscValue)
+ return true;
+ return false;
+ });
+}
- AuraEffectList const& mTotalAuraList = GetAuraEffectsByType(auratype);
- for (AuraEffectList::const_iterator i = mTotalAuraList.begin(); i != mTotalAuraList.end(); ++i)
+int32 Unit::GetMaxNegativeAuraModifierByMiscValue(AuraType auraType, int32 miscValue) const
+{
+ return GetMaxNegativeAuraModifier(auraType, [miscValue](AuraEffect const* aurEff) -> bool
{
- if ((*i)->GetMiscValue() == misc_value && (*i)->GetAmount() < modifier)
- modifier = (*i)->GetAmount();
- }
+ if (aurEff->GetMiscValue() == miscValue)
+ return true;
+ return false;
+ });
+}
- return modifier;
+int32 Unit::GetTotalAuraModifierByAffectMask(AuraType auraType, SpellInfo const* affectedSpell) const
+{
+ return GetTotalAuraModifier(auraType, [affectedSpell](AuraEffect const* aurEff) -> bool
+ {
+ if (aurEff->IsAffectedOnSpell(affectedSpell))
+ return true;
+ return false;
+ });
}
-int32 Unit::GetTotalAuraModifierByAffectMask(AuraType auratype, SpellInfo const* affectedSpell) const
+float Unit::GetTotalAuraMultiplierByAffectMask(AuraType auraType, SpellInfo const* affectedSpell) const
{
- int32 modifier = 0;
+ return GetTotalAuraMultiplier(auraType, [affectedSpell](AuraEffect const* aurEff) -> bool
+ {
+ if (aurEff->IsAffectedOnSpell(affectedSpell))
+ return true;
+ return false;
+ });
+}
- AuraEffectList const& mTotalAuraList = GetAuraEffectsByType(auratype);
- for (AuraEffectList::const_iterator i = mTotalAuraList.begin(); i != mTotalAuraList.end(); ++i)
- if ((*i)->IsAffectedOnSpell(affectedSpell))
- modifier += (*i)->GetAmount();
+int32 Unit::GetMaxPositiveAuraModifierByAffectMask(AuraType auraType, SpellInfo const* affectedSpell) const
+{
+ return GetMaxPositiveAuraModifier(auraType, [affectedSpell](AuraEffect const* aurEff) -> bool
+ {
+ if (aurEff->IsAffectedOnSpell(affectedSpell))
+ return true;
+ return false;
+ });
+}
- return modifier;
+int32 Unit::GetMaxNegativeAuraModifierByAffectMask(AuraType auraType, SpellInfo const* affectedSpell) const
+{
+ return GetMaxNegativeAuraModifier(auraType, [affectedSpell](AuraEffect const* aurEff) -> bool
+ {
+ if (aurEff->IsAffectedOnSpell(affectedSpell))
+ return true;
+ return false;
+ });
}
-float Unit::GetTotalAuraMultiplierByAffectMask(AuraType auratype, SpellInfo const* affectedSpell) const
+void Unit::UpdateResistanceBuffModsMod(SpellSchools school)
{
- float multiplier = 1.0f;
+ float modPos = 0.0f;
+ float modNeg = 0.0f;
- AuraEffectList const& mTotalAuraList = GetAuraEffectsByType(auratype);
- for (AuraEffectList::const_iterator i = mTotalAuraList.begin(); i != mTotalAuraList.end(); ++i)
- if ((*i)->IsAffectedOnSpell(affectedSpell))
- AddPct(multiplier, (*i)->GetAmount());
+ // these auras are always positive
+ modPos = GetMaxPositiveAuraModifierByMiscMask(SPELL_AURA_MOD_RESISTANCE_EXCLUSIVE, 1 << school);
+ modPos += GetTotalAuraModifier(SPELL_AURA_MOD_RESISTANCE, [school](AuraEffect const* aurEff) -> bool
+ {
+ if ((aurEff->GetMiscValue() & (1 << school)) && aurEff->GetAmount() > 0)
+ return true;
+ return false;
+ });
- return multiplier;
+ modNeg = GetTotalAuraModifier(SPELL_AURA_MOD_RESISTANCE, [school](AuraEffect const* aurEff) -> bool
+ {
+ if ((aurEff->GetMiscValue() & (1 << school)) && aurEff->GetAmount() < 0)
+ return true;
+ return false;
+ });
+
+ float factor = GetTotalAuraMultiplierByMiscMask(SPELL_AURA_MOD_RESISTANCE_PCT, 1 << school);
+ modPos *= factor;
+ modNeg *= factor;
+
+ SetFloatValue(UNIT_FIELD_RESISTANCEBUFFMODSPOSITIVE + AsUnderlyingType(school), modPos);
+ SetFloatValue(UNIT_FIELD_RESISTANCEBUFFMODSNEGATIVE + AsUnderlyingType(school), modNeg);
}
-int32 Unit::GetMaxPositiveAuraModifierByAffectMask(AuraType auratype, SpellInfo const* affectedSpell) const
+void Unit::UpdateStatBuffMod(Stats stat)
{
- int32 modifier = 0;
+ float modPos = 0.0f;
+ float modNeg = 0.0f;
+ float factor = 0.0f;
- AuraEffectList const& mTotalAuraList = GetAuraEffectsByType(auratype);
- for (AuraEffectList::const_iterator i = mTotalAuraList.begin(); i != mTotalAuraList.end(); ++i)
+ UnitMods const unitMod = static_cast<UnitMods>(UNIT_MOD_STAT_START + AsUnderlyingType(stat));
+
+ // includes value from items and enchantments
+ float modValue = GetFlatModifierValue(unitMod, BASE_VALUE);
+ if (modValue > 0.f)
+ modPos += modValue;
+ else
+ modNeg += modValue;
+
+ modPos += GetTotalAuraModifier(SPELL_AURA_MOD_STAT, [stat](AuraEffect const* aurEff) -> bool
{
- if ((*i)->IsAffectedOnSpell(affectedSpell) && (*i)->GetAmount() > modifier)
- modifier = (*i)->GetAmount();
- }
+ if ((aurEff->GetMiscValue() < 0 || aurEff->GetMiscValue() == stat) && aurEff->GetAmount() > 0)
+ return true;
+ return false;
+ });
- return modifier;
-}
+ modNeg += GetTotalAuraModifier(SPELL_AURA_MOD_STAT, [stat](AuraEffect const* aurEff) -> bool
+ {
+ if ((aurEff->GetMiscValue() < 0 || aurEff->GetMiscValue() == stat) && aurEff->GetAmount() < 0)
+ return true;
+ return false;
+ });
-int32 Unit::GetMaxNegativeAuraModifierByAffectMask(AuraType auratype, SpellInfo const* affectedSpell) const
-{
- int32 modifier = 0;
+ factor = GetTotalAuraMultiplier(SPELL_AURA_MOD_PERCENT_STAT, [stat](AuraEffect const* aurEff) -> bool
+ {
+ if (aurEff->GetMiscValue() == -1 || aurEff->GetMiscValue() == stat)
+ return true;
+ return false;
+ });
- AuraEffectList const& mTotalAuraList = GetAuraEffectsByType(auratype);
- for (AuraEffectList::const_iterator i = mTotalAuraList.begin(); i != mTotalAuraList.end(); ++i)
+ factor *= GetTotalAuraMultiplier(SPELL_AURA_MOD_TOTAL_STAT_PERCENTAGE, [stat](AuraEffect const* aurEff) -> bool
{
- if ((*i)->IsAffectedOnSpell(affectedSpell) && (*i)->GetAmount() < modifier)
- modifier = (*i)->GetAmount();
- }
+ if (aurEff->GetMiscValue() == -1 || aurEff->GetMiscValue() == stat)
+ return true;
+ return false;
+ });
- return modifier;
+ modPos *= factor;
+ modNeg *= factor;
+
+ SetFloatValue(UNIT_FIELD_POSSTAT0 + AsUnderlyingType(stat), modPos);
+ SetFloatValue(UNIT_FIELD_NEGSTAT0 + AsUnderlyingType(stat), modNeg);
}
void Unit::_RegisterDynObject(DynamicObject* dynObj)
@@ -8176,7 +8307,7 @@ bool Unit::HandleDummyAuraProc(Unit* victim, uint32 damage, AuraEffect* triggere
if (triggeredByAura->GetBase() && castItem->GetGUID() != triggeredByAura->GetBase()->GetCastItemGUID())
return false;
- WeaponAttackType attType = WeaponAttackType(player->GetAttackBySlot(castItem->GetSlot()));
+ WeaponAttackType attType = player->GetAttackBySlot(castItem->GetSlot());
if ((attType != BASE_ATTACK && attType != OFF_ATTACK)
|| (attType == BASE_ATTACK && procFlag & PROC_FLAG_DONE_OFFHAND_ATTACK)
|| (attType == OFF_ATTACK && procFlag & PROC_FLAG_DONE_MAINHAND_ATTACK))
@@ -8367,7 +8498,7 @@ bool Unit::HandleDummyAuraProc(Unit* victim, uint32 damage, AuraEffect* triggere
if (!IsPlayer() || !victim || !victim->IsAlive() || !castItem || !castItem->IsEquipped())
return false;
- WeaponAttackType attType = WeaponAttackType(Player::GetAttackBySlot(castItem->GetSlot()));
+ WeaponAttackType attType = Player::GetAttackBySlot(castItem->GetSlot());
if ((attType != BASE_ATTACK && attType != OFF_ATTACK)
|| (attType == BASE_ATTACK && procFlag & PROC_FLAG_DONE_OFFHAND_ATTACK)
|| (attType == OFF_ATTACK && procFlag & PROC_FLAG_DONE_MAINHAND_ATTACK))
@@ -9285,28 +9416,6 @@ bool Unit::HandleProcTriggerSpell(Unit* victim, uint32 damage, AuraEffect* trigg
{
switch (auraSpellInfo->Id)
{
- // Soul Preserver
- case 60510:
- {
- switch (getClass())
- {
- case CLASS_DRUID:
- trigger_spell_id = 60512;
- break;
- case CLASS_PALADIN:
- trigger_spell_id = 60513;
- break;
- case CLASS_PRIEST:
- trigger_spell_id = 60514;
- break;
- case CLASS_SHAMAN:
- trigger_spell_id = 60515;
- break;
- }
-
- target = this;
- break;
- }
case 37657: // Lightning Capacitor
case 54841: // Thunder Capacitor
case 67712: // Item - Coliseum 25 Normal Caster Trinket
@@ -10982,7 +11091,11 @@ void Unit::SetCharm(Unit* charm, bool apply)
charm->SetUnitFlag(UNIT_FLAG_PLAYER_CONTROLLED);
}
else
+ {
charm->m_ControlledByPlayer = false;
+ if (!HasUnitFlag(UNIT_FLAG_PLAYER_CONTROLLED))
+ charm->RemoveUnitFlag(UNIT_FLAG_PLAYER_CONTROLLED);
+ }
// PvP, FFAPvP
charm->SetByteValue(UNIT_FIELD_BYTES_2, 1, GetByteValue(UNIT_FIELD_BYTES_2, 1));
@@ -11091,7 +11204,7 @@ int32 Unit::DealHeal(Unit* healer, Unit* victim, uint32 addhealth)
return gain;
}
-bool RedirectSpellEvent::Execute(uint64 /*e_time*/, uint32 /*p_time*/)
+bool RedirectSpellEvent::Execute(uint64 /*e_time*/, uint32 /*p_time*/)
{
if (Unit* auraOwner = ObjectAccessor::GetUnit(_self, _auraOwnerGUID))
{
@@ -11401,44 +11514,41 @@ float Unit::SpellPctDamageModsDone(Unit* victim, SpellInfo const* spellProto, Da
// Done total percent damage auras
float DoneTotalMod = 1.0f;
- AuraEffectList const& mModDamagePercentDone = GetAuraEffectsByType(SPELL_AURA_MOD_DAMAGE_PERCENT_DONE);
- for (AuraEffectList::const_iterator i = mModDamagePercentDone.begin(); i != mModDamagePercentDone.end(); ++i)
+ DoneTotalMod *= GetTotalAuraMultiplier(SPELL_AURA_MOD_DAMAGE_PERCENT_DONE, [spellProto, this, damagetype](AuraEffect const* aurEff)
{
// prevent apply mods from weapon specific case to non weapon specific spells (Example: thunder clap and two-handed weapon specialization)
- if (spellProto->EquippedItemClass == -1 && (*i)->GetSpellInfo()->EquippedItemClass != -1 &&
- !(*i)->GetSpellInfo()->HasAttribute(SPELL_ATTR5_AURA_AFFECTS_NOT_JUST_REQ_EQUIPPED_ITEM) && (*i)->GetMiscValue() == SPELL_SCHOOL_MASK_NORMAL)
+ if (spellProto->EquippedItemClass == -1 && aurEff->GetSpellInfo()->EquippedItemClass != -1 &&
+ !aurEff->GetSpellInfo()->HasAttribute(SPELL_ATTR5_AURA_AFFECTS_NOT_JUST_REQ_EQUIPPED_ITEM) && aurEff->GetMiscValue() == SPELL_SCHOOL_MASK_NORMAL)
{
- continue;
- }
-
- if (!spellProto->ValidateAttribute6SpellDamageMods(this, *i, damagetype == DOT))
- continue;
+ return false;
+ }
- if (!sScriptMgr->IsNeedModSpellDamagePercent(this, *i, DoneTotalMod, spellProto))
- continue;
+ if (!spellProto->ValidateAttribute6SpellDamageMods(this, aurEff, damagetype == DOT))
+ return false;
- if ((*i)->GetMiscValue() & spellProto->GetSchoolMask())
+ if (aurEff->GetMiscValue() & spellProto->GetSchoolMask())
{
- if ((*i)->GetSpellInfo()->EquippedItemClass == -1)
- AddPct(DoneTotalMod, (*i)->GetAmount());
- else if (!(*i)->GetSpellInfo()->HasAttribute(SPELL_ATTR5_AURA_AFFECTS_NOT_JUST_REQ_EQUIPPED_ITEM) && ((*i)->GetSpellInfo()->EquippedItemSubClassMask == 0))
- AddPct(DoneTotalMod, (*i)->GetAmount());
- else if (ToPlayer() && ToPlayer()->HasItemFitToSpellRequirements((*i)->GetSpellInfo()))
- AddPct(DoneTotalMod, (*i)->GetAmount());
+ if (aurEff->GetSpellInfo()->EquippedItemClass == -1)
+ return true;
+ else if (!aurEff->GetSpellInfo()->HasAttribute(SPELL_ATTR5_AURA_AFFECTS_NOT_JUST_REQ_EQUIPPED_ITEM) && (aurEff->GetSpellInfo()->EquippedItemSubClassMask == 0))
+ return true;
+ else if (ToPlayer() && ToPlayer()->HasItemFitToSpellRequirements(aurEff->GetSpellInfo()))
+ return true;
}
- }
+ return false;
+ });
uint32 creatureTypeMask = victim->GetCreatureTypeMask();
- AuraEffectList const& mDamageDoneVersus = GetAuraEffectsByType(SPELL_AURA_MOD_DAMAGE_DONE_VERSUS);
- for (AuraEffectList::const_iterator i = mDamageDoneVersus.begin(); i != mDamageDoneVersus.end(); ++i)
- if ((creatureTypeMask & uint32((*i)->GetMiscValue())) && spellProto->ValidateAttribute6SpellDamageMods(this, *i, damagetype == DOT))
- AddPct(DoneTotalMod, (*i)->GetAmount());
+ DoneTotalMod *= GetTotalAuraMultiplier(SPELL_AURA_MOD_DAMAGE_DONE_VERSUS, [creatureTypeMask, spellProto, damagetype, this](AuraEffect const* aurEff)
+ {
+ return creatureTypeMask & aurEff->GetMiscValue() && spellProto->ValidateAttribute6SpellDamageMods(this, aurEff, damagetype == DOT);
+ });
// bonus against aurastate
- AuraEffectList const& mDamageDoneVersusAurastate = GetAuraEffectsByType(SPELL_AURA_MOD_DAMAGE_DONE_VERSUS_AURASTATE);
- for (AuraEffectList::const_iterator i = mDamageDoneVersusAurastate.begin(); i != mDamageDoneVersusAurastate.end(); ++i)
- if (victim->HasAuraState(AuraStateType((*i)->GetMiscValue())) && spellProto->ValidateAttribute6SpellDamageMods(this, *i, damagetype == DOT))
- AddPct(DoneTotalMod, (*i)->GetAmount());
+ DoneTotalMod *= GetTotalAuraMultiplier(SPELL_AURA_MOD_DAMAGE_DONE_VERSUS_AURASTATE, [victim, spellProto, damagetype, this](AuraEffect const* aurEff)
+ {
+ return victim->HasAuraState(AuraStateType(aurEff->GetMiscValue())) && spellProto->ValidateAttribute6SpellDamageMods(this, aurEff, damagetype == DOT);
+ });
// done scripted mod (take it from owner)
Unit* owner = GetOwner() ? GetOwner() : this;
@@ -11890,22 +12000,19 @@ uint32 Unit::SpellDamageBonusTaken(Unit* caster, SpellInfo const* spellProto, ui
// from positive and negative SPELL_AURA_MOD_DAMAGE_PERCENT_TAKEN
// multiplicative bonus, for example Dispersion + Shadowform (0.10*0.85=0.085)
- AuraEffectList const& mTotalAuraList = GetAuraEffectsByType(SPELL_AURA_MOD_DAMAGE_PERCENT_TAKEN);
- for (AuraEffectList::const_iterator i = mTotalAuraList.begin(); i != mTotalAuraList.end(); ++i)
- if (((*i)->GetMiscValue() & spellProto->GetSchoolMask()))
- if (spellProto->ValidateAttribute6SpellDamageMods(caster, *i, damagetype == DOT))
- AddPct(TakenTotalMod, (*i)->GetAmount());
+ TakenTotalMod *= GetTotalAuraMultiplierByMiscMask(SPELL_AURA_MOD_DAMAGE_PERCENT_TAKEN, spellProto->GetSchoolMask());
TakenTotalMod = processDummyAuras(TakenTotalMod);
// From caster spells
if (caster)
{
- AuraEffectList const& mOwnerTaken = GetAuraEffectsByType(SPELL_AURA_MOD_DAMAGE_FROM_CASTER);
- for (AuraEffectList::const_iterator i = mOwnerTaken.begin(); i != mOwnerTaken.end(); ++i)
- if ((*i)->GetCasterGUID() == caster->GetGUID() && (*i)->IsAffectedOnSpell(spellProto))
- if (spellProto->ValidateAttribute6SpellDamageMods(caster, *i, damagetype == DOT))
- AddPct(TakenTotalMod, (*i)->GetAmount());
+ TakenTotalMod *= GetTotalAuraMultiplier(SPELL_AURA_MOD_DAMAGE_FROM_CASTER, [caster, spellProto](AuraEffect const* aurEff) -> bool
+ {
+ if (aurEff->GetCasterGUID() == caster->GetGUID() && aurEff->IsAffectedOnSpell(spellProto))
+ return true;
+ return false;
+ });
}
if (uint32 mechanicMask = spellProto->GetAllEffectsMechanicMask())
@@ -12028,16 +12135,14 @@ float Unit::processDummyAuras(float TakenTotalMod) const
int32 Unit::SpellBaseDamageBonusDone(SpellSchoolMask schoolMask)
{
- int32 DoneAdvertisedBenefit = 0;
-
- AuraEffectList const& mDamageDone = GetAuraEffectsByType(SPELL_AURA_MOD_DAMAGE_DONE);
- for (AuraEffectList::const_iterator i = mDamageDone.begin(); i != mDamageDone.end(); ++i)
- if (((*i)->GetMiscValue() & schoolMask) != 0 &&
- (*i)->GetSpellInfo()->EquippedItemClass == -1 &&
+ int32 DoneAdvertisedBenefit = GetTotalAuraModifier(SPELL_AURA_MOD_DAMAGE_DONE, [schoolMask](AuraEffect const* aurEff)
+ {
+ return aurEff->GetMiscValue() & schoolMask &&
// -1 == any item class (not wand then)
- (*i)->GetSpellInfo()->EquippedItemInventoryTypeMask == 0)
- // 0 == any inventory type (not wand then)
- DoneAdvertisedBenefit += (*i)->GetAmount();
+ aurEff->GetSpellInfo()->EquippedItemClass == -1 &&
+ // 0 == any inventory type (not wand then)
+ aurEff->GetSpellInfo()->EquippedItemInventoryTypeMask == 0;
+ });
if (IsPlayer())
{
@@ -12057,31 +12162,20 @@ int32 Unit::SpellBaseDamageBonusDone(SpellSchoolMask schoolMask)
}
}
// ... and attack power
- AuraEffectList const& mDamageDonebyAP = GetAuraEffectsByType(SPELL_AURA_MOD_SPELL_DAMAGE_OF_ATTACK_POWER);
- for (AuraEffectList::const_iterator i = mDamageDonebyAP.begin(); i != mDamageDonebyAP.end(); ++i)
- if ((*i)->GetMiscValue() & schoolMask)
- DoneAdvertisedBenefit += int32(CalculatePct(GetTotalAttackPowerValue(BASE_ATTACK), (*i)->GetAmount()));
+ DoneAdvertisedBenefit += int32(CalculatePct(GetTotalAttackPowerValue(BASE_ATTACK), GetTotalAuraModifierByMiscMask(SPELL_AURA_MOD_SPELL_DAMAGE_OF_ATTACK_POWER, schoolMask)));
}
return DoneAdvertisedBenefit;
}
int32 Unit::SpellBaseDamageBonusTaken(SpellSchoolMask schoolMask, bool isDoT)
{
- int32 TakenAdvertisedBenefit = 0;
-
- AuraEffectList const& mDamageTaken = GetAuraEffectsByType(SPELL_AURA_MOD_DAMAGE_TAKEN);
- for (AuraEffectList::const_iterator i = mDamageTaken.begin(); i != mDamageTaken.end(); ++i)
- if (((*i)->GetMiscValue() & schoolMask) != 0)
- {
+ return GetTotalAuraModifier(SPELL_AURA_MOD_DAMAGE_TAKEN, [schoolMask, isDoT](AuraEffect const* aurEff)
+ {
+ return (aurEff->GetMiscValue() & schoolMask) != 0
// Xinef: if we have DoT damage type and aura has charges, check if it affects DoTs
// Xinef: required for hemorrhage & rupture / garrote
- if (isDoT && (*i)->GetBase()->IsUsingCharges() && !((*i)->GetSpellInfo()->ProcFlags & PROC_FLAG_TAKEN_PERIODIC))
- continue;
-
- TakenAdvertisedBenefit += (*i)->GetAmount();
- }
-
- return TakenAdvertisedBenefit;
+ && !(isDoT && aurEff->GetBase()->IsUsingCharges() && aurEff->GetSpellInfo()->ProcFlags & PROC_FLAG_TAKEN_PERIODIC);
+ });
}
float Unit::SpellDoneCritChance(Unit const* /*victim*/, SpellInfo const* spellProto, SpellSchoolMask schoolMask, WeaponAttackType attackType, bool skipEffectCheck) const
@@ -12352,14 +12446,10 @@ float Unit::SpellTakenCritChance(Unit const* caster, SpellInfo const* spellProto
if (caster)
{
- AuraEffectList const& mTotalAuraList = GetAuraEffectsByType(SPELL_AURA_MOD_CRIT_CHANCE_FOR_CASTER);
- for (AuraEffectList::const_iterator i = mTotalAuraList.begin(); i != mTotalAuraList.end(); ++i)
+ crit_chance += GetTotalAuraModifier(SPELL_AURA_MOD_CRIT_CHANCE_FOR_CASTER, [caster](AuraEffect const* aurEff)
{
- if (caster->GetGUID() != (*i)->GetCasterGUID())
- continue;
-
- crit_chance += (*i)->GetAmount();
- }
+ return caster->GetGUID() == aurEff->GetCasterGUID();
+ });
}
// Modify critical chance by victim SPELL_AURA_MOD_ATTACKER_SPELL_AND_WEAPON_CRIT_CHANCE
@@ -12472,14 +12562,7 @@ float Unit::SpellPctHealingModsDone(Unit* victim, SpellInfo const* spellProto, D
float DoneTotalMod = 1.0f;
// Healing done percent
- AuraEffectList const& mHealingDonePct = GetAuraEffectsByType(SPELL_AURA_MOD_HEALING_DONE_PERCENT);
- for (auto const& auraEff : mHealingDonePct)
- {
- if (!sScriptMgr->IsNeedModHealPercent(this, auraEff, DoneTotalMod, spellProto))
- continue;
-
- AddPct(DoneTotalMod, auraEff->GetAmount());
- }
+ DoneTotalMod *= GetTotalAuraMultiplier(SPELL_AURA_MOD_HEALING_DONE_PERCENT);
// done scripted mod (take it from owner)
Unit* owner = GetOwner() ? GetOwner() : this;
@@ -12645,6 +12728,8 @@ uint32 Unit::SpellHealingBonusDone(Unit* victim, SpellInfo const* spellProto, ui
case SPELL_AURA_PERIODIC_HEALTH_FUNNEL:
DoneTotal = 0;
break;
+ default:
+ break;
}
if (spellProto->Effects[i].Effect == SPELL_EFFECT_HEALTH_LEECH)
DoneTotal = 0;
@@ -12686,7 +12771,7 @@ uint32 Unit::SpellHealingBonusTaken(Unit* caster, SpellInfo const* spellProto, u
int32 TakenTotal = 0;
// Taken fixed damage bonus auras
- int32 TakenAdvertisedBenefit = SpellBaseHealingBonusTaken(spellProto->GetSchoolMask());
+ int32 TakenAdvertisedBenefit = GetTotalAuraModifierByMiscMask(SPELL_AURA_MOD_HEALING, spellProto->GetSchoolMask());
// Nourish cast, glyph of nourish
if (spellProto->SpellFamilyName == SPELLFAMILY_DRUID && spellProto->SpellFamilyFlags[1] & 0x2000000 && caster)
@@ -12760,10 +12845,10 @@ uint32 Unit::SpellHealingBonusTaken(Unit* caster, SpellInfo const* spellProto, u
if (caster)
{
- AuraEffectList const& mHealingGet = GetAuraEffectsByType(SPELL_AURA_MOD_HEALING_RECEIVED);
- for (AuraEffectList::const_iterator i = mHealingGet.begin(); i != mHealingGet.end(); ++i)
- if (caster->GetGUID() == (*i)->GetCasterGUID() && (*i)->IsAffectedOnSpell(spellProto))
- AddPct(TakenTotalMod, (*i)->GetAmount());
+ TakenTotalMod *= GetTotalAuraMultiplier(SPELL_AURA_MOD_HEALING_RECEIVED, [caster, spellProto](AuraEffect const* aurEff)
+ {
+ return caster->GetGUID() == aurEff->GetCasterGUID() && aurEff->IsAffectedOnSpell(spellProto);
+ });
}
for (uint8 i = 0; i < MAX_SPELL_EFFECTS; ++i)
@@ -12775,6 +12860,8 @@ uint32 Unit::SpellHealingBonusTaken(Unit* caster, SpellInfo const* spellProto, u
case SPELL_AURA_PERIODIC_HEALTH_FUNNEL:
TakenTotal = 0;
break;
+ default:
+ break;
}
if (spellProto->Effects[i].Effect == SPELL_EFFECT_HEALTH_LEECH)
TakenTotal = 0;
@@ -12796,10 +12883,10 @@ int32 Unit::SpellBaseHealingBonusDone(SpellSchoolMask schoolMask)
{
int32 AdvertisedBenefit = 0;
- AuraEffectList const& mHealingDone = GetAuraEffectsByType(SPELL_AURA_MOD_HEALING_DONE);
- for (AuraEffectList::const_iterator i = mHealingDone.begin(); i != mHealingDone.end(); ++i)
- if (!(*i)->GetMiscValue() || ((*i)->GetMiscValue() & schoolMask) != 0)
- AdvertisedBenefit += (*i)->GetAmount();
+ AdvertisedBenefit += GetTotalAuraModifier(SPELL_AURA_MOD_HEALING_DONE, [schoolMask](AuraEffect const* aurEff)
+ {
+ return !aurEff->GetMiscValue() || (aurEff->GetMiscValue() & schoolMask) != 0;
+ });
// Healing bonus of spirit, intellect and strength
if (IsPlayer())
@@ -12818,26 +12905,11 @@ int32 Unit::SpellBaseHealingBonusDone(SpellSchoolMask schoolMask)
}
// ... and attack power
- AuraEffectList const& mHealingDonebyAP = GetAuraEffectsByType(SPELL_AURA_MOD_SPELL_HEALING_OF_ATTACK_POWER);
- for (AuraEffectList::const_iterator i = mHealingDonebyAP.begin(); i != mHealingDonebyAP.end(); ++i)
- if ((*i)->GetMiscValue() & schoolMask)
- AdvertisedBenefit += int32(CalculatePct(GetTotalAttackPowerValue(BASE_ATTACK), (*i)->GetAmount()));
+ AdvertisedBenefit += int32(CalculatePct(GetTotalAttackPowerValue(BASE_ATTACK), GetTotalAuraModifierByMiscMask(SPELL_AURA_MOD_SPELL_HEALING_OF_ATTACK_POWER, schoolMask)));
}
return AdvertisedBenefit;
}
-int32 Unit::SpellBaseHealingBonusTaken(SpellSchoolMask schoolMask)
-{
- int32 AdvertisedBenefit = 0;
-
- AuraEffectList const& mDamageTaken = GetAuraEffectsByType(SPELL_AURA_MOD_HEALING);
- for (AuraEffectList::const_iterator i = mDamageTaken.begin(); i != mDamageTaken.end(); ++i)
- if (((*i)->GetMiscValue() & schoolMask) != 0)
- AdvertisedBenefit += (*i)->GetAmount();
-
- return AdvertisedBenefit;
-}
-
bool Unit::IsImmunedToDamage(SpellSchoolMask meleeSchoolMask) const
{
if (meleeSchoolMask == SPELL_SCHOOL_MASK_NONE)
@@ -13186,10 +13258,7 @@ uint32 Unit::MeleeDamageBonusDone(Unit* victim, uint32 pdamage, WeaponAttackType
int32 DoneFlatBenefit = 0;
// ..done
- AuraEffectList const& mDamageDoneCreature = GetAuraEffectsByType(SPELL_AURA_MOD_DAMAGE_DONE_CREATURE);
- for (AuraEffectList::const_iterator i = mDamageDoneCreature.begin(); i != mDamageDoneCreature.end(); ++i)
- if (creatureTypeMask & uint32((*i)->GetMiscValue()))
- DoneFlatBenefit += (*i)->GetAmount();
+ DoneFlatBenefit += GetTotalAuraModifierByMiscMask(SPELL_AURA_MOD_DAMAGE_DONE_CREATURE, creatureTypeMask);
// ..done
// SPELL_AURA_MOD_DAMAGE_DONE included in weapon damage
@@ -13202,20 +13271,14 @@ uint32 Unit::MeleeDamageBonusDone(Unit* victim, uint32 pdamage, WeaponAttackType
APbonus += victim->GetTotalAuraModifier(SPELL_AURA_RANGED_ATTACK_POWER_ATTACKER_BONUS);
// ..done (base at attack power and creature type)
- AuraEffectList const& mCreatureAttackPower = GetAuraEffectsByType(SPELL_AURA_MOD_RANGED_ATTACK_POWER_VERSUS);
- for (AuraEffectList::const_iterator i = mCreatureAttackPower.begin(); i != mCreatureAttackPower.end(); ++i)
- if (creatureTypeMask & uint32((*i)->GetMiscValue()))
- APbonus += (*i)->GetAmount();
+ APbonus += GetTotalAuraModifierByMiscMask(SPELL_AURA_MOD_RANGED_ATTACK_POWER_VERSUS, creatureTypeMask);
}
else
{
APbonus += victim->GetTotalAuraModifier(SPELL_AURA_MELEE_ATTACK_POWER_ATTACKER_BONUS);
// ..done (base at attack power and creature type)
- AuraEffectList const& mCreatureAttackPower = GetAuraEffectsByType(SPELL_AURA_MOD_MELEE_ATTACK_POWER_VERSUS);
- for (AuraEffectList::const_iterator i = mCreatureAttackPower.begin(); i != mCreatureAttackPower.end(); ++i)
- if (creatureTypeMask & uint32((*i)->GetMiscValue()))
- APbonus += (*i)->GetAmount();
+ APbonus += GetTotalAuraModifierByMiscMask(SPELL_AURA_MOD_MELEE_ATTACK_POWER_VERSUS, creatureTypeMask);
}
if (APbonus != 0) // Can be negative
@@ -13238,37 +13301,34 @@ uint32 Unit::MeleeDamageBonusDone(Unit* victim, uint32 pdamage, WeaponAttackType
if (!(damageSchoolMask & SPELL_SCHOOL_MASK_NORMAL))
{
// Some spells don't benefit from pct done mods
- AuraEffectList const& mModDamagePercentDone = GetAuraEffectsByType(SPELL_AURA_MOD_DAMAGE_PERCENT_DONE);
- for (AuraEffectList::const_iterator i = mModDamagePercentDone.begin(); i != mModDamagePercentDone.end(); ++i)
- {
- if (!spellProto || (spellProto->ValidateAttribute6SpellDamageMods(this, *i, false) &&
- sScriptMgr->IsNeedModMeleeDamagePercent(this, *i, DoneTotalMod, spellProto)))
+ DoneTotalMod *= GetTotalAuraMultiplier(SPELL_AURA_MOD_DAMAGE_PERCENT_DONE, [spellProto, this, damageSchoolMask](AuraEffect const* aurEff)
+ {
+ if (!spellProto || (spellProto->ValidateAttribute6SpellDamageMods(this, aurEff, false)))
{
- if (((*i)->GetMiscValue() & damageSchoolMask))
+ if ((aurEff->GetMiscValue() & damageSchoolMask))
{
- if ((*i)->GetSpellInfo()->EquippedItemClass == -1)
- AddPct(DoneTotalMod, (*i)->GetAmount());
- else if (!(*i)->GetSpellInfo()->HasAttribute(SPELL_ATTR5_AURA_AFFECTS_NOT_JUST_REQ_EQUIPPED_ITEM) && ((*i)->GetSpellInfo()->EquippedItemSubClassMask == 0))
- AddPct(DoneTotalMod, (*i)->GetAmount());
- else if (ToPlayer() && ToPlayer()->HasItemFitToSpellRequirements((*i)->GetSpellInfo()))
- AddPct(DoneTotalMod, (*i)->GetAmount());
+ if (aurEff->GetSpellInfo()->EquippedItemClass == -1)
+ return true;
+ else if (!aurEff->GetSpellInfo()->HasAttribute(SPELL_ATTR5_AURA_AFFECTS_NOT_JUST_REQ_EQUIPPED_ITEM) && (aurEff->GetSpellInfo()->EquippedItemSubClassMask == 0))
+ return true;
+ else if (ToPlayer() && ToPlayer()->HasItemFitToSpellRequirements(aurEff->GetSpellInfo()))
+ return true;
}
}
- }
+ return false;
+ });
}
- AuraEffectList const& mDamageDoneVersus = GetAuraEffectsByType(SPELL_AURA_MOD_DAMAGE_DONE_VERSUS);
- for (AuraEffectList::const_iterator i = mDamageDoneVersus.begin(); i != mDamageDoneVersus.end(); ++i)
- if (creatureTypeMask & uint32((*i)->GetMiscValue()))
- if (!spellProto || spellProto->ValidateAttribute6SpellDamageMods(this, *i, false))
- AddPct(DoneTotalMod, (*i)->GetAmount());
+ DoneTotalMod *= GetTotalAuraMultiplier(SPELL_AURA_MOD_DAMAGE_DONE_VERSUS, [creatureTypeMask, spellProto, this](AuraEffect const* aurEff)
+ {
+ return (creatureTypeMask & aurEff->GetMiscValue() && (!spellProto || spellProto->ValidateAttribute6SpellDamageMods(this, aurEff, false)));
+ });
// bonus against aurastate
- AuraEffectList const& mDamageDoneVersusAurastate = GetAuraEffectsByType(SPELL_AURA_MOD_DAMAGE_DONE_VERSUS_AURASTATE);
- for (AuraEffectList::const_iterator i = mDamageDoneVersusAurastate.begin(); i != mDamageDoneVersusAurastate.end(); ++i)
- if (victim->HasAuraState(AuraStateType((*i)->GetMiscValue())))
- if (!spellProto || spellProto->ValidateAttribute6SpellDamageMods(this, *i, false))
- AddPct(DoneTotalMod, (*i)->GetAmount());
+ DoneTotalMod *= GetTotalAuraMultiplier(SPELL_AURA_MOD_DAMAGE_DONE_VERSUS_AURASTATE, [victim, spellProto, this](AuraEffect const* aurEff)
+ {
+ return (victim->HasAuraState(AuraStateType(aurEff->GetMiscValue())) && (!spellProto || spellProto->ValidateAttribute6SpellDamageMods(this, aurEff, false)));
+ });
// done scripted mod (take it from owner)
Unit* owner = GetOwner() ? GetOwner() : this;
@@ -13375,10 +13435,7 @@ uint32 Unit::MeleeDamageBonusTaken(Unit* attacker, uint32 pdamage, WeaponAttackT
int32 TakenFlatBenefit = 0;
// ..taken
- AuraEffectList const& mDamageTaken = GetAuraEffectsByType(SPELL_AURA_MOD_DAMAGE_TAKEN);
- for (AuraEffectList::const_iterator i = mDamageTaken.begin(); i != mDamageTaken.end(); ++i)
- if ((*i)->GetMiscValue() & damageSchoolMask)
- TakenFlatBenefit += (*i)->GetAmount();
+ TakenFlatBenefit += GetTotalAuraModifierByMiscMask(SPELL_AURA_MOD_DAMAGE_TAKEN, damageSchoolMask);
if (attType != RANGED_ATTACK)
TakenFlatBenefit += GetTotalAuraModifier(SPELL_AURA_MOD_MELEE_DAMAGE_TAKEN);
@@ -13394,10 +13451,10 @@ uint32 Unit::MeleeDamageBonusTaken(Unit* attacker, uint32 pdamage, WeaponAttackT
if (spellProto)
{
// From caster spells
- AuraEffectList const& mOwnerTaken = GetAuraEffectsByType(SPELL_AURA_MOD_DAMAGE_FROM_CASTER);
- for (AuraEffectList::const_iterator i = mOwnerTaken.begin(); i != mOwnerTaken.end(); ++i)
- if ((*i)->GetCasterGUID() == attacker->GetGUID() && (*i)->IsAffectedOnSpell(spellProto))
- AddPct(TakenTotalMod, (*i)->GetAmount());
+ TakenTotalMod *= GetTotalAuraMultiplier(SPELL_AURA_MOD_DAMAGE_FROM_CASTER, [attacker, spellProto](AuraEffect const* aurEff)
+ {
+ return attacker->GetGUID() == aurEff->GetCasterGUID() && aurEff->IsAffectedOnSpell(spellProto);
+ });
// Mod damage from spell mechanic
uint32 mechanicMask = spellProto->GetAllEffectsMechanicMask();
@@ -13408,10 +13465,12 @@ uint32 Unit::MeleeDamageBonusTaken(Unit* attacker, uint32 pdamage, WeaponAttackT
if (mechanicMask)
{
- AuraEffectList const& mDamageDoneMechanic = GetAuraEffectsByType(SPELL_AURA_MOD_MECHANIC_DAMAGE_TAKEN_PERCENT);
- for (AuraEffectList::const_iterator i = mDamageDoneMechanic.begin(); i != mDamageDoneMechanic.end(); ++i)
- if (mechanicMask & uint32(1 << ((*i)->GetMiscValue())))
- AddPct(TakenTotalMod, (*i)->GetAmount());
+ TakenTotalMod *= GetTotalAuraMultiplier(SPELL_AURA_MOD_MECHANIC_DAMAGE_TAKEN_PERCENT, [mechanicMask](AuraEffect const* aurEff) -> bool
+ {
+ if (mechanicMask & uint32(1 << (aurEff->GetMiscValue())))
+ return true;
+ return false;
+ });
}
}
@@ -13428,15 +13487,11 @@ uint32 Unit::MeleeDamageBonusTaken(Unit* attacker, uint32 pdamage, WeaponAttackT
if (attType != RANGED_ATTACK)
{
- AuraEffectList const& mModMeleeDamageTakenPercent = GetAuraEffectsByType(SPELL_AURA_MOD_MELEE_DAMAGE_TAKEN_PCT);
- for (AuraEffectList::const_iterator i = mModMeleeDamageTakenPercent.begin(); i != mModMeleeDamageTakenPercent.end(); ++i)
- AddPct(TakenTotalMod, (*i)->GetAmount());
+ TakenTotalMod *= GetTotalAuraMultiplier(SPELL_AURA_MOD_MELEE_DAMAGE_TAKEN_PCT);
}
else
{
- AuraEffectList const& mModRangedDamageTakenPercent = GetAuraEffectsByType(SPELL_AURA_MOD_RANGED_DAMAGE_TAKEN_PCT);
- for (AuraEffectList::const_iterator i = mModRangedDamageTakenPercent.begin(); i != mModRangedDamageTakenPercent.end(); ++i)
- AddPct(TakenTotalMod, (*i)->GetAmount());
+ TakenTotalMod *= GetTotalAuraMultiplier(SPELL_AURA_MOD_RANGED_DAMAGE_TAKEN_PCT);
}
// No positive taken bonus, custom attr
@@ -13581,7 +13636,7 @@ void Unit::Mount(uint32 mount, uint32 VehicleId, uint32 creatureEntry)
SendMessageToSet(&data, true);
data.Initialize(SMSG_ON_CANCEL_EXPECTED_RIDE_VEHICLE_AURA, 0);
- player->GetSession()->SendPacket(&data);
+ player->SendDirectMessage(&data);
// mounts can also have accessories
GetVehicleKit()->InstallAllAccessories(false);
@@ -13607,9 +13662,10 @@ void Unit::Mount(uint32 mount, uint32 VehicleId, uint32 creatureEntry)
WorldPacket data(SMSG_MOVE_SET_COLLISION_HGT, GetPackGUID().size() + 4 + 4);
data << GetPackGUID();
- data << uint32(GameTime::GetGameTime().count()); // Packet counter
+ data << player->GetSession()->GetOrderCounter(); // movement counter
data << player->GetCollisionHeight();
- player->GetSession()->SendPacket(&data);
+ player->SendDirectMessage(&data);
+ player->GetSession()->IncrementOrderCounter();
}
RemoveAurasWithInterruptFlags(AURA_INTERRUPT_FLAG_MOUNT);
@@ -13623,13 +13679,14 @@ void Unit::Dismount()
SetUInt32Value(UNIT_FIELD_MOUNTDISPLAYID, 0);
RemoveUnitFlag(UNIT_FLAG_MOUNT);
- if (Player* thisPlayer = ToPlayer())
+ if (Player* player = ToPlayer())
{
WorldPacket data(SMSG_MOVE_SET_COLLISION_HGT, GetPackGUID().size() + 4 + 4);
data << GetPackGUID();
- data << uint32(GameTime::GetGameTime().count()); // Packet counter
- data << thisPlayer->GetCollisionHeight();
- thisPlayer->GetSession()->SendPacket(&data);
+ data << player->GetSession()->GetOrderCounter(); // movement counter
+ data << player->GetCollisionHeight();
+ player->SendDirectMessage(&data);
+ player->GetSession()->IncrementOrderCounter();
}
WorldPacket data(SMSG_DISMOUNT, 8);
@@ -14033,7 +14090,22 @@ bool Unit::_IsValidAttackTarget(Unit const* target, SpellInfo const* bySpell, Wo
if (repThisToTarget > REP_NEUTRAL
|| (repTargetToThis = target->GetReactionTo(this)) > REP_NEUTRAL)
- return false;
+ {
+ // contested guards can attack contested PvP players even though players may be friendly
+ if (!target->IsControlledByPlayer())
+ return false;
+
+ bool isContestedGuard = false;
+ if (FactionTemplateEntry const* entry = GetFactionTemplateEntry())
+ isContestedGuard = entry->factionFlags & FACTION_TEMPLATE_FLAG_ATTACK_PVP_ACTIVE_PLAYERS;
+
+ bool isContestedPvp = false;
+ if (Player const* player = target->GetCharmerOrOwnerPlayerOrPlayerItself())
+ isContestedPvp = player->HasPlayerFlag(PLAYER_FLAGS_CONTESTED_PVP);
+
+ if (!isContestedGuard && !isContestedPvp)
+ return false;
+ }
// Not all neutral creatures can be attacked (even some unfriendly faction does not react aggresive to you, like Sporaggar)
if (repThisToTarget == REP_NEUTRAL &&
@@ -14284,15 +14356,6 @@ int32 Unit::ModifyPower(Powers power, int32 dVal, bool withPowerUpdate /*= true*
return gain;
}
-// returns negative amount on power reduction
-int32 Unit::ModifyPowerPct(Powers power, float pct, bool apply)
-{
- float amount = (float)GetMaxPower(power);
- ApplyPercentModFloatVar(amount, pct, apply);
-
- return ModifyPower(power, (int32)amount - (int32)GetMaxPower(power));
-}
-
bool Unit::IsAlwaysVisibleFor(WorldObject const* seer) const
{
if (WorldObject::IsAlwaysVisibleFor(seer))
@@ -14540,114 +14603,55 @@ void Unit::SetSpeed(UnitMoveType mtype, float rate, bool forced)
propagateSpeedChange();
- WorldPacket data;
- if (!forced)
+ SpeedOpcodePair const& speedOpcodes = SetSpeed2Opc_table[mtype];
+
+ if (forced && IsClientControlled())
{
- 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;
- }
+ Player* player = const_cast<Player*>(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<size_t>(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<size_t>(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 << (uint32)0; // moveEvent, NUM_PMOVE_EVTS = 0x39
- if (mtype == MOVE_RUN)
- data << uint8(0); // new 2.1.0
- data << float(GetSpeed(mtype));
- SendMessageToSet(&data, true);
+ ToPlayer()->SetCanTeleport(true);
}
}
@@ -15280,6 +15284,11 @@ float Unit::GetSpellMinRangeForTarget(Unit const* target, SpellInfo const* spell
return spellInfo->GetMinRange(!IsHostileTo(target));
}
+void Unit::SetAnimTier(AnimTier animTier)
+{
+ SetByteValue(UNIT_FIELD_BYTES_1, UNIT_BYTES_1_OFFSET_ANIM_TIER, uint8(animTier));
+}
+
uint32 Unit::GetCreatureType() const
{
if (IsPlayer())
@@ -15301,30 +15310,100 @@ uint32 Unit::GetCreatureType() const
######## ########
#######################################*/
-bool Unit::HandleStatModifier(UnitMods unitMod, UnitModifierType modifierType, float amount, bool apply)
+bool Unit::HandleStatFlatModifier(UnitMods unitMod, UnitModifierFlatType modifierType, float amount, bool apply)
{
- if (unitMod >= UNIT_MOD_END || modifierType >= MODIFIER_TYPE_END)
+ if (unitMod >= UNIT_MOD_END || modifierType >= MODIFIER_TYPE_FLAT_END)
{
LOG_ERROR("entities.unit", "ERROR in HandleStatModifier(): non-existing UnitMods or wrong UnitModifierType!");
return false;
}
+ if (!amount)
+ return false;
+
switch (modifierType)
{
case BASE_VALUE:
case TOTAL_VALUE:
- m_auraModifiersGroup[unitMod][modifierType] += apply ? amount : -amount;
+ m_auraFlatModifiersGroup[unitMod][modifierType] += apply ? amount : -amount;
+ break;
+ default:
break;
+ }
+
+ UpdateUnitMod(unitMod);
+ return true;
+}
+
+// Usage outside of AuraEffect Handlers is discouraged as the value will be lost when auras change. Use an Aura instead.
+void Unit::ApplyStatPctModifier(UnitMods unitMod, UnitModifierPctType modifierType, float pct)
+{
+ if (unitMod >= UNIT_MOD_END || modifierType >= MODIFIER_TYPE_PCT_END)
+ {
+ LOG_ERROR("entities.unit", "ERROR in ApplyStatPctModifier(): non-existing UnitMods or wrong UnitModifierType!");
+ return;
+ }
+
+ if (!pct)
+ return;
+
+ switch (modifierType)
+ {
case BASE_PCT:
case TOTAL_PCT:
- ApplyPercentModFloatVar(m_auraModifiersGroup[unitMod][modifierType], amount, apply);
+ AddPct(m_auraPctModifiersGroup[unitMod][modifierType], pct);
break;
default:
break;
}
- if (!CanModifyStats())
- return false;
+ UpdateUnitMod(unitMod);
+}
+
+void Unit::SetStatFlatModifier(UnitMods unitMod, UnitModifierFlatType modifierType, float val)
+{
+ if (m_auraFlatModifiersGroup[unitMod][modifierType] == val)
+ return;
+
+ m_auraFlatModifiersGroup[unitMod][modifierType] = val;
+ UpdateUnitMod(unitMod);
+}
+
+void Unit::SetStatPctModifier(UnitMods unitMod, UnitModifierPctType modifierType, float val)
+{
+ if (m_auraPctModifiersGroup[unitMod][modifierType] == val)
+ return;
+
+ m_auraPctModifiersGroup[unitMod][modifierType] = val;
+ UpdateUnitMod(unitMod);
+}
+
+float Unit::GetFlatModifierValue(UnitMods unitMod, UnitModifierFlatType modifierType) const
+{
+ if (unitMod >= UNIT_MOD_END || modifierType >= MODIFIER_TYPE_FLAT_END)
+ {
+ LOG_ERROR("entities.unit", "attempt to access non-existing modifier value from UnitMods!");
+ return 0.0f;
+ }
+
+ return m_auraFlatModifiersGroup[unitMod][modifierType];
+}
+
+float Unit::GetPctModifierValue(UnitMods unitMod, UnitModifierPctType modifierType) const
+{
+ if (unitMod >= UNIT_MOD_END || modifierType >= MODIFIER_TYPE_PCT_END)
+ {
+ LOG_ERROR("entities.unit", "attempt to access non-existing modifier value from UnitMods!");
+ return 0.0f;
+ }
+
+ return m_auraPctModifiersGroup[unitMod][modifierType];
+}
+
+void Unit::UpdateUnitMod(UnitMods unitMod)
+{
+ if (!CanModifyStats())
+ return;
switch (unitMod)
{
@@ -15382,36 +15461,100 @@ bool Unit::HandleStatModifier(UnitMods unitMod, UnitModifierType modifierType, f
default:
break;
}
+}
- return true;
+void Unit::UpdateDamageDoneMods(WeaponAttackType attackType, int32 /*skipEnchantSlot = -1*/)
+{
+ UnitMods unitMod;
+ switch (attackType)
+ {
+ case BASE_ATTACK:
+ unitMod = UNIT_MOD_DAMAGE_MAINHAND;
+ break;
+ case OFF_ATTACK:
+ unitMod = UNIT_MOD_DAMAGE_OFFHAND;
+ break;
+ case RANGED_ATTACK:
+ unitMod = UNIT_MOD_DAMAGE_RANGED;
+ break;
+ default:
+ ABORT();
+ break;
+ }
+
+ float amount = GetTotalAuraModifier(SPELL_AURA_MOD_DAMAGE_DONE, [&](AuraEffect const* aurEff) -> bool
+ {
+ if (!(aurEff->GetMiscValue() & SPELL_SCHOOL_MASK_NORMAL))
+ return false;
+
+ return CheckAttackFitToAuraRequirement(attackType, aurEff);
+ });
+
+ SetStatFlatModifier(unitMod, TOTAL_VALUE, amount);
+}
+
+void Unit::UpdateAllDamageDoneMods()
+{
+ for (uint8 i = BASE_ATTACK; i < MAX_ATTACK; ++i)
+ UpdateDamageDoneMods(WeaponAttackType(i));
}
-float Unit::GetModifierValue(UnitMods unitMod, UnitModifierType modifierType) const
+void Unit::UpdateDamagePctDoneMods(WeaponAttackType attackType)
{
- if (unitMod >= UNIT_MOD_END || modifierType >= MODIFIER_TYPE_END)
+ float factor;
+ UnitMods unitMod;
+ switch (attackType)
{
- LOG_ERROR("entities.unit", "attempt to access non-existing modifier value from UnitMods!");
- return 0.0f;
+ case BASE_ATTACK:
+ factor = 1.0f;
+ unitMod = UNIT_MOD_DAMAGE_MAINHAND;
+ break;
+ case OFF_ATTACK:
+ // off hand has 50% penalty
+ factor = 0.5f;
+ unitMod = UNIT_MOD_DAMAGE_OFFHAND;
+ break;
+ case RANGED_ATTACK:
+ factor = 1.0f;
+ unitMod = UNIT_MOD_DAMAGE_RANGED;
+ break;
+ default:
+ ABORT();
+ break;
}
- if (modifierType == TOTAL_PCT && m_auraModifiersGroup[unitMod][modifierType] <= 0.0f)
- return 0.0f;
+ factor *= GetTotalAuraMultiplier(SPELL_AURA_MOD_DAMAGE_PERCENT_DONE, [attackType, this](AuraEffect const* aurEff) -> bool
+ {
+ if (!(aurEff->GetMiscValue() & SPELL_SCHOOL_MASK_NORMAL))
+ return false;
- return m_auraModifiersGroup[unitMod][modifierType];
+ return CheckAttackFitToAuraRequirement(attackType, aurEff);
+ });
+
+ if (attackType == OFF_ATTACK)
+ factor *= GetTotalAuraMultiplier(SPELL_AURA_MOD_OFFHAND_DAMAGE_PCT, std::bind(&Unit::CheckAttackFitToAuraRequirement, this, attackType, std::placeholders::_1));
+
+ SetStatPctModifier(unitMod, TOTAL_PCT, factor);
+}
+
+void Unit::UpdateAllDamagePctDoneMods()
+{
+ for (uint8 i = BASE_ATTACK; i < MAX_ATTACK; ++i)
+ UpdateDamagePctDoneMods(WeaponAttackType(i));
}
float Unit::GetTotalStatValue(Stats stat, float additionalValue) const
{
UnitMods unitMod = UnitMods(static_cast<uint16>(UNIT_MOD_STAT_START) + stat);
- if (m_auraModifiersGroup[unitMod][TOTAL_PCT] <= 0.0f)
+ if (GetPctModifierValue(unitMod, TOTAL_PCT) <= 0.0f)
return 0.0f;
// value = ((base_value * base_pct) + total_value) * total_pct
- float value = m_auraModifiersGroup[unitMod][BASE_VALUE] + GetCreateStat(stat);
- value *= m_auraModifiersGroup[unitMod][BASE_PCT];
- value += m_auraModifiersGroup[unitMod][TOTAL_VALUE] + additionalValue;
- value *= m_auraModifiersGroup[unitMod][TOTAL_PCT];
+ float value = GetFlatModifierValue(unitMod, BASE_VALUE) + GetCreateStat(stat);
+ value *= GetPctModifierValue(unitMod, BASE_PCT);
+ value += GetFlatModifierValue(unitMod, TOTAL_VALUE) + additionalValue;
+ value *= GetPctModifierValue(unitMod, TOTAL_PCT);
return value;
}
@@ -15424,25 +15567,16 @@ float Unit::GetTotalAuraModValue(UnitMods unitMod) const
return 0.0f;
}
- if (m_auraModifiersGroup[unitMod][TOTAL_PCT] <= 0.0f)
+ if (GetPctModifierValue(unitMod, TOTAL_PCT) <= 0.0f)
return 0.0f;
- float value = m_auraModifiersGroup[unitMod][BASE_VALUE];
- value *= m_auraModifiersGroup[unitMod][BASE_PCT];
- value += m_auraModifiersGroup[unitMod][TOTAL_VALUE];
- value *= m_auraModifiersGroup[unitMod][TOTAL_PCT];
-
+ float value = GetFlatModifierValue(unitMod, BASE_VALUE);
+ value *= GetPctModifierValue(unitMod, BASE_PCT);
+ value += GetFlatModifierValue(unitMod, TOTAL_VALUE);
+ value *= GetPctModifierValue(unitMod, TOTAL_PCT);
return value;
}
-void Unit::ApplyStatPercentBuffMod(Stats stat, float val, bool apply)
-{
- if (val == -100.0f) // prevent set var to zero
- val = -99.99f;
- float var = GetStat(stat) * val / 100.0f;
- ApplyModSignedFloatValue((var > 0 ? static_cast<uint16>(UNIT_FIELD_POSSTAT0) + stat : static_cast<uint16>(UNIT_FIELD_NEGSTAT0) + stat), var, apply);
-}
-
SpellSchools Unit::GetSpellSchoolByAuraGroup(UnitMods unitMod) const
{
SpellSchools school = SPELL_SCHOOL_NORMAL;
@@ -16688,7 +16822,7 @@ Player* Unit::GetSpellModOwner() const
}
///----------Pet responses methods-----------------
-void Unit::SendPetActionFeedback(uint8 msg)
+void Unit::SendPetActionFeedback(uint8 msg) const
{
Unit* owner = GetOwner();
if (!owner || !owner->IsPlayer())
@@ -16696,22 +16830,21 @@ void Unit::SendPetActionFeedback(uint8 msg)
WorldPacket data(SMSG_PET_ACTION_FEEDBACK, 1);
data << uint8(msg);
- owner->ToPlayer()->GetSession()->SendPacket(&data);
+ owner->ToPlayer()->SendDirectMessage(&data);
}
-void Unit::SendPetTalk(uint32 pettalk)
+void Unit::SendPetActionSound(PetAction action) const
{
- Unit* owner = GetOwner();
- if (!owner || !owner->IsPlayer())
- return;
+ SendMessageToSet(WorldPackets::Pet::PetActionSound(GetGUID(), static_cast<int32>(action)).Write(), false);
+}
- WorldPacket data(SMSG_PET_ACTION_SOUND, 8 + 4);
- data << GetGUID();
- data << uint32(pettalk);
- owner->ToPlayer()->GetSession()->SendPacket(&data);
+void Unit::SendPetDismissSound() const
+{
+ if (CreatureDisplayInfoEntry const* displayInfo = sCreatureDisplayInfoStore.LookupEntry(GetNativeDisplayId()))
+ SendMessageToSet(WorldPackets::Pet::PetDismissSound(static_cast<int32>(displayInfo->ModelId), GetPosition()).Write(), false);
}
-void Unit::SendPetAIReaction(ObjectGuid guid)
+void Unit::SendPetAIReaction(ObjectGuid guid) const
{
Unit* owner = GetOwner();
if (!owner || !owner->IsPlayer())
@@ -16720,7 +16853,7 @@ void Unit::SendPetAIReaction(ObjectGuid guid)
WorldPacket data(SMSG_AI_REACTION, 8 + 4);
data << guid;
data << uint32(AI_REACTION_HOSTILE);
- owner->ToPlayer()->GetSession()->SendPacket(&data);
+ owner->ToPlayer()->SendDirectMessage(&data);
}
///----------End of Pet responses methods----------
@@ -16786,6 +16919,13 @@ void Unit::StopMovingOnCurrentPos()
void Unit::SendMovementFlagUpdate(bool self /* = false */)
{
+ if (IsRooted())
+ {
+ // each case where this occurs has to be examined and reported and dealt with.
+ LOG_ERROR("Unit", "Attempted sending heartbeat with root flag for guid {}", GetGUID().ToString());
+ return;
+ }
+
WorldPacket data;
BuildHeartBeatMsg(&data);
SendMessageToSet(&data, self);
@@ -16806,6 +16946,15 @@ bool Unit::IsStandState() const
return !IsSitState() && s != UNIT_STAND_STATE_SLEEP && s != UNIT_STAND_STATE_KNEEL;
}
+bool Unit::IsStandUpOnMovementState() const
+{
+ uint8 s = getStandState();
+ return
+ s == UNIT_STAND_STATE_SIT_CHAIR || s == UNIT_STAND_STATE_SIT_LOW_CHAIR ||
+ s == UNIT_STAND_STATE_SIT_MEDIUM_CHAIR || s == UNIT_STAND_STATE_SIT_HIGH_CHAIR ||
+ s == UNIT_STAND_STATE_SIT || s == UNIT_STAND_STATE_SLEEP;
+}
+
void Unit::SetStandState(uint8 state)
{
SetByteValue(UNIT_FIELD_BYTES_1, UNIT_BYTES_1_OFFSET_STAND_STATE, state);
@@ -16817,7 +16966,7 @@ void Unit::SetStandState(uint8 state)
{
WorldPacket data(SMSG_STANDSTATE_UPDATE, 1);
data << (uint8)state;
- ToPlayer()->GetSession()->SendPacket(&data);
+ ToPlayer()->SendDirectMessage(&data);
}
}
@@ -17134,28 +17283,40 @@ Unit* Unit::SelectNearbyNoTotemTarget(Unit* exclude, float dist) const
return Acore::Containers::SelectRandomContainerElement(targets);
}
+void ApplyPercentModFloatVar(float& var, float val, bool apply)
+{
+ var *= (apply ? (100.0f + val) / 100.0f : 100.0f / (100.0f + val));
+}
+
void Unit::ApplyAttackTimePercentMod(WeaponAttackType att, float val, bool apply)
{
+ float amount = GetFloatValue(UNIT_FIELD_BASEATTACKTIME + AsUnderlyingType(att));
+
float remainingTimePct = std::max((float)m_attackTimer[att], 0.0f) / (GetAttackTime(att) * m_modAttackSpeedPct[att]);
- if (val > 0)
+ if (val > 0.f)
{
ApplyPercentModFloatVar(m_modAttackSpeedPct[att], val, !apply);
- ApplyPercentModFloatValue(static_cast<uint16>(UNIT_FIELD_BASEATTACKTIME) + att, val, !apply);
+ ApplyPercentModFloatVar(amount, val, !apply);
}
else
{
ApplyPercentModFloatVar(m_modAttackSpeedPct[att], -val, apply);
- ApplyPercentModFloatValue(static_cast<uint16>(UNIT_FIELD_BASEATTACKTIME) + att, -val, apply);
+ ApplyPercentModFloatVar(amount, -val, apply);
}
+ SetFloatValue(UNIT_FIELD_BASEATTACKTIME + AsUnderlyingType(att), amount);
m_attackTimer[att] = uint32(GetAttackTime(att) * m_modAttackSpeedPct[att] * remainingTimePct);
}
void Unit::ApplyCastTimePercentMod(float val, bool apply)
{
- if (val > 0)
- ApplyPercentModFloatValue(UNIT_MOD_CAST_SPEED, val, !apply);
+ float amount = GetFloatValue(UNIT_MOD_CAST_SPEED);
+
+ if (val > 0.f)
+ ApplyPercentModFloatVar(amount, val, !apply);
else
- ApplyPercentModFloatValue(UNIT_MOD_CAST_SPEED, -val, apply);
+ ApplyPercentModFloatVar(amount, -val, apply);
+
+ SetFloatValue(UNIT_MOD_CAST_SPEED, amount);
}
uint32 Unit::GetCastingTimeForBonus(SpellInfo const* spellProto, DamageEffectType damagetype, uint32 CastingTime) const
@@ -18252,10 +18413,8 @@ void Unit::SetControlled(bool apply, UnitState state, Unit* source /*= nullptr*/
void Unit::SetStunned(bool apply)
{
- if (HasUnitState(UNIT_STATE_IN_FLIGHT))
- {
+ if (IsInFlight())
return;
- }
if (apply)
{
@@ -18298,74 +18457,65 @@ void Unit::SetStunned(bool apply)
}
}
-void Unit::SetRooted(bool apply, bool isStun)
+void Unit::SetRooted(bool apply, bool stun, bool logout)
{
+ const uint32 state = (stun ? (logout ? UNIT_STATE_LOGOUT_TIMER : UNIT_STATE_STUNNED) : UNIT_STATE_ROOT);
+
if (apply)
{
- if (m_rootTimes > 0) // blizzard internal check?
- m_rootTimes++;
+ AddUnitState(state);
- // MOVEMENTFLAG_ROOT cannot be used in conjunction with MOVEMENTFLAG_MASK_MOVING (tested 3.3.5a)
- // this will freeze clients. That's why we remove MOVEMENTFLAG_MASK_MOVING before
- // setting MOVEMENTFLAG_ROOT
- RemoveUnitMovementFlag(MOVEMENTFLAG_MASK_MOVING);
+ SendMoveRoot(true);
+ }
+ else
+ {
+ ClearUnitState(state);
- if (IsFalling())
- {
- AddUnitMovementFlag(MOVEMENTFLAG_PENDING_ROOT);
- }
- else
- {
- AddUnitMovementFlag(MOVEMENTFLAG_ROOT);
- }
+ // Prevent giving ability to move if more immobilizers are active
+ if (!IsImmobilizedState())
+ SendMoveRoot(false);
+ }
+}
- // Creature specific
- if (!IsPlayer())
- {
- if (isStun && movespline->Finalized())
- {
- StopMovingOnCurrentPos();
- }
- else
- {
- StopMoving();
- }
- }
+void Unit::SendMoveRoot(bool apply)
+{
+ const Player* client = GetClientControlling();
- if (m_movedByPlayer)
+ // Apply flags in-place when unit currently is not controlled by a player
+ if (!client)
+ {
+ if (apply)
{
- WorldPacket data(SMSG_FORCE_MOVE_ROOT, GetPackGUID().size() + 4);
- data << GetPackGUID();
- data << m_rootTimes;
- m_movedByPlayer->ToPlayer()->SendDirectMessage(&data);
+ m_movementInfo.RemoveMovementFlag(MOVEMENTFLAG_MASK_MOVING_FLY);
+ m_movementInfo.AddMovementFlag(MOVEMENTFLAG_ROOT);
+ if (!client)
+ StopMoving();
}
else
- {
- WorldPacket data(SMSG_SPLINE_MOVE_ROOT, GetPackGUID().size());
- data << GetPackGUID();
- SendMessageToSet(&data, true);
- }
+ m_movementInfo.RemoveMovementFlag(MOVEMENTFLAG_ROOT);
+ }
+
+ if (!IsInWorld())
+ return;
+
+ const PackedGuid& guid = GetPackGUID();
+ // Wrath+ spline root: when unit is currently not controlled by a player
+ if (!client)
+ {
+ WorldPacket data(apply ? SMSG_SPLINE_MOVE_ROOT : SMSG_SPLINE_MOVE_UNROOT, guid.size());
+ data << guid;
+ SendMessageToSet(&data, true);
}
+ // Wrath+ force root: when unit is controlled by a player
else
{
- RemoveUnitMovementFlag(MOVEMENTFLAG_ROOT | MOVEMENTFLAG_PENDING_ROOT);
+ uint32 const counter = client->GetSession()->GetOrderCounter();
- if (!HasUnitState(UNIT_STATE_STUNNED)) // prevent moving if it also has stun effect
- {
- if (m_movedByPlayer)
- {
- WorldPacket data(SMSG_FORCE_MOVE_UNROOT, GetPackGUID().size() + 4);
- data << GetPackGUID();
- data << m_rootTimes;
- m_movedByPlayer->ToPlayer()->SendDirectMessage(&data);
- }
- else
- {
- WorldPacket data(SMSG_SPLINE_MOVE_UNROOT, GetPackGUID().size());
- data << GetPackGUID();
- SendMessageToSet(&data, true);
- }
- }
+ WorldPacket data(apply ? SMSG_FORCE_MOVE_ROOT : SMSG_FORCE_MOVE_UNROOT, guid.size() + 4);
+ data << guid;
+ data << counter;
+ client->GetSession()->SendPacket(&data);
+ client->GetSession()->IncrementOrderCounter();
}
}
@@ -18455,7 +18605,7 @@ bool Unit::SetCharmedBy(Unit* charmer, CharmType type, AuraApplication const* au
}
// dismount players when charmed
- if (IsPlayer())
+ if (IsPlayer() && type != CHARM_TYPE_POSSESS)
RemoveAurasByType(SPELL_AURA_MOUNTED);
if (charmer->IsPlayer())
@@ -19261,16 +19411,14 @@ void Unit::KnockbackFrom(float x, float y, float speedXY, float speedZ)
WorldPacket data(SMSG_MOVE_KNOCK_BACK, (8 + 4 + 4 + 4 + 4 + 4));
data << GetPackGUID();
- data << uint32(0); // counter
+ data << player->GetSession()->GetOrderCounter(); // movement counter
data << float(vcos); // x direction
data << float(vsin); // y direction
data << float(speedXY); // Horizontal speed
data << float(-speedZ); // Z Movement speed (vertical)
- player->GetSession()->SendPacket(&data);
-
- if (player->HasIncreaseMountedFlightSpeedAura() || player->HasFlyAura())
- player->SetCanFly(true, true);
+ player->SendDirectMessage(&data);
+ player->GetSession()->IncrementOrderCounter();
player->SetCanKnockback(true);
}
@@ -19369,7 +19517,7 @@ void Unit::JumpTo(float speedXY, float speedZ, bool forward)
data << float(speedXY); // Horizontal speed
data << float(-speedZ); // Z Movement speed (vertical)
- ToPlayer()->GetSession()->SendPacket(&data);
+ ToPlayer()->SendDirectMessage(&data);
}
}
@@ -19527,7 +19675,7 @@ void Unit::_EnterVehicle(Vehicle* vehicle, int8 seatId, AuraApplication const* a
bg->EventPlayerDroppedFlag(player);
WorldPacket data(SMSG_ON_CANCEL_EXPECTED_RIDE_VEHICLE_AURA, 0);
- player->GetSession()->SendPacket(&data);
+ player->SendDirectMessage(&data);
}
ASSERT(!m_vehicle);
@@ -19590,7 +19738,7 @@ void Unit::ExitVehicle(Position const* /*exitPosition*/)
}
}
-bool VehicleDespawnEvent::Execute(uint64 /*e_time*/, uint32 /*p_time*/)
+bool VehicleDespawnEvent::Execute(uint64 /*e_time*/, uint32 /*p_time*/)
{
Position pos = _self;
_self.MovePositionToFirstCollision(pos, 20.0f, M_PI);
@@ -19621,6 +19769,9 @@ void Unit::_ExitVehicle(Position const* exitPosition)
if (!vehicleBase)
return;
+ if (IsPlayer())
+ ToPlayer()->SetExpectingChangeTransport(true);
+
SetControlled(false, UNIT_STATE_ROOT); // SMSG_MOVE_FORCE_UNROOT, ~MOVEMENTFLAG_ROOT
Position pos;
@@ -19651,12 +19802,6 @@ void Unit::_ExitVehicle(Position const* exitPosition)
sScriptMgr->AnticheatSetUnderACKmount(player);
}
- else if (HasUnitMovementFlag(MOVEMENTFLAG_ROOT))
- {
- WorldPacket data(SMSG_SPLINE_MOVE_UNROOT, 8);
- data << GetPackGUID();
- SendMessageToSet(&data, false);
- }
// xinef: hack for flameleviathan seat vehicle
VehicleEntry const* vehicleInfo = vehicle->GetVehicleInfo();
@@ -19697,7 +19842,7 @@ void Unit::_ExitVehicle(Position const* exitPosition)
else if (vehicleBase->IsCreature())
{
vehicle->Uninstall();
- vehicleBase->m_Events.AddEvent(new VehicleDespawnEvent(*vehicleBase, 2000), vehicleBase->m_Events.CalculateTime(2000));
+ vehicleBase->m_Events.AddEventAtOffset(new VehicleDespawnEvent(*vehicleBase, 2s), 2s);
}
// xinef: ugly hack, no appripriate hook later to cast spell
@@ -19717,7 +19862,7 @@ void Unit::_ExitVehicle(Position const* exitPosition)
setDeathState(DeathState::JustDied);
// If for other reason we as minion are exiting the vehicle (ejected, master dismounted) - unsummon
else
- ToTempSummon()->UnSummon(2000); // Approximation
+ ToTempSummon()->UnSummon(2s); // Approximation
}
if (player)
@@ -20104,7 +20249,7 @@ class AuraMunchingQueue : public BasicEvent
public:
AuraMunchingQueue(Unit& owner, ObjectGuid targetGUID, int32 basePoints, uint32 spellId, AuraEffect* aurEff, AuraType auraType) : _owner(owner), _targetGUID(targetGUID), _basePoints(basePoints), _spellId(spellId), _aurEff(aurEff), _auraType(auraType) { }
- bool Execute(uint64 /*eventTime*/, uint32 /*updateTime*/) override
+ bool Execute(uint64 /*e_time*/, uint32 /*p_time*/) override
{
if (_owner.IsInWorld() && _owner.FindMap())
if (Unit* target = ObjectAccessor::GetUnit(_owner, _targetGUID))
@@ -20133,24 +20278,6 @@ private:
AuraType _auraType;
};
-class ResetToHomeOrientation : public BasicEvent
-{
-public:
- ResetToHomeOrientation(Creature& self) : _self(self) { }
-
- bool Execute(uint64 /*eventTime*/, uint32 /*updateTime*/) override
- {
- if (_self.IsInWorld() && _self.FindMap() && _self.IsAlive() && !_self.IsInCombat())
- {
- _self.SetFacingTo(_self.GetHomePosition().GetOrientation());
- }
-
- return true;
- }
-private:
- Creature& _self;
-};
-
void Unit::CastDelayedSpellWithPeriodicAmount(Unit* caster, uint32 spellId, AuraType auraType, int32 addAmount, uint8 effectIndex)
{
AuraEffect* aurEff = nullptr;
@@ -20376,7 +20503,7 @@ void Unit::SetFacingTo(float ori)
init.Launch();
}
-void Unit::SetFacingToObject(WorldObject* object)
+void Unit::SetFacingToObject(WorldObject* object, Milliseconds timed /*= 0ms*/)
{
// never face when already moving
if (!IsStopped())
@@ -20387,24 +20514,20 @@ void Unit::SetFacingToObject(WorldObject* object)
init.MoveTo(GetPositionX(), GetPositionY(), GetPositionZ());
init.SetFacing(GetAngle(object)); // when on transport, GetAngle will still return global coordinates (and angle) that needs transforming
init.Launch();
-}
-
-void Unit::SetTimedFacingToObject(WorldObject* object, uint32 time)
-{
- // never face when already moving
- if (!IsStopped() || !time)
- return;
-
- /// @todo figure out under what conditions creature will move towards object instead of facing it where it currently is.
- Movement::MoveSplineInit init(this);
- init.MoveTo(GetPositionX(), GetPositionY(), GetPositionZ());
- init.SetFacing(GetAngle(object)); // when on transport, GetAngle will still return global coordinates (and angle) that needs transforming
- init.Launch();
- if (Creature* c = ToCreature())
- c->m_Events.AddEvent(new ResetToHomeOrientation(*c), c->m_Events.CalculateTime(time));
- else
- LOG_ERROR("entities.unit", "Unit::SetTimedFacingToObject called on non-creature unit {}. This should never happen.", GetEntry());
+ if (timed > 0ms)
+ {
+ if (Creature* c = ToCreature())
+ {
+ c->m_Events.AddEventAtOffset([c]()
+ {
+ if (c->IsInWorld() && c->FindMap() && c->IsAlive() && !c->IsInCombat())
+ c->SetFacingTo(c->GetHomePosition().GetOrientation());
+ }, timed);
+ }
+ else
+ LOG_ERROR("entities.unit", "Unit::SetFacingToObject called on non-creature unit {}. This should never happen.", GetEntry());
+ }
}
bool Unit::SetWalk(bool enable)
@@ -20421,22 +20544,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);
+ if (enable)
+ m_movementInfo.AddMovementFlag(MOVEMENTFLAG_DISABLE_GRAVITY);
+ else
+ m_movementInfo.RemoveMovementFlag(MOVEMENTFLAG_DISABLE_GRAVITY);
}
- else
+
+ if (!IsInWorld()) // is sent on add to map
+ return;
+
+ if (isClientControlled)
{
- RemoveUnitMovementFlag(MOVEMENTFLAG_DISABLE_GRAVITY);
+ 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;
+ }
}
- return true;
+ WorldPacket data(enable ? SMSG_SPLINE_MOVE_GRAVITY_DISABLE : SMSG_SPLINE_MOVE_GRAVITY_ENABLE, 9);
+ data << GetPackGUID();
+ SendMessageToSet(&data, true);
}
bool Unit::SetSwim(bool enable)
@@ -20464,98 +20604,187 @@ bool Unit::SetSwim(bool enable)
*
* Doesn't inform the client.
*/
-bool Unit::SetCanFly(bool enable, bool /*packetOnly = false */)
+void Unit::SetCanFly(bool enable)
{
- if (enable == HasUnitMovementFlag(MOVEMENTFLAG_CAN_FLY))
- return false;
+ bool isClientControlled = IsClientControlled();
- if (enable)
+ if (!isClientControlled)
{
- AddUnitMovementFlag(MOVEMENTFLAG_CAN_FLY);
- RemoveUnitMovementFlag(MOVEMENTFLAG_FALLING);
+ if (enable)
+ m_movementInfo.AddMovementFlag(MOVEMENTFLAG_CAN_FLY);
+ else
+ m_movementInfo.RemoveMovementFlag(MOVEMENTFLAG_CAN_FLY);
}
- else
+
+ if (!IsInWorld()) // is sent on add to map
+ return;
+
+ if (isClientControlled)
{
- RemoveUnitMovementFlag(MOVEMENTFLAG_CAN_FLY | MOVEMENTFLAG_MASK_MOVING_FLY);
+ if (Player const* player = GetClientControlling())
+ {
+ uint32 const counter = player->GetSession()->GetOrderCounter();
+ const_cast<Player*>(player)->SetPendingFlightChange(counter);
+
+ WorldPacket data(enable ? SMSG_MOVE_SET_CAN_FLY : SMSG_MOVE_UNSET_CAN_FLY, GetPackGUID().size() + 4);
+ data << GetPackGUID();
+ data << counter;
+ player->SendDirectMessage(&data);
+ player->GetSession()->IncrementOrderCounter();
+ return;
+ }
}
- return true;
+ WorldPacket data(enable ? SMSG_SPLINE_MOVE_SET_FLYING : SMSG_SPLINE_MOVE_UNSET_FLYING, 9);
+ data << GetPackGUID();
+ SendMessageToSet(&data, true);
}
-/**
- * @brief Allow to walk on water. Doesn't inform the client.
- * Need to use SendMovementWaterWalking() if it's for players.
- */
-bool Unit::SetWaterWalking(bool enable, bool /*packetOnly = false*/)
+void Unit::SetFeatherFall(bool enable)
{
- if (enable == HasUnitMovementFlag(MOVEMENTFLAG_WATERWALKING))
- return false;
+ bool isClientControlled = IsClientControlled();
- if (enable)
- AddUnitMovementFlag(MOVEMENTFLAG_WATERWALKING);
- else
- RemoveUnitMovementFlag(MOVEMENTFLAG_WATERWALKING);
-
- return true;
-}
+ if (!isClientControlled)
+ {
+ if (enable)
+ m_movementInfo.AddMovementFlag(MOVEMENTFLAG_FALLING_SLOW);
+ else
+ m_movementInfo.RemoveMovementFlag(MOVEMENTFLAG_FALLING_SLOW);
+ }
-void Unit::SendMovementWaterWalking(Player* sendTo)
-{
- if (!movespline->Initialized())
+ if (!IsInWorld()) // is sent on add to map
return;
- WorldPacket data(SMSG_SPLINE_MOVE_WATER_WALK, 9);
+
+ if (isClientControlled)
+ {
+ if (Player const* player = GetClientControlling())
+ {
+ uint32 const counter = player->GetSession()->GetOrderCounter();
+
+ WorldPacket data(enable ? SMSG_MOVE_FEATHER_FALL : SMSG_MOVE_NORMAL_FALL, GetPackGUID().size() + 4);
+
+ data << GetPackGUID();
+ data << counter;
+ player->SendDirectMessage(&data);
+ player->GetSession()->IncrementOrderCounter();
+
+ // start fall from current height
+ if (!enable)
+ const_cast<Player*>(player)->SetFallInformation(0, GetPositionZ());
+
+ return;
+ }
+ }
+
+ WorldPacket data(enable ? SMSG_SPLINE_MOVE_FEATHER_FALL : SMSG_SPLINE_MOVE_NORMAL_FALL);
data << GetPackGUID();
- sendTo->SendDirectMessage(&data);
+ SendMessageToSet(&data, true);
}
-bool Unit::SetFeatherFall(bool enable, bool /*packetOnly = false*/)
+void Unit::SetHover(bool enable)
{
- if (enable == HasUnitMovementFlag(MOVEMENTFLAG_FALLING_SLOW))
- return false;
+ bool isClientControlled = IsClientControlled();
+
+ if (!isClientControlled)
+ {
+ if (enable)
+ m_movementInfo.AddMovementFlag(MOVEMENTFLAG_HOVER);
+ else
+ m_movementInfo.RemoveMovementFlag(MOVEMENTFLAG_HOVER);
+ }
+
+ float hoverHeight = GetHoverHeight();
if (enable)
- AddUnitMovementFlag(MOVEMENTFLAG_FALLING_SLOW);
+ {
+ if (hoverHeight && GetPositionZ() - GetMap()->GetHeight(GetPhaseMask(), GetPositionX(), GetPositionY(), GetPositionZ()) < hoverHeight)
+ Relocate(GetPositionX(), GetPositionY(), GetPositionZ() + hoverHeight);
+ }
else
- RemoveUnitMovementFlag(MOVEMENTFLAG_FALLING_SLOW);
-
- return true;
-}
+ {
+ if (IsAlive() || !IsUnit())
+ {
+ float newZ = std::max<float>(GetMap()->GetHeight(GetPhaseMask(), GetPositionX(), GetPositionY(), GetPositionZ()), GetPositionZ() - hoverHeight);
+ UpdateAllowedPositionZ(GetPositionX(), GetPositionY(), newZ);
+ Relocate(GetPositionX(), GetPositionY(), newZ);
+ }
+ }
-void Unit::SendMovementFeatherFall(Player* sendTo)
-{
- if (!movespline->Initialized())
+ if (!IsInWorld()) // is sent on add to map
return;
- WorldPacket data(SMSG_SPLINE_MOVE_FEATHER_FALL, 9);
+
+ if (isClientControlled)
+ {
+ if (Player const* player = GetClientControlling())
+ {
+ WorldPacket data(enable ? SMSG_MOVE_SET_HOVER : SMSG_MOVE_UNSET_HOVER, GetPackGUID().size() + 4);
+
+ uint32 const counter = player->GetSession()->GetOrderCounter();
+
+ data << GetPackGUID();
+ data << counter;
+ player->SendDirectMessage(&data);
+ player->GetSession()->IncrementOrderCounter();
+ return;
+ }
+ }
+
+ WorldPacket data(enable ? SMSG_SPLINE_MOVE_SET_HOVER : SMSG_SPLINE_MOVE_UNSET_HOVER, 9);
data << GetPackGUID();
- sendTo->SendDirectMessage(&data);
+ SendMessageToSet(&data, true);
}
-bool Unit::SetHover(bool enable, bool /*packetOnly = false*/, bool /*updateAnimationTier = true*/)
+void Unit::SetWaterWalking(bool enable)
{
- if (enable == HasUnitMovementFlag(MOVEMENTFLAG_HOVER))
- return false;
-
- float hoverHeight = GetFloatValue(UNIT_FIELD_HOVERHEIGHT);
+ bool isClientControlled = IsClientControlled();
- if (enable)
+ if (!isClientControlled)
{
- AddUnitMovementFlag(MOVEMENTFLAG_HOVER);
- if (hoverHeight && GetPositionZ() - GetFloorZ() < hoverHeight)
- UpdateHeight(GetPositionZ() + hoverHeight);
+ if (enable)
+ m_movementInfo.AddMovementFlag(MOVEMENTFLAG_WATERWALKING);
+ else
+ m_movementInfo.RemoveMovementFlag(MOVEMENTFLAG_WATERWALKING);
}
- else
+
+ if (!IsInWorld()) // is sent on add to map
+ return;
+
+ if (isClientControlled)
{
- RemoveUnitMovementFlag(MOVEMENTFLAG_HOVER);
- if (hoverHeight && (!isDying() || !IsCreature()))
+ if (Player const* player = GetClientControlling())
{
- float newZ = std::max<float>(GetFloorZ(), GetPositionZ() - hoverHeight);
- UpdateAllowedPositionZ(GetPositionX(), GetPositionY(), newZ);
- UpdateHeight(newZ);
+ uint32 const counter = player->GetSession()->GetOrderCounter();
+
+ WorldPacket data(enable ? SMSG_MOVE_WATER_WALK : SMSG_MOVE_LAND_WALK, GetPackGUID().size() + 4);
+ data << GetPackGUID();
+ data << counter;
+ player->SendDirectMessage(&data);
+ player->GetSession()->IncrementOrderCounter();
+ return;
}
- SendMovementFlagUpdate(); // pussywizard: needed for falling after death (instead of falling onto air at hover height)
}
- return true;
+ WorldPacket data(enable ? SMSG_SPLINE_MOVE_WATER_WALK : SMSG_SPLINE_MOVE_LAND_WALK, 9);
+ data << GetPackGUID();
+ SendMessageToSet(&data, true);
+}
+
+void Unit::SendMovementWaterWalking(Player* sendTo)
+{
+ if (!movespline->Initialized())
+ return;
+ WorldPacket data(SMSG_SPLINE_MOVE_WATER_WALK, 9);
+ data << GetPackGUID();
+ sendTo->SendDirectMessage(&data);
+}
+
+void Unit::SendMovementFeatherFall(Player* sendTo)
+{
+ if (!movespline->Initialized())
+ return;
+ WorldPacket data(SMSG_SPLINE_MOVE_FEATHER_FALL, 9);
+ data << GetPackGUID();
+ sendTo->SendDirectMessage(&data);
}
void Unit::SendMovementHover(Player* sendTo)
@@ -20719,7 +20948,10 @@ void Unit::PatchValuesUpdate(ByteBuffer& valuesUpdateBuf, BuildValuesCachePosPoi
appendValue &= ~UNIT_NPC_FLAG_SPELLCLICK;
if (!target->CanSeeVendor(creature))
+ {
+ appendValue &= ~UNIT_NPC_FLAG_REPAIR;
appendValue &= ~UNIT_NPC_FLAG_VENDOR_MASK;
+ }
if (!creature->IsValidTrainerForPlayer(target, &appendValue))
appendValue &= ~UNIT_NPC_FLAG_TRAINER;
@@ -21203,3 +21435,58 @@ std::string Unit::GetDebugInfo() const
<< " Class: " << std::to_string(getClass());
return sstr.str();
}
+
+bool Unit::IsClientControlled(Player const* exactClient /*= nullptr*/) const
+{
+ // Severvide method to check if unit is client controlled (optionally check for specific client in control)
+
+ // Applies only to player controlled units
+ if (!HasFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_PLAYER_CONTROLLED))
+ return false;
+
+ // These flags are meant to be used when server controls this unit, client control is taken away
+ if (HasFlag(UNIT_FIELD_FLAGS, (UNIT_FLAG_DISABLE_MOVE | UNIT_FLAG_CONFUSED | UNIT_FLAG_FLEEING)))
+ return false;
+
+ // If unit is possessed, it has lost original control...
+ if (ObjectGuid const& guid = GetCharmerGUID())
+ {
+ // ... but if it is a possessing charm, then we have to check if some other player controls it
+ if (HasFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_POSSESSED) && guid.IsPlayer())
+ return (exactClient ? (exactClient->GetGUID() == guid) : true);
+ return false;
+ }
+
+ // By default: players have client control over themselves
+ if (IsPlayer())
+ return (exactClient ? (exactClient == this) : true);
+ return false;
+}
+
+Player const* Unit::GetClientControlling() const
+{
+ // Serverside reverse "mover" deduction logic at controlled unit
+
+ // Applies only to player controlled units
+ if (HasFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_PLAYER_CONTROLLED))
+ {
+ // Charm always removes control from original client...
+ if (GetCharmerGUID())
+ {
+ // ... but if it is a possessing charm, some other client may have control
+ if (HasFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_POSSESSED))
+ {
+ Unit const* charmer = GetCharmer();
+ if (charmer && charmer->IsPlayer())
+ return static_cast<Player const*>(charmer);
+ }
+ }
+ else if (IsPlayer())
+ {
+ // Check if anything prevents original client from controlling
+ if (IsClientControlled(static_cast<Player const*>(this)))
+ return static_cast<Player const*>(this);
+ }
+ }
+ return nullptr;
+}
diff --git a/src/server/game/Entities/Unit/Unit.h b/src/server/game/Entities/Unit/Unit.h
index 2fcccdb905..1590c2721f 100644
--- a/src/server/game/Entities/Unit/Unit.h
+++ b/src/server/game/Entities/Unit/Unit.h
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
@@ -26,6 +26,7 @@
#include "ItemTemplate.h"
#include "MotionMaster.h"
#include "Object.h"
+#include "PetDefines.h"
#include "SharedDefines.h"
#include "SpellAuraDefines.h"
#include "SpellDefines.h"
@@ -122,13 +123,18 @@ enum HitInfo
HITINFO_FAKE_DAMAGE = 0x01000000 // enables damage animation even if no damage done, set only if no damage
};
-enum UnitModifierType
+enum UnitModifierFlatType
{
BASE_VALUE = 0,
- BASE_PCT = 1,
- TOTAL_VALUE = 2,
- TOTAL_PCT = 3,
- MODIFIER_TYPE_END = 4
+ TOTAL_VALUE = 1,
+ MODIFIER_TYPE_FLAT_END = 3
+};
+
+enum UnitModifierPctType
+{
+ BASE_PCT = 0,
+ TOTAL_PCT = 1,
+ MODIFIER_TYPE_PCT_END = 2
};
enum WeaponDamageRange
@@ -213,7 +219,7 @@ enum WeaponAttackType : uint8
MAX_ATTACK
};
-enum CombatRating
+enum CombatRating : uint8
{
CR_WEAPON_SKILL = 0,
CR_DEFENSE_SKILL = 1,
@@ -567,6 +573,13 @@ enum class SearchMethod
typedef std::list<Player*> SharedVisionList;
+enum class DualWieldMode : uint8
+{
+ AUTO = 0, // non-player units must have a valid offhand weapon to enable dual wield
+ DISABLED = 1,
+ ENABLED = 2,
+};
+
struct AttackPosition {
AttackPosition(Position pos) : _pos(std::move(pos)), _taken(false) {}
bool operator==(const int val)
@@ -616,6 +629,28 @@ typedef std::unordered_map<uint32, uint32> PacketCooldowns;
struct SpellProcEventEntry; // used only privately
+enum class SpeedOpcodeIndex : uint32
+{
+ PC,
+ NPC,
+ ACK_RESPONSE,
+ MAX
+};
+
+typedef const Opcodes SpeedOpcodePair[static_cast<size_t>(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:
@@ -737,6 +772,9 @@ public:
void SetExtraUnitMovementFlags(uint16 f) { m_movementInfo.flags2 = f; }
inline bool IsCrowdControlled() const { return HasFlag(UNIT_FIELD_FLAGS, (UNIT_FLAG_CONFUSED | UNIT_FLAG_FLEEING | UNIT_FLAG_STUNNED)); }
+ inline bool IsImmobilizedState() const { return HasUnitState(UNIT_STATE_ROOT | UNIT_STATE_STUNNED); }
+
+ void SetAnimTier(AnimTier animTier);
/*********************************************************/
/*** UNIT TYPES, CLASSES, RACES... ***/
@@ -819,6 +857,11 @@ public:
bool IsValidAssistTarget(Unit const* target) const;
bool _IsValidAssistTarget(Unit const* target, SpellInfo const* bySpell) const;
+ // Client controlled: check if unit currently is under client control (has active "mover"), optionally check for specific client (server-side)
+ bool IsClientControlled(Player const* exactClient = nullptr) const;
+ // Controlling client: server PoV on which client (player) controls movement of the unit at the moment, obtain "mover" (server-side)
+ Player const* GetClientControlling() const;
+
// Combat range
[[nodiscard]] float GetBoundaryRadius() const { return m_floatValues[UNIT_FIELD_BOUNDINGRADIUS]; }
[[nodiscard]] float GetCombatReach() const override { return m_floatValues[UNIT_FIELD_COMBATREACH]; }
@@ -917,8 +960,9 @@ public:
// Weapons systems
[[nodiscard]] bool haveOffhandWeapon() const;
- [[nodiscard]] bool CanDualWield() const { return m_canDualWield; }
- virtual void SetCanDualWield(bool value) { m_canDualWield = value; }
+ [[nodiscard]] bool CanDualWield() const { return _dualWieldMode == DualWieldMode::ENABLED; }
+ virtual void SetCanDualWield(bool value) { _dualWieldMode = value ? DualWieldMode::ENABLED : DualWieldMode::DISABLED; }
+ virtual void SetDualWieldMode(DualWieldMode mode) { _dualWieldMode = mode; }
virtual bool HasWeapon(WeaponAttackType type) const = 0;
inline bool HasMainhandWeapon() const { return HasWeapon(BASE_ATTACK); }
@@ -930,7 +974,7 @@ public:
inline bool HasMainhandWeaponForAttack() const { return HasWeaponForAttack(BASE_ATTACK); }
inline bool HasOffhandWeaponForAttack() const { return HasWeaponForAttack(OFF_ATTACK); }
inline bool HasRangedWeaponForAttack() const { return HasWeaponForAttack(RANGED_ATTACK); }
- [[nodiscard]] bool CanUseAttackType(uint8 attacktype) const
+ [[nodiscard]] bool CanUseAttackType(WeaponAttackType attacktype) const
{
switch (attacktype)
{
@@ -1013,16 +1057,32 @@ public:
for (uint8 i = STAT_STRENGTH; i < MAX_STATS; ++i) SetFloatValue(static_cast<uint16>(UNIT_FIELD_NEGSTAT0) + i, 0);
}
- bool HandleStatModifier(UnitMods unitMod, UnitModifierType modifierType, float amount, bool apply);
- void SetModifierValue(UnitMods unitMod, UnitModifierType modifierType, float value) { m_auraModifiersGroup[unitMod][modifierType] = value; }
- [[nodiscard]] float GetModifierValue(UnitMods unitMod, UnitModifierType modifierType) const;
+ bool HandleStatFlatModifier(UnitMods unitMod, UnitModifierFlatType modifierType, float amount, bool apply);
+ void ApplyStatPctModifier(UnitMods unitMod, UnitModifierPctType modifierType, float amount);
+
+ void SetStatFlatModifier(UnitMods unitMod, UnitModifierFlatType modifierType, float val);
+ void SetStatPctModifier(UnitMods unitMod, UnitModifierPctType modifierType, float val);
+
+ [[nodiscard]] float GetFlatModifierValue(UnitMods unitMod, UnitModifierFlatType modifierType) const;
+ [[nodiscard]] float GetPctModifierValue(UnitMods unitMod, UnitModifierPctType modifierType) const;
+
+ void UpdateUnitMod(UnitMods unitMod);
+
+ // only players have item requirements
+ [[nodiscard]] virtual bool CheckAttackFitToAuraRequirement(WeaponAttackType /*attackType*/, AuraEffect const* /*aurEff*/) const { return true; }
+
+ virtual void UpdateDamageDoneMods(WeaponAttackType attackType, int32 skipEnchantSlot = -1);
+ void UpdateAllDamageDoneMods();
+
+ void UpdateDamagePctDoneMods(WeaponAttackType attackType);
+ void UpdateAllDamagePctDoneMods();
+
[[nodiscard]] float GetTotalStatValue(Stats stat, float additionalValue = 0.0f) const;
void SetCanModifyStats(bool modifyStats) { m_canModifyStats = modifyStats; }
[[nodiscard]] bool CanModifyStats() const { return m_canModifyStats; }
- void ApplyStatBuffMod(Stats stat, float val, bool apply) { ApplyModSignedFloatValue((val > 0 ? static_cast<uint16>(UNIT_FIELD_POSSTAT0) + stat : static_cast<uint16>(UNIT_FIELD_NEGSTAT0) + stat), val, apply); }
- void ApplyStatPercentBuffMod(Stats stat, float val, bool apply);
+ void UpdateStatBuffMod(Stats stat);
// Unit level methods
[[nodiscard]] uint8 GetLevel() const { return uint8(GetUInt32Value(UNIT_FIELD_LEVEL)); }
@@ -1067,7 +1127,6 @@ public:
void SetMaxPower(Powers power, uint32 val);
int32 ModifyPower(Powers power, int32 val, bool withPowerUpdate = true);
- int32 ModifyPowerPct(Powers power, float pct, bool apply = true);
void RewardRage(uint32 damage, uint32 weaponSpeedHitFactor, bool attacker);
@@ -1122,13 +1181,9 @@ public:
[[nodiscard]] uint32 GetResistance(SpellSchoolMask mask) const;
[[nodiscard]] uint32 GetResistance(SpellSchools school) const { return GetUInt32Value(static_cast<uint16>(UNIT_FIELD_RESISTANCES) + school); }
static float GetEffectiveResistChance(Unit const* owner, SpellSchoolMask schoolMask, Unit const* victim);
- [[nodiscard]] float GetResistanceBuffMods(SpellSchools school, bool positive) const { return GetFloatValue(positive ? static_cast<uint16>(UNIT_FIELD_RESISTANCEBUFFMODSPOSITIVE) + school : static_cast<uint16>(UNIT_FIELD_RESISTANCEBUFFMODSNEGATIVE) + + school); }
void SetResistance(SpellSchools school, int32 val) { SetStatInt32Value(static_cast<uint16>(UNIT_FIELD_RESISTANCES) + school, val); }
- void SetResistanceBuffMods(SpellSchools school, bool positive, float val) { SetFloatValue(positive ? static_cast<uint16>(UNIT_FIELD_RESISTANCEBUFFMODSPOSITIVE) + school : static_cast<uint16>(UNIT_FIELD_RESISTANCEBUFFMODSNEGATIVE) + + school, val); }
-
- void ApplyResistanceBuffModsMod(SpellSchools school, bool positive, float val, bool apply) { ApplyModSignedFloatValue(positive ? static_cast<uint16>(UNIT_FIELD_RESISTANCEBUFFMODSPOSITIVE) + school : static_cast<uint16>(UNIT_FIELD_RESISTANCEBUFFMODSNEGATIVE) + + school, val, apply); }
- void ApplyResistanceBuffModsPercentMod(SpellSchools school, bool positive, float val, bool apply) { ApplyPercentModFloatValue(positive ? static_cast<uint16>(UNIT_FIELD_RESISTANCEBUFFMODSPOSITIVE) + school : static_cast<uint16>(UNIT_FIELD_RESISTANCEBUFFMODSNEGATIVE) + + school, val, apply); }
+ void UpdateResistanceBuffModsMod(SpellSchools school);
//////////// Need triage ////////////////
uint16 GetMaxSkillValueForLevel(Unit const* target = nullptr) const { return (target ? getLevelForTarget(target) : GetLevel()) * 5; }
@@ -1157,6 +1212,7 @@ public:
static uint32 DealDamage(Unit* attacker, Unit* victim, uint32 damage, CleanDamage const* cleanDamage = nullptr, DamageEffectType damagetype = DIRECT_DAMAGE, SpellSchoolMask damageSchoolMask = SPELL_SCHOOL_MASK_NORMAL, SpellInfo const* spellProto = nullptr, bool durabilityLoss = true, bool allowGM = false, Spell const* spell = nullptr);
void DealMeleeDamage(CalcDamageInfo* damageInfo, bool durabilityLoss);
void DealSpellDamage(SpellNonMeleeDamage* damageInfo, bool durabilityLoss, Spell const* spell = nullptr);
+ void DealDamageShieldDamage(Unit* victim);
static void DealDamageMods(Unit const* victim, uint32& damage, uint32* absorb);
static void Kill(Unit* killer, Unit* victim, bool durabilityLoss = true, WeaponAttackType attackType = BASE_ATTACK, SpellInfo const* spellProto = nullptr, Spell const* spell = nullptr);
@@ -1281,6 +1337,10 @@ public:
void SetAuraStack(uint32 spellId, Unit* target, uint32 stack);
+ int32 GetHighestExclusiveSameEffectSpellGroupValue(AuraEffect const* aurEff, AuraType auraType, bool checkMiscValue = false, int32 miscValue = 0) const;
+ bool IsHighestExclusiveAura(Aura const* aura, bool removeOtherAuraApplications = false);
+ bool IsHighestExclusiveAuraEffect(SpellInfo const* spellInfo, AuraType auraType, int32 effectAmount, uint8 auraEffectMask, bool removeOtherAuraApplications = false);
+
// aura apply/remove helpers - you should better not use these
Aura* _TryStackingOrRefreshingExistingAura(SpellInfo const* newAura, uint8 effMask, Unit* caster, int32* baseAmount = nullptr, Item* castItem = nullptr, ObjectGuid casterGUID = ObjectGuid::Empty, bool periodicReset = false);
void _AddAura(UnitAura* aura, Unit* caster);
@@ -1290,7 +1350,7 @@ public:
void _UnapplyAura(AuraApplicationMap::iterator& i, AuraRemoveMode removeMode);
void _UnapplyAura(AuraApplication* aurApp, AuraRemoveMode removeMode);
void _RemoveNoStackAuraApplicationsDueToAura(Aura* aura);
- void _RemoveNoStackAurasDueToAura(Aura* aura);
+ void _RemoveNoStackAurasDueToAura(Aura* aura, bool owned);
bool _IsNoStackAuraDueToAura(Aura* appliedAura, Aura* existingAura) const;
void _RegisterAuraEffect(AuraEffect* aurEff, bool apply);
@@ -1436,15 +1496,19 @@ public:
uint32 GetDiseasesByCaster(ObjectGuid casterGUID, uint8 mode = 0);
[[nodiscard]] uint32 GetDoTsByCaster(ObjectGuid casterGUID) const;
- [[nodiscard]] int32 GetTotalAuraModifierAreaExclusive(AuraType auratype) const;
[[nodiscard]] int32 GetTotalAuraModifier(AuraType auratype) const;
[[nodiscard]] float GetTotalAuraMultiplier(AuraType auratype) const;
- int32 GetMaxPositiveAuraModifier(AuraType auratype);
+ [[nodiscard]] int32 GetMaxPositiveAuraModifier(AuraType auratype) const;
[[nodiscard]] int32 GetMaxNegativeAuraModifier(AuraType auratype) const;
+ [[nodiscard]] int32 GetTotalAuraModifier(AuraType auratype, std::function<bool(AuraEffect const*)> const& predicate) const;
+ [[nodiscard]] float GetTotalAuraMultiplier(AuraType auraType, std::function<bool(AuraEffect const*)> const& predicate) const;
+ [[nodiscard]] int32 GetMaxPositiveAuraModifier(AuraType auraType, std::function<bool(AuraEffect const*)> const& predicate) const;
+ [[nodiscard]] int32 GetMaxNegativeAuraModifier(AuraType auraType, std::function<bool(AuraEffect const*)> const& predicate) const;
+
[[nodiscard]] int32 GetTotalAuraModifierByMiscMask(AuraType auratype, uint32 misc_mask) const;
[[nodiscard]] float GetTotalAuraMultiplierByMiscMask(AuraType auratype, uint32 misc_mask) const;
- int32 GetMaxPositiveAuraModifierByMiscMask(AuraType auratype, uint32 misc_mask, const AuraEffect* except = nullptr) const;
+ [[nodiscard]] int32 GetMaxPositiveAuraModifierByMiscMask(AuraType auratype, uint32 misc_mask, const AuraEffect* except = nullptr) const;
[[nodiscard]] int32 GetMaxNegativeAuraModifierByMiscMask(AuraType auratype, uint32 misc_mask) const;
[[nodiscard]] int32 GetTotalAuraModifierByMiscValue(AuraType auratype, int32 misc_value) const;
@@ -1543,7 +1607,6 @@ public:
int32 HealBySpell(HealInfo& healInfo, bool critical = false);
int32 SpellBaseHealingBonusDone(SpellSchoolMask schoolMask);
- int32 SpellBaseHealingBonusTaken(SpellSchoolMask schoolMask);
float SpellPctHealingModsDone(Unit* victim, SpellInfo const* spellProto, DamageEffectType damagetype);
uint32 SpellHealingBonusDone(Unit* victim, SpellInfo const* spellProto, uint32 healamount, DamageEffectType damagetype, uint8 effIndex, float TotalMod = 0.0f, uint32 stack = 1);
uint32 SpellHealingBonusTaken(Unit* caster, SpellInfo const* spellProto, uint32 healamount, DamageEffectType damagetype, uint32 stack = 1);
@@ -1629,6 +1692,7 @@ public:
[[nodiscard]] virtual bool CanFly() const = 0;
[[nodiscard]] bool IsFlying() const { return m_movementInfo.HasMovementFlag(MOVEMENTFLAG_FLYING | MOVEMENTFLAG_DISABLE_GRAVITY); }
[[nodiscard]] bool IsFalling() const;
+ [[nodiscard]] bool IsRooted() const { return m_movementInfo.HasMovementFlag(MOVEMENTFLAG_ROOT); }
[[nodiscard]] float GetHoverHeight() const { return IsHovering() ? GetFloatValue(UNIT_FIELD_HOVERHEIGHT) : 0.0f; }
@@ -1661,17 +1725,15 @@ public:
void propagateSpeedChange() { GetMotionMaster()->propagateSpeedChange(); }
void SendMonsterMove(float NewPosX, float NewPosY, float NewPosZ, uint32 TransitTime, SplineFlags sf = SPLINEFLAG_WALK_MODE); // pussywizard: need to just send packet, with no movement/spline
- void MonsterMoveWithSpeed(float x, float y, float z, float speed);
- //void SetFacing(float ori, WorldObject* obj = nullptr);
- //void SendMonsterMove(float NewPosX, float NewPosY, float NewPosZ, uint8 type, uint32 MovementFlags, uint32 Time, Player* player = nullptr);
+ 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);
- virtual bool SetCanFly(bool enable, bool packetOnly = false);
- virtual bool SetWaterWalking(bool enable, bool packetOnly = false);
- virtual bool SetFeatherFall(bool enable, bool packetOnly = false);
- virtual bool SetHover(bool enable, bool packetOnly = false, bool updateAnimationTier = true);
+ void SetCanFly(bool enable);
+ void SetWaterWalking(bool enable);
+ void SetFeatherFall(bool enable);
+ void SetHover(bool enable);
MotionMaster* GetMotionMaster() { return i_motionMaster; }
[[nodiscard]] const MotionMaster* GetMotionMaster() const { return i_motionMaster; }
@@ -1698,6 +1760,7 @@ public:
[[nodiscard]] uint8 getStandState() const { return GetByteValue(UNIT_FIELD_BYTES_1, 0); }
[[nodiscard]] bool IsSitState() const;
[[nodiscard]] bool IsStandState() const;
+ [[nodiscard]] bool IsStandUpOnMovementState() const;
void SetStandState(uint8 state);
void SetStandFlags(uint8 flags) { SetByteFlag(UNIT_FIELD_BYTES_1, UNIT_BYTES_1_OFFSET_VIS_FLAG, flags); }
@@ -1904,8 +1967,8 @@ public:
void SetInFront(WorldObject const* target);
void SetFacingTo(float ori);
- void SetFacingToObject(WorldObject* object);
- void SetTimedFacingToObject(WorldObject* object, uint32 time); // Reset to home orientation after given time
+ // <timed>Reset to home orientation after given time
+ void SetFacingToObject(WorldObject* object, Milliseconds timed = 0ms);
bool isInAccessiblePlaceFor(Creature const* c) const;
bool isInFrontInMap(Unit const* target, float distance, float arc = M_PI) const;
@@ -1947,9 +2010,10 @@ public:
void SendPlaySpellVisual(uint32 id);
void SendPlaySpellImpact(ObjectGuid guid, uint32 id);
- void SendPetActionFeedback (uint8 msg);
- void SendPetTalk (uint32 pettalk);
- void SendPetAIReaction(ObjectGuid guid);
+ void SendPetActionFeedback(uint8 msg) const;
+ void SendPetActionSound(PetAction action) const;
+ void SendPetDismissSound() const;
+ void SendPetAIReaction(ObjectGuid guid) const;
void SendPeriodicAuraLog(SpellPeriodicAuraLogInfo* pInfo);
@@ -1988,7 +2052,7 @@ public:
//----------- Public variables ----------//
uint32 m_extraAttacks;
- bool m_canDualWield;
+ DualWieldMode _dualWieldMode;
ControlSet m_Controlled;
@@ -2049,7 +2113,8 @@ protected:
void SetFeared(bool apply, Unit* fearedBy = nullptr, bool isFear = false);
void SetConfused(bool apply);
void SetStunned(bool apply);
- void SetRooted(bool apply, bool isStun = false);
+ void SetRooted(bool apply, bool stun = false, bool logout = false);
+ void SendMoveRoot(bool state);
//----------- Protected variables ----------//
UnitAI* i_AI;
@@ -2092,7 +2157,8 @@ protected:
AuraStateAurasMap m_auraStateAuras; // Used for improve performance of aura state checks on aura apply/remove
uint32 m_interruptMask;
- float m_auraModifiersGroup[UNIT_MOD_END][MODIFIER_TYPE_END];
+ float m_auraFlatModifiersGroup[UNIT_MOD_END][MODIFIER_TYPE_FLAT_END];
+ float m_auraPctModifiersGroup[UNIT_MOD_END][MODIFIER_TYPE_PCT_END];
float m_weaponDamage[MAX_ATTACK][MAX_WEAPON_DAMAGE_RANGE][MAX_ITEM_PROTO_DAMAGES];
bool m_canModifyStats;
VisibleAuraMap m_visibleAuras;
@@ -2121,8 +2187,6 @@ protected:
bool m_applyResilience;
bool _instantCast;
- uint32 m_rootTimes;
-
private:
bool IsTriggeredAtSpellProcEvent(Unit* victim, Aura* aura, WeaponAttackType attType, bool isVictim, bool active, SpellProcEventEntry const*& spellProcEvent, ProcEventInfo const& eventInfo);
bool HandleDummyAuraProc(Unit* victim, uint32 damage, AuraEffect* triggeredByAura, SpellInfo const* procSpell, uint32 procFlag, uint32 procEx, uint32 cooldown, ProcEventInfo const& eventInfo);
diff --git a/src/server/game/Entities/Unit/UnitDefines.h b/src/server/game/Entities/Unit/UnitDefines.h
index e6885fe162..af52a98912 100644
--- a/src/server/game/Entities/Unit/UnitDefines.h
+++ b/src/server/game/Entities/Unit/UnitDefines.h
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
@@ -197,7 +197,9 @@ enum UnitState
UNIT_STATE_IGNORE_PATHFINDING = 0x10000000, // do not use pathfinding in any MovementGenerator
UNIT_STATE_NO_ENVIRONMENT_UPD = 0x20000000,
- UNIT_STATE_NO_COMBAT_MOVEMENT, // serverside only - should never be changed outside of core and hence shouldnt have a defined static value and be at the end
+ // serverside region
+ UNIT_STATE_NO_COMBAT_MOVEMENT = 0x40000000, // should not be changed outside the core and should be placed at the end
+ UNIT_STATE_LOGOUT_TIMER = 0x80000000, // Unit is logging out
UNIT_STATE_ALL_STATE_SUPPORTED = UNIT_STATE_DIED | UNIT_STATE_MELEE_ATTACKING | UNIT_STATE_STUNNED | UNIT_STATE_ROAMING | UNIT_STATE_CHASE
| UNIT_STATE_FLEEING | UNIT_STATE_IN_FLIGHT | UNIT_STATE_FOLLOW | UNIT_STATE_ROOT | UNIT_STATE_CONFUSED
@@ -412,6 +414,8 @@ enum MovementFlags
MOVEMENTFLAG_MASK_PLAYER_ONLY =
MOVEMENTFLAG_FLYING,
+ MOVEMENTFLAG_MASK_MOVING_OR_TURN = MOVEMENTFLAG_MASK_MOVING | MOVEMENTFLAG_MASK_TURNING,
+
/// Movement flags that have change status opcodes associated for players
MOVEMENTFLAG_MASK_HAS_PLAYER_STATUS_OPCODE = MOVEMENTFLAG_DISABLE_GRAVITY | MOVEMENTFLAG_ROOT |
MOVEMENTFLAG_CAN_FLY | MOVEMENTFLAG_WATERWALKING | MOVEMENTFLAG_FALLING_SLOW | MOVEMENTFLAG_HOVER
diff --git a/src/server/game/Entities/Unit/UnitUtils.h b/src/server/game/Entities/Unit/UnitUtils.h
index 42f0ba1a03..e863426605 100644
--- a/src/server/game/Entities/Unit/UnitUtils.h
+++ b/src/server/game/Entities/Unit/UnitUtils.h
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/game/Entities/Unit/enuminfo_Unit.cpp b/src/server/game/Entities/Unit/enuminfo_Unit.cpp
index 01747bdb69..6ded62396c 100644
--- a/src/server/game/Entities/Unit/enuminfo_Unit.cpp
+++ b/src/server/game/Entities/Unit/enuminfo_Unit.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/game/Entities/Vehicle/Vehicle.cpp b/src/server/game/Entities/Vehicle/Vehicle.cpp
index b0752ecd2d..d18e721adb 100644
--- a/src/server/game/Entities/Vehicle/Vehicle.cpp
+++ b/src/server/game/Entities/Vehicle/Vehicle.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
@@ -423,7 +423,9 @@ bool Vehicle::AddPassenger(Unit* unit, int8 seatId)
if (_me->IsInWorld())
{
unit->SendClearTarget(); // SMSG_BREAK_TARGET
- unit->SetControlled(true, UNIT_STATE_ROOT); // SMSG_FORCE_ROOT - In some cases we send SMSG_SPLINE_MOVE_ROOT here (for creatures)
+ unit->SetControlled(true, UNIT_STATE_ROOT); // SMSG_FORCE_ROOT - In some cases we send SMSG_SPLINE_MOVE_ROOT here (for creatures)
+ if (unit->IsPlayer())
+ unit->ToPlayer()->SetExpectingChangeTransport(true);
// also adds MOVEMENTFLAG_ROOT
Movement::MoveSplineInit init(unit);
init.DisableTransportPathTransformations();
diff --git a/src/server/game/Entities/Vehicle/Vehicle.h b/src/server/game/Entities/Vehicle/Vehicle.h
index 3d5115e7f0..04594870b0 100644
--- a/src/server/game/Entities/Vehicle/Vehicle.h
+++ b/src/server/game/Entities/Vehicle/Vehicle.h
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
@@ -100,12 +100,12 @@ private:
class VehicleDespawnEvent : public BasicEvent
{
public:
- VehicleDespawnEvent(Unit& self, uint32 duration) : _self(self), _duration(duration) { }
+ VehicleDespawnEvent(Unit& self, Milliseconds duration) : _self(self), _duration(duration) { }
bool Execute(uint64 e_time, uint32 p_time) override;
protected:
Unit& _self;
- uint32 _duration;
+ Milliseconds _duration;
};
#endif
diff --git a/src/server/game/Entities/Vehicle/VehicleDefines.h b/src/server/game/Entities/Vehicle/VehicleDefines.h
index 1f4e99e6c0..1aa2545819 100644
--- a/src/server/game/Entities/Vehicle/VehicleDefines.h
+++ b/src/server/game/Entities/Vehicle/VehicleDefines.h
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/game/Events/GameEventMgr.cpp b/src/server/game/Events/GameEventMgr.cpp
index 4e98280fc1..509d5235ed 100644
--- a/src/server/game/Events/GameEventMgr.cpp
+++ b/src/server/game/Events/GameEventMgr.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/game/Events/GameEventMgr.h b/src/server/game/Events/GameEventMgr.h
index 9cc0adcb6b..fc7f3726d1 100644
--- a/src/server/game/Events/GameEventMgr.h
+++ b/src/server/game/Events/GameEventMgr.h
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/game/Globals/ObjectAccessor.cpp b/src/server/game/Globals/ObjectAccessor.cpp
index f9a4cb01e3..7ed1f0c2ad 100644
--- a/src/server/game/Globals/ObjectAccessor.cpp
+++ b/src/server/game/Globals/ObjectAccessor.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
@@ -112,7 +112,7 @@ namespace PlayerNameMapHolder
} // namespace PlayerNameMapHolder
-WorldObject* ObjectAccessor::GetWorldObject(WorldObject const& p, ObjectGuid const guid)
+WorldObject* ObjectAccessor::GetWorldObject(WorldObject const& p, ObjectGuid const& guid)
{
switch (guid.GetHigh())
{
@@ -138,7 +138,7 @@ WorldObject* ObjectAccessor::GetWorldObject(WorldObject const& p, ObjectGuid con
return nullptr;
}
-Object* ObjectAccessor::GetObjectByTypeMask(WorldObject const& p, ObjectGuid const guid, uint32 typemask)
+Object* ObjectAccessor::GetObjectByTypeMask(WorldObject const& p, ObjectGuid const& guid, uint32 typemask)
{
switch (guid.GetHigh())
{
@@ -176,27 +176,27 @@ Object* ObjectAccessor::GetObjectByTypeMask(WorldObject const& p, ObjectGuid con
return nullptr;
}
-Corpse* ObjectAccessor::GetCorpse(WorldObject const& u, ObjectGuid const guid)
+Corpse* ObjectAccessor::GetCorpse(WorldObject const& u, ObjectGuid const& guid)
{
return u.GetMap()->GetCorpse(guid);
}
-GameObject* ObjectAccessor::GetGameObject(WorldObject const& u, ObjectGuid const guid)
+GameObject* ObjectAccessor::GetGameObject(WorldObject const& u, ObjectGuid const& guid)
{
return u.GetMap()->GetGameObject(guid);
}
-Transport* ObjectAccessor::GetTransport(WorldObject const& u, ObjectGuid const guid)
+Transport* ObjectAccessor::GetTransport(WorldObject const& u, ObjectGuid const& guid)
{
return u.GetMap()->GetTransport(guid);
}
-DynamicObject* ObjectAccessor::GetDynamicObject(WorldObject const& u, ObjectGuid const guid)
+DynamicObject* ObjectAccessor::GetDynamicObject(WorldObject const& u, ObjectGuid const& guid)
{
return u.GetMap()->GetDynamicObject(guid);
}
-Unit* ObjectAccessor::GetUnit(WorldObject const& u, ObjectGuid const guid)
+Unit* ObjectAccessor::GetUnit(WorldObject const& u, ObjectGuid const& guid)
{
if (guid.IsPlayer())
return GetPlayer(u, guid);
@@ -207,17 +207,17 @@ Unit* ObjectAccessor::GetUnit(WorldObject const& u, ObjectGuid const guid)
return GetCreature(u, guid);
}
-Creature* ObjectAccessor::GetCreature(WorldObject const& u, ObjectGuid const guid)
+Creature* ObjectAccessor::GetCreature(WorldObject const& u, ObjectGuid const& guid)
{
return u.GetMap()->GetCreature(guid);
}
-Pet* ObjectAccessor::GetPet(WorldObject const& u, ObjectGuid const guid)
+Pet* ObjectAccessor::GetPet(WorldObject const& u, ObjectGuid const& guid)
{
return u.GetMap()->GetPet(guid);
}
-Player* ObjectAccessor::GetPlayer(Map const* m, ObjectGuid const guid)
+Player* ObjectAccessor::GetPlayer(Map const* m, ObjectGuid const& guid)
{
if (Player * player = HashMapHolder<Player>::Find(guid))
if (player->IsInWorld() && player->GetMap() == m)
@@ -226,12 +226,12 @@ Player* ObjectAccessor::GetPlayer(Map const* m, ObjectGuid const guid)
return nullptr;
}
-Player* ObjectAccessor::GetPlayer(WorldObject const& u, ObjectGuid const guid)
+Player* ObjectAccessor::GetPlayer(WorldObject const& u, ObjectGuid const& guid)
{
return GetPlayer(u.GetMap(), guid);
}
-Creature* ObjectAccessor::GetCreatureOrPetOrVehicle(WorldObject const& u, ObjectGuid const guid)
+Creature* ObjectAccessor::GetCreatureOrPetOrVehicle(WorldObject const& u, ObjectGuid const& guid)
{
if (guid.IsPet())
return GetPet(u, guid);
diff --git a/src/server/game/Globals/ObjectAccessor.h b/src/server/game/Globals/ObjectAccessor.h
index 2fbe70bf5b..d7d2aaa8a7 100644
--- a/src/server/game/Globals/ObjectAccessor.h
+++ b/src/server/game/Globals/ObjectAccessor.h
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
@@ -60,18 +60,18 @@ public:
namespace ObjectAccessor
{
// these functions return objects only if in map of specified object
- WorldObject* GetWorldObject(WorldObject const&, ObjectGuid const guid);
- Object* GetObjectByTypeMask(WorldObject const&, ObjectGuid const guid, uint32 typemask);
- Corpse* GetCorpse(WorldObject const& u, ObjectGuid const guid);
- GameObject* GetGameObject(WorldObject const& u, ObjectGuid const guid);
- Transport* GetTransport(WorldObject const& u, ObjectGuid const guid);
- DynamicObject* GetDynamicObject(WorldObject const& u, ObjectGuid const guid);
- Unit* GetUnit(WorldObject const&, ObjectGuid const guid);
- Creature* GetCreature(WorldObject const& u, ObjectGuid const guid);
- Pet* GetPet(WorldObject const&, ObjectGuid const guid);
- Player* GetPlayer(Map const*, ObjectGuid const guid);
- Player* GetPlayer(WorldObject const&, ObjectGuid const guid);
- Creature* GetCreatureOrPetOrVehicle(WorldObject const&, ObjectGuid const);
+ WorldObject* GetWorldObject(WorldObject const&, ObjectGuid const& guid);
+ Object* GetObjectByTypeMask(WorldObject const&, ObjectGuid const& guid, uint32 typemask);
+ Corpse* GetCorpse(WorldObject const& u, ObjectGuid const& guid);
+ GameObject* GetGameObject(WorldObject const& u, ObjectGuid const& guid);
+ Transport* GetTransport(WorldObject const& u, ObjectGuid const& guid);
+ DynamicObject* GetDynamicObject(WorldObject const& u, ObjectGuid const& guid);
+ Unit* GetUnit(WorldObject const&, ObjectGuid const& guid);
+ Creature* GetCreature(WorldObject const& u, ObjectGuid const& guid);
+ Pet* GetPet(WorldObject const&, ObjectGuid const& guid);
+ Player* GetPlayer(Map const*, ObjectGuid const& guid);
+ Player* GetPlayer(WorldObject const&, ObjectGuid const& guid);
+ Creature* GetCreatureOrPetOrVehicle(WorldObject const&, ObjectGuid const&);
// these functions return objects if found in whole world
// ACCESS LIKE THAT IS NOT THREAD SAFE
diff --git a/src/server/game/Globals/ObjectMgr.cpp b/src/server/game/Globals/ObjectMgr.cpp
index c532f5fe7e..f22606ec27 100644
--- a/src/server/game/Globals/ObjectMgr.cpp
+++ b/src/server/game/Globals/ObjectMgr.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
@@ -1122,8 +1122,22 @@ void ObjectMgr::CheckCreatureTemplate(CreatureTemplate const* cInfo)
if (!cInfo->Models.size())
LOG_ERROR("sql.sql", "Creature (Entry: {}) does not have any existing display id in creature_template_model.", cInfo->Entry);
- else if (std::accumulate(cInfo->Models.begin(), cInfo->Models.end(), 0.0f, [](float sum, CreatureModel const& model) { return sum + model.Probability; }) <= 0.0f)
- LOG_ERROR("sql.sql", "Creature (Entry: {}) has zero total chance for all models in creature_template_model.", cInfo->Entry);
+ else
+ {
+ float const totalProbability = std::accumulate(cInfo->Models.begin(), cInfo->Models.end(), 0.0f, [](float sum, CreatureModel const& model) { return sum + model.Probability; });
+
+ if (totalProbability <= 0.0f)
+ { // There are many cases in official data of all models having a probability of 0. Believe to be treated equivalent to equal chance ONLY if all are zeroed
+ if (totalProbability == 0.0f)
+ LOG_DEBUG("sql.sql", "Creature (Entry: {}) has zero total chance for all models in creature_template_model. Setting all to 1.0.", cInfo->Entry);
+ else // Custom, likely bad data
+ LOG_ERROR("sql.sql", "Creature (Entry: {}) has less than zero total chance for all models in creature_template_model. Setting all to 1.0.", cInfo->Entry);
+
+ auto& models = const_cast<CreatureTemplate*>(cInfo)->Models;
+ for (auto& model : models)
+ model.Probability = 1.0f;
+ }
+ }
if (!cInfo->unit_class || ((1 << (cInfo->unit_class - 1)) & CLASSMASK_ALL_CREATURES) == 0)
{
diff --git a/src/server/game/Globals/ObjectMgr.h b/src/server/game/Globals/ObjectMgr.h
index f6492ad317..173447ce8c 100644
--- a/src/server/game/Globals/ObjectMgr.h
+++ b/src/server/game/Globals/ObjectMgr.h
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/game/Globals/WorldGlobals.cpp b/src/server/game/Globals/WorldGlobals.cpp
index fcfb3369e0..fd1663dc31 100644
--- a/src/server/game/Globals/WorldGlobals.cpp
+++ b/src/server/game/Globals/WorldGlobals.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/game/Globals/WorldGlobals.h b/src/server/game/Globals/WorldGlobals.h
index e8695d02b9..5eca5f6618 100644
--- a/src/server/game/Globals/WorldGlobals.h
+++ b/src/server/game/Globals/WorldGlobals.h
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/game/Grids/Cells/Cell.h b/src/server/game/Grids/Cells/Cell.h
index a54f7f4cd8..72097e7e7d 100644
--- a/src/server/game/Grids/Cells/Cell.h
+++ b/src/server/game/Grids/Cells/Cell.h
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/game/Grids/Cells/CellImpl.h b/src/server/game/Grids/Cells/CellImpl.h
index 997840367a..4bc1a66ed5 100644
--- a/src/server/game/Grids/Cells/CellImpl.h
+++ b/src/server/game/Grids/Cells/CellImpl.h
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/game/Grids/GridCell.h b/src/server/game/Grids/GridCell.h
index 65e3a0315b..dda22551d4 100644
--- a/src/server/game/Grids/GridCell.h
+++ b/src/server/game/Grids/GridCell.h
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/game/Grids/GridDefines.h b/src/server/game/Grids/GridDefines.h
index 5c1d09c63e..8904ff41d1 100644
--- a/src/server/game/Grids/GridDefines.h
+++ b/src/server/game/Grids/GridDefines.h
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/game/Grids/GridObjectLoader.cpp b/src/server/game/Grids/GridObjectLoader.cpp
index d8b39ebd69..07a5d2211b 100644
--- a/src/server/game/Grids/GridObjectLoader.cpp
+++ b/src/server/game/Grids/GridObjectLoader.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/game/Grids/GridObjectLoader.h b/src/server/game/Grids/GridObjectLoader.h
index ec60447315..892df35cbe 100644
--- a/src/server/game/Grids/GridObjectLoader.h
+++ b/src/server/game/Grids/GridObjectLoader.h
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/game/Grids/GridRefMgr.h b/src/server/game/Grids/GridRefMgr.h
index 32dd3cfeb6..09b307ae91 100644
--- a/src/server/game/Grids/GridRefMgr.h
+++ b/src/server/game/Grids/GridRefMgr.h
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/game/Grids/GridReference.h b/src/server/game/Grids/GridReference.h
index e365a56010..35a808c9c6 100644
--- a/src/server/game/Grids/GridReference.h
+++ b/src/server/game/Grids/GridReference.h
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/game/Grids/GridTerrainData.cpp b/src/server/game/Grids/GridTerrainData.cpp
index e2439dc2e5..ab4a1c2869 100644
--- a/src/server/game/Grids/GridTerrainData.cpp
+++ b/src/server/game/Grids/GridTerrainData.cpp
@@ -527,9 +527,11 @@ float GridTerrainData::getLiquidLevel(float x, float y) const
}
// Get water state on map
-LiquidData const GridTerrainData::GetLiquidData(float x, float y, float z, float collisionHeight, uint8 ReqLiquidType) const
+LiquidData const GridTerrainData::GetLiquidData(float x, float y, float z, float collisionHeight, Optional<uint8> ReqLiquidType) const
{
LiquidData liquidData;
+ liquidData.Status = LIQUID_MAP_NO_WATER;
+
if (!_loadedLiquidData)
return liquidData;
@@ -575,7 +577,7 @@ LiquidData const GridTerrainData::GetLiquidData(float x, float y, float z, float
}
// Check req liquid type mask
- if (type != 0 && (!ReqLiquidType || (ReqLiquidType & type) != 0))
+ if (type != 0 && (!ReqLiquidType || (*ReqLiquidType & type) != 0))
{
// Check water level:
// Check water height map
diff --git a/src/server/game/Grids/GridTerrainData.h b/src/server/game/Grids/GridTerrainData.h
index 6d6b898252..18324d574e 100644
--- a/src/server/game/Grids/GridTerrainData.h
+++ b/src/server/game/Grids/GridTerrainData.h
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
@@ -186,7 +186,7 @@ struct LoadedHoleData
HolesType holes;
};
-enum LiquidStatus
+enum LiquidStatus : uint32
{
LIQUID_MAP_NO_WATER = 0x00000000,
LIQUID_MAP_ABOVE_WATER = 0x00000001,
@@ -249,7 +249,7 @@ public:
inline float getHeight(float x, float y) const { return (this->*_gridGetHeight)(x, y); }
float getMinHeight(float x, float y) const;
float getLiquidLevel(float x, float y) const;
- LiquidData const GetLiquidData(float x, float y, float z, float collisionHeight, uint8 ReqLiquidType) const;
+ LiquidData const GetLiquidData(float x, float y, float z, float collisionHeight, Optional<uint8> ReqLiquidType) const;
};
#endif
diff --git a/src/server/game/Grids/GridTerrainLoader.h b/src/server/game/Grids/GridTerrainLoader.h
index 39cbc0d622..e1d6019bf4 100644
--- a/src/server/game/Grids/GridTerrainLoader.h
+++ b/src/server/game/Grids/GridTerrainLoader.h
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/game/Grids/MapGrid.h b/src/server/game/Grids/MapGrid.h
index c80c3b4d3f..cecad754a5 100644
--- a/src/server/game/Grids/MapGrid.h
+++ b/src/server/game/Grids/MapGrid.h
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/game/Grids/MapGridManager.h b/src/server/game/Grids/MapGridManager.h
index 3eb7c629d5..59f6e45c89 100644
--- a/src/server/game/Grids/MapGridManager.h
+++ b/src/server/game/Grids/MapGridManager.h
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/game/Grids/Notifiers/GridNotifiers.cpp b/src/server/game/Grids/Notifiers/GridNotifiers.cpp
index 5dd717f321..36ed177442 100644
--- a/src/server/game/Grids/Notifiers/GridNotifiers.cpp
+++ b/src/server/game/Grids/Notifiers/GridNotifiers.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
@@ -83,7 +83,7 @@ void VisibleNotifier::SendToSelf()
WorldPacket packet;
i_data.BuildPacket(packet);
- i_player.GetSession()->SendPacket(&packet);
+ i_player.SendDirectMessage(&packet);
for (std::vector<Unit*>::const_iterator it = i_visibleNow.begin(); it != i_visibleNow.end(); ++it)
i_player.GetInitialVisiblePackets(*it);
diff --git a/src/server/game/Grids/Notifiers/GridNotifiers.h b/src/server/game/Grids/Notifiers/GridNotifiers.h
index d35e8600c1..afb6b71bbc 100644
--- a/src/server/game/Grids/Notifiers/GridNotifiers.h
+++ b/src/server/game/Grids/Notifiers/GridNotifiers.h
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
@@ -126,7 +126,7 @@ namespace Acore
if (!player->HaveAtClient(i_source))
return;
- player->GetSession()->SendPacket(i_message);
+ player->SendDirectMessage(i_message);
}
};
@@ -151,7 +151,7 @@ namespace Acore
if (player == i_source || !player->HaveAtClient(i_source) || player->IsFriendlyTo(i_source))
return;
- player->GetSession()->SendPacket(i_message);
+ player->SendDirectMessage(i_message);
}
};
@@ -1092,10 +1092,9 @@ namespace Acore
{
return false;
}
-
}
- if (i_funit->_IsValidAttackTarget(u, _spellInfo, i_obj->IsDynamicObject() ? i_obj : nullptr) && i_obj->IsWithinDistInMap(u, i_range,true,false))
+ if (i_funit->_IsValidAttackTarget(u, _spellInfo, i_obj->IsDynamicObject() ? i_obj : nullptr) && i_obj->IsWithinDistInMap(u, i_range,true,false, true))
return true;
@@ -1192,7 +1191,7 @@ namespace Acore
}
bool operator()(Unit* u)
{
- if (!me->IsWithinDistInMap(u, m_range, true, false))
+ if (!me->IsWithinDistInMap(u, m_range, true, false, false))
return false;
if (!me->IsValidAttackTarget(u))
@@ -1218,7 +1217,7 @@ namespace Acore
explicit NearestHostileUnitInAttackDistanceCheck(Creature const* creature, float dist) : me(creature), m_range(dist) {}
bool operator()(Unit* u)
{
- if (!me->IsWithinDistInMap(u, m_range, true, false))
+ if (!me->IsWithinDistInMap(u, m_range, true, false, false))
return false;
if (!me->CanStartAttack(u))
diff --git a/src/server/game/Grids/Notifiers/GridNotifiersImpl.h b/src/server/game/Grids/Notifiers/GridNotifiersImpl.h
index a24e873745..3bbd580b1f 100644
--- a/src/server/game/Grids/Notifiers/GridNotifiersImpl.h
+++ b/src/server/game/Grids/Notifiers/GridNotifiersImpl.h
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/game/Groups/Group.cpp b/src/server/game/Groups/Group.cpp
index b4b2331e11..d2338ca813 100644
--- a/src/server/game/Groups/Group.cpp
+++ b/src/server/game/Groups/Group.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
@@ -580,14 +580,14 @@ bool Group::RemoveMember(ObjectGuid guid, const RemoveMethod& method /*= GROUP_R
if (method == GROUP_REMOVEMETHOD_KICK || method == GROUP_REMOVEMETHOD_KICK_LFG)
{
data.Initialize(SMSG_GROUP_UNINVITE, 0);
- player->GetSession()->SendPacket(&data);
+ player->SendDirectMessage(&data);
}
// Do we really need to send this opcode?
data.Initialize(SMSG_GROUP_LIST, 1 + 1 + 1 + 1 + 8 + 4 + 4 + 8);
data << uint8(0x10) << uint8(0) << uint8(0) << uint8(0);
data << m_guid << uint32(m_counter) << uint32(0) << uint64(0);
- player->GetSession()->SendPacket(&data);
+ player->SendDirectMessage(&data);
}
// Remove player from group in DB
@@ -799,7 +799,7 @@ void Group::Disband(bool hideDestroy /* = false */)
if (!hideDestroy)
{
data.Initialize(SMSG_GROUP_DESTROYED, 0);
- player->GetSession()->SendPacket(&data);
+ player->SendDirectMessage(&data);
}
//we already removed player from group and in player->GetGroup() is his original group, send update
@@ -812,7 +812,7 @@ void Group::Disband(bool hideDestroy /* = false */)
data.Initialize(SMSG_GROUP_LIST, 1 + 1 + 1 + 1 + 8 + 4 + 4 + 8);
data << uint8(0x10) << uint8(0) << uint8(0) << uint8(0);
data << m_guid << uint32(m_counter) << uint32(0) << uint64(0);
- player->GetSession()->SendPacket(&data);
+ player->SendDirectMessage(&data);
}
}
RollId.clear();
@@ -870,7 +870,7 @@ void Group::SendLootStartRoll(uint32 CountDown, uint32 mapid, const Roll& r)
continue;
if (itr->second == NOT_EMITED_YET)
- p->GetSession()->SendPacket(&data);
+ p->SendDirectMessage(&data);
}
}
@@ -893,7 +893,7 @@ void Group::SendLootStartRollToPlayer(uint32 countDown, uint32 mapId, Player* p,
voteMask &= ~ROLL_FLAG_TYPE_NEED;
data << uint8(voteMask); // roll type mask
- p->GetSession()->SendPacket(&data);
+ p->SendDirectMessage(&data);
}
void Group::SendLootRoll(ObjectGuid sourceGuid, ObjectGuid targetGuid, uint8 rollNumber, uint8 rollType, Roll const& roll, bool autoPass)
@@ -916,7 +916,7 @@ void Group::SendLootRoll(ObjectGuid sourceGuid, ObjectGuid targetGuid, uint8 rol
continue;
if (itr->second != NOT_VALID)
- p->GetSession()->SendPacket(&data);
+ p->SendDirectMessage(&data);
}
}
@@ -939,7 +939,7 @@ void Group::SendLootRollWon(ObjectGuid sourceGuid, ObjectGuid targetGuid, uint8
continue;
if (itr->second != NOT_VALID)
- p->GetSession()->SendPacket(&data);
+ p->SendDirectMessage(&data);
}
}
@@ -959,7 +959,7 @@ void Group::SendLootAllPassed(Roll const& roll)
continue;
if (itr->second != NOT_VALID)
- player->GetSession()->SendPacket(&data);
+ player->SendDirectMessage(&data);
}
}
@@ -1353,7 +1353,7 @@ void Group::MasterLoot(Loot* loot, WorldObject* pLootedObject)
for (Player* looter : looters)
{
- looter->GetSession()->SendPacket(&data);
+ looter->SendDirectMessage(&data);
}
}
@@ -1735,7 +1735,7 @@ void Group::SendUpdateToPlayer(ObjectGuid playerGUID, MemberSlot* slot)
data << uint8(m_raidDifficulty >= RAID_DIFFICULTY_10MAN_HEROIC); // 3.3 Dynamic Raid Difficulty - 0 normal/1 heroic
}
- player->GetSession()->SendPacket(&data);
+ player->SendDirectMessage(&data);
}
void Group::UpdatePlayerOutOfRange(Player* player)
@@ -1750,7 +1750,7 @@ void Group::UpdatePlayerOutOfRange(Player* player)
{
Player* member = itr->GetSource();
if (member && (!member->IsInMap(player) || !member->IsWithinDist(player, member->GetSightRange(player), false)))
- member->GetSession()->SendPacket(&data);
+ member->SendDirectMessage(&data);
}
}
@@ -1763,7 +1763,7 @@ void Group::BroadcastPacket(WorldPacket const* packet, bool ignorePlayersInBGRai
continue;
if (group == -1 || itr->getSubGroup() == group)
- player->GetSession()->SendPacket(packet);
+ player->SendDirectMessage(packet);
}
}
@@ -1774,7 +1774,7 @@ void Group::BroadcastReadyCheck(WorldPacket const* packet)
Player* player = itr->GetSource();
if (player)
if (IsLeader(player->GetGUID()) || IsAssistant(player->GetGUID()))
- player->GetSession()->SendPacket(packet);
+ player->SendDirectMessage(packet);
}
}
diff --git a/src/server/game/Groups/Group.h b/src/server/game/Groups/Group.h
index acf6fc0e1d..c4a9b92627 100644
--- a/src/server/game/Groups/Group.h
+++ b/src/server/game/Groups/Group.h
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/game/Groups/GroupMgr.cpp b/src/server/game/Groups/GroupMgr.cpp
index 81ba1deded..4ce8475385 100644
--- a/src/server/game/Groups/GroupMgr.cpp
+++ b/src/server/game/Groups/GroupMgr.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/game/Groups/GroupMgr.h b/src/server/game/Groups/GroupMgr.h
index 72358121ac..7fa4d052fa 100644
--- a/src/server/game/Groups/GroupMgr.h
+++ b/src/server/game/Groups/GroupMgr.h
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/game/Groups/GroupRefMgr.h b/src/server/game/Groups/GroupRefMgr.h
index 025121d167..3a965d1955 100644
--- a/src/server/game/Groups/GroupRefMgr.h
+++ b/src/server/game/Groups/GroupRefMgr.h
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/game/Groups/GroupReference.cpp b/src/server/game/Groups/GroupReference.cpp
index 3e12577aa5..69f7df5135 100644
--- a/src/server/game/Groups/GroupReference.cpp
+++ b/src/server/game/Groups/GroupReference.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/game/Groups/GroupReference.h b/src/server/game/Groups/GroupReference.h
index ea0ec3e243..dec6e6586b 100644
--- a/src/server/game/Groups/GroupReference.h
+++ b/src/server/game/Groups/GroupReference.h
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/game/Guilds/Guild.cpp b/src/server/game/Guilds/Guild.cpp
index a39c14b6b8..d388381215 100644
--- a/src/server/game/Guilds/Guild.cpp
+++ b/src/server/game/Guilds/Guild.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
@@ -2123,7 +2123,7 @@ void Guild::BroadcastToGuild(WorldSession* session, bool officerOnly, std::strin
for (auto const& [guid, member] : m_members)
if (Player* player = member.FindPlayer())
if (_HasRankRight(player, officerOnly ? GR_RIGHT_OFFCHATLISTEN : GR_RIGHT_GCHATLISTEN) && !player->GetSocial()->HasIgnore(session->GetPlayer()->GetGUID()))
- player->GetSession()->SendPacket(&data);
+ player->SendDirectMessage(&data);
}
}
@@ -2132,14 +2132,14 @@ void Guild::BroadcastPacketToRank(WorldPacket const* packet, uint8 rankId) const
for (auto const& [guid, member] : m_members)
if (member.IsRank(rankId))
if (Player* player = member.FindPlayer())
- player->GetSession()->SendPacket(packet);
+ player->SendDirectMessage(packet);
}
void Guild::BroadcastPacket(WorldPacket const* packet) const
{
for (auto const& [guid, member] : m_members)
if (Player* player = member.FindPlayer())
- player->GetSession()->SendPacket(packet);
+ player->SendDirectMessage(packet);
}
void Guild::MassInviteToEvent(WorldSession* session, uint32 minLevel, uint32 maxLevel, uint32 minRank)
diff --git a/src/server/game/Guilds/Guild.h b/src/server/game/Guilds/Guild.h
index 202041389d..ab5d47295d 100644
--- a/src/server/game/Guilds/Guild.h
+++ b/src/server/game/Guilds/Guild.h
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/game/Guilds/GuildMgr.cpp b/src/server/game/Guilds/GuildMgr.cpp
index 3df4968def..bfa1986864 100644
--- a/src/server/game/Guilds/GuildMgr.cpp
+++ b/src/server/game/Guilds/GuildMgr.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/game/Guilds/GuildMgr.h b/src/server/game/Guilds/GuildMgr.h
index ad645d7b6e..7f7e698572 100644
--- a/src/server/game/Guilds/GuildMgr.h
+++ b/src/server/game/Guilds/GuildMgr.h
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/game/Handlers/AddonHandler.cpp b/src/server/game/Handlers/AddonHandler.cpp
index fd8954907d..2ac47870c5 100644
--- a/src/server/game/Handlers/AddonHandler.cpp
+++ b/src/server/game/Handlers/AddonHandler.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/game/Handlers/AddonHandler.h b/src/server/game/Handlers/AddonHandler.h
index 3382b3e031..c8cd5f7c7b 100644
--- a/src/server/game/Handlers/AddonHandler.h
+++ b/src/server/game/Handlers/AddonHandler.h
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/game/Handlers/ArenaTeamHandler.cpp b/src/server/game/Handlers/ArenaTeamHandler.cpp
index e982f61fc4..65ad0e0c70 100644
--- a/src/server/game/Handlers/ArenaTeamHandler.cpp
+++ b/src/server/game/Handlers/ArenaTeamHandler.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
@@ -160,7 +160,7 @@ void WorldSession::HandleArenaTeamInviteOpcode(WorldPacket& recvData)
WorldPacket data(SMSG_ARENA_TEAM_INVITE, (8 + 10));
data << GetPlayer()->GetName();
data << arenaTeam->GetName();
- player->GetSession()->SendPacket(&data);
+ player->SendDirectMessage(&data);
LOG_DEBUG("network", "WORLD: Sent SMSG_ARENA_TEAM_INVITE");
}
diff --git a/src/server/game/Handlers/AuctionHouseHandler.cpp b/src/server/game/Handlers/AuctionHouseHandler.cpp
index a3205df4b3..50df6f4d34 100644
--- a/src/server/game/Handlers/AuctionHouseHandler.cpp
+++ b/src/server/game/Handlers/AuctionHouseHandler.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/game/Handlers/AuthHandler.cpp b/src/server/game/Handlers/AuthHandler.cpp
index 45a87579b9..52dcffdecd 100644
--- a/src/server/game/Handlers/AuthHandler.cpp
+++ b/src/server/game/Handlers/AuthHandler.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/game/Handlers/BankHandler.cpp b/src/server/game/Handlers/BankHandler.cpp
index 85e1bd8780..3138727194 100644
--- a/src/server/game/Handlers/BankHandler.cpp
+++ b/src/server/game/Handlers/BankHandler.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/game/Handlers/BattleGroundHandler.cpp b/src/server/game/Handlers/BattleGroundHandler.cpp
index c66ea7361d..dba88af1b7 100644
--- a/src/server/game/Handlers/BattleGroundHandler.cpp
+++ b/src/server/game/Handlers/BattleGroundHandler.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
@@ -265,7 +265,7 @@ void WorldSession::HandleBattlemasterJoinOpcode(WorldPacket& recvData)
{
WorldPacket data;
sBattlegroundMgr->BuildGroupJoinedBattlegroundPacket(&data, err);
- member->GetSession()->SendPacket(&data);
+ member->SendDirectMessage(&data);
});
return;
@@ -283,10 +283,10 @@ void WorldSession::HandleBattlemasterJoinOpcode(WorldPacket& recvData)
// send status packet
sBattlegroundMgr->BuildBattlegroundStatusPacket(&data, bg, member->AddBattlegroundQueueId(bgQueueTypeId), STATUS_WAIT_QUEUE, avgWaitTime, 0, 0, TEAM_NEUTRAL);
- member->GetSession()->SendPacket(&data);
+ member->SendDirectMessage(&data);
sBattlegroundMgr->BuildGroupJoinedBattlegroundPacket(&data, err);
- member->GetSession()->SendPacket(&data);
+ member->SendDirectMessage(&data);
sScriptMgr->OnPlayerJoinBG(member);
});
@@ -879,7 +879,7 @@ void WorldSession::HandleBattlemasterJoinArena(WorldPacket& recvData)
if (err <= 0)
{
sBattlegroundMgr->BuildGroupJoinedBattlegroundPacket(&data, err);
- member->GetSession()->SendPacket(&data);
+ member->SendDirectMessage(&data);
continue;
}
@@ -887,10 +887,10 @@ void WorldSession::HandleBattlemasterJoinArena(WorldPacket& recvData)
// send status packet
sBattlegroundMgr->BuildBattlegroundStatusPacket(&data, bgt, queueSlot, STATUS_WAIT_QUEUE, avgWaitTime, 0, arenatype, TEAM_NEUTRAL, isRated);
- member->GetSession()->SendPacket(&data);
+ member->SendDirectMessage(&data);
sBattlegroundMgr->BuildGroupJoinedBattlegroundPacket(&data, err);
- member->GetSession()->SendPacket(&data);
+ member->SendDirectMessage(&data);
LOG_DEBUG("bg.battleground", "Battleground: player joined queue for arena as group bg queue type {} bg type {}: {}, NAME {}", bgQueueTypeId, bgTypeId, member->GetGUID().ToString(), member->GetName());
diff --git a/src/server/game/Handlers/CalendarHandler.cpp b/src/server/game/Handlers/CalendarHandler.cpp
index 53cccbf4e0..d5b41e41c1 100644
--- a/src/server/game/Handlers/CalendarHandler.cpp
+++ b/src/server/game/Handlers/CalendarHandler.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
@@ -35,6 +35,7 @@ Copied events should probably have a new owner
#include "ArenaTeamMgr.h"
#include "CalendarMgr.h"
+#include "CalendarPackets.h"
#include "DatabaseEnv.h"
#include "DisableMgr.h"
#include "GameEventMgr.h"
@@ -184,43 +185,31 @@ void WorldSession::HandleCalendarGetCalendar(WorldPacket& /*recvData*/)
SendPacket(&data);
}
-void WorldSession::HandleCalendarGetEvent(WorldPacket& recvData)
+void WorldSession::HandleCalendarGetEvent(WorldPackets::Calendar::GetEvent& packet)
{
- uint64 eventId;
- recvData >> eventId;
+ LOG_DEBUG("network", "CMSG_CALENDAR_GET_EVENT. Player [{}] Event [{}]", _player->GetGUID().ToString(), packet.EventId);
- LOG_DEBUG("network", "CMSG_CALENDAR_GET_EVENT. Player [{}] Event [{}]", _player->GetGUID().ToString(), eventId);
-
- if (CalendarEvent* calendarEvent = sCalendarMgr->GetEvent(eventId))
+ if (CalendarEvent* calendarEvent = sCalendarMgr->GetEvent(packet.EventId))
sCalendarMgr->SendCalendarEvent(_player->GetGUID(), *calendarEvent, CALENDAR_SENDTYPE_GET);
else
sCalendarMgr->SendCalendarCommandResult(_player->GetGUID(), CALENDAR_ERROR_EVENT_INVALID);
}
-void WorldSession::HandleCalendarGuildFilter(WorldPacket& recvData)
+void WorldSession::HandleCalendarGuildFilter(WorldPackets::Calendar::GuildFilter& packet)
{
LOG_DEBUG("network", "CMSG_CALENDAR_GUILD_FILTER [{}]", _player->GetGUID().ToString());
- uint32 minLevel;
- uint32 maxLevel;
- uint32 minRank;
-
- recvData >> minLevel >> maxLevel >> minRank;
-
if (Guild* guild = sGuildMgr->GetGuildById(_player->GetGuildId()))
- guild->MassInviteToEvent(this, minLevel, maxLevel, minRank);
+ guild->MassInviteToEvent(this, packet.MinimumLevel, packet.MaximumLevel, packet.MinimumRank);
- LOG_DEBUG("network", "CMSG_CALENDAR_GUILD_FILTER: Min level [{}], Max level [{}], Min rank [{}]", minLevel, maxLevel, minRank);
+ LOG_DEBUG("network", "CMSG_CALENDAR_GUILD_FILTER: Min level [{}], Max level [{}], Min rank [{}]", packet.MinimumLevel, packet.MaximumLevel, packet.MinimumRank);
}
-void WorldSession::HandleCalendarArenaTeam(WorldPacket& recvData)
+void WorldSession::HandleCalendarArenaTeam(WorldPackets::Calendar::ArenaTeam& packet)
{
LOG_DEBUG("network", "CMSG_CALENDAR_ARENA_TEAM [{}]", _player->GetGUID().ToString());
- uint32 arenaTeamId;
- recvData >> arenaTeamId;
-
- if (ArenaTeam* team = sArenaTeamMgr->GetArenaTeamById(arenaTeamId))
+ if (ArenaTeam* team = sArenaTeamMgr->GetArenaTeamById(packet.ArenaTeamId))
team->MassInviteToEvent(this);
}
@@ -763,14 +752,11 @@ void WorldSession::HandleCalendarEventModeratorStatus(WorldPacket& recvData)
sCalendarMgr->SendCalendarCommandResult(guid, CALENDAR_ERROR_EVENT_INVALID);
}
-void WorldSession::HandleCalendarComplain(WorldPacket& recvData)
+void WorldSession::HandleCalendarComplain(WorldPackets::Calendar::CalendarComplain& packet)
{
ObjectGuid guid = _player->GetGUID();
- uint64 eventId;
- ObjectGuid complainGUID;
- recvData >> eventId >> complainGUID;
- LOG_DEBUG("network", "CMSG_CALENDAR_COMPLAIN [{}] EventId [{}] guid [{}]", guid.ToString(), eventId, complainGUID.ToString());
+ LOG_DEBUG("network", "CMSG_CALENDAR_COMPLAIN [{}] EventId [{}] guid [{}]", guid.ToString(), packet.EventId, packet.ComplainGuid.ToString());
// what to do with complains?
}
diff --git a/src/server/game/Handlers/ChannelHandler.cpp b/src/server/game/Handlers/ChannelHandler.cpp
index 37c7a34c71..2193daaabe 100644
--- a/src/server/game/Handlers/ChannelHandler.cpp
+++ b/src/server/game/Handlers/ChannelHandler.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/game/Handlers/CharacterHandler.cpp b/src/server/game/Handlers/CharacterHandler.cpp
index 2169cb5316..eeff0d3d64 100644
--- a/src/server/game/Handlers/CharacterHandler.cpp
+++ b/src/server/game/Handlers/CharacterHandler.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
@@ -668,51 +668,46 @@ void WorldSession::HandleCharDeleteOpcode(WorldPacket& recvData)
void WorldSession::HandlePlayerLoginOpcode(WorldPacket& recvData)
{
- m_playerLoading = true;
- ObjectGuid playerGuid;
- recvData >> playerGuid;
+ if (!sWorld->getBoolConfig(CONFIG_REALM_LOGIN_ENABLED))
+ {
+ SendCharLoginFailed(LoginFailureReason::NoWorld);
+ return;
+ }
- if (PlayerLoading() || GetPlayer() != nullptr || !playerGuid.IsPlayer())
+ if (PlayerLoading() || GetPlayer() != nullptr)
{
- // limit player interaction with the world
- if (!sWorld->getBoolConfig(CONFIG_REALM_LOGIN_ENABLED))
- {
- WorldPacket data(SMSG_CHARACTER_LOGIN_FAILED, 1);
- // see LoginFailureReason enum for more reasons
- data << uint8(LoginFailureReason::NoWorld);
- SendPacket(&data);
- return;
- }
+ LOG_ERROR("network", "Player tried to login again, AccountId = {}", GetAccountId());
+ KickPlayer("WorldSession::HandlePlayerLoginOpcode Another client logging in");
+ return;
}
- if (!playerGuid.IsPlayer() || !IsLegitCharacterForAccount(playerGuid))
+ ObjectGuid playerGuid;
+ recvData >> playerGuid;
+
+ if (!IsLegitCharacterForAccount(playerGuid))
{
LOG_ERROR("network", "Account ({}) can't login with that character ({}).", GetAccountId(), playerGuid.ToString());
KickPlayer("Account can't login with this character");
return;
}
- auto SendCharLogin = [&](ResponseCodes result)
- {
- WorldPacket data(SMSG_CHARACTER_LOGIN_FAILED, 1);
- data << uint8(result);
- SendPacket(&data);
- };
-
// pussywizard:
if (WorldSession* sess = sWorldSessionMgr->FindOfflineSessionForCharacterGUID(playerGuid.GetCounter()))
+ {
if (sess->GetAccountId() != GetAccountId())
{
- SendCharLogin(CHAR_LOGIN_DUPLICATE_CHARACTER);
+ SendCharLoginFailed(LoginFailureReason::DuplicateCharacter);
return;
}
+ }
+
// pussywizard:
if (WorldSession* sess = sWorldSessionMgr->FindOfflineSession(GetAccountId()))
{
Player* p = sess->GetPlayer();
if (!p || sess->IsKicked())
{
- SendCharLogin(CHAR_LOGIN_DUPLICATE_CHARACTER);
+ SendCharLoginFailed(LoginFailureReason::DuplicateCharacter);
return;
}
@@ -723,7 +718,7 @@ void WorldSession::HandlePlayerLoginOpcode(WorldPacket& recvData)
// pussywizard: players stay ingame no matter what (prevent abuse), but allow to turn it off to stop crashing
if (!sWorld->getBoolConfig(CONFIG_ENABLE_LOGIN_AFTER_DC))
{
- SendCharLogin(CHAR_LOGIN_DUPLICATE_CHARACTER);
+ SendCharLoginFailed(LoginFailureReason::DuplicateCharacter);
return;
}
@@ -765,7 +760,7 @@ void WorldSession::HandlePlayerLoginOpcode(WorldPacket& recvData)
}
if (!p->FindMap() || !p->IsInWorld() || sess->IsKicked())
{
- SendCharLogin(CHAR_LOGIN_DUPLICATE_CHARACTER);
+ SendCharLoginFailed(LoginFailureReason::DuplicateCharacter);
return;
}
@@ -781,11 +776,9 @@ void WorldSession::HandlePlayerLoginOpcode(WorldPacket& recvData)
std::shared_ptr<LoginQueryHolder> holder = std::make_shared<LoginQueryHolder>(GetAccountId(), playerGuid);
if (!holder->Initialize())
- {
- m_playerLoading = false;
return;
- }
+ m_playerLoading = true;
AddQueryHolderCallback(CharacterDatabase.DelayQueryHolder(holder)).AfterComplete([this](SQLQueryHolderBase const& holder)
{
HandlePlayerLoginFromDB(static_cast<LoginQueryHolder const&>(holder));
@@ -957,7 +950,6 @@ void WorldSession::HandlePlayerLoginFromDB(LoginQueryHolder const& holder)
pCurrChar->CastSpell(pCurrChar, 20584, true, 0); // auras SPELL_AURA_INCREASE_SPEED(+speed in wisp form), SPELL_AURA_INCREASE_SWIM_SPEED(+swim speed in wisp form), SPELL_AURA_TRANSFORM (to wisp form)
pCurrChar->CastSpell(pCurrChar, 8326, true, 0); // auras SPELL_AURA_GHOST, SPELL_AURA_INCREASE_SPEED(why?), SPELL_AURA_INCREASE_SWIM_SPEED(why?)
- pCurrChar->SetMovement(MOVE_WATER_WALK);
}
// Set FFA PvP for non GM in non-rest mode
@@ -1171,15 +1163,23 @@ void WorldSession::HandlePlayerLoginToCharInWorld(Player* pCurrChar)
SendPacket(&data);
// Xinef: fix possible problem with flag UNIT_FLAG_STUNNED added during logout
- if (!pCurrChar->HasUnitState(UNIT_STATE_STUNNED))
+ if (pCurrChar->HasUnitState(UNIT_STATE_LOGOUT_TIMER))
+ {
+ pCurrChar->SetRooted(false, true, true);
pCurrChar->RemoveUnitFlag(UNIT_FLAG_STUNNED);
+ }
+
+ if (pCurrChar->GetPendingFlightChange() <= pCurrChar->GetMapChangeOrderCounter())
+ {
+ if (!pCurrChar->HasIncreaseMountedFlightSpeedAura() && !pCurrChar->HasFlyAura())
+ pCurrChar->m_movementInfo.RemoveMovementFlag(MOVEMENTFLAG_CAN_FLY);
+ }
pCurrChar->SendInitialPacketsBeforeAddToMap();
// necessary actions from AddPlayerToMap:
pCurrChar->GetMap()->SendInitTransports(pCurrChar);
pCurrChar->GetMap()->SendInitSelf(pCurrChar);
- pCurrChar->GetMap()->SendZoneDynamicInfo(pCurrChar);
// If we are logging into an existing player, simply clear visibility references
// so player will receive a fresh list of new objects on the next vis update.
@@ -1762,9 +1762,21 @@ void WorldSession::HandleEquipmentSetSave(WorldPacket& recvData)
std::string name;
recvData >> name;
+ if (name.length() > 16) // Client limitation
+ {
+ LOG_ERROR("entities.player.cheat", "Character GUID {} tried to create equipment set {} with too long a name!", _player->GetGUID().ToString(), setGuid);
+ return;
+ }
+
std::string iconName;
recvData >> iconName;
+ if (iconName.length() > 100) // DB limitation
+ {
+ LOG_ERROR("entities.player.cheat", "Character GUID {} tried to create equipment set {} with too long an icon name!", _player->GetGUID().ToString(), setGuid);
+ return;
+ }
+
EquipmentSet eqSet;
eqSet.Guid = setGuid;
@@ -2576,6 +2588,13 @@ void WorldSession::SendCharDelete(ResponseCodes result)
SendPacket(&data);
}
+void WorldSession::SendCharLoginFailed(LoginFailureReason reason)
+{
+ WorldPacket data(SMSG_CHARACTER_LOGIN_FAILED, 1);
+ data << uint8(reason);
+ SendPacket(&data);
+};
+
void WorldSession::SendCharRename(ResponseCodes result, CharacterRenameInfo const* renameInfo)
{
WorldPacket data(SMSG_CHAR_RENAME, 1 + 8 + renameInfo->Name.size() + 1);
diff --git a/src/server/game/Handlers/ChatHandler.cpp b/src/server/game/Handlers/ChatHandler.cpp
index 04337cd9c8..f191dc05ae 100644
--- a/src/server/game/Handlers/ChatHandler.cpp
+++ b/src/server/game/Handlers/ChatHandler.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
@@ -434,11 +434,7 @@ void WorldSession::HandleMessagechatOpcode(WorldPacket& recvData)
return;
if (!sScriptMgr->OnPlayerCanUseChat(GetPlayer(), type, lang, msg, group))
- {
return;
- }
-
- sScriptMgr->OnPlayerChat(GetPlayer(), type, lang, msg, group);
WorldPacket data;
ChatHandler::BuildChatPacket(data, ChatMsg(type), Language(lang), sender, nullptr, msg);
@@ -452,11 +448,7 @@ void WorldSession::HandleMessagechatOpcode(WorldPacket& recvData)
if (Guild* guild = sGuildMgr->GetGuildById(GetPlayer()->GetGuildId()))
{
if (!sScriptMgr->OnPlayerCanUseChat(GetPlayer(), type, lang, msg, guild))
- {
return;
- }
-
- sScriptMgr->OnPlayerChat(GetPlayer(), type, lang, msg, guild);
guild->BroadcastToGuild(this, false, msg, lang == LANG_ADDON ? LANG_ADDON : LANG_UNIVERSAL);
}
@@ -470,11 +462,7 @@ void WorldSession::HandleMessagechatOpcode(WorldPacket& recvData)
if (Guild* guild = sGuildMgr->GetGuildById(GetPlayer()->GetGuildId()))
{
if (!sScriptMgr->OnPlayerCanUseChat(GetPlayer(), type, lang, msg, guild))
- {
return;
- }
-
- sScriptMgr->OnPlayerChat(GetPlayer(), type, lang, msg, guild);
guild->BroadcastToGuild(this, true, msg, lang == LANG_ADDON ? LANG_ADDON : LANG_UNIVERSAL);
}
@@ -493,11 +481,7 @@ void WorldSession::HandleMessagechatOpcode(WorldPacket& recvData)
}
if (!sScriptMgr->OnPlayerCanUseChat(GetPlayer(), type, lang, msg, group))
- {
return;
- }
-
- sScriptMgr->OnPlayerChat(GetPlayer(), type, lang, msg, group);
WorldPacket data;
ChatHandler::BuildChatPacket(data, CHAT_MSG_RAID, Language(lang), sender, nullptr, msg);
@@ -516,11 +500,7 @@ void WorldSession::HandleMessagechatOpcode(WorldPacket& recvData)
}
if (!sScriptMgr->OnPlayerCanUseChat(GetPlayer(), type, lang, msg, group))
- {
return;
- }
-
- sScriptMgr->OnPlayerChat(GetPlayer(), type, lang, msg, group);
WorldPacket data;
ChatHandler::BuildChatPacket(data, CHAT_MSG_RAID_LEADER, Language(lang), sender, nullptr, msg);
@@ -534,11 +514,7 @@ void WorldSession::HandleMessagechatOpcode(WorldPacket& recvData)
return;
if (!sScriptMgr->OnPlayerCanUseChat(GetPlayer(), type, lang, msg, group))
- {
return;
- }
-
- sScriptMgr->OnPlayerChat(GetPlayer(), type, lang, msg, group);
// In battleground, raid warning is sent only to players in battleground - code is ok
WorldPacket data;
@@ -554,11 +530,7 @@ void WorldSession::HandleMessagechatOpcode(WorldPacket& recvData)
return;
if (!sScriptMgr->OnPlayerCanUseChat(GetPlayer(), type, lang, msg, group))
- {
return;
- }
-
- sScriptMgr->OnPlayerChat(GetPlayer(), type, lang, msg, group);
WorldPacket data;
ChatHandler::BuildChatPacket(data, CHAT_MSG_BATTLEGROUND, Language(lang), sender, nullptr, msg);
@@ -573,11 +545,7 @@ void WorldSession::HandleMessagechatOpcode(WorldPacket& recvData)
return;
if (!sScriptMgr->OnPlayerCanUseChat(GetPlayer(), type, lang, msg, group))
- {
return;
- }
-
- sScriptMgr->OnPlayerChat(GetPlayer(), type, lang, msg, group);
WorldPacket data;
ChatHandler::BuildChatPacket(data, CHAT_MSG_BATTLEGROUND_LEADER, Language(lang), sender, nullptr, msg);
@@ -600,11 +568,7 @@ void WorldSession::HandleMessagechatOpcode(WorldPacket& recvData)
if (Channel* chn = cMgr->GetChannel(channel, sender))
{
if (!sScriptMgr->OnPlayerCanUseChat(sender, type, lang, msg, chn))
- {
return;
- }
-
- sScriptMgr->OnPlayerChat(sender, type, lang, msg, chn);
chn->Say(sender->GetGUID(), msg.c_str(), lang);
}
@@ -633,11 +597,7 @@ void WorldSession::HandleMessagechatOpcode(WorldPacket& recvData)
}
if (!sScriptMgr->OnPlayerCanUseChat(sender, type, lang, msg))
- {
return;
- }
-
- sScriptMgr->OnPlayerChat(sender, type, lang, msg);
}
break;
}
@@ -661,11 +621,7 @@ void WorldSession::HandleMessagechatOpcode(WorldPacket& recvData)
}
if (!sScriptMgr->OnPlayerCanUseChat(sender, type, lang, msg))
- {
return;
- }
-
- sScriptMgr->OnPlayerChat(sender, type, lang, msg);
break;
}
@@ -803,7 +759,7 @@ void WorldSession::HandleChatIgnoredOpcode(WorldPacket& recvData)
WorldPacket data;
ChatHandler::BuildChatPacket(data, CHAT_MSG_IGNORED, LANG_UNIVERSAL, _player, _player, GetPlayer()->GetName());
- player->GetSession()->SendPacket(&data);
+ player->SendDirectMessage(&data);
}
void WorldSession::HandleChannelDeclineInvite(WorldPacket& recvPacket)
diff --git a/src/server/game/Handlers/CombatHandler.cpp b/src/server/game/Handlers/CombatHandler.cpp
index 4ea3cb00e2..7f945eb175 100644
--- a/src/server/game/Handlers/CombatHandler.cpp
+++ b/src/server/game/Handlers/CombatHandler.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/game/Handlers/DuelHandler.cpp b/src/server/game/Handlers/DuelHandler.cpp
index 88a3d7949b..ab34ee98bc 100644
--- a/src/server/game/Handlers/DuelHandler.cpp
+++ b/src/server/game/Handlers/DuelHandler.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/game/Handlers/GroupHandler.cpp b/src/server/game/Handlers/GroupHandler.cpp
index c8f14779be..179a4469a8 100644
--- a/src/server/game/Handlers/GroupHandler.cpp
+++ b/src/server/game/Handlers/GroupHandler.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
@@ -149,7 +149,7 @@ void WorldSession::HandleGroupInviteOpcode(WorldPacket& recvData)
data << uint32(0); // unk
data << uint8(0); // count
data << uint32(0); // unk
- invitedPlayer->GetSession()->SendPacket(&data);
+ invitedPlayer->SendDirectMessage(&data);
}
return;
@@ -209,7 +209,7 @@ void WorldSession::HandleGroupInviteOpcode(WorldPacket& recvData)
data << uint32(0); // unk
data << uint8(0); // count
data << uint32(0); // unk
- invitedPlayer->GetSession()->SendPacket(&data);
+ invitedPlayer->SendDirectMessage(&data);
SendPartyResult(PARTY_OP_INVITE, membername, ERR_PARTY_RESULT_OK);
}
@@ -292,7 +292,7 @@ void WorldSession::HandleGroupDeclineOpcode(WorldPacket& /*recvData*/)
// report
WorldPacket data(SMSG_GROUP_DECLINE, GetPlayer()->GetName().length());
data << GetPlayer()->GetName();
- leader->GetSession()->SendPacket(&data);
+ leader->SendDirectMessage(&data);
}
void WorldSession::HandleGroupUninviteGuidOpcode(WorldPacket& recvData)
diff --git a/src/server/game/Handlers/GuildHandler.cpp b/src/server/game/Handlers/GuildHandler.cpp
index eac43c69b5..35134009dd 100644
--- a/src/server/game/Handlers/GuildHandler.cpp
+++ b/src/server/game/Handlers/GuildHandler.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/game/Handlers/ItemHandler.cpp b/src/server/game/Handlers/ItemHandler.cpp
index 880440a3dc..9fc5643d0a 100644
--- a/src/server/game/Handlers/ItemHandler.cpp
+++ b/src/server/game/Handlers/ItemHandler.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
@@ -256,8 +256,8 @@ void WorldSession::HandleAutoEquipItemOpcode(WorldPackets::Item::AutoEquipItem&
}
// now do moves, remove...
- _player->RemoveItem(dstbag, dstslot, true, true);
- _player->RemoveItem(packet.SourceBag, packet.SourceSlot, true, true);
+ _player->RemoveItem(dstbag, dstslot, true);
+ _player->RemoveItem(packet.SourceBag, packet.SourceSlot, true);
// add to dest
_player->EquipItem(dest, pSrcItem, true);
diff --git a/src/server/game/Handlers/LFGHandler.cpp b/src/server/game/Handlers/LFGHandler.cpp
index 4a2fbbf1b5..934f6b84c6 100644
--- a/src/server/game/Handlers/LFGHandler.cpp
+++ b/src/server/game/Handlers/LFGHandler.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/game/Handlers/LootHandler.cpp b/src/server/game/Handlers/LootHandler.cpp
index f1b00066b5..50636f27c7 100644
--- a/src/server/game/Handlers/LootHandler.cpp
+++ b/src/server/game/Handlers/LootHandler.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
@@ -206,7 +206,7 @@ void WorldSession::HandleLootMoneyOpcode(WorldPacket& /*recvData*/)
WorldPacket data(SMSG_LOOT_MONEY_NOTIFY, 4 + 1);
data << uint32(goldPerPlayer);
data << uint8(playersNear.size() > 1 ? 0 : 1); // Controls the text displayed in chat. 0 is "Your share is..." and 1 is "You loot..."
- (*i)->GetSession()->SendPacket(&data);
+ (*i)->SendDirectMessage(&data);
}
}
else
diff --git a/src/server/game/Handlers/MailHandler.cpp b/src/server/game/Handlers/MailHandler.cpp
index 76cb7fc0d1..bcf3701625 100644
--- a/src/server/game/Handlers/MailHandler.cpp
+++ b/src/server/game/Handlers/MailHandler.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/game/Handlers/MiscHandler.cpp b/src/server/game/Handlers/MiscHandler.cpp
index 942eae9c54..c6485d813c 100644
--- a/src/server/game/Handlers/MiscHandler.cpp
+++ b/src/server/game/Handlers/MiscHandler.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
@@ -468,7 +468,7 @@ void WorldSession::HandleLogoutRequestOpcode(WorldPackets::Character::LogoutRequ
GetPlayer()->SetStandState(UNIT_STAND_STATE_SIT);
}
- GetPlayer()->SetRooted(true);
+ GetPlayer()->SetRooted(true, true, true);
GetPlayer()->SetUnitFlag(UNIT_FLAG_STUNNED);
}
@@ -492,7 +492,7 @@ void WorldSession::HandleLogoutCancelOpcode(WorldPackets::Character::LogoutCance
// not remove flags if can't free move - its not set in Logout request code.
if (GetPlayer()->CanFreeMove())
{
- GetPlayer()->SetRooted(false);
+ GetPlayer()->SetRooted(false, true, true);
GetPlayer()->SetStandState(UNIT_STAND_STATE_STAND);
GetPlayer()->RemoveUnitFlag(UNIT_FLAG_STUNNED);
@@ -656,7 +656,8 @@ void WorldSession::HandleReclaimCorpseOpcode(WorldPacket& recv_data)
if (time_t(corpse->GetGhostTime() + _player->GetCorpseReclaimDelay(corpse->GetType() == CORPSE_RESURRECTABLE_PVP)) > time_t(GameTime::GetGameTime().count()))
return;
- if (!corpse->IsWithinDistInMap(_player, CORPSE_RECLAIM_RADIUS, true))
+ // skip phase check
+ if (!corpse->IsInMap(_player) || !corpse->IsWithinDist(_player, CORPSE_RECLAIM_RADIUS, true))
return;
// resurrect
@@ -949,12 +950,6 @@ void WorldSession::HandleNextCinematicCamera(WorldPacket& /*recv_data*/)
GetPlayer()->GetCinematicMgr()->BeginCinematic();
}
-void WorldSession::HandleFeatherFallAck(WorldPacket& recv_data)
-{
- // no used
- recv_data.rfinish(); // prevent warnings spam
-}
-
void WorldSession::HandleSetActionBarToggles(WorldPacket& recv_data)
{
uint8 ActionBar;
@@ -1144,45 +1139,18 @@ void WorldSession::HandleWhoisOpcode(WorldPacket& recv_data)
LOG_DEBUG("network", "Received whois command from player {} for character {}", GetPlayer()->GetName(), charname);
}
-void WorldSession::HandleComplainOpcode(WorldPacket& recv_data)
+void WorldSession::HandleComplainOpcode(WorldPackets::Misc::Complain& packet)
{
LOG_DEBUG("network", "WORLD: CMSG_COMPLAIN");
- uint8 spam_type; // 0 - mail, 1 - chat
- ObjectGuid spammer_guid;
- uint32 unk1 = 0;
- uint32 unk2 = 0;
- uint32 unk3 = 0;
- uint32 unk4 = 0;
- std::string description = "";
- recv_data >> spam_type; // unk 0x01 const, may be spam type (mail/chat)
- recv_data >> spammer_guid; // player guid
- switch (spam_type)
- {
- case 0:
- recv_data >> unk1; // const 0
- recv_data >> unk2; // probably mail id
- recv_data >> unk3; // const 0
- break;
- case 1:
- recv_data >> unk1; // probably language
- recv_data >> unk2; // message type?
- recv_data >> unk3; // probably channel id
- recv_data >> unk4; // unk random value
- recv_data >> description; // spam description string (messagetype, channel name, player name, message)
- break;
- }
-
// NOTE: all chat messages from this spammer automatically ignored by spam reporter until logout in case chat spam.
// if it's mail spam - ALL mails from this spammer automatically removed by client
// Complaint Received message
- WorldPacket data(SMSG_COMPLAIN_RESULT, 1);
- data << uint8(0);
- SendPacket(&data);
+ SendPacket(WorldPackets::Misc::ComplainResult().Write());
LOG_DEBUG("network", "REPORT SPAM: type {}, {}, unk1 {}, unk2 {}, unk3 {}, unk4 {}, message {}",
- spam_type, spammer_guid.ToString(), unk1, unk2, unk3, unk4, description);
+ packet.SpamType, packet.SpammerGuid.ToString(), packet.Unk1, packet.Unk2, packet.Unk3, packet.Unk4, packet.Description);
}
void WorldSession::HandleRealmSplitOpcode(WorldPacket& recv_data)
@@ -1519,12 +1487,15 @@ void WorldSession::HandleCancelMountAuraOpcode(WorldPacket& /*recv_data*/)
_player->RemoveAurasByType(SPELL_AURA_MOUNTED);
}
-void WorldSession::HandleMoveSetCanFlyAckOpcode(WorldPacket& recv_data)
+void WorldSession::HandleMoveFlagChangeOpcode(WorldPacket& recv_data)
{
- // fly mode on/off
- LOG_DEBUG("network", "WORLD: CMSG_MOVE_SET_CAN_FLY_ACK");
+ LOG_DEBUG("network", "WORLD: {}", GetOpcodeNameForLogging((Opcodes)recv_data.GetOpcode()));
+
+ Opcodes opcode = (Opcodes)recv_data.GetOpcode();
ObjectGuid guid;
+ uint32 counter;
+ uint32 isApplied;
recv_data >> guid.ReadAsPacked();
if (!_player)
@@ -1533,17 +1504,51 @@ void WorldSession::HandleMoveSetCanFlyAckOpcode(WorldPacket& recv_data)
return;
}
- recv_data.read_skip<uint32>(); // unk
+ recv_data >> counter;
MovementInfo movementInfo;
movementInfo.guid = guid;
ReadMovementInfo(recv_data, &movementInfo);
- recv_data.read_skip<float>(); // unk2
+ if (opcode != CMSG_MOVE_GRAVITY_DISABLE_ACK && opcode != CMSG_MOVE_GRAVITY_ENABLE_ACK)
+ recv_data >> isApplied;
sScriptMgr->AnticheatSetCanFlybyServer(_player, movementInfo.HasMovementFlag(MOVEMENTFLAG_CAN_FLY));
- _player->m_mover->m_movementInfo.flags = movementInfo.GetMovementFlags();
+ Unit* mover = _player->m_mover;
+ Player* plrMover = mover->ToPlayer();
+
+ mover->m_movementInfo.flags = movementInfo.GetMovementFlags();
+
+ // old map - async processing, ignore
+ if (counter <= _player->GetMapChangeOrderCounter())
+ return;
+
+ if (!ProcessMovementInfo(movementInfo, mover, plrMover, recv_data))
+ {
+ recv_data.rfinish(); // prevent warnings spam
+ return;
+ }
+
+ if (_player->GetPendingFlightChange() == counter && opcode == CMSG_MOVE_SET_CAN_FLY_ACK)
+ _player->SetPendingFlightChange(false);
+
+ Opcodes response;
+
+ switch (recv_data.GetOpcode())
+ {
+ case CMSG_MOVE_HOVER_ACK: response = MSG_MOVE_HOVER; break;
+ 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;
+ }
+
+ WorldPacket data(response, 8);
+ WriteMovementInfo(&data, &movementInfo);
+ _player->m_mover->SendMessageToSet(&data, _player);
}
void WorldSession::HandleRequestPetInfo(WorldPackets::Pet::RequestPetInfo& /*packet*/)
diff --git a/src/server/game/Handlers/MovementHandler.cpp b/src/server/game/Handlers/MovementHandler.cpp
index 77b5bb43bd..fb40ce36ac 100644
--- a/src/server/game/Handlers/MovementHandler.cpp
+++ b/src/server/game/Handlers/MovementHandler.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
@@ -105,6 +105,13 @@ void WorldSession::HandleMoveWorldportAck()
GetPlayer()->UpdatePositionData();
GetPlayer()->SendInitialPacketsBeforeAddToMap();
+
+ if (GetPlayer()->GetPendingFlightChange() <= GetPlayer()->GetMapChangeOrderCounter())
+ {
+ if (!GetPlayer()->HasIncreaseMountedFlightSpeedAura() && !GetPlayer()->HasFlyAura())
+ GetPlayer()->m_movementInfo.RemoveMovementFlag(MOVEMENTFLAG_CAN_FLY);
+ }
+
if (!GetPlayer()->GetMap()->AddPlayerToMap(GetPlayer()))
{
LOG_ERROR("network.opcode", "WORLD: failed to teleport player {} ({}) to map {} because of unknown reason!",
@@ -292,6 +299,8 @@ void WorldSession::HandleMoveTeleportAck(WorldPacket& recvData)
plMover->UpdatePosition(dest, true);
+ plMover->SetFallInformation(GameTime::GetGameTime().count(), dest.GetPositionZ());
+
// xinef: teleport pets if they are not unsummoned
if (Pet* pet = plMover->GetPet())
{
@@ -370,15 +379,139 @@ void WorldSession::HandleMovementOpcodes(WorldPacket& recvData)
movementInfo.guid = guid;
ReadMovementInfo(recvData, &movementInfo);
- // Stop emote on move
- if (Player* plrMover = mover->ToPlayer())
+ if (!ProcessMovementInfo(movementInfo, mover, plrMover, recvData))
+ {
+ recvData.rfinish(); // prevent warnings spam
+ return;
+ }
+
+ if (opcode == CMSG_MOVE_FALL_RESET || opcode == CMSG_MOVE_CHNG_TRANSPORT)
+ return;
+
+ /* process position-change */
+ WorldPacket data(opcode, recvData.size());
+ WriteMovementInfo(&data, &movementInfo);
+ mover->SendMessageToSet(&data, _player);
+}
+
+void WorldSession::SynchronizeMovement(MovementInfo& movementInfo)
+{
+ int64 movementTime = (int64)movementInfo.time + _timeSyncClockDelta;
+ if (_timeSyncClockDelta == 0 || movementTime < 0 || movementTime > 0xFFFFFFFF)
+ {
+ LOG_INFO("misc", "The computed movement time using clockDelta is erronous. Using fallback instead");
+ movementInfo.time = getMSTime();
+ }
+ else
+ {
+ movementInfo.time = (uint32)movementTime;
+ }
+}
+
+void WorldSession::HandleMoverRelocation(MovementInfo& movementInfo, Unit* mover)
+{
+ SynchronizeMovement(movementInfo);
+
+ mover->UpdatePosition(movementInfo.pos);
+ mover->m_movementInfo = movementInfo;
+
+ if (mover->m_movementInfo.HasMovementFlag(MOVEMENTFLAG_ONTRANSPORT))
+ {
+ // if we boarded a transport, add us to it (generalized for both players and creatures)
+ if (!mover->GetTransport())
+ {
+ if (Transport* transport = mover->GetMap()->GetTransport(movementInfo.transport.guid))
+ {
+ mover->SetTransport(transport);
+ transport->AddPassenger(mover);
+ }
+ }
+ else if (mover->GetTransport()->GetGUID() != movementInfo.transport.guid)
+ {
+ // Switching transports
+ bool foundNewTransport = false;
+ mover->GetTransport()->RemovePassenger(mover);
+ if (Transport* transport = mover->GetMap()->GetTransport(movementInfo.transport.guid))
+ {
+ foundNewTransport = true;
+ mover->SetTransport(transport);
+ transport->AddPassenger(mover);
+ }
+
+ if (!foundNewTransport)
+ {
+ mover->SetTransport(nullptr);
+ movementInfo.transport.Reset();
+ }
+ }
+
+ if (!mover->GetTransport() && !mover->GetVehicle())
+ {
+ GameObject* go = mover->GetMap()->GetGameObject(movementInfo.transport.guid);
+ if (!go || go->GetGoType() != GAMEOBJECT_TYPE_TRANSPORT)
+ movementInfo.RemoveMovementFlag(MOVEMENTFLAG_ONTRANSPORT);
+ }
+ }
+ else
{
- if (plrMover->GetUInt32Value(UNIT_NPC_EMOTESTATE) != EMOTE_ONESHOT_NONE && movementInfo.HasMovementFlag(MOVEMENTFLAG_MASK_MOVING))
+ // if we were on a transport, leave (handles both players and creatures)
+ if (Transport* transport = mover->GetTransport())
{
- plrMover->SetUInt32Value(UNIT_NPC_EMOTESTATE, EMOTE_ONESHOT_NONE);
+ if (mover->IsPlayer())
+ sScriptMgr->AnticheatSetUnderACKmount(mover->ToPlayer()); // just for safe
+
+ transport->RemovePassenger(mover);
+ mover->SetTransport(nullptr);
+ movementInfo.transport.Reset();
}
}
+ // Some vehicles allow the passenger to turn by himself
+ if (Vehicle* vehicle = mover->GetVehicle())
+ {
+ if (VehicleSeatEntry const* seat = vehicle->GetSeatForPassenger(mover))
+ {
+ if (seat->m_flags & VEHICLE_SEAT_FLAG_ALLOW_TURNING && movementInfo.pos.GetOrientation() != mover->GetOrientation())
+ {
+ mover->SetOrientation(movementInfo.pos.GetOrientation());
+ mover->RemoveAurasWithInterruptFlags(AURA_INTERRUPT_FLAG_TURNING);
+ }
+ }
+ }
+
+ if (Player* plrMover = mover->ToPlayer()) // nothing is charmed, or player charmed
+ {
+ if (plrMover->IsSitState() && (movementInfo.flags & (MOVEMENTFLAG_MASK_MOVING | MOVEMENTFLAG_MASK_TURNING)))
+ plrMover->SetStandState(UNIT_STAND_STATE_STAND);
+
+ if (movementInfo.pos.GetPositionZ() < plrMover->GetMap()->GetMinHeight(movementInfo.pos.GetPositionX(), movementInfo.pos.GetPositionY()))
+ {
+ if (!plrMover->GetBattleground() || !plrMover->GetBattleground()->HandlePlayerUnderMap(_player))
+ {
+ if (plrMover->IsAlive())
+ {
+ plrMover->SetPlayerFlag(PLAYER_FLAGS_IS_OUT_OF_BOUNDS);
+ plrMover->EnvironmentalDamage(DAMAGE_FALL_TO_VOID, GetPlayer()->GetMaxHealth());
+ // player can be alive if GM
+ if (plrMover->IsAlive())
+ plrMover->KillPlayer();
+ }
+ else if (!plrMover->HasPlayerFlag(PLAYER_FLAGS_IS_OUT_OF_BOUNDS))
+ {
+ GraveyardStruct const* grave = sGraveyard->GetClosestGraveyard(plrMover, plrMover->GetTeamId());
+ if (grave)
+ {
+ plrMover->TeleportTo(grave->Map, grave->x, grave->y, grave->z, plrMover->GetOrientation());
+ plrMover->Relocate(grave->x, grave->y, grave->z, plrMover->GetOrientation());
+ }
+ }
+ }
+ }
+ }
+}
+
+bool WorldSession::VerifyMovementInfo(MovementInfo const& movementInfo, Player* plrMover, Unit* mover, Opcodes opcode) const
+{
if (!movementInfo.pos.IsPositionValid())
{
if (plrMover)
@@ -386,14 +519,13 @@ void WorldSession::HandleMovementOpcodes(WorldPacket& recvData)
sScriptMgr->AnticheatUpdateMovementInfo(plrMover, movementInfo);
}
- recvData.rfinish(); // prevent warnings spam
- return;
+ return false;
}
if (!mover->movespline->Finalized())
{
- recvData.rfinish(); // prevent warnings spam
- return;
+ if (!mover->movespline->isBoarding() || (opcode != CMSG_FORCE_MOVE_UNROOT_ACK && opcode != CMSG_FORCE_MOVE_ROOT_ACK))
+ return false;
}
// Xinef: do not allow to move with UNIT_FLAG_DISABLE_MOVE
@@ -406,18 +538,28 @@ void WorldSession::HandleMovementOpcodes(WorldPacket& recvData)
{
sScriptMgr->AnticheatUpdateMovementInfo(plrMover, movementInfo);
}
- return;
+ return false;
}
- movementInfo.pos.Relocate(mover->GetPositionX(), mover->GetPositionY(), mover->GetPositionZ());
+ }
- if (mover->IsCreature())
+ bool jumpopcode = false;
+ if (opcode == MSG_MOVE_JUMP)
+ {
+ jumpopcode = true;
+ if (plrMover && !sScriptMgr->AnticheatHandleDoubleJump(plrMover, mover))
{
- movementInfo.transport.guid = mover->m_movementInfo.transport.guid;
- movementInfo.transport.pos.Relocate(mover->m_movementInfo.transport.pos.GetPositionX(), mover->m_movementInfo.transport.pos.GetPositionY(), mover->m_movementInfo.transport.pos.GetPositionZ());
- movementInfo.transport.seat = mover->m_movementInfo.transport.seat;
+ plrMover->GetSession()->KickPlayer();
+ return false;
}
}
+ /* start some hack detection */
+ if (plrMover && !sScriptMgr->AnticheatCheckMovementInfo(plrMover, movementInfo, mover, jumpopcode))
+ {
+ plrMover->GetSession()->KickPlayer();
+ return false;
+ }
+
if (movementInfo.HasMovementFlag(MOVEMENTFLAG_ONTRANSPORT))
{
// We were teleported, skip packets that were broadcast before teleport
@@ -428,68 +570,45 @@ void WorldSession::HandleMovementOpcodes(WorldPacket& recvData)
sScriptMgr->AnticheatUpdateMovementInfo(plrMover, movementInfo);
//LOG_INFO("anticheat", "MovementHandler:: 2 We were teleported, skip packets that were broadcast before teleport");
}
- recvData.rfinish(); // prevent warnings spam
- return;
+ return false;
}
if (!Acore::IsValidMapCoord(movementInfo.pos.GetPositionX() + movementInfo.transport.pos.GetPositionX(), movementInfo.pos.GetPositionY() + movementInfo.transport.pos.GetPositionY(),
- movementInfo.pos.GetPositionZ() + movementInfo.transport.pos.GetPositionZ(), movementInfo.pos.GetOrientation() + movementInfo.transport.pos.GetOrientation()))
+ movementInfo.pos.GetPositionZ() + movementInfo.transport.pos.GetPositionZ(), movementInfo.pos.GetOrientation() + movementInfo.transport.pos.GetOrientation()))
{
if (plrMover)
{
sScriptMgr->AnticheatUpdateMovementInfo(plrMover, movementInfo);
}
- recvData.rfinish(); // prevent warnings spam
- return;
+ return false;
}
+ }
- // if we boarded a transport, add us to it
- if (plrMover)
- {
- if (!plrMover->GetTransport())
- {
- if (Transport* transport = plrMover->GetMap()->GetTransport(movementInfo.transport.guid))
- {
- plrMover->m_transport = transport;
- transport->AddPassenger(plrMover);
- }
- }
- else if (plrMover->GetTransport()->GetGUID() != movementInfo.transport.guid)
- {
- bool foundNewTransport = false;
- plrMover->m_transport->RemovePassenger(plrMover);
- if (Transport* transport = plrMover->GetMap()->GetTransport(movementInfo.transport.guid))
- {
- foundNewTransport = true;
- plrMover->m_transport = transport;
- transport->AddPassenger(plrMover);
- }
+ // rooted mover sent packet without root or moving AND root - ignore, due to client crash possibility
+ if (opcode != CMSG_FORCE_MOVE_UNROOT_ACK)
+ if (mover->IsRooted() && (!movementInfo.HasMovementFlag(MOVEMENTFLAG_ROOT) || movementInfo.HasMovementFlag(MOVEMENTFLAG_MASK_MOVING)))
+ return false;
- if (!foundNewTransport)
- {
- plrMover->m_transport = nullptr;
- movementInfo.transport.Reset();
- }
- }
- }
+ return true;
+}
- if (!mover->GetTransport() && !mover->GetVehicle())
- {
- GameObject* go = mover->GetMap()->GetGameObject(movementInfo.transport.guid);
- if (!go || go->GetGoType() != GAMEOBJECT_TYPE_TRANSPORT)
- {
- movementInfo.RemoveMovementFlag(MOVEMENTFLAG_ONTRANSPORT);
- }
- }
- }
- else if (plrMover && plrMover->GetTransport()) // if we were on a transport, leave
+bool WorldSession::ProcessMovementInfo(MovementInfo& movementInfo, Unit* mover, Player* plrMover, WorldPacket& recvData)
+{
+ Opcodes opcode = (Opcodes)recvData.GetOpcode();
+ if (!VerifyMovementInfo(movementInfo, plrMover, mover, opcode))
+ return false;
+
+ if (mover->HasUnitFlag(UNIT_FLAG_DISABLE_MOVE))
{
- sScriptMgr->AnticheatSetUnderACKmount(plrMover); // just for safe
+ movementInfo.pos.Relocate(mover->GetPositionX(), mover->GetPositionY(), mover->GetPositionZ());
- plrMover->m_transport->RemovePassenger(plrMover);
- plrMover->m_transport = nullptr;
- movementInfo.transport.Reset();
+ if (mover->IsCreature())
+ {
+ movementInfo.transport.guid = mover->m_movementInfo.transport.guid;
+ movementInfo.transport.pos.Relocate(mover->m_movementInfo.transport.pos.GetPositionX(), mover->m_movementInfo.transport.pos.GetPositionY(), mover->m_movementInfo.transport.pos.GetPositionZ());
+ movementInfo.transport.seat = mover->m_movementInfo.transport.seat;
+ }
}
// fall damage generation (ignore in flight case that can be triggered also at lags in moment teleportation to another map).
@@ -523,89 +642,19 @@ void WorldSession::HandleMovementOpcodes(WorldPacket& recvData)
sScriptMgr->OnPlayerMove(plrMover, movementInfo, opcode);
}
- bool jumpopcode = false;
- if (opcode == MSG_MOVE_JUMP)
- {
- jumpopcode = true;
- if (plrMover && !sScriptMgr->AnticheatHandleDoubleJump(plrMover, mover))
- {
- plrMover->GetSession()->KickPlayer();
- return;
- }
- }
-
- /* start some hack detection */
- if (plrMover && !sScriptMgr->AnticheatCheckMovementInfo(plrMover, movementInfo, mover, jumpopcode))
- {
- plrMover->GetSession()->KickPlayer();
- return;
- }
-
- /* process position-change */
- WorldPacket data(opcode, recvData.size());
- int64 movementTime = (int64)movementInfo.time + _timeSyncClockDelta;
- if (_timeSyncClockDelta == 0 || movementTime < 0 || movementTime > 0xFFFFFFFF)
- {
- LOG_INFO("misc", "The computed movement time using clockDelta is erronous. Using fallback instead");
- movementInfo.time = getMSTime();
- }
- else
+ if (movementInfo.GetMovementFlags() & MOVEMENTFLAG_MASK_MOVING_OR_TURN)
{
- movementInfo.time = (uint32) movementTime;
+ if (mover->IsStandState())
+ mover->SetStandState(UNIT_STAND_STATE_STAND);
+ mover->SetUInt32Value(UNIT_NPC_EMOTESTATE, EMOTE_ONESHOT_NONE);
}
- movementInfo.guid = mover->GetGUID();
- WriteMovementInfo(&data, &movementInfo);
- mover->SendMessageToSet(&data, _player);
-
- mover->m_movementInfo = movementInfo;
-
- // Some vehicles allow the passenger to turn by himself
- if (Vehicle* vehicle = mover->GetVehicle())
- {
- if (VehicleSeatEntry const* seat = vehicle->GetSeatForPassenger(mover))
- {
- if (seat->m_flags & VEHICLE_SEAT_FLAG_ALLOW_TURNING && movementInfo.pos.GetOrientation() != mover->GetOrientation())
- {
- mover->SetOrientation(movementInfo.pos.GetOrientation());
- mover->RemoveAurasWithInterruptFlags(AURA_INTERRUPT_FLAG_TURNING);
- }
- }
-
- return;
- }
-
- mover->UpdatePosition(movementInfo.pos);
-
- if (plrMover) // nothing is charmed, or player charmed
- {
- if (plrMover->IsSitState() && (movementInfo.flags & (MOVEMENTFLAG_MASK_MOVING | MOVEMENTFLAG_MASK_TURNING)))
- plrMover->SetStandState(UNIT_STAND_STATE_STAND);
+ HandleMoverRelocation(movementInfo, mover);
+ if (plrMover && opcode != CMSG_MOVE_KNOCK_BACK_ACK)
plrMover->UpdateFallInformationIfNeed(movementInfo, opcode);
- if (movementInfo.pos.GetPositionZ() < plrMover->GetMap()->GetMinHeight(movementInfo.pos.GetPositionX(), movementInfo.pos.GetPositionY()))
- if (!plrMover->GetBattleground() || !plrMover->GetBattleground()->HandlePlayerUnderMap(_player))
- {
- if (plrMover->IsAlive())
- {
- plrMover->SetPlayerFlag(PLAYER_FLAGS_IS_OUT_OF_BOUNDS);
- plrMover->EnvironmentalDamage(DAMAGE_FALL_TO_VOID, GetPlayer()->GetMaxHealth());
- // player can be alive if GM
- if (plrMover->IsAlive())
- plrMover->KillPlayer();
- }
- else if (!plrMover->HasPlayerFlag(PLAYER_FLAGS_IS_OUT_OF_BOUNDS))
- {
- GraveyardStruct const* grave = sGraveyard->GetClosestGraveyard(plrMover, plrMover->GetTeamId());
- if (grave)
- {
- plrMover->TeleportTo(grave->Map, grave->x, grave->y, grave->z, plrMover->GetOrientation());
- plrMover->Relocate(grave->x, grave->y, grave->z, plrMover->GetOrientation());
- }
- }
- }
- }
+ return true;
}
void WorldSession::HandleForceSpeedChangeAck(WorldPacket& recvData)
@@ -615,26 +664,43 @@ 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
+ // old map - async processing, ignore
+ if (counter <= _player->GetMapChangeOrderCounter())
+ return;
- MovementInfo movementInfo;
- movementInfo.guid = guid;
- ReadMovementInfo(recvData, &movementInfo);
+ if (!ProcessMovementInfo(movementInfo, mover, _player, recvData))
+ {
+ recvData.rfinish(); // prevent warnings spam
+ return;
+ }
- 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
@@ -645,42 +711,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;
@@ -688,6 +727,12 @@ void WorldSession::HandleForceSpeedChangeAck(WorldPacket& recvData)
sScriptMgr->AnticheatSetUnderACKmount(_player);
+ SpeedOpcodePair const& speedOpcodes = SetSpeed2Opc_table[move_type];
+ WorldPacket data(speedOpcodes[static_cast<size_t>(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)
@@ -762,11 +807,13 @@ void WorldSession::HandleMoveKnockBackAck(WorldPacket& recvData)
{
LOG_DEBUG("network", "CMSG_MOVE_KNOCK_BACK_ACK");
+ Unit* mover = _player->m_mover;
+
ObjectGuid guid;
recvData >> guid.ReadAsPacked();
// pussywizard: typical check for incomming movement packets
- if (!_player->m_mover || !_player->m_mover->IsInWorld() || _player->m_mover->IsDuringRemoveFromWorld() || guid != _player->m_mover->GetGUID())
+ if (!mover || !mover->IsInWorld() || mover->IsDuringRemoveFromWorld() || guid != mover->GetGUID())
{
recvData.rfinish(); // prevent warnings spam
return;
@@ -778,7 +825,10 @@ void WorldSession::HandleMoveKnockBackAck(WorldPacket& recvData)
movementInfo.guid = guid;
ReadMovementInfo(recvData, &movementInfo);
- _player->m_mover->m_movementInfo = movementInfo;
+ mover->m_movementInfo = movementInfo;
+
+ if (mover->IsPlayer() && static_cast<Player*>(mover)->IsFreeFlying())
+ mover->SetCanFly(true);
WorldPacket data(MSG_MOVE_KNOCK_BACK, 66);
data << guid.WriteAsPacked();
@@ -793,38 +843,6 @@ void WorldSession::HandleMoveKnockBackAck(WorldPacket& recvData)
_player->SendMessageToSet(&data, false);
}
-void WorldSession::HandleMoveHoverAck(WorldPacket& recvData)
-{
- LOG_DEBUG("network", "CMSG_MOVE_HOVER_ACK");
-
- ObjectGuid guid;
- recvData >> guid.ReadAsPacked();
-
- recvData.read_skip<uint32>(); // unk
-
- MovementInfo movementInfo;
- movementInfo.guid = guid;
- ReadMovementInfo(recvData, &movementInfo);
-
- recvData.read_skip<uint32>(); // unk2
-}
-
-void WorldSession::HandleMoveWaterWalkAck(WorldPacket& recvData)
-{
- LOG_DEBUG("network", "CMSG_MOVE_WATER_WALK_ACK");
-
- ObjectGuid guid;
- recvData >> guid.ReadAsPacked();
-
- recvData.read_skip<uint32>(); // unk
-
- MovementInfo movementInfo;
- movementInfo.guid = guid;
- ReadMovementInfo(recvData, &movementInfo);
-
- recvData.read_skip<uint32>(); // unk2
-}
-
void WorldSession::HandleSummonResponseOpcode(WorldPacket& recvData)
{
if (!_player->IsAlive() || _player->IsInCombat())
@@ -954,79 +972,44 @@ void WorldSession::ComputeNewClockDelta()
void WorldSession::HandleMoveRootAck(WorldPacket& recvData)
{
- ObjectGuid guid;
- recvData >> guid.ReadAsPacked();
-
- Unit* mover = _player->m_mover;
- if (!mover || guid != mover->GetGUID())
- {
- recvData.rfinish(); // prevent warnings spam
- return;
- }
-
- uint32 movementCounter;
- recvData >> movementCounter;
+ Opcodes opcode = (Opcodes)recvData.GetOpcode();
+ LOG_DEBUG("network", "WORLD: {}", GetOpcodeNameForLogging(opcode));
+ ObjectGuid guid;
+ uint32 counter;
MovementInfo movementInfo;
+ recvData >> guid.ReadAsPacked();
+ recvData >> counter;
movementInfo.guid = guid;
ReadMovementInfo(recvData, &movementInfo);
- /* process position-change */
- int64 movementTime = (int64) movementInfo.time + _timeSyncClockDelta;
- if (_timeSyncClockDelta == 0 || movementTime < 0 || movementTime > 0xFFFFFFFF)
- {
- LOG_INFO("misc", "The computed movement time using clockDelta is erronous. Using fallback instead");
- movementInfo.time = getMSTime();
- }
- else
- {
- movementInfo.time = (uint32)movementTime;
- }
-
- movementInfo.guid = mover->GetGUID();
- mover->m_movementInfo = movementInfo;
- mover->UpdatePosition(movementInfo.pos);
-
-}
-
-void WorldSession::HandleMoveUnRootAck(WorldPacket& recvData)
-{
- ObjectGuid guid;
- recvData >> guid.ReadAsPacked();
-
Unit* mover = _player->m_mover;
- if (!mover || guid != mover->GetGUID())
- {
- recvData.rfinish(); // prevent warnings spam
- return;
- }
-
- uint32 movementCounter;
- recvData >> movementCounter;
- MovementInfo movementInfo;
- movementInfo.guid = guid;
- ReadMovementInfo(recvData, &movementInfo);
+ if (mover->GetGUID() != guid)
+ return;
- /* process position-change */
- int64 movementTime = (int64) movementInfo.time + _timeSyncClockDelta;
- if (_timeSyncClockDelta == 0 || movementTime < 0 || movementTime > 0xFFFFFFFF)
+ if (opcode == CMSG_FORCE_MOVE_UNROOT_ACK) // unroot case
{
- LOG_INFO("misc", "The computed movement time using clockDelta is erronous. Using fallback instead");
- movementInfo.time = getMSTime();
+ if (!mover->m_movementInfo.HasMovementFlag(MOVEMENTFLAG_ROOT))
+ return;
}
- else
+ else // root case
{
- movementInfo.time = (uint32)movementTime;
+ if (mover->m_movementInfo.HasMovementFlag(MOVEMENTFLAG_ROOT))
+ return;
}
- if (G3D::fuzzyEq(movementInfo.fallTime, 0.f))
- {
- movementInfo.RemoveMovementFlag(MOVEMENTFLAG_FALLING);
- }
+ // old map - async processing, ignore
+ if (counter <= _player->GetMapChangeOrderCounter())
+ return;
- movementInfo.guid = mover->GetGUID();
- mover->m_movementInfo = movementInfo;
- mover->UpdatePosition(movementInfo.pos);
+ if (!ProcessMovementInfo(movementInfo, mover, _player, recvData))
+ return;
+
+ if (_player->IsExpectingChangeTransport())
+ return;
+ WorldPacket data(opcode == CMSG_FORCE_MOVE_UNROOT_ACK ? MSG_MOVE_UNROOT : MSG_MOVE_ROOT);
+ WriteMovementInfo(&data, &movementInfo);
+ mover->SendMessageToSet(&data, _player);
}
diff --git a/src/server/game/Handlers/NPCHandler.cpp b/src/server/game/Handlers/NPCHandler.cpp
index b969e81057..66b7d01af1 100644
--- a/src/server/game/Handlers/NPCHandler.cpp
+++ b/src/server/game/Handlers/NPCHandler.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/game/Handlers/NPCHandler.h b/src/server/game/Handlers/NPCHandler.h
index 9a4511d008..1cdb7cd14f 100644
--- a/src/server/game/Handlers/NPCHandler.h
+++ b/src/server/game/Handlers/NPCHandler.h
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/game/Handlers/PetHandler.cpp b/src/server/game/Handlers/PetHandler.cpp
index 38b66926e5..d445be9ed7 100644
--- a/src/server/game/Handlers/PetHandler.cpp
+++ b/src/server/game/Handlers/PetHandler.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
@@ -262,8 +262,8 @@ void WorldSession::HandlePetActionHelper(Unit* pet, ObjectGuid guid1, uint32 spe
pet->ToCreature()->AI()->AttackStart(TargetUnit);
//10% chance to play special pet attack talk, else growl
- if (pet->IsPet() && ((Pet*)pet)->getPetType() == SUMMON_PET && pet != TargetUnit && urand(0, 100) < 10)
- pet->SendPetTalk((uint32)PET_TALK_ATTACK);
+ if (pet->IsPet() && pet->ToPet()->getPetType() == SUMMON_PET && pet != TargetUnit && roll_chance_i(10))
+ pet->SendPetActionSound(PET_ACTION_ATTACK);
else
{
// 90% chance for pet and 100% chance for charmed creature
@@ -297,8 +297,11 @@ void WorldSession::HandlePetActionHelper(Unit* pet, ObjectGuid guid1, uint32 spe
if (pet->ToPet()->getPetType() == HUNTER_PET)
GetPlayer()->RemovePet(pet->ToPet(), PET_SAVE_AS_DELETED);
else
+ {
+ pet->SendPetDismissSound();
//dismissing a summoned pet is like killing them (this prevents returning a soulshard...)
pet->setDeathState(DeathState::Corpse);
+ }
}
else if (pet->HasUnitTypeMask(UNIT_MASK_MINION | UNIT_MASK_SUMMON | UNIT_MASK_GUARDIAN | UNIT_MASK_CONTROLLABLE_GUARDIAN))
{
@@ -413,8 +416,8 @@ void WorldSession::HandlePetActionHelper(Unit* pet, ObjectGuid guid1, uint32 spe
//10% chance to play special pet attack talk, else growl
//actually this only seems to happen on special spells, fire shield for imp, torment for voidwalker, but it's stupid to check every spell
- if (pet->IsPet() && (((Pet*)pet)->getPetType() == SUMMON_PET) && (pet != unit_target) && (urand(0, 100) < 10))
- pet->SendPetTalk((uint32)PET_TALK_SPECIAL_SPELL);
+ if (pet->IsPet() && (pet->ToPet()->getPetType() == SUMMON_PET) && (pet != unit_target) && roll_chance_i(10))
+ pet->SendPetActionSound(PET_ACTION_SPECIAL_SPELL);
else
{
pet->SendPetAIReaction(guid1);
@@ -509,8 +512,8 @@ void WorldSession::HandlePetActionHelper(Unit* pet, ObjectGuid guid1, uint32 spe
pet->ToCreature()->AI()->AttackStart(TargetUnit);
- if (pet->IsPet() && ((Pet*)pet)->getPetType() == SUMMON_PET && pet != TargetUnit && urand(0, 100) < 10)
- pet->SendPetTalk((uint32)PET_TALK_SPECIAL_SPELL);
+ if (pet->IsPet() && pet->ToPet()->getPetType() == SUMMON_PET && pet != TargetUnit && roll_chance_i(10))
+ pet->SendPetActionSound(PET_ACTION_SPECIAL_SPELL);
else
pet->SendPetAIReaction(guid1);
}
@@ -558,8 +561,8 @@ void WorldSession::HandlePetActionHelper(Unit* pet, ObjectGuid guid1, uint32 spe
pet->GetMotionMaster()->MoveFollow(unit_target, PET_FOLLOW_DIST, rand_norm() * 2 * M_PI);
- if (pet->IsPet() && ((Pet*)pet)->getPetType() == SUMMON_PET && pet != unit_target && urand(0, 100) < 10)
- pet->SendPetTalk((uint32)PET_TALK_SPECIAL_SPELL);
+ if (pet->IsPet() && pet->ToPet()->getPetType() == SUMMON_PET && pet != unit_target && roll_chance_i(10))
+ pet->SendPetActionSound(PET_ACTION_SPECIAL_SPELL);
else
{
pet->SendPetAIReaction(guid1);
@@ -1059,8 +1062,8 @@ void WorldSession::HandlePetCastSpellOpcode(WorldPacket& recvPacket)
{
// 10% chance to play special pet attack talk, else growl
// actually this only seems to happen on special spells, fire shield for imp, torment for voidwalker, but it's stupid to check every spell
- if (pet->getPetType() == SUMMON_PET && (urand(0, 100) < 10))
- pet->SendPetTalk(PET_TALK_SPECIAL_SPELL);
+ if (pet->getPetType() == SUMMON_PET && roll_chance_i(10))
+ pet->SendPetActionSound(PET_ACTION_SPECIAL_SPELL);
else
pet->SendPetAIReaction(guid);
}
diff --git a/src/server/game/Handlers/PetitionsHandler.cpp b/src/server/game/Handlers/PetitionsHandler.cpp
index 7ff2091d40..7ce5870153 100644
--- a/src/server/game/Handlers/PetitionsHandler.cpp
+++ b/src/server/game/Handlers/PetitionsHandler.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
@@ -494,7 +494,7 @@ void WorldSession::HandlePetitionSignOpcode(WorldPacket& recvData)
// update for owner if online
if (Player* owner = ObjectAccessor::FindConnectedPlayer(petition->ownerGuid))
- owner->GetSession()->SendPacket(&data);
+ owner->SendDirectMessage(&data);
return;
}
@@ -527,7 +527,7 @@ void WorldSession::HandlePetitionSignOpcode(WorldPacket& recvData)
// update for owner if online
if (Player* owner = ObjectAccessor::FindConnectedPlayer(petition->ownerGuid))
- owner->GetSession()->SendPacket(&data);
+ owner->SendDirectMessage(&data);
}
void WorldSession::HandlePetitionDeclineOpcode(WorldPacket& recvData)
@@ -547,7 +547,7 @@ void WorldSession::HandlePetitionDeclineOpcode(WorldPacket& recvData)
{
WorldPacket data(MSG_PETITION_DECLINE, 8);
data << _player->GetGUID();
- owner->GetSession()->SendPacket(&data);
+ owner->SendDirectMessage(&data);
}
}
@@ -639,7 +639,7 @@ void WorldSession::HandleOfferPetitionOpcode(WorldPacket& recvData)
data << uint32(0); // there 0 ...
}
- player->GetSession()->SendPacket(&data);
+ player->SendDirectMessage(&data);
}
void WorldSession::HandleTurnInPetitionOpcode(WorldPacket& recvData)
diff --git a/src/server/game/Handlers/QueryHandler.cpp b/src/server/game/Handlers/QueryHandler.cpp
index 604977301b..478dbe5abe 100644
--- a/src/server/game/Handlers/QueryHandler.cpp
+++ b/src/server/game/Handlers/QueryHandler.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/game/Handlers/QuestHandler.cpp b/src/server/game/Handlers/QuestHandler.cpp
index 80063d6382..946d23b851 100644
--- a/src/server/game/Handlers/QuestHandler.cpp
+++ b/src/server/game/Handlers/QuestHandler.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
@@ -625,7 +625,7 @@ void WorldSession::HandleQuestPushResult(WorldPacket& recvPacket)
WorldPacket data(MSG_QUEST_PUSH_RESULT, 8 + 4 + 1);
data << _player->GetGUID();
data << uint8(msg); // valid values: 0-8
- player->GetSession()->SendPacket(&data);
+ player->SendDirectMessage(&data);
_player->SetDivider();
}
}
diff --git a/src/server/game/Handlers/ReferAFriendHandler.cpp b/src/server/game/Handlers/ReferAFriendHandler.cpp
index e616d7b47b..20d17e86fd 100644
--- a/src/server/game/Handlers/ReferAFriendHandler.cpp
+++ b/src/server/game/Handlers/ReferAFriendHandler.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
@@ -60,7 +60,7 @@ void WorldSession::HandleGrantLevel(WorldPacket& recvData)
WorldPacket data2(SMSG_PROPOSE_LEVEL_GRANT, 8);
data2 << _player->GetPackGUID();
- target->GetSession()->SendPacket(&data2);
+ target->SendDirectMessage(&data2);
}
void WorldSession::HandleAcceptGrantLevel(WorldPacket& recvData)
diff --git a/src/server/game/Handlers/SkillHandler.cpp b/src/server/game/Handlers/SkillHandler.cpp
index 5768900cc5..0cc383454b 100644
--- a/src/server/game/Handlers/SkillHandler.cpp
+++ b/src/server/game/Handlers/SkillHandler.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/game/Handlers/Socialhandler.cpp b/src/server/game/Handlers/Socialhandler.cpp
index 5a4557cc95..6fccfa1d30 100644
--- a/src/server/game/Handlers/Socialhandler.cpp
+++ b/src/server/game/Handlers/Socialhandler.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/game/Handlers/SpellHandler.cpp b/src/server/game/Handlers/SpellHandler.cpp
index 6117637db6..0ab498b43b 100644
--- a/src/server/game/Handlers/SpellHandler.cpp
+++ b/src/server/game/Handlers/SpellHandler.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/game/Handlers/TaxiHandler.cpp b/src/server/game/Handlers/TaxiHandler.cpp
index 8a76a2bd63..4fd089b6b2 100644
--- a/src/server/game/Handlers/TaxiHandler.cpp
+++ b/src/server/game/Handlers/TaxiHandler.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
@@ -198,54 +198,70 @@ void WorldSession::HandleActivateTaxiExpressOpcode(WorldPacket& recvData)
void WorldSession::HandleMoveSplineDoneOpcode(WorldPacket& recvData)
{
- ObjectGuid guid; // used only for proper packet read
- recvData >> guid.ReadAsPacked();
-
- MovementInfo movementInfo; // used only for proper packet read
- movementInfo.guid = guid;
- ReadMovementInfo(recvData, &movementInfo);
+ ObjectGuid guid; // used only for proper packet read
+ MovementInfo movementInfo; // used only for proper packet read
+ uint32 movementCounter; // spline counter
- recvData.read_skip<uint32>(); // spline id
+ Unit* mover = _player->m_mover;
- // in taxi flight packet received in 2 case:
- // 1) end taxi path in far (multi-node) flight
- // 2) switch from one map to other in case multim-map taxi path
- // we need process only (1)
+ recvData >> guid.ReadAsPacked();
+ ReadMovementInfo(recvData, &movementInfo);
+ recvData >> movementCounter;
- uint32 curDest = GetPlayer()->m_taxi.GetTaxiDestination();
- if (curDest)
+ if (_player->HasFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_TAXI_FLIGHT)) // taxi spline case
{
- TaxiNodesEntry const* curDestNode = sTaxiNodesStore.LookupEntry(curDest);
+ // in taxi flight packet received in 2 case:
+ // 1) end taxi path in far (multi-node) flight
+ // 2) switch from one map to other in case multim-map taxi path
+ // we need process only (1)
- // far teleport case
- if (curDestNode && curDestNode->map_id != GetPlayer()->GetMapId() && GetPlayer()->GetMotionMaster()->GetCurrentMovementGeneratorType() == FLIGHT_MOTION_TYPE)
+ uint32 curDest = GetPlayer()->m_taxi.GetTaxiDestination();
+ if (curDest)
{
- if (FlightPathMovementGenerator* flight = dynamic_cast<FlightPathMovementGenerator*>(GetPlayer()->GetMotionMaster()->top()))
- {
- // short preparations to continue flight
- flight->SetCurrentNodeAfterTeleport();
- TaxiPathNodeEntry const* node = flight->GetPath()[flight->GetCurrentNode()];
- flight->SkipCurrentNode();
+ TaxiNodesEntry const* curDestNode = sTaxiNodesStore.LookupEntry(curDest);
- GetPlayer()->TeleportTo(curDestNode->map_id, node->x, node->y, node->z, GetPlayer()->GetOrientation(), TELE_TO_NOT_LEAVE_TAXI);
+ // far teleport case
+ if (curDestNode && curDestNode->map_id != GetPlayer()->GetMapId() && GetPlayer()->GetMotionMaster()->GetCurrentMovementGeneratorType() == FLIGHT_MOTION_TYPE)
+ {
+ if (FlightPathMovementGenerator* flight = dynamic_cast<FlightPathMovementGenerator*>(GetPlayer()->GetMotionMaster()->top()))
+ {
+ // short preparations to continue flight
+ flight->SetCurrentNodeAfterTeleport();
+ TaxiPathNodeEntry const* node = flight->GetPath()[flight->GetCurrentNode()];
+ flight->SkipCurrentNode();
+
+ GetPlayer()->TeleportTo(curDestNode->map_id, node->x, node->y, node->z, GetPlayer()->GetOrientation(), TELE_TO_NOT_LEAVE_TAXI);
+ }
}
+
+ return;
}
+ // at this point only 1 node is expected (final destination)
+ if (GetPlayer()->m_taxi.GetPath().size() != 1)
+ {
+ return;
+ }
+
+ GetPlayer()->CleanupAfterTaxiFlight();
+ GetPlayer()->SetFallInformation(GameTime::GetGameTime().count(), GetPlayer()->GetPositionZ());
+ if (GetPlayer()->pvpInfo.IsHostile)
+ {
+ GetPlayer()->CastSpell(GetPlayer(), 2479, true);
+ }
return;
}
- // at this point only 1 node is expected (final destination)
- if (GetPlayer()->m_taxi.GetPath().size() != 1)
- {
+ if (mover->GetGUID() != guid)
return;
- }
- GetPlayer()->CleanupAfterTaxiFlight();
- GetPlayer()->SetFallInformation(GameTime::GetGameTime().count(), GetPlayer()->GetPositionZ());
- if (GetPlayer()->pvpInfo.IsHostile)
- {
- GetPlayer()->CastSpell(GetPlayer(), 2479, true);
- }
+ if (!_player->IsExpectingChangeTransport() || !mover->movespline || mover->movespline->GetId() != movementCounter)
+ return;
+
+ _player->SetExpectingChangeTransport(false);
+ WorldPacket data(_player->m_movementInfo.HasMovementFlag(MOVEMENTFLAG_ROOT) ? MSG_MOVE_ROOT : MSG_MOVE_UNROOT, recvData.size());
+ WriteMovementInfo(&data, &movementInfo);
+ mover->SendMessageToSet(&data, _player);
}
void WorldSession::HandleActivateTaxiOpcode(WorldPacket& recvData)
diff --git a/src/server/game/Handlers/TicketHandler.cpp b/src/server/game/Handlers/TicketHandler.cpp
index 089546aa51..9ab4fb3442 100644
--- a/src/server/game/Handlers/TicketHandler.cpp
+++ b/src/server/game/Handlers/TicketHandler.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/game/Handlers/TradeHandler.cpp b/src/server/game/Handlers/TradeHandler.cpp
index ce316965ef..6bef09eb0e 100644
--- a/src/server/game/Handlers/TradeHandler.cpp
+++ b/src/server/game/Handlers/TradeHandler.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
@@ -646,7 +646,7 @@ void WorldSession::HandleInitiateTradeOpcode(WorldPacket& recvPacket)
WorldPacket data(SMSG_TRADE_STATUS, 12);
data << uint32(TRADE_STATUS_BEGIN_TRADE);
data << _player->GetGUID();
- pOther->GetSession()->SendPacket(&data);
+ pOther->SendDirectMessage(&data);
}
void WorldSession::HandleSetTradeGoldOpcode(WorldPacket& recvPacket)
diff --git a/src/server/game/Handlers/VehicleHandler.cpp b/src/server/game/Handlers/VehicleHandler.cpp
index 180cb6c293..4df63ad67f 100644
--- a/src/server/game/Handlers/VehicleHandler.cpp
+++ b/src/server/game/Handlers/VehicleHandler.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
@@ -50,7 +50,10 @@ void WorldSession::HandleDismissControlledVehicle(WorldPacket& recvData)
mi.guid = guid;
ReadMovementInfo(recvData, &mi);
- _player->m_mover->m_movementInfo = mi;
+ if (_player->m_mover->IsRooted()) // for some reason client sends it without it even if rooted
+ mi.AddMovementFlag(MOVEMENTFLAG_ROOT);
+
+ ProcessMovementInfo(mi, _player->m_mover, _player->m_mover->ToPlayer(), recvData);
_player->ExitVehicle();
}
diff --git a/src/server/game/Handlers/VoiceChatHandler.cpp b/src/server/game/Handlers/VoiceChatHandler.cpp
index 1badb072f4..c81eff848d 100644
--- a/src/server/game/Handlers/VoiceChatHandler.cpp
+++ b/src/server/game/Handlers/VoiceChatHandler.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/game/Instances/InstanceSaveMgr.cpp b/src/server/game/Instances/InstanceSaveMgr.cpp
index 5088742c80..da03677fe0 100644
--- a/src/server/game/Instances/InstanceSaveMgr.cpp
+++ b/src/server/game/Instances/InstanceSaveMgr.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/game/Instances/InstanceSaveMgr.h b/src/server/game/Instances/InstanceSaveMgr.h
index 686a6fe729..ce9cd722a7 100644
--- a/src/server/game/Instances/InstanceSaveMgr.h
+++ b/src/server/game/Instances/InstanceSaveMgr.h
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/game/Instances/InstanceScript.cpp b/src/server/game/Instances/InstanceScript.cpp
index bb510cf128..5b72b94647 100644
--- a/src/server/game/Instances/InstanceScript.cpp
+++ b/src/server/game/Instances/InstanceScript.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/game/Instances/InstanceScript.h b/src/server/game/Instances/InstanceScript.h
index 86ec413a9b..b10db66e9e 100644
--- a/src/server/game/Instances/InstanceScript.h
+++ b/src/server/game/Instances/InstanceScript.h
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/game/Loot/LootItemStorage.cpp b/src/server/game/Loot/LootItemStorage.cpp
index 434ad43250..6d66e83515 100644
--- a/src/server/game/Loot/LootItemStorage.cpp
+++ b/src/server/game/Loot/LootItemStorage.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/game/Loot/LootItemStorage.h b/src/server/game/Loot/LootItemStorage.h
index c1b2771421..10d7685298 100644
--- a/src/server/game/Loot/LootItemStorage.h
+++ b/src/server/game/Loot/LootItemStorage.h
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/game/Loot/LootMgr.cpp b/src/server/game/Loot/LootMgr.cpp
index b5bcbea318..59a6c9d204 100644
--- a/src/server/game/Loot/LootMgr.cpp
+++ b/src/server/game/Loot/LootMgr.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/game/Loot/LootMgr.h b/src/server/game/Loot/LootMgr.h
index ebdfc2d3dc..d906a56a09 100644
--- a/src/server/game/Loot/LootMgr.h
+++ b/src/server/game/Loot/LootMgr.h
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/game/Mails/Mail.cpp b/src/server/game/Mails/Mail.cpp
index f8d838776f..81bc4085f6 100644
--- a/src/server/game/Mails/Mail.cpp
+++ b/src/server/game/Mails/Mail.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/game/Mails/Mail.h b/src/server/game/Mails/Mail.h
index f89a5e1271..0f9bc71d0d 100644
--- a/src/server/game/Mails/Mail.h
+++ b/src/server/game/Mails/Mail.h
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/game/Mails/ServerMailMgr.cpp b/src/server/game/Mails/ServerMailMgr.cpp
index 8ed35ffc17..9f8d05377c 100644
--- a/src/server/game/Mails/ServerMailMgr.cpp
+++ b/src/server/game/Mails/ServerMailMgr.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/game/Mails/ServerMailMgr.h b/src/server/game/Mails/ServerMailMgr.h
index 12eee5113d..73092d5467 100644
--- a/src/server/game/Mails/ServerMailMgr.h
+++ b/src/server/game/Mails/ServerMailMgr.h
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/game/Maps/AreaBoundary.cpp b/src/server/game/Maps/AreaBoundary.cpp
index e5b1848761..80bacdc841 100644
--- a/src/server/game/Maps/AreaBoundary.cpp
+++ b/src/server/game/Maps/AreaBoundary.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/game/Maps/AreaBoundary.h b/src/server/game/Maps/AreaBoundary.h
index 48a5e66713..392bfef22d 100644
--- a/src/server/game/Maps/AreaBoundary.h
+++ b/src/server/game/Maps/AreaBoundary.h
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/game/Maps/AreaDefines.h b/src/server/game/Maps/AreaDefines.h
index a7af304579..1730cd09d4 100644
--- a/src/server/game/Maps/AreaDefines.h
+++ b/src/server/game/Maps/AreaDefines.h
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/game/Maps/Map.cpp b/src/server/game/Maps/Map.cpp
index d8dde935e5..0ea47ff8ab 100644
--- a/src/server/game/Maps/Map.cpp
+++ b/src/server/game/Maps/Map.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
@@ -43,16 +43,21 @@
#include "Vehicle.h"
#include "VMapMgr2.h"
#include "Weather.h"
+#include "WeatherMgr.h"
#define MAP_INVALID_ZONE 0xFFFFFFFF
-ZoneDynamicInfo::ZoneDynamicInfo() : MusicId(0), WeatherId(WEATHER_STATE_FINE),
+ZoneDynamicInfo::ZoneDynamicInfo() : MusicId(0), DefaultWeather(nullptr), WeatherId(WEATHER_STATE_FINE),
WeatherGrade(0.0f), OverrideLightId(0), LightFadeInTime(0) { }
Map::~Map()
{
// UnloadAll must be called before deleting the map
+ // Kill all scheduled events without executing them, since the map and its objects are being destroyed.
+ // This prevents events from running on invalid or deleted objects during map destruction.
+ Events.KillAllEvents(false);
+
sScriptMgr->OnDestroyMap(this);
if (!m_scriptSchedule.empty())
@@ -74,6 +79,7 @@ Map::Map(uint32 id, uint32 InstanceId, uint8 SpawnMode, Map* _parent) :
//lets initialize visibility distance for map
Map::InitVisibilityDistance();
+ _weatherUpdateTimer.SetInterval(1 * IN_MILLISECONDS);
_corpseUpdateTimer.SetInterval(20 * MINUTE * IN_MILLISECONDS);
}
@@ -268,7 +274,6 @@ bool Map::AddPlayerToMap(Player* player)
SendInitTransports(player);
SendInitSelf(player);
- SendZoneDynamicInfo(player);
player->UpdateObjectVisibility(false);
@@ -416,12 +421,12 @@ void Map::UpdatePlayerZoneStats(uint32 oldZone, uint32 newZone)
if (oldZone != MAP_INVALID_ZONE)
{
uint32& oldZoneCount = _zonePlayerCountMap[oldZone];
- if (!oldZoneCount)
- LOG_ERROR("maps", "A player left zone {} (went to {}) - but there were no players in the zone!", oldZone, newZone);
- else
+ if (oldZoneCount)
--oldZoneCount;
}
- ++_zonePlayerCountMap[newZone];
+
+ if (newZone != MAP_INVALID_ZONE)
+ ++_zonePlayerCountMap[newZone];
}
void Map::Update(const uint32 t_diff, const uint32 s_diff, bool /*thread*/)
@@ -446,7 +451,7 @@ void Map::Update(const uint32 t_diff, const uint32 s_diff, bool /*thread*/)
}
}
- _creatureRespawnScheduler.Update(t_diff);
+ Events.Update(t_diff);
if (!t_diff)
{
@@ -500,6 +505,7 @@ void Map::Update(const uint32 t_diff, const uint32 s_diff, bool /*thread*/)
HandleDelayedVisibility();
+ UpdateWeather(t_diff);
UpdateExpiredCorpses(t_diff);
sScriptMgr->OnMapUpdate(this, t_diff);
@@ -694,8 +700,8 @@ struct ResetNotifier
void Map::RemovePlayerFromMap(Player* player, bool remove)
{
- // Before leaving map, update zone/area for stats
- player->UpdateZone(MAP_INVALID_ZONE, 0);
+ UpdatePlayerZoneStats(player->GetZoneId(), MAP_INVALID_ZONE);
+
player->getHostileRefMgr().deleteReferences(true); // pussywizard: multithreading crashfix
player->RemoveFromWorld();
@@ -723,8 +729,6 @@ void Map::RemoveFromMap(T* obj, bool remove)
obj->RemoveFromWorld();
obj->RemoveFromGrid();
- if (obj->IsFarVisible())
- RemoveWorldObjectFromFarVisibleMap(obj);
obj->ResetMap();
@@ -1097,7 +1101,7 @@ float Map::GetWaterOrGroundLevel(uint32 phasemask, float x, float y, float z, fl
if (ground)
*ground = ground_z;
- LiquidData const& liquidData = const_cast<Map*>(this)->GetLiquidData(phasemask, x, y, ground_z, collisionHeight, MAP_ALL_LIQUIDS);
+ LiquidData const& liquidData = const_cast<Map*>(this)->GetLiquidData(phasemask, x, y, ground_z, collisionHeight, {});
switch (liquidData.Status)
{
case LIQUID_MAP_ABOVE_WATER:
@@ -1198,27 +1202,18 @@ static inline bool IsInWMOInterior(uint32 mogpFlags)
bool Map::GetAreaInfo(uint32 phaseMask, float x, float y, float z, uint32& flags, int32& adtId, int32& rootId, int32& groupId) const
{
- float vmap_z = z;
- float dynamic_z = z;
float check_z = z;
VMAP::IVMapMgr* vmgr = VMAP::VMapFactory::createOrGetVMapMgr();
- uint32 vflags;
- int32 vadtId;
- int32 vrootId;
- int32 vgroupId;
- uint32 dflags;
- int32 dadtId;
- int32 drootId;
- int32 dgroupId;
-
- bool hasVmapAreaInfo = vmgr->GetAreaInfo(GetId(), x, y, vmap_z, vflags, vadtId, vrootId, vgroupId);
- bool hasDynamicAreaInfo = _dynamicTree.GetAreaInfo(x, y, dynamic_z, phaseMask, dflags, dadtId, drootId, dgroupId);
- auto useVmap = [&]() { check_z = vmap_z; flags = vflags; adtId = vadtId; rootId = vrootId; groupId = vgroupId; };
- auto useDyn = [&]() { check_z = dynamic_z; flags = dflags; adtId = dadtId; rootId = drootId; groupId = dgroupId; };
+ VMAP::AreaAndLiquidData vdata;
+ VMAP::AreaAndLiquidData ddata;
+ bool hasVmapAreaInfo = vmgr->GetAreaAndLiquidData(GetId(), x, y, z, {}, vdata) && vdata.areaInfo.has_value();
+ bool hasDynamicAreaInfo = _dynamicTree.GetAreaAndLiquidData(x, y, z, phaseMask, {}, ddata) && ddata.areaInfo.has_value();
+ auto useVmap = [&] { check_z = vdata.floorZ; groupId = vdata.areaInfo->groupId; adtId = vdata.areaInfo->adtId; rootId = vdata.areaInfo->rootId; flags = vdata.areaInfo->mogpFlags; };
+ auto useDyn = [&] { check_z = ddata.floorZ; groupId = ddata.areaInfo->groupId; adtId = ddata.areaInfo->adtId; rootId = ddata.areaInfo->rootId; flags = ddata.areaInfo->mogpFlags; };
if (hasVmapAreaInfo)
{
- if (hasDynamicAreaInfo && dynamic_z > vmap_z)
+ if (hasDynamicAreaInfo && ddata.floorZ > vdata.floorZ)
useDyn();
else
useVmap();
@@ -1299,32 +1294,30 @@ void Map::GetZoneAndAreaId(uint32 phaseMask, uint32& zoneid, uint32& areaid, flo
zoneid = area->zone;
}
-LiquidData const Map::GetLiquidData(uint32 phaseMask, float x, float y, float z, float collisionHeight, uint8 ReqLiquidType)
+LiquidData const Map::GetLiquidData(uint32 phaseMask, float x, float y, float z, float collisionHeight, Optional<uint8> ReqLiquidType)
{
LiquidData liquidData;
+ liquidData.Status = LIQUID_MAP_NO_WATER;
VMAP::IVMapMgr* vmgr = VMAP::VMapFactory::createOrGetVMapMgr();
- float liquid_level = INVALID_HEIGHT;
- float ground_level = INVALID_HEIGHT;
- uint32 liquid_type = 0;
- uint32 mogpFlags = 0;
+ VMAP::AreaAndLiquidData vmapData;
bool useGridLiquid = true;
- if (vmgr->GetLiquidLevel(GetId(), x, y, z, ReqLiquidType, liquid_level, ground_level, liquid_type, mogpFlags))
+ if (vmgr->GetAreaAndLiquidData(GetId(), x, y, z, ReqLiquidType, vmapData) && vmapData.liquidInfo)
{
- useGridLiquid = !IsInWMOInterior(mogpFlags);
- LOG_DEBUG("maps", "GetLiquidStatus(): vmap liquid level: {} ground: {} type: {}", liquid_level, ground_level, liquid_type);
+ useGridLiquid = !vmapData.areaInfo || !IsInWMOInterior(vmapData.areaInfo->mogpFlags);
+ LOG_DEBUG("maps", "GetLiquidStatus(): vmap liquid level: {} ground: {} type: {}", vmapData.liquidInfo->level, vmapData.floorZ, vmapData.liquidInfo->type);
// Check water level and ground level
- if (liquid_level > ground_level && G3D::fuzzyGe(z, ground_level - GROUND_HEIGHT_TOLERANCE))
+ if (vmapData.liquidInfo->level > vmapData.floorZ && G3D::fuzzyGe(z, vmapData.floorZ - GROUND_HEIGHT_TOLERANCE))
{
// hardcoded in client like this
- if (GetId() == MAP_OUTLAND && liquid_type == 2)
- liquid_type = 15;
+ if (GetId() == MAP_OUTLAND && vmapData.liquidInfo->type == 2)
+ vmapData.liquidInfo->type = 15;
uint32 liquidFlagType = 0;
- if (LiquidTypeEntry const* liq = sLiquidTypeStore.LookupEntry(liquid_type))
+ if (LiquidTypeEntry const* liq = sLiquidTypeStore.LookupEntry(vmapData.liquidInfo->type))
liquidFlagType = liq->Type;
- if (liquid_type && liquid_type < 21)
+ if (vmapData.liquidInfo->type && vmapData.liquidInfo->type < 21)
{
if (AreaTableEntry const* area = sAreaTableStore.LookupEntry(GetAreaId(phaseMask, x, y, z)))
{
@@ -1338,19 +1331,19 @@ LiquidData const Map::GetLiquidData(uint32 phaseMask, float x, float y, float z,
if (LiquidTypeEntry const* liq = sLiquidTypeStore.LookupEntry(overrideLiquid))
{
- liquid_type = overrideLiquid;
+ vmapData.liquidInfo->type = overrideLiquid;
liquidFlagType = liq->Type;
}
}
}
- liquidData.Level = liquid_level;
- liquidData.DepthLevel = ground_level;
- liquidData.Entry = liquid_type;
+ liquidData.Level = vmapData.liquidInfo->level;
+ liquidData.DepthLevel = vmapData.floorZ;
+ liquidData.Entry = vmapData.liquidInfo->type;
liquidData.Flags = 1 << liquidFlagType;
}
- float delta = liquid_level - z;
+ float delta = vmapData.liquidInfo->level - z;
// Get position delta
if (delta > collisionHeight)
@@ -1369,7 +1362,7 @@ LiquidData const Map::GetLiquidData(uint32 phaseMask, float x, float y, float z,
{
LiquidData const& map_data = gmap->GetLiquidData(x, y, z, collisionHeight, ReqLiquidType);
// Not override LIQUID_MAP_ABOVE_WATER with LIQUID_MAP_NO_WATER:
- if (map_data.Status != LIQUID_MAP_NO_WATER && (map_data.Level > ground_level))
+ if (map_data.Status != LIQUID_MAP_NO_WATER && (map_data.Level > vmapData.floorZ))
{
// hardcoded in client like this
uint32 liquidEntry = map_data.Entry;
@@ -1385,7 +1378,7 @@ LiquidData const Map::GetLiquidData(uint32 phaseMask, float x, float y, float z,
return liquidData;
}
-void Map::GetFullTerrainStatusForPosition(uint32 /*phaseMask*/, float x, float y, float z, float collisionHeight, PositionFullTerrainStatus& data, uint8 reqLiquidType)
+void Map::GetFullTerrainStatusForPosition(uint32 /*phaseMask*/, float x, float y, float z, float collisionHeight, PositionFullTerrainStatus& data, Optional<uint8> reqLiquidType)
{
GridTerrainData* gmap = GetGridTerrainData(x, y);
@@ -1600,7 +1593,7 @@ float Map::GetHeight(uint32 phasemask, float x, float y, float z, bool vmap/*=tr
bool Map::IsInWater(uint32 phaseMask, float x, float y, float pZ, float collisionHeight) const
{
- LiquidData const& liquidData = const_cast<Map*>(this)->GetLiquidData(phaseMask, x, y, pZ, collisionHeight, MAP_ALL_LIQUIDS);
+ LiquidData const& liquidData = const_cast<Map*>(this)->GetLiquidData(phaseMask, x, y, pZ, collisionHeight, {});
return (liquidData.Status & MAP_LIQUID_STATUS_SWIMMING) != 0;
}
@@ -1691,7 +1684,7 @@ void Map::SendInitTransports(Player* player)
WorldPacket packet;
transData.BuildPacket(packet);
- player->GetSession()->SendPacket(&packet);
+ player->SendDirectMessage(&packet);
}
void Map::SendRemoveTransports(Player* player)
@@ -1710,7 +1703,7 @@ void Map::SendRemoveTransports(Player* player)
WorldPacket packet;
transData.BuildPacket(packet);
- player->GetSession()->SendPacket(&packet);
+ player->SendDirectMessage(&packet);
}
void Map::SendObjectUpdates()
@@ -1730,7 +1723,7 @@ void Map::SendObjectUpdates()
for (UpdateDataMapType::iterator iter = update_players.begin(); iter != update_players.end(); ++iter)
{
iter->second.BuildPacket(packet);
- iter->first->GetSession()->SendPacket(&packet);
+ iter->first->SendDirectMessage(&packet);
packet.clear(); // clean the string
}
}
@@ -1850,7 +1843,7 @@ uint32 Map::GetPlayersCountExceptGMs() const
void Map::SendToPlayers(WorldPacket const* data) const
{
for (MapRefMgr::const_iterator itr = m_mapRefMgr.begin(); itr != m_mapRefMgr.end(); ++itr)
- itr->GetSource()->GetSession()->SendPacket(data);
+ itr->GetSource()->SendDirectMessage(data);
}
template bool Map::AddToMap(Corpse*, bool);
@@ -2055,7 +2048,7 @@ bool InstanceMap::AddPlayerToMap(Player* player)
data << uint32(60000);
data << uint32(instance_data ? instance_data->GetCompletedEncounterMask() : 0);
data << uint8(0);
- player->GetSession()->SendPacket(&data);
+ player->SendDirectMessage(&data);
player->SetPendingBind(mapSave->GetInstanceId(), 60000);
}
}
@@ -2118,7 +2111,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 +2125,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)
{
@@ -2227,7 +2220,7 @@ void InstanceMap::PermBindAllPlayers()
{
WorldPacket data(SMSG_INSTANCE_SAVE_CREATED, 4);
data << uint32(0);
- player->GetSession()->SendPacket(&data);
+ player->SendDirectMessage(&data);
sInstanceSaveMgr->PlayerBindToInstance(player->GetGUID(), save, true, player);
}
@@ -2356,27 +2349,27 @@ void BattlegroundMap::RemoveAllPlayers()
player->TeleportTo(player->GetEntryPoint());
}
-Corpse* Map::GetCorpse(ObjectGuid const guid)
+Corpse* Map::GetCorpse(ObjectGuid const& guid)
{
return _objectsStore.Find<Corpse>(guid);
}
-Creature* Map::GetCreature(ObjectGuid const guid)
+Creature* Map::GetCreature(ObjectGuid const& guid)
{
return _objectsStore.Find<Creature>(guid);
}
-GameObject* Map::GetGameObject(ObjectGuid const guid)
+GameObject* Map::GetGameObject(ObjectGuid const& guid)
{
return _objectsStore.Find<GameObject>(guid);
}
-Pet* Map::GetPet(ObjectGuid const guid)
+Pet* Map::GetPet(ObjectGuid const& guid)
{
return dynamic_cast<Pet*>(_objectsStore.Find<Creature>(guid));
}
-Transport* Map::GetTransport(ObjectGuid guid)
+Transport* Map::GetTransport(ObjectGuid const& guid)
{
if (guid.GetHigh() != HighGuid::Mo_Transport && guid.GetHigh() != HighGuid::Transport)
return nullptr;
@@ -2385,7 +2378,7 @@ Transport* Map::GetTransport(ObjectGuid guid)
return go ? go->ToTransport() : nullptr;
}
-DynamicObject* Map::GetDynamicObject(ObjectGuid guid)
+DynamicObject* Map::GetDynamicObject(ObjectGuid const& guid)
{
return _objectsStore.Find<DynamicObject>(guid);
}
@@ -2677,7 +2670,7 @@ void Map::RemoveCorpse(Corpse* corpse)
_corpseBones.erase(corpse);
}
-Corpse* Map::ConvertCorpseToBones(ObjectGuid const ownerGuid, bool insignia /*= false*/)
+Corpse* Map::ConvertCorpseToBones(ObjectGuid const& ownerGuid, bool insignia /*= false*/)
{
Corpse* corpse = GetCorpseByPlayer(ownerGuid);
if (!corpse)
@@ -2758,18 +2751,46 @@ void Map::RemoveOldCorpses()
void Map::ScheduleCreatureRespawn(ObjectGuid creatureGuid, Milliseconds respawnTimer, Position pos)
{
- _creatureRespawnScheduler.Schedule(respawnTimer, [this, creatureGuid, pos](TaskContext)
+ Events.AddEventAtOffset([this, creatureGuid, pos]()
{
if (Creature* creature = GetCreature(creatureGuid))
creature->Respawn();
else
SummonCreature(creatureGuid.GetEntry(), pos);
- });
+ }, respawnTimer);
+}
+
+/// Send a packet to all players (or players selected team) in the zone (except self if mentioned)
+bool Map::SendZoneMessage(uint32 zone, WorldPacket const* packet, WorldSession const* self, TeamId teamId) const
+{
+ bool foundPlayerToSend = false;
+
+ for (MapReference const& ref : GetPlayers())
+ {
+ Player* player = ref.GetSource();
+ if (player->IsInWorld() &&
+ player->GetZoneId() == zone &&
+ player->GetSession() != self &&
+ (teamId == TEAM_NEUTRAL || player->GetTeamId() == teamId))
+ {
+ player->SendDirectMessage(packet);
+ foundPlayerToSend = true;
+ }
+ }
+
+ return foundPlayerToSend;
+}
+
+/// Send a System Message to all players in the zone (except self if mentioned)
+void Map::SendZoneText(uint32 zoneId, char const* text, WorldSession const* self, TeamId teamId) const
+{
+ WorldPacket data;
+ ChatHandler::BuildChatPacket(data, CHAT_MSG_SYSTEM, LANG_UNIVERSAL, nullptr, nullptr, text);
+ SendZoneMessage(zoneId, &data, self, teamId);
}
-void Map::SendZoneDynamicInfo(Player* player)
+void Map::SendZoneDynamicInfo(uint32 zoneId, Player* player) const
{
- uint32 zoneId = player->GetZoneId();
ZoneDynamicInfoMap::const_iterator itr = _zoneDynamicInfo.find(zoneId);
if (itr == _zoneDynamicInfo.end())
return;
@@ -2777,15 +2798,11 @@ void Map::SendZoneDynamicInfo(Player* player)
if (uint32 music = itr->second.MusicId)
player->SendDirectMessage(WorldPackets::Misc::PlayMusic(music).Write());
- if (WeatherState weatherId = itr->second.WeatherId)
- {
- WorldPackets::Misc::Weather weather(weatherId, itr->second.WeatherGrade);
- player->SendDirectMessage(weather.Write());
- }
+ SendZoneWeather(itr->second, player);
if (uint32 overrideLight = itr->second.OverrideLightId)
{
- WorldPacket data(SMSG_OVERRIDE_LIGHT, 4 + 4 + 1);
+ WorldPacket data(SMSG_OVERRIDE_LIGHT, 4 + 4 + 4);
data << uint32(_defaultLight);
data << uint32(overrideLight);
data << uint32(itr->second.LightFadeInTime);
@@ -2793,6 +2810,41 @@ void Map::SendZoneDynamicInfo(Player* player)
}
}
+void Map::SendZoneWeather(uint32 zoneId, Player* player) const
+{
+ ZoneDynamicInfoMap::const_iterator itr = _zoneDynamicInfo.find(zoneId);
+ if (itr == _zoneDynamicInfo.end())
+ return;
+
+ SendZoneWeather(itr->second, player);
+}
+
+void Map::SendZoneWeather(ZoneDynamicInfo const& zoneDynamicInfo, Player* player) const
+{
+ if (WeatherState weatherId = zoneDynamicInfo.WeatherId)
+ {
+ WorldPackets::Misc::Weather weather(weatherId, zoneDynamicInfo.WeatherGrade);
+ player->SendDirectMessage(weather.Write());
+ }
+ else if (zoneDynamicInfo.DefaultWeather)
+ zoneDynamicInfo.DefaultWeather->SendWeatherUpdateToPlayer(player);
+ else
+ Weather::SendFineWeatherUpdateToPlayer(player);
+}
+
+void Map::UpdateWeather(uint32 const diff)
+{
+ _weatherUpdateTimer.Update(diff);
+ if (!_weatherUpdateTimer.Passed())
+ return;
+
+ for (auto&& zoneInfo : _zoneDynamicInfo)
+ if (zoneInfo.second.DefaultWeather && !zoneInfo.second.DefaultWeather->Update(_weatherUpdateTimer.GetInterval()))
+ zoneInfo.second.DefaultWeather.reset();
+
+ _weatherUpdateTimer.Reset();
+}
+
void Map::PlayDirectSoundToMap(uint32 soundId, uint32 zoneId)
{
Map::PlayerList const& players = GetPlayers();
@@ -2810,67 +2862,50 @@ void Map::PlayDirectSoundToMap(uint32 soundId, uint32 zoneId)
void Map::SetZoneMusic(uint32 zoneId, uint32 musicId)
{
- if (_zoneDynamicInfo.find(zoneId) == _zoneDynamicInfo.end())
- _zoneDynamicInfo.insert(ZoneDynamicInfoMap::value_type(zoneId, ZoneDynamicInfo()));
-
_zoneDynamicInfo[zoneId].MusicId = musicId;
- Map::PlayerList const& players = GetPlayers();
- if (!players.IsEmpty())
- {
- WorldPackets::Misc::PlayMusic playMusic(musicId);
- playMusic.Write();
+ WorldPackets::Misc::PlayMusic playMusic(musicId);
+ SendZoneMessage(zoneId, WorldPackets::Misc::PlayMusic(musicId).Write());
+}
- for (Map::PlayerList::const_iterator itr = players.begin(); itr != players.end(); ++itr)
- if (Player* player = itr->GetSource())
- if (player->GetZoneId() == zoneId)
- player->SendDirectMessage(playMusic.GetRawPacket());
+Weather* Map::GetOrGenerateZoneDefaultWeather(uint32 zoneId)
+{
+ WeatherData const* weatherData = WeatherMgr::GetWeatherData(zoneId);
+ if (!weatherData)
+ return nullptr;
+
+ ZoneDynamicInfo& info = _zoneDynamicInfo[zoneId];
+
+ if (!info.DefaultWeather)
+ {
+ info.DefaultWeather = std::make_unique<Weather>(this, zoneId, weatherData);
+ info.DefaultWeather->ReGenerate();
+ info.DefaultWeather->UpdateWeather();
}
+
+ return info.DefaultWeather.get();
}
void Map::SetZoneWeather(uint32 zoneId, WeatherState weatherId, float weatherGrade)
{
- if (_zoneDynamicInfo.find(zoneId) == _zoneDynamicInfo.end())
- _zoneDynamicInfo.insert(ZoneDynamicInfoMap::value_type(zoneId, ZoneDynamicInfo()));
-
ZoneDynamicInfo& info = _zoneDynamicInfo[zoneId];
info.WeatherId = weatherId;
info.WeatherGrade = weatherGrade;
- Map::PlayerList const& players = GetPlayers();
-
- if (!players.IsEmpty())
- {
- WorldPackets::Misc::Weather weather(weatherId, weatherGrade);
- for (Map::PlayerList::const_iterator itr = players.begin(); itr != players.end(); ++itr)
- if (Player* player = itr->GetSource())
- if (player->GetZoneId() == zoneId)
- player->SendDirectMessage(weather.Write());
- }
+ SendZoneMessage(zoneId, WorldPackets::Misc::Weather(weatherId, weatherGrade).Write());
}
void Map::SetZoneOverrideLight(uint32 zoneId, uint32 lightId, Milliseconds fadeInTime)
{
- if (_zoneDynamicInfo.find(zoneId) == _zoneDynamicInfo.end())
- _zoneDynamicInfo.insert(ZoneDynamicInfoMap::value_type(zoneId, ZoneDynamicInfo()));
-
ZoneDynamicInfo& info = _zoneDynamicInfo[zoneId];
info.OverrideLightId = lightId;
info.LightFadeInTime = static_cast<uint32>(fadeInTime.count());
- Map::PlayerList const& players = GetPlayers();
- if (!players.IsEmpty())
- {
- WorldPacket data(SMSG_OVERRIDE_LIGHT, 4 + 4 + 4);
- data << uint32(_defaultLight);
- data << uint32(lightId);
- data << uint32(static_cast<uint32>(fadeInTime.count()));
-
- for (Map::PlayerList::const_iterator itr = players.begin(); itr != players.end(); ++itr)
- if (Player* player = itr->GetSource())
- if (player->GetZoneId() == zoneId)
- player->SendDirectMessage(&data);
- }
+ WorldPacket data(SMSG_OVERRIDE_LIGHT, 4 + 4 + 4);
+ data << uint32(_defaultLight);
+ data << uint32(lightId);
+ data << uint32(static_cast<uint32>(fadeInTime.count()));
+ SendZoneMessage(zoneId, &data);
}
void Map::DoForAllPlayers(std::function<void(Player*)> exec)
diff --git a/src/server/game/Maps/Map.h b/src/server/game/Maps/Map.h
index c875e4eaa9..21226c54a9 100644
--- a/src/server/game/Maps/Map.h
+++ b/src/server/game/Maps/Map.h
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
@@ -23,6 +23,7 @@
#include "DataMap.h"
#include "Define.h"
#include "DynamicTree.h"
+#include "EventProcessor.h"
#include "GameObjectModel.h"
#include "GridDefines.h"
#include "GridRefMgr.h"
@@ -33,7 +34,6 @@
#include "PathGenerator.h"
#include "Position.h"
#include "SharedDefines.h"
-#include "TaskScheduler.h"
#include "Timer.h"
#include "GridTerrainData.h"
#include <bitset>
@@ -47,6 +47,7 @@ class InstanceScript;
class Group;
class InstanceSave;
class Object;
+class Weather;
class WorldObject;
class TempSummon;
class Player;
@@ -62,6 +63,7 @@ class Transport;
class StaticTransport;
class MotionTransport;
class PathGenerator;
+class WorldSession;
enum WeatherState : uint32;
@@ -132,6 +134,7 @@ struct ZoneDynamicInfo
ZoneDynamicInfo();
uint32 MusicId;
+ std::unique_ptr<Weather> DefaultWeather;
WeatherState WeatherId;
float WeatherGrade;
uint32 OverrideLightId;
@@ -169,7 +172,7 @@ public:
// currently unused for normal maps
bool CanUnload(uint32 diff)
{
- if (!m_unloadTimer)
+ if (!m_unloadTimer || Events.HasEvents())
return false;
if (m_unloadTimer <= diff)
@@ -240,8 +243,8 @@ public:
[[nodiscard]] float GetMinHeight(float x, float y) const;
Transport* GetTransportForPos(uint32 phase, float x, float y, float z, WorldObject* worldobject = nullptr);
- void GetFullTerrainStatusForPosition(uint32 phaseMask, float x, float y, float z, float collisionHeight, PositionFullTerrainStatus& data, uint8 reqLiquidType = MAP_ALL_LIQUIDS);
- LiquidData const GetLiquidData(uint32 phaseMask, float x, float y, float z, float collisionHeight, uint8 ReqLiquidType);
+ void GetFullTerrainStatusForPosition(uint32 phaseMask, float x, float y, float z, float collisionHeight, PositionFullTerrainStatus& data, Optional<uint8> reqLiquidType = {});
+ LiquidData const GetLiquidData(uint32 phaseMask, float x, float y, float z, float collisionHeight, Optional<uint8> ReqLiquidType);
[[nodiscard]] bool GetAreaInfo(uint32 phaseMask, float x, float y, float z, uint32& mogpflags, int32& adtId, int32& rootId, int32& groupId) const;
[[nodiscard]] uint32 GetAreaId(uint32 phaseMask, float x, float y, float z) const;
@@ -335,12 +338,12 @@ public:
GameObject* SummonGameObject(uint32 entry, Position const& pos, float rotation0 = 0.0f, float rotation1 = 0.0f, float rotation2 = 0.0f, float rotation3 = 0.0f, uint32 respawnTime = 100, bool checkTransport = true);
void SummonCreatureGroup(uint8 group, std::list<TempSummon*>* list = nullptr);
- Corpse* GetCorpse(ObjectGuid const guid);
- Creature* GetCreature(ObjectGuid const guid);
- GameObject* GetGameObject(ObjectGuid const guid);
- Transport* GetTransport(ObjectGuid const guid);
- DynamicObject* GetDynamicObject(ObjectGuid const guid);
- Pet* GetPet(ObjectGuid const guid);
+ Corpse* GetCorpse(ObjectGuid const& guid);
+ Creature* GetCreature(ObjectGuid const& guid);
+ GameObject* GetGameObject(ObjectGuid const& guid);
+ Transport* GetTransport(ObjectGuid const& guid);
+ DynamicObject* GetDynamicObject(ObjectGuid const& guid);
+ Pet* GetPet(ObjectGuid const& guid);
MapStoredObjectTypesContainer& GetObjectsStore() { return _objectsStore; }
@@ -427,7 +430,7 @@ public:
void UpdatePlayerZoneStats(uint32 oldZone, uint32 newZone);
[[nodiscard]] uint32 ApplyDynamicModeRespawnScaling(WorldObject const* obj, uint32 respawnDelay) const;
- TaskScheduler _creatureRespawnScheduler;
+ EventProcessor Events;
void ScheduleCreatureRespawn(ObjectGuid /*creatureGuid*/, Milliseconds /*respawnTimer*/, Position pos = Position());
@@ -435,20 +438,27 @@ public:
void DeleteCorpseData();
void AddCorpse(Corpse* corpse);
void RemoveCorpse(Corpse* corpse);
- Corpse* ConvertCorpseToBones(ObjectGuid const ownerGuid, bool insignia = false);
+ Corpse* ConvertCorpseToBones(ObjectGuid const& ownerGuid, bool insignia = false);
void RemoveOldCorpses();
static void DeleteRespawnTimesInDB(uint16 mapId, uint32 instanceId);
+ bool SendZoneMessage(uint32 zone, WorldPacket const* packet, WorldSession const* self = nullptr, TeamId teamId = TEAM_NEUTRAL) const;
+ void SendZoneText(uint32 zoneId, char const* text, WorldSession const* self = nullptr, TeamId teamId = TEAM_NEUTRAL) const;
+
void SendInitTransports(Player* player);
void SendRemoveTransports(Player* player);
- void SendZoneDynamicInfo(Player* player);
+ void SendZoneDynamicInfo(uint32 zoneId, Player* player) const;
+ void SendZoneWeather(uint32 zoneId, Player* player) const;
+ void SendZoneWeather(ZoneDynamicInfo const& zoneDynamicInfo, Player* player) const;
void SendInitSelf(Player* player);
+ void UpdateWeather(uint32 const diff);
void UpdateExpiredCorpses(uint32 const diff);
void PlayDirectSoundToMap(uint32 soundId, uint32 zoneId = 0);
void SetZoneMusic(uint32 zoneId, uint32 musicId);
+ Weather* GetOrGenerateZoneDefaultWeather(uint32 zoneId);
void SetZoneWeather(uint32 zoneId, WeatherState weatherId, float weatherGrade);
void SetZoneOverrideLight(uint32 zoneId, uint32 lightId, Milliseconds fadeInTime);
@@ -504,6 +514,14 @@ public:
void RemoveWorldObjectFromZoneWideVisibleMap(uint32 zoneId, WorldObject* obj);
ZoneWideVisibleWorldObjectsSet const* GetZoneWideVisibleWorldObjectsForZone(uint32 zoneId) const;
+ [[nodiscard]] uint32 GetPlayerCountInZone(uint32 zoneId) const
+ {
+ if (auto const& it = _zonePlayerCountMap.find(zoneId); it != _zonePlayerCountMap.end())
+ return it->second;
+
+ return 0;
+ };
+
private:
template<class T> void InitializeObject(T* obj);
@@ -584,6 +602,7 @@ private:
std::unordered_map<uint32, uint32> _zonePlayerCountMap;
ZoneDynamicInfoMap _zoneDynamicInfo;
+ IntervalTimer _weatherUpdateTimer;
uint32 _defaultLight;
IntervalTimer _corpseUpdateTimer;
diff --git a/src/server/game/Maps/MapInstanced.cpp b/src/server/game/Maps/MapInstanced.cpp
index 9d8172a733..cbe0a3a17e 100644
--- a/src/server/game/Maps/MapInstanced.cpp
+++ b/src/server/game/Maps/MapInstanced.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/game/Maps/MapInstanced.h b/src/server/game/Maps/MapInstanced.h
index e50057c9e5..75601434cd 100644
--- a/src/server/game/Maps/MapInstanced.h
+++ b/src/server/game/Maps/MapInstanced.h
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/game/Maps/MapMgr.cpp b/src/server/game/Maps/MapMgr.cpp
index e113c93d27..94044f7997 100644
--- a/src/server/game/Maps/MapMgr.cpp
+++ b/src/server/game/Maps/MapMgr.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
@@ -205,7 +205,7 @@ Map::EnterState MapMgr::PlayerCannotEnter(uint32 mapid, Player* player, bool log
if (!corpseMap)
{
WorldPacket data(SMSG_CORPSE_NOT_IN_INSTANCE, 0);
- player->GetSession()->SendPacket(&data);
+ player->SendDirectMessage(&data);
LOG_DEBUG("maps", "MAP: Player '{}' does not have a corpse in instance '{}' and cannot enter.", player->GetName(), mapName);
return Map::CANNOT_ENTER_CORPSE_IN_DIFFERENT_INSTANCE;
}
diff --git a/src/server/game/Maps/MapMgr.h b/src/server/game/Maps/MapMgr.h
index 2872ddd7c8..c2336707e4 100644
--- a/src/server/game/Maps/MapMgr.h
+++ b/src/server/game/Maps/MapMgr.h
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/game/Maps/MapRefMgr.h b/src/server/game/Maps/MapRefMgr.h
index ddedb076d9..cb5f6486f1 100644
--- a/src/server/game/Maps/MapRefMgr.h
+++ b/src/server/game/Maps/MapRefMgr.h
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/game/Maps/MapReference.h b/src/server/game/Maps/MapReference.h
index 002771c76a..82c47a71ee 100644
--- a/src/server/game/Maps/MapReference.h
+++ b/src/server/game/Maps/MapReference.h
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/game/Maps/MapUpdater.cpp b/src/server/game/Maps/MapUpdater.cpp
index ea5fe96025..d2ad9e6708 100644
--- a/src/server/game/Maps/MapUpdater.cpp
+++ b/src/server/game/Maps/MapUpdater.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/game/Maps/MapUpdater.h b/src/server/game/Maps/MapUpdater.h
index 9576e7e1f0..a2e9aaae45 100644
--- a/src/server/game/Maps/MapUpdater.h
+++ b/src/server/game/Maps/MapUpdater.h
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/game/Maps/TransportMgr.cpp b/src/server/game/Maps/TransportMgr.cpp
index f065ccf56a..00afdf2b64 100644
--- a/src/server/game/Maps/TransportMgr.cpp
+++ b/src/server/game/Maps/TransportMgr.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
@@ -448,31 +448,45 @@ void TransportMgr::SpawnContinentTransports()
LOG_INFO("server.loading", ">> Spawned {} continent motion transports in {} ms", count, GetMSTimeDiffToNow(oldMSTime));
}
+ // Preloads Deeprun Tram to fix issues with Subway carts syncronization
+ /// @todo: This is a temporary workaround. Consider removing TransportMgr::PreloadGridsFromQuery() as part of fix.
+ /**
+ Takenbacon: "In the long run the most likely ideal fix would be to always spawn all transport types (and thus loading their grid) on map creation"
+ See https://github.com/azerothcore/azerothcore-wotlk/pull/23009 for more details.
+ */
+ PreloadGridsFromQuery("SELECT map, position_x, position_y FROM gameobject g JOIN gameobject_template t ON g.id = t.entry WHERE t.type = 11 AND g.map = 369", count);
+
if (sWorld->getBoolConfig(CONFIG_ENABLE_CONTINENT_TRANSPORT_PRELOADING))
{
// pussywizard: preload grids for continent static transports
- QueryResult result2 = WorldDatabase.Query("SELECT map, position_x, position_y FROM gameobject g JOIN gameobject_template t ON g.id = t.entry WHERE t.type = 11");
+ PreloadGridsFromQuery("SELECT map, position_x, position_y FROM gameobject g JOIN gameobject_template t ON g.id = t.entry WHERE t.type = 11 AND g.map != 369", count);
+ LOG_INFO("server.loading", ">> Preloaded grids for {} continent static transports in {} ms", count, GetMSTimeDiffToNow(oldMSTime));
+ }
+}
- if (result2)
+void TransportMgr::PreloadGridsFromQuery(std::string const& query, uint32& count)
+{
+ if (QueryResult result = WorldDatabase.Query(query))
+ {
+ do
{
- do
- {
- Field* fields = result2->Fetch();
- uint16 mapId = fields[0].Get<uint16>();
- float x = fields[1].Get<float>();
- float y = fields[2].Get<float>();
+ Field* fields = result->Fetch();
+ uint16 mapId = fields[0].Get<uint16>();
+ float x = fields[1].Get<float>();
+ float y = fields[2].Get<float>();
- MapEntry const* mapEntry = sMapStore.LookupEntry(mapId);
- if (mapEntry && !mapEntry->Instanceable())
+ if (MapEntry const* mapEntry = sMapStore.LookupEntry(mapId))
+ {
+ if (!mapEntry->Instanceable())
+ {
if (Map* map = sMapMgr->CreateBaseMap(mapId))
{
map->LoadGrid(x, y);
++count;
}
- } while (result2->NextRow());
- }
-
- LOG_INFO("server.loading", ">> Preloaded grids for {} continent static transports in {} ms", count, GetMSTimeDiffToNow(oldMSTime));
+ }
+ }
+ } while (result->NextRow());
}
}
diff --git a/src/server/game/Maps/TransportMgr.h b/src/server/game/Maps/TransportMgr.h
index 9767ab3359..73a5655fb0 100644
--- a/src/server/game/Maps/TransportMgr.h
+++ b/src/server/game/Maps/TransportMgr.h
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
@@ -158,6 +158,8 @@ private:
TransportInstanceMap _instanceTransports;
TransportAnimationContainer _transportAnimations;
+
+ void PreloadGridsFromQuery(std::string const& query, uint32& count);
};
#define sTransportMgr TransportMgr::instance()
diff --git a/src/server/game/Maps/ZoneScript.h b/src/server/game/Maps/ZoneScript.h
index c257115da0..3dd66ce290 100644
--- a/src/server/game/Maps/ZoneScript.h
+++ b/src/server/game/Maps/ZoneScript.h
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/game/Misc/BanMgr.cpp b/src/server/game/Misc/BanMgr.cpp
index 70fcf80d3c..bc2bb0d38f 100644
--- a/src/server/game/Misc/BanMgr.cpp
+++ b/src/server/game/Misc/BanMgr.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/game/Misc/BanMgr.h b/src/server/game/Misc/BanMgr.h
index e8eefae76a..8ba74f13a8 100644
--- a/src/server/game/Misc/BanMgr.h
+++ b/src/server/game/Misc/BanMgr.h
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/game/Misc/DynamicVisibility.cpp b/src/server/game/Misc/DynamicVisibility.cpp
index 60889c4bcc..cf1eed670e 100644
--- a/src/server/game/Misc/DynamicVisibility.cpp
+++ b/src/server/game/Misc/DynamicVisibility.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/game/Misc/DynamicVisibility.h b/src/server/game/Misc/DynamicVisibility.h
index 00d7fe6790..b0ec2d1fd5 100644
--- a/src/server/game/Misc/DynamicVisibility.h
+++ b/src/server/game/Misc/DynamicVisibility.h
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/game/Misc/GameGraveyard.cpp b/src/server/game/Misc/GameGraveyard.cpp
index 338e31ff42..e497a92457 100644
--- a/src/server/game/Misc/GameGraveyard.cpp
+++ b/src/server/game/Misc/GameGraveyard.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/game/Misc/GameGraveyard.h b/src/server/game/Misc/GameGraveyard.h
index c3f0a3a395..1ba22d1f72 100644
--- a/src/server/game/Misc/GameGraveyard.h
+++ b/src/server/game/Misc/GameGraveyard.h
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/game/Miscellaneous/Formulas.cpp b/src/server/game/Miscellaneous/Formulas.cpp
index 76c6c292d8..e8b6ea568a 100644
--- a/src/server/game/Miscellaneous/Formulas.cpp
+++ b/src/server/game/Miscellaneous/Formulas.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
@@ -84,14 +84,9 @@ uint32 Acore::XP::Gain(Player* player, Unit* unit, bool isBattleGround /*= false
if (gain && creature)
{
if (creature->isElite())
- {
- // Elites in instances have a 2.75x XP bonus instead of the regular 2x world bonus.
- if (unit->GetMap() && unit->GetMap()->IsDungeon())
- xpMod *= 2.75f;
- else
- xpMod *= 2.0f;
- }
+ xpMod *= 2.0f;
+ // Instanced mobs (particularly bosses) oftentimes have higher bonuses, especially in later content levels
xpMod *= creature->GetCreatureTemplate()->ModExperience;
}
diff --git a/src/server/game/Miscellaneous/Formulas.h b/src/server/game/Miscellaneous/Formulas.h
index eba9431c76..a8b87ae20f 100644
--- a/src/server/game/Miscellaneous/Formulas.h
+++ b/src/server/game/Miscellaneous/Formulas.h
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/game/Miscellaneous/Language.h b/src/server/game/Miscellaneous/Language.h
index 5658e4147d..66268e3b48 100644
--- a/src/server/game/Miscellaneous/Language.h
+++ b/src/server/game/Miscellaneous/Language.h
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
@@ -978,7 +978,8 @@ enum AcoreStrings
LANG_GUILD_INFO_EXTRA_INFO = 1183,
LANG_GUILD_INFO_RANKS = 1184,
LANG_GUILD_INFO_RANKS_LIST = 1185,
- // Room for more level 3 1186-1198 not used
+ LANG_COMMAND_BEASTMASTER_MODE = 1186,
+ // Room for more level 3 1187-1198 not used
// Debug commands
LANG_DO_NOT_USE_6X_DEBUG_AREATRIGGER_LEFT = 1999,
@@ -1156,7 +1157,10 @@ enum AcoreStrings
LANG_CMD_NO_DOOR_FOUND = 5086,
LANG_CMD_DOOR_OPENED = 5087,
- // Room for more strings 5088-9999
+ LANG_CMD_QUEST_STATUS = 5088,
+ LANG_CMD_QUEST_UNAVAILABLE = 5089,
+
+ // Room for more strings 5090-9999
// Level requirement notifications
LANG_SAY_REQ = 6604,
diff --git a/src/server/game/Modules/ModuleMgr.cpp b/src/server/game/Modules/ModuleMgr.cpp
index ed9ce90abd..7f4dcb274e 100644
--- a/src/server/game/Modules/ModuleMgr.cpp
+++ b/src/server/game/Modules/ModuleMgr.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/game/Modules/ModuleMgr.h b/src/server/game/Modules/ModuleMgr.h
index 3513dc5deb..c9a166be09 100644
--- a/src/server/game/Modules/ModuleMgr.h
+++ b/src/server/game/Modules/ModuleMgr.h
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/game/Motd/MotdMgr.cpp b/src/server/game/Motd/MotdMgr.cpp
index 8c85222d27..ad4df47a26 100644
--- a/src/server/game/Motd/MotdMgr.cpp
+++ b/src/server/game/Motd/MotdMgr.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/game/Motd/MotdMgr.h b/src/server/game/Motd/MotdMgr.h
index 1f85ba921c..7eff1b0686 100644
--- a/src/server/game/Motd/MotdMgr.h
+++ b/src/server/game/Motd/MotdMgr.h
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/game/Movement/FollowerRefMgr.h b/src/server/game/Movement/FollowerRefMgr.h
index c33e764651..6c2e6de436 100644
--- a/src/server/game/Movement/FollowerRefMgr.h
+++ b/src/server/game/Movement/FollowerRefMgr.h
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/game/Movement/FollowerReference.cpp b/src/server/game/Movement/FollowerReference.cpp
index de9eb97442..287a0d9c75 100644
--- a/src/server/game/Movement/FollowerReference.cpp
+++ b/src/server/game/Movement/FollowerReference.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/game/Movement/FollowerReference.h b/src/server/game/Movement/FollowerReference.h
index de172b6d79..2d1c77f46b 100644
--- a/src/server/game/Movement/FollowerReference.h
+++ b/src/server/game/Movement/FollowerReference.h
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/game/Movement/MotionMaster.cpp b/src/server/game/Movement/MotionMaster.cpp
index 2b2aba6ef9..8e4f91c16c 100644
--- a/src/server/game/Movement/MotionMaster.cpp
+++ b/src/server/game/Movement/MotionMaster.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
@@ -32,6 +32,7 @@
#include "TargetedMovementGenerator.h"
#include "WaypointMgr.h"
#include "WaypointMovementGenerator.h"
+#include "SmartScriptMgr.h"
inline MovementGenerator* GetIdleMovementGenerator()
{
@@ -387,6 +388,7 @@ void MotionMaster::MoveBackwards(Unit* target, float dist)
Movement::MoveSplineInit init(_owner);
init.MoveTo(point.x, point.y, point.z, false);
+ init.SetWalk(true);
init.SetFacing(target);
init.SetOrientationInversed();
init.Launch();
@@ -469,7 +471,7 @@ void MotionMaster::MoveFollow(Unit* target, float dist, float angle, MovementSlo
*
* For transition movement between the ground and the air, use MoveLand or MoveTakeoff instead.
*/
-void MotionMaster::MovePoint(uint32 id, float x, float y, float z, bool generatePath, bool forceDestination, MovementSlot slot, float orientation /* = 0.0f*/)
+void MotionMaster::MovePoint(uint32 id, float x, float y, float z, ForcedMovement forcedMovement, float speed, float orientation, bool generatePath, bool forceDestination, MovementSlot slot, std::optional<AnimTier> animTier)
{
if (_owner->HasUnitFlag(UNIT_FLAG_DISABLE_MOVE))
return;
@@ -477,16 +479,16 @@ void MotionMaster::MovePoint(uint32 id, float x, float y, float z, bool generate
if (_owner->IsPlayer())
{
LOG_DEBUG("movement.motionmaster", "Player ({}) targeted point (Id: {} X: {} Y: {} Z: {})", _owner->GetGUID().ToString(), id, x, y, z);
- Mutate(new PointMovementGenerator<Player>(id, x, y, z, 0.0f, orientation, nullptr, generatePath, forceDestination), slot);
+ Mutate(new PointMovementGenerator<Player>(id, x, y, z, forcedMovement, speed, orientation, nullptr, generatePath, forceDestination, animTier), slot);
}
else
{
LOG_DEBUG("movement.motionmaster", "Creature ({}) targeted point (ID: {} X: {} Y: {} Z: {})", _owner->GetGUID().ToString(), id, x, y, z);
- Mutate(new PointMovementGenerator<Creature>(id, x, y, z, 0.0f, orientation, nullptr, generatePath, forceDestination), slot);
+ Mutate(new PointMovementGenerator<Creature>(id, x, y, z, forcedMovement, speed, orientation, nullptr, generatePath, forceDestination, animTier), slot);
}
}
-void MotionMaster::MoveSplinePath(Movement::PointsArray* path)
+void MotionMaster::MoveSplinePath(Movement::PointsArray* path, ForcedMovement forcedMovement)
{
// Xinef: do not allow to move with UNIT_FLAG_DISABLE_MOVE
if (_owner->HasUnitFlag(UNIT_FLAG_DISABLE_MOVE))
@@ -494,27 +496,43 @@ void MotionMaster::MoveSplinePath(Movement::PointsArray* path)
if (_owner->IsPlayer())
{
- Mutate(new EscortMovementGenerator<Player>(path), MOTION_SLOT_ACTIVE);
+ Mutate(new EscortMovementGenerator<Player>(forcedMovement, path), MOTION_SLOT_ACTIVE);
}
else
{
- Mutate(new EscortMovementGenerator<Creature>(path), MOTION_SLOT_ACTIVE);
+ Mutate(new EscortMovementGenerator<Creature>(forcedMovement, path), MOTION_SLOT_ACTIVE);
}
}
-void MotionMaster::MoveSplinePath(uint32 path_id)
+void MotionMaster::MovePath(uint32 path_id, ForcedMovement forcedMovement, PathSource pathSource)
{
- // convert the path id to a Movement::PointsArray*
- Movement::PointsArray* points = new Movement::PointsArray();
- WaypointPath const* path = sWaypointMgr->GetPath(path_id);
- for (uint8 i = 0; i < path->size(); ++i)
+ WaypointPath const* path;
+ switch (pathSource)
+ {
+ default:
+ case PathSource::WAYPOINT_MGR:
+ path = sWaypointMgr->GetPath(path_id);
+ break;
+ case PathSource::SMART_WAYPOINT_MGR:
+ path = sSmartWaypointMgr->GetPath(path_id);
+ break;
+ }
+
+ if (path == nullptr)
+ {
+ LOG_ERROR("sql.sql", "WaypointMovementGenerator::LoadPath: creature {} ({}) doesn't have waypoint path id: {} pathSource: {}",
+ _owner->GetName(), _owner->GetGUID().ToString(), path_id, pathSource);
+ return;
+ }
+
+ Movement::PointsArray points;
+ for (auto& point : *path)
{
- WaypointData const* node = path->at(i);
- points->push_back(G3D::Vector3(node->x, node->y, node->z));
+ points.push_back(G3D::Vector3(point.second.x, point.second.y, point.second.z));
}
// pass the new PointsArray* to the appropriate MoveSplinePath function
- MoveSplinePath(points);
+ MoveSplinePath(&points, forcedMovement);
}
/**
@@ -538,9 +556,9 @@ void MotionMaster::MoveLand(uint32 id, Position const& pos, float speed /* = 0.0
init.SetVelocity(speed);
}
- init.SetAnimation(Movement::ToGround);
- init.Launch();
- Mutate(new EffectMovementGenerator(id), MOTION_SLOT_ACTIVE);
+ init.SetAnimation(AnimTier::Ground);
+
+ Mutate(new EffectMovementGenerator(init, id), MOTION_SLOT_ACTIVE);
}
/**
@@ -569,16 +587,12 @@ void MotionMaster::MoveTakeoff(uint32 id, Position const& pos, float speed /* =
init.MoveTo(x, y, z);
if (speed > 0.0f)
- {
init.SetVelocity(speed);
- }
if (!skipAnimation)
- {
- init.SetAnimation(Movement::ToFly);
- }
- init.Launch();
- Mutate(new EffectMovementGenerator(id), MOTION_SLOT_ACTIVE);
+ init.SetAnimation(AnimTier::Hover);
+
+ Mutate(new EffectMovementGenerator(init, id), MOTION_SLOT_ACTIVE);
}
/**
@@ -612,8 +626,8 @@ void MotionMaster::MoveKnockbackFrom(float srcX, float srcY, float speedXY, floa
init.SetParabolic(max_height, 0);
init.SetOrientationFixed(true);
init.SetVelocity(speedXY);
- init.Launch();
- Mutate(new EffectMovementGenerator(0), MOTION_SLOT_CONTROLLED);
+
+ Mutate(new EffectMovementGenerator(init, 0), MOTION_SLOT_CONTROLLED);
}
/**
@@ -652,8 +666,8 @@ void MotionMaster::MoveJump(float x, float y, float z, float speedXY, float spee
init.SetVelocity(speedXY);
if (target)
init.SetFacing(target);
- init.Launch();
- Mutate(new EffectMovementGenerator(id), MOTION_SLOT_CONTROLLED);
+
+ Mutate(new EffectMovementGenerator(init, id), MOTION_SLOT_CONTROLLED);
}
/**
@@ -695,8 +709,8 @@ void MotionMaster::MoveFall(uint32 id /*=0*/, bool addFlagForNPC)
Movement::MoveSplineInit init(_owner);
init.MoveTo(_owner->GetPositionX(), _owner->GetPositionY(), tz + _owner->GetHoverHeight());
init.SetFall();
- init.Launch();
- Mutate(new EffectMovementGenerator(id), MOTION_SLOT_CONTROLLED);
+
+ Mutate(new EffectMovementGenerator(init, id), MOTION_SLOT_CONTROLLED);
}
/**
@@ -713,12 +727,12 @@ void MotionMaster::MoveCharge(float x, float y, float z, float speed, uint32 id,
if (_owner->IsPlayer())
{
LOG_DEBUG("movement.motionmaster", "Player ({}) charge point (X: {} Y: {} Z: {})", _owner->GetGUID().ToString(), x, y, z);
- Mutate(new PointMovementGenerator<Player>(id, x, y, z, speed, orientation, path, generatePath, generatePath, targetGUID), MOTION_SLOT_CONTROLLED);
+ Mutate(new PointMovementGenerator<Player>(id, x, y, z, FORCED_MOVEMENT_NONE, speed, orientation, path, generatePath, generatePath, std::nullopt, targetGUID), MOTION_SLOT_CONTROLLED);
}
else
{
LOG_DEBUG("movement.motionmaster", "Creature ({}) charge point (X: {} Y: {} Z: {})", _owner->GetGUID().ToString(), x, y, z);
- Mutate(new PointMovementGenerator<Creature>(id, x, y, z, speed, orientation, path, generatePath, generatePath, targetGUID), MOTION_SLOT_CONTROLLED);
+ Mutate(new PointMovementGenerator<Creature>(id, x, y, z, FORCED_MOVEMENT_NONE, speed, orientation, path, generatePath, generatePath, std::nullopt, targetGUID), MOTION_SLOT_CONTROLLED);
}
}
@@ -884,7 +898,7 @@ void MotionMaster::Mutate(MovementGenerator* m, MovementSlot slot)
/**
* @brief Move the unit following a specific path. Doesn't work with UNIT_FLAG_DISABLE_MOVE
*/
-void MotionMaster::MovePath(uint32 path_id, bool repeatable)
+void MotionMaster::MoveWaypoint(uint32 path_id, bool repeatable, PathSource pathSource)
{
if (!path_id)
return;
@@ -892,20 +906,7 @@ void MotionMaster::MovePath(uint32 path_id, bool repeatable)
if (_owner->HasUnitFlag(UNIT_FLAG_DISABLE_MOVE))
return;
- //We set waypoint movement as new default movement generator
- // clear ALL movement generators (including default)
- /*while (!empty())
- {
- MovementGenerator *curr = top();
- curr->Finalize(*_owner);
- pop();
- if (!isStatic(curr))
- delete curr;
- }*/
-
- //_owner->IsPlayer() ?
- //Mutate(new WaypointMovementGenerator<Player>(path_id, repeatable)):
- Mutate(new WaypointMovementGenerator<Creature>(path_id, repeatable), MOTION_SLOT_IDLE);
+ Mutate(new WaypointMovementGenerator<Creature>(path_id, pathSource, repeatable), MOTION_SLOT_IDLE);
LOG_DEBUG("movement.motionmaster", "{} ({}) start moving over path(Id:{}, repeatable: {})",
_owner->IsPlayer() ? "Player" : "Creature", _owner->GetGUID().ToString(), path_id, repeatable ? "YES" : "NO");
diff --git a/src/server/game/Movement/MotionMaster.h b/src/server/game/Movement/MotionMaster.h
index 0fcf5abae8..4ac140260f 100644
--- a/src/server/game/Movement/MotionMaster.h
+++ b/src/server/game/Movement/MotionMaster.h
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
@@ -80,6 +80,31 @@ enum RotateDirection
ROTATE_DIRECTION_RIGHT
};
+enum ForcedMovement
+{
+ FORCED_MOVEMENT_NONE = 0,
+ FORCED_MOVEMENT_WALK = 1,
+ FORCED_MOVEMENT_RUN = 2,
+
+ FORCED_MOVEMENT_MAX
+};
+
+enum class PathSource
+{
+ WAYPOINT_MGR = 0,
+ SMART_WAYPOINT_MGR = 1,
+};
+
+enum class AnimTier : uint8
+{
+ Ground = 0,
+ Swim = 1,
+ Hover = 2,
+ Fly = 3,
+ Submerged = 4,
+ Max
+};
+
struct ChaseRange
{
ChaseRange(float range);
@@ -210,11 +235,11 @@ public:
void MoveForwards(Unit* target, float dist);
void MoveConfused();
void MoveFleeing(Unit* enemy, uint32 time = 0);
- void MovePoint(uint32 id, const Position& pos, bool generatePath = true, bool forceDestination = true)
- { MovePoint(id, pos.m_positionX, pos.m_positionY, pos.m_positionZ, generatePath, forceDestination, MOTION_SLOT_ACTIVE, pos.GetOrientation()); }
- void MovePoint(uint32 id, float x, float y, float z, bool generatePath = true, bool forceDestination = true, MovementSlot slot = MOTION_SLOT_ACTIVE, float orientation = 0.0f);
- void MoveSplinePath(Movement::PointsArray* path);
- void MoveSplinePath(uint32 path_id);
+ void MovePoint(uint32 id, const Position& pos, ForcedMovement forcedMovement = FORCED_MOVEMENT_NONE, float speed = 0.f, bool generatePath = true, bool forceDestination = true, std::optional<AnimTier> animTier = std::nullopt)
+ { MovePoint(id, pos.m_positionX, pos.m_positionY, pos.m_positionZ, forcedMovement, speed, pos.GetOrientation(), generatePath, forceDestination, MOTION_SLOT_ACTIVE, animTier); }
+ void MovePoint(uint32 id, float x, float y, float z, ForcedMovement forcedMovement = FORCED_MOVEMENT_NONE, float speed = 0.f, float orientation = 0.0f, bool generatePath = true, bool forceDestination = true, MovementSlot slot = MOTION_SLOT_ACTIVE, std::optional<AnimTier> animTier = std::nullopt);
+ void MoveSplinePath(Movement::PointsArray* path, ForcedMovement forcedMovement = FORCED_MOVEMENT_NONE);
+ void MovePath(uint32 path_id, ForcedMovement forcedMovement = FORCED_MOVEMENT_NONE, PathSource pathSource = PathSource::WAYPOINT_MGR);
// These two movement types should only be used with creatures having landing/takeoff animations
void MoveLand(uint32 id, Position const& pos, float speed = 0.0f);
@@ -235,7 +260,7 @@ public:
void MoveSeekAssistanceDistract(uint32 timer);
void MoveTaxiFlight(uint32 path, uint32 pathnode);
void MoveDistract(uint32 time);
- void MovePath(uint32 path_id, bool repeatable);
+ void MoveWaypoint(uint32 path_id, bool repeatable, PathSource pathSource = PathSource::WAYPOINT_MGR);
void MoveRotate(uint32 time, RotateDirection direction);
[[nodiscard]] MovementGeneratorType GetCurrentMovementGeneratorType() const;
diff --git a/src/server/game/Movement/MovementGenerator.cpp b/src/server/game/Movement/MovementGenerator.cpp
index a14578b26e..d92939c5fe 100644
--- a/src/server/game/Movement/MovementGenerator.cpp
+++ b/src/server/game/Movement/MovementGenerator.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/game/Movement/MovementGenerator.h b/src/server/game/Movement/MovementGenerator.h
index 4ddd4a1d43..89ff556839 100644
--- a/src/server/game/Movement/MovementGenerator.h
+++ b/src/server/game/Movement/MovementGenerator.h
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/game/Movement/MovementGenerators/ConfusedMovementGenerator.cpp b/src/server/game/Movement/MovementGenerators/ConfusedMovementGenerator.cpp
index 6d3d1007c8..2839e8bdd8 100644
--- a/src/server/game/Movement/MovementGenerators/ConfusedMovementGenerator.cpp
+++ b/src/server/game/Movement/MovementGenerators/ConfusedMovementGenerator.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
@@ -146,6 +146,7 @@ bool ConfusedMovementGenerator<T>::DoUpdate(T* unit, uint32 diff)
float z = i_waypoints[i_nextMove][2];
Movement::MoveSplineInit init(unit);
init.MoveTo(x, y, z, true);
+ init.SetWalk(true);
init.Launch();
}
}
diff --git a/src/server/game/Movement/MovementGenerators/ConfusedMovementGenerator.h b/src/server/game/Movement/MovementGenerators/ConfusedMovementGenerator.h
index 73038a1387..bb119338e0 100644
--- a/src/server/game/Movement/MovementGenerators/ConfusedMovementGenerator.h
+++ b/src/server/game/Movement/MovementGenerators/ConfusedMovementGenerator.h
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/game/Movement/MovementGenerators/EscortMovementGenerator.cpp b/src/server/game/Movement/MovementGenerators/EscortMovementGenerator.cpp
index 14133dbe26..35d09cf42a 100644
--- a/src/server/game/Movement/MovementGenerators/EscortMovementGenerator.cpp
+++ b/src/server/game/Movement/MovementGenerators/EscortMovementGenerator.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
@@ -36,6 +36,11 @@ void EscortMovementGenerator<T>::DoInitialize(T* unit)
else if (m_precomputedPath.size())
init.MovebyPath(m_precomputedPath);
+ if (_forcedMovement == FORCED_MOVEMENT_WALK)
+ init.SetWalk(true);
+ else if (_forcedMovement == FORCED_MOVEMENT_RUN)
+ init.SetWalk(false);
+
init.Launch();
_splineId = unit->movespline->GetId();
@@ -79,6 +84,11 @@ bool EscortMovementGenerator<T>::DoUpdate(T* unit, uint32 /*diff*/)
init.MoveTo(m_precomputedPath[1].x, m_precomputedPath[1].y, m_precomputedPath[1].z, true);
}
+ if (_forcedMovement == FORCED_MOVEMENT_WALK)
+ init.SetWalk(true);
+ else if (_forcedMovement == FORCED_MOVEMENT_RUN)
+ init.SetWalk(false);
+
init.Launch();
// Xinef: Override spline Id on recalculate launch
_splineId = unit->movespline->GetId();
diff --git a/src/server/game/Movement/MovementGenerators/EscortMovementGenerator.h b/src/server/game/Movement/MovementGenerators/EscortMovementGenerator.h
index edb410b8a8..fdb4d317f3 100644
--- a/src/server/game/Movement/MovementGenerators/EscortMovementGenerator.h
+++ b/src/server/game/Movement/MovementGenerators/EscortMovementGenerator.h
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
@@ -24,7 +24,7 @@ template<class T>
class EscortMovementGenerator : public MovementGeneratorMedium< T, EscortMovementGenerator<T> >
{
public:
- EscortMovementGenerator(Movement::PointsArray* _path = nullptr) : i_recalculateSpeed(false)
+ EscortMovementGenerator(ForcedMovement forcedMovement, Movement::PointsArray* _path = nullptr) : i_recalculateSpeed(false), _forcedMovement(forcedMovement)
{
if (_path)
m_precomputedPath = *_path;
@@ -46,6 +46,7 @@ private:
Movement::PointsArray m_precomputedPath;
uint32 _splineId;
+ ForcedMovement _forcedMovement;
};
#endif
diff --git a/src/server/game/Movement/MovementGenerators/FleeingMovementGenerator.cpp b/src/server/game/Movement/MovementGenerators/FleeingMovementGenerator.cpp
index d340246555..45b14e1ae1 100644
--- a/src/server/game/Movement/MovementGenerators/FleeingMovementGenerator.cpp
+++ b/src/server/game/Movement/MovementGenerators/FleeingMovementGenerator.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/game/Movement/MovementGenerators/FleeingMovementGenerator.h b/src/server/game/Movement/MovementGenerators/FleeingMovementGenerator.h
index bcde0966ea..a169a5fb31 100644
--- a/src/server/game/Movement/MovementGenerators/FleeingMovementGenerator.h
+++ b/src/server/game/Movement/MovementGenerators/FleeingMovementGenerator.h
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/game/Movement/MovementGenerators/HomeMovementGenerator.cpp b/src/server/game/Movement/MovementGenerators/HomeMovementGenerator.cpp
index be1667e5bc..d4928722a5 100644
--- a/src/server/game/Movement/MovementGenerators/HomeMovementGenerator.cpp
+++ b/src/server/game/Movement/MovementGenerators/HomeMovementGenerator.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
@@ -31,8 +31,6 @@ void HomeMovementGenerator<Creature>::DoFinalize(Creature* owner)
owner->ClearUnitState(UNIT_STATE_EVADE);
if (arrived)
{
- // Xinef: npc run by default
- //owner->SetWalk(true);
owner->LoadCreaturesAddon(true);
owner->AI()->JustReachedHome();
}
diff --git a/src/server/game/Movement/MovementGenerators/HomeMovementGenerator.h b/src/server/game/Movement/MovementGenerators/HomeMovementGenerator.h
index 82da2b0f2f..fe01f12d18 100644
--- a/src/server/game/Movement/MovementGenerators/HomeMovementGenerator.h
+++ b/src/server/game/Movement/MovementGenerators/HomeMovementGenerator.h
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/game/Movement/MovementGenerators/IdleMovementGenerator.cpp b/src/server/game/Movement/MovementGenerators/IdleMovementGenerator.cpp
index c1505f9af1..0aef8cd733 100644
--- a/src/server/game/Movement/MovementGenerators/IdleMovementGenerator.cpp
+++ b/src/server/game/Movement/MovementGenerators/IdleMovementGenerator.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/game/Movement/MovementGenerators/IdleMovementGenerator.h b/src/server/game/Movement/MovementGenerators/IdleMovementGenerator.h
index 293862bdda..fa7c948e4b 100644
--- a/src/server/game/Movement/MovementGenerators/IdleMovementGenerator.h
+++ b/src/server/game/Movement/MovementGenerators/IdleMovementGenerator.h
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/game/Movement/MovementGenerators/PathGenerator.cpp b/src/server/game/Movement/MovementGenerators/PathGenerator.cpp
index c59def7b72..5ddbc2c45a 100644
--- a/src/server/game/Movement/MovementGenerators/PathGenerator.cpp
+++ b/src/server/game/Movement/MovementGenerators/PathGenerator.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
@@ -211,8 +211,8 @@ void PathGenerator::BuildPolyPath(G3D::Vector3 const& startPos, G3D::Vector3 con
{
bool buildShortcut = false;
- auto liquidDataStart = _source->GetMap()->GetLiquidData(_source->GetPhaseMask(), startPos.x, startPos.y, startPos.z, _source->GetCollisionHeight(), MAP_ALL_LIQUIDS);
- auto liquidDataEnd = _source->GetMap()->GetLiquidData(_source->GetPhaseMask(), endPos.x, endPos.y, endPos.z, _source->GetCollisionHeight(), MAP_ALL_LIQUIDS);
+ auto liquidDataStart = _source->GetMap()->GetLiquidData(_source->GetPhaseMask(), startPos.x, startPos.y, startPos.z, _source->GetCollisionHeight(), {});
+ auto liquidDataEnd = _source->GetMap()->GetLiquidData(_source->GetPhaseMask(), endPos.x, endPos.y, endPos.z, _source->GetCollisionHeight(), {});
bool startUnderWaterEndInWater = liquidDataStart.Status == LIQUID_MAP_UNDER_WATER &&
(liquidDataEnd.Status & MAP_LIQUID_STATUS_IN_CONTACT) != 0;
@@ -698,7 +698,7 @@ void PathGenerator::UpdateFilter()
NavTerrain PathGenerator::GetNavTerrain(float x, float y, float z) const
{
- LiquidData const& liquidData = _source->GetMap()->GetLiquidData(_source->GetPhaseMask(), x, y, z, _source->GetCollisionHeight(), MAP_ALL_LIQUIDS);
+ LiquidData const& liquidData = _source->GetMap()->GetLiquidData(_source->GetPhaseMask(), x, y, z, _source->GetCollisionHeight(), {});
if (liquidData.Status == LIQUID_MAP_NO_WATER)
return NAV_GROUND;
diff --git a/src/server/game/Movement/MovementGenerators/PathGenerator.h b/src/server/game/Movement/MovementGenerators/PathGenerator.h
index b26f961a84..56b55d2f96 100644
--- a/src/server/game/Movement/MovementGenerators/PathGenerator.h
+++ b/src/server/game/Movement/MovementGenerators/PathGenerator.h
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/game/Movement/MovementGenerators/PointMovementGenerator.cpp b/src/server/game/Movement/MovementGenerators/PointMovementGenerator.cpp
index fdce942480..66ba79be59 100644
--- a/src/server/game/Movement/MovementGenerators/PointMovementGenerator.cpp
+++ b/src/server/game/Movement/MovementGenerators/PointMovementGenerator.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
@@ -84,11 +84,19 @@ void PointMovementGenerator<T>::DoInitialize(T* unit)
if (speed > 0.0f)
init.SetVelocity(speed);
+ if (_forcedMovement == FORCED_MOVEMENT_WALK)
+ init.SetWalk(true);
+ else if (_forcedMovement == FORCED_MOVEMENT_RUN)
+ init.SetWalk(false);
+
if (i_orientation > 0.0f)
{
init.SetFacing(i_orientation);
}
+ if (_animTier)
+ init.SetAnimation(*_animTier);
+
init.Launch();
}
@@ -142,6 +150,14 @@ bool PointMovementGenerator<T>::DoUpdate(T* unit, uint32 /*diff*/)
if (speed > 0.0f) // Default value for point motion type is 0.0, if 0.0 spline will use GetSpeed on unit
init.SetVelocity(speed);
+ if (_forcedMovement == FORCED_MOVEMENT_WALK)
+ init.SetWalk(true);
+ else if (_forcedMovement == FORCED_MOVEMENT_RUN)
+ init.SetWalk(false);
+
+ if (_animTier)
+ init.SetAnimation(*_animTier);
+
if (i_orientation > 0.0f)
{
init.SetFacing(i_orientation);
@@ -200,9 +216,14 @@ template <> void PointMovementGenerator<Creature>::MovementInform(Creature* unit
if (Unit* summoner = unit->GetCharmerOrOwner())
{
if (UnitAI* AI = summoner->GetAI())
- {
AI->SummonMovementInform(unit, POINT_MOTION_TYPE, id);
- }
+ }
+ else
+ {
+ if (TempSummon* tempSummon = unit->ToTempSummon())
+ if (Unit* summoner = tempSummon->GetSummonerUnit())
+ if (UnitAI* AI = summoner->GetAI())
+ AI->SummonMovementInform(unit, POINT_MOTION_TYPE, id);
}
}
@@ -228,6 +249,11 @@ bool EffectMovementGenerator::Update(Unit* unit, uint32)
return !unit->movespline->Finalized();
}
+void EffectMovementGenerator::Initialize(Unit*)
+{
+ i_spline.Launch();
+}
+
void EffectMovementGenerator::Finalize(Unit* unit)
{
if (!unit->IsCreature())
diff --git a/src/server/game/Movement/MovementGenerators/PointMovementGenerator.h b/src/server/game/Movement/MovementGenerators/PointMovementGenerator.h
index f19e04d422..b4b782bfd1 100644
--- a/src/server/game/Movement/MovementGenerators/PointMovementGenerator.h
+++ b/src/server/game/Movement/MovementGenerators/PointMovementGenerator.h
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
@@ -20,15 +20,17 @@
#include "Creature.h"
#include "MovementGenerator.h"
+#include "MoveSplineInit.h"
+#include <optional>
template<class T>
class PointMovementGenerator : public MovementGeneratorMedium< T, PointMovementGenerator<T> >
{
public:
- PointMovementGenerator(uint32 _id, float _x, float _y, float _z, float _speed = 0.0f, float orientation = 0.0f, const Movement::PointsArray* _path = nullptr,
- bool generatePath = false, bool forceDestination = false, ObjectGuid chargeTargetGUID = ObjectGuid::Empty)
- : id(_id), i_x(_x), i_y(_y), i_z(_z), speed(_speed), i_orientation(orientation), _generatePath(generatePath), _forceDestination(forceDestination),
- _chargeTargetGUID(chargeTargetGUID)
+ PointMovementGenerator(uint32 _id, float _x, float _y, float _z, ForcedMovement forcedMovement, float _speed = 0.0f, float orientation = 0.0f, const Movement::PointsArray* _path = nullptr,
+ bool generatePath = false, bool forceDestination = false, std::optional<AnimTier> animTier = std::nullopt, ObjectGuid chargeTargetGUID = ObjectGuid::Empty, bool reverseOrientation = false, ObjectGuid facingTargetGuid = ObjectGuid())
+ : id(_id), i_x(_x), i_y(_y), i_z(_z), speed(_speed), i_orientation(orientation), _generatePath(generatePath), _forceDestination(forceDestination), _reverseOrientation(reverseOrientation),
+ _chargeTargetGUID(chargeTargetGUID), _forcedMovement(forcedMovement), _facingTargetGuid(facingTargetGuid), _animTier(animTier)
{
if (_path)
m_precomputedPath = *_path;
@@ -55,14 +57,18 @@ private:
Movement::PointsArray m_precomputedPath;
bool _generatePath;
bool _forceDestination;
+ bool _reverseOrientation;
ObjectGuid _chargeTargetGUID;
+ ForcedMovement _forcedMovement;
+ ObjectGuid _facingTargetGuid;
+ std::optional<AnimTier> _animTier;
};
class AssistanceMovementGenerator : public PointMovementGenerator<Creature>
{
public:
AssistanceMovementGenerator(float _x, float _y, float _z) :
- PointMovementGenerator<Creature>(0, _x, _y, _z) {}
+ PointMovementGenerator<Creature>(0, _x, _y, _z, FORCED_MOVEMENT_NONE) {}
MovementGeneratorType GetMovementGeneratorType() { return ASSISTANCE_MOTION_TYPE; }
void Finalize(Unit*);
@@ -72,14 +78,15 @@ public:
class EffectMovementGenerator : public MovementGenerator
{
public:
- explicit EffectMovementGenerator(uint32 Id) : m_Id(Id) {}
- void Initialize(Unit*) override {}
+ explicit EffectMovementGenerator(Movement::MoveSplineInit& spline, uint32 Id) : m_Id(Id), i_spline(spline) {}
+ void Initialize(Unit*) override;
void Finalize(Unit*) override;
void Reset(Unit*) override {}
bool Update(Unit*, uint32) override;
MovementGeneratorType GetMovementGeneratorType() override { return EFFECT_MOTION_TYPE; }
private:
uint32 m_Id;
+ Movement::MoveSplineInit i_spline;
};
#endif
diff --git a/src/server/game/Movement/MovementGenerators/RandomMovementGenerator.cpp b/src/server/game/Movement/MovementGenerators/RandomMovementGenerator.cpp
index 5d904d31ac..56109087f3 100644
--- a/src/server/game/Movement/MovementGenerators/RandomMovementGenerator.cpp
+++ b/src/server/game/Movement/MovementGenerators/RandomMovementGenerator.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
@@ -51,7 +51,21 @@ void RandomMovementGenerator<Creature>::_setRandomLocation(Creature* creature)
creature->AddUnitState(UNIT_STATE_ROAMING_MOVE);
Movement::MoveSplineInit init(creature);
init.MoveTo(_currDestPosition.GetPositionX(), _currDestPosition.GetPositionY(), _currDestPosition.GetPositionZ());
- init.SetWalk(true);
+
+ bool walk = true;
+ switch (creature->GetMovementTemplate().GetRandom())
+ {
+ case CreatureRandomMovementType::CanRun:
+ walk = creature->IsWalking();
+ break;
+ case CreatureRandomMovementType::AlwaysRun:
+ walk = false;
+ break;
+ default:
+ break;
+ }
+
+ init.SetWalk(walk);
init.Launch();
if (creature->GetFormation() && creature->GetFormation()->GetLeader() == creature)
creature->GetFormation()->LeaderMoveTo(_currDestPosition.GetPositionX(), _currDestPosition.GetPositionY(), _currDestPosition.GetPositionZ(), 0);
@@ -270,7 +284,6 @@ template<>
void RandomMovementGenerator<Creature>::DoFinalize(Creature* creature)
{
creature->ClearUnitState(UNIT_STATE_ROAMING | UNIT_STATE_ROAMING_MOVE);
- creature->SetWalk(false);
}
template<>
diff --git a/src/server/game/Movement/MovementGenerators/RandomMovementGenerator.h b/src/server/game/Movement/MovementGenerators/RandomMovementGenerator.h
index d765e3d3e8..f5bdabdac0 100644
--- a/src/server/game/Movement/MovementGenerators/RandomMovementGenerator.h
+++ b/src/server/game/Movement/MovementGenerators/RandomMovementGenerator.h
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/game/Movement/MovementGenerators/TargetedMovementGenerator.cpp b/src/server/game/Movement/MovementGenerators/TargetedMovementGenerator.cpp
index 4dfc688282..eff2249dae 100644
--- a/src/server/game/Movement/MovementGenerators/TargetedMovementGenerator.cpp
+++ b/src/server/game/Movement/MovementGenerators/TargetedMovementGenerator.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
@@ -113,7 +113,7 @@ bool ChaseMovementGenerator<T>::DispatchSplineToPosition(T* owner, float x, floa
}
owner->StopMoving();
- return true;
+ return false;
}
if (cutPath)
@@ -134,7 +134,7 @@ bool ChaseMovementGenerator<T>::DispatchSplineToPosition(T* owner, float x, floa
init.SetWalk(walk);
init.Launch();
- return false;
+ return true;
}
template<class T>
@@ -219,18 +219,21 @@ bool ChaseMovementGenerator<T>::DoUpdate(T* owner, uint32 time_diff)
{
i_recheckDistance.Reset(400); // Sniffed value
- if (i_recalculateTravel && PositionOkay(owner, target, _movingTowards ? maxTarget : Optional<float>(), angle))
+ if (m_currentMode != CHASE_MODE_DISTANCING)
{
- if ((owner->HasUnitState(UNIT_STATE_CHASE_MOVE) && !target->isMoving() && !mutualChase) || _range)
+ if (i_recalculateTravel && PositionOkay(owner, target, _movingTowards ? maxTarget : Optional<float>(), angle))
{
- i_recalculateTravel = false;
- i_path = nullptr;
- if (cOwner)
- cOwner->SetCannotReachTarget();
- owner->StopMoving();
- owner->SetInFront(target);
- MovementInform(owner);
- return true;
+ if ((owner->HasUnitState(UNIT_STATE_CHASE_MOVE) && !target->isMoving() && !mutualChase) || _range)
+ {
+ i_recalculateTravel = false;
+ i_path = nullptr;
+ if (cOwner)
+ cOwner->SetCannotReachTarget();
+ owner->StopMoving();
+ owner->SetInFront(target);
+ MovementInform(owner);
+ return true;
+ }
}
}
}
@@ -262,6 +265,9 @@ bool ChaseMovementGenerator<T>::DoUpdate(T* owner, uint32 time_diff)
i_leashExtensionTimer.Reset(cOwner->GetAttackTime(BASE_ATTACK));
}
+ if (m_currentMode == CHASE_MODE_DISTANCING)
+ return true;
+
// if the target moved, we have to consider whether to adjust
if (!_lastTargetPosition || target->GetPosition() != _lastTargetPosition.value() || mutualChase != _mutualChase || !owner->IsWithinLOSInMap(target))
{
@@ -365,7 +371,6 @@ void ChaseMovementGenerator<Creature>::DoInitialize(Creature* owner)
_lastTargetPosition.reset();
i_recheckDistance.Reset(0);
i_leashExtensionTimer.Reset(owner->GetAttackTime(BASE_ATTACK));
- owner->SetWalk(false);
owner->AddUnitState(UNIT_STATE_CHASE);
}
diff --git a/src/server/game/Movement/MovementGenerators/TargetedMovementGenerator.h b/src/server/game/Movement/MovementGenerators/TargetedMovementGenerator.h
index e5e87f845b..4e7721be38 100644
--- a/src/server/game/Movement/MovementGenerators/TargetedMovementGenerator.h
+++ b/src/server/game/Movement/MovementGenerators/TargetedMovementGenerator.h
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/game/Movement/MovementGenerators/WaypointMovementGenerator.cpp b/src/server/game/Movement/MovementGenerators/WaypointMovementGenerator.cpp
index be3c0d57f1..7c13fb982e 100644
--- a/src/server/game/Movement/MovementGenerators/WaypointMovementGenerator.cpp
+++ b/src/server/game/Movement/MovementGenerators/WaypointMovementGenerator.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
@@ -28,13 +28,26 @@
#include "Spell.h"
#include "Transport.h"
#include "World.h"
+#include "SmartScriptMgr.h"
void WaypointMovementGenerator<Creature>::LoadPath(Creature* creature)
{
- if (!path_id)
- path_id = creature->GetWaypointPath();
+ switch (i_pathSource)
+ {
+ case PathSource::WAYPOINT_MGR:
+ {
+ if (!path_id)
+ path_id = creature->GetWaypointPath();
- i_path = sWaypointMgr->GetPath(path_id);
+ i_path = sWaypointMgr->GetPath(path_id);
+ break;
+ }
+ case PathSource::SMART_WAYPOINT_MGR:
+ {
+ i_path = sSmartWaypointMgr->GetPath(path_id);
+ break;
+ }
+ }
if (!i_path)
{
@@ -44,6 +57,8 @@ void WaypointMovementGenerator<Creature>::LoadPath(Creature* creature)
return;
}
+ i_currentNode = i_path->begin()->first;
+
StartMoveNow(creature);
}
@@ -56,7 +71,6 @@ void WaypointMovementGenerator<Creature>::DoInitialize(Creature* creature)
void WaypointMovementGenerator<Creature>::DoFinalize(Creature* creature)
{
creature->ClearUnitState(UNIT_STATE_ROAMING | UNIT_STATE_ROAMING_MOVE);
- creature->SetWalk(false);
}
void WaypointMovementGenerator<Creature>::DoReset(Creature* creature)
@@ -79,22 +93,24 @@ void WaypointMovementGenerator<Creature>::OnArrived(Creature* creature)
creature->ClearUnitState(UNIT_STATE_ROAMING_MOVE);
m_isArrivalDone = true;
- if (i_path->at(i_currentNode)->event_id && urand(0, 99) < i_path->at(i_currentNode)->event_chance)
+ auto currentNodeItr = i_path->find(i_currentNode);
+
+ if (currentNodeItr->second.event_id && urand(0, 99) < currentNodeItr->second.event_chance)
{
LOG_DEBUG("maps.script", "Creature movement start script {} at point {} for {}.",
- i_path->at(i_currentNode)->event_id, i_currentNode, creature->GetGUID().ToString());
+ currentNodeItr->second.event_id, i_currentNode, creature->GetGUID().ToString());
creature->ClearUnitState(UNIT_STATE_ROAMING_MOVE);
- creature->GetMap()->ScriptsStart(sWaypointScripts, i_path->at(i_currentNode)->event_id, creature, nullptr);
+ creature->GetMap()->ScriptsStart(sWaypointScripts, currentNodeItr->second.event_id, creature, nullptr);
}
// Inform script
MovementInform(creature);
creature->UpdateWaypointID(i_currentNode);
- if (i_path->at(i_currentNode)->delay)
+ if (currentNodeItr->second.delay)
{
creature->ClearUnitState(UNIT_STATE_ROAMING_MOVE);
- Stop(i_path->at(i_currentNode)->delay);
+ Stop(currentNodeItr->second.delay);
}
}
@@ -114,12 +130,11 @@ bool WaypointMovementGenerator<Creature>::StartMove(Creature* creature)
if (m_isArrivalDone)
{
- // Xinef: not true... update this at every waypoint!
- //if ((i_currentNode == i_path->size() - 1) && !repeating) // If that's our last waypoint
{
- float x = i_path->at(i_currentNode)->x;
- float y = i_path->at(i_currentNode)->y;
- float z = i_path->at(i_currentNode)->z;
+ auto currentNodeItr = i_path->find(i_currentNode);
+ float x = currentNodeItr->second.x;
+ float y = currentNodeItr->second.y;
+ float z = currentNodeItr->second.z;
float o = creature->GetOrientation();
if (!transportPath)
@@ -140,14 +155,17 @@ bool WaypointMovementGenerator<Creature>::StartMove(Creature* creature)
}
// Xinef: moved the upper IF here
- if ((i_currentNode == i_path->size() - 1) && !repeating) // If that's our last waypoint
+ uint32 lastPoint = i_path->rbegin()->first;
+ if ((i_currentNode == lastPoint) && !repeating) // If that's our last waypoint
{
creature->AI()->PathEndReached(path_id);
creature->GetMotionMaster()->Initialize();
return false;
}
- i_currentNode = (i_currentNode + 1) % i_path->size();
+ ++i_currentNode;
+ if (lastPoint < i_currentNode)
+ i_currentNode = i_path->begin()->first;
}
// xinef: do not initialize motion if we got stunned in movementinform
@@ -156,13 +174,14 @@ bool WaypointMovementGenerator<Creature>::StartMove(Creature* creature)
return true;
}
- WaypointData const* node = i_path->at(i_currentNode);
+ auto currentNodeItr = i_path->find(i_currentNode);
+ WaypointData const& node = currentNodeItr->second;
m_isArrivalDone = false;
creature->AddUnitState(UNIT_STATE_ROAMING_MOVE);
- Movement::Location formationDest(node->x, node->y, node->z, 0.0f);
+ Movement::Location formationDest(node.x, node.y, node.z, 0.0f);
Movement::MoveSplineInit init(creature);
//! If creature is on transport, we assume waypoints set in DB are already transport offsets
@@ -173,22 +192,22 @@ bool WaypointMovementGenerator<Creature>::StartMove(Creature* creature)
trans->CalculatePassengerPosition(formationDest.x, formationDest.y, formationDest.z, &formationDest.orientation);
}
- float z = node->z;
- creature->UpdateAllowedPositionZ(node->x, node->y, z);
+ float z = node.z;
+ creature->UpdateAllowedPositionZ(node.x, node.y, z);
//! Do not use formationDest here, MoveTo requires transport offsets due to DisableTransportPathTransformations() call
//! but formationDest contains global coordinates
- init.MoveTo(node->x, node->y, z, true, true);
+ init.MoveTo(node.x, node.y, z, true, true);
- if (node->orientation.has_value() && node->delay > 0)
- init.SetFacing(*node->orientation);
+ if (node.orientation.has_value() && node.delay > 0)
+ init.SetFacing(*node.orientation);
- switch (node->move_type)
+ switch (node.move_type)
{
case WAYPOINT_MOVE_TYPE_LAND:
- init.SetAnimation(Movement::ToGround);
+ init.SetAnimation(AnimTier::Ground);
break;
case WAYPOINT_MOVE_TYPE_TAKEOFF:
- init.SetAnimation(Movement::ToFly);
+ init.SetAnimation(AnimTier::Hover);
break;
case WAYPOINT_MOVE_TYPE_RUN:
init.SetWalk(false);
@@ -204,7 +223,7 @@ bool WaypointMovementGenerator<Creature>::StartMove(Creature* creature)
//Call for creature group update
if (creature->GetFormation() && creature->GetFormation()->GetLeader() == creature)
- creature->GetFormation()->LeaderMoveTo(formationDest.x, formationDest.y, formationDest.z, node->move_type);
+ creature->GetFormation()->LeaderMoveTo(formationDest.x, formationDest.y, formationDest.z, node.move_type);
return true;
}
@@ -240,13 +259,7 @@ bool WaypointMovementGenerator<Creature>::DoUpdate(Creature* creature, uint32 di
}
else
{
- bool finished = creature->movespline->Finalized();
- // xinef: code to detect pre-empetively if we should start movement to next waypoint
- // xinef: do not start pre-empetive movement if current node has delay or we are ending waypoint movement
- //if (!finished && !i_path->at(i_currentNode)->delay && ((i_currentNode != i_path->size() - 1) || repeating))
- // finished = (creature->movespline->_Spline().length(creature->movespline->_currentSplineIdx() + 1) - creature->movespline->timePassed()) < 200;
-
- if (finished)
+ if (creature->movespline->Finalized())
{
OnArrived(creature);
return StartMove(creature);
@@ -263,22 +276,14 @@ void WaypointMovementGenerator<Creature>::MovementInform(Creature* creature)
if (Unit* owner = creature->GetCharmerOrOwner())
{
if (UnitAI* AI = owner->GetAI())
- {
AI->SummonMovementInform(creature, WAYPOINT_MOTION_TYPE, i_currentNode);
- }
}
else
{
if (TempSummon* tempSummon = creature->ToTempSummon())
- {
if (Unit* owner = tempSummon->GetSummonerUnit())
- {
if (UnitAI* AI = owner->GetAI())
- {
AI->SummonMovementInform(creature, WAYPOINT_MOTION_TYPE, i_currentNode);
- }
- }
- }
}
}
@@ -405,6 +410,7 @@ void FlightPathMovementGenerator::DoFinalize(Player* player)
player->m_taxi.ClearTaxiDestinations();
player->Dismount();
player->RemoveUnitFlag(UNIT_FLAG_DISABLE_MOVE | UNIT_FLAG_TAXI_FLIGHT);
+ player->UpdatePvPState(); // to account for cases such as flying into a PvP territory, as it does not flag on the way in
if (player->m_taxi.empty())
{
@@ -434,6 +440,9 @@ void FlightPathMovementGenerator::DoReset(Player* player)
return;
}
+ if (player->pvpInfo.EndTimer)
+ player->UpdatePvP(false, true); // PvP flag timer immediately ends when starting taxi
+
player->getHostileRefMgr().setOnlineOfflineState(false);
player->AddUnitState(UNIT_STATE_IN_FLIGHT);
player->SetUnitFlag(UNIT_FLAG_DISABLE_MOVE | UNIT_FLAG_TAXI_FLIGHT);
diff --git a/src/server/game/Movement/MovementGenerators/WaypointMovementGenerator.h b/src/server/game/Movement/MovementGenerators/WaypointMovementGenerator.h
index 3161894a2b..44194581e6 100644
--- a/src/server/game/Movement/MovementGenerators/WaypointMovementGenerator.h
+++ b/src/server/game/Movement/MovementGenerators/WaypointMovementGenerator.h
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
@@ -54,8 +54,8 @@ class WaypointMovementGenerator<Creature> : public MovementGeneratorMedium< Crea
public PathMovementBase<Creature, WaypointPath const*>
{
public:
- WaypointMovementGenerator(uint32 _path_id = 0, bool _repeating = true, bool _stalled = false)
- : PathMovementBase((WaypointPath const*)nullptr), i_nextMoveTime(0), m_isArrivalDone(false), path_id(_path_id), repeating(_repeating), stalled(_stalled) {}
+ WaypointMovementGenerator(uint32 _path_id = 0, PathSource pathSource = PathSource::WAYPOINT_MGR, bool _repeating = true, bool _stalled = false)
+ : PathMovementBase((WaypointPath const*)nullptr), i_nextMoveTime(0), m_isArrivalDone(false), path_id(_path_id), repeating(_repeating), stalled(_stalled), i_pathSource(pathSource) {}
~WaypointMovementGenerator() { i_path = nullptr; }
void DoInitialize(Creature*);
void DoFinalize(Creature*);
@@ -96,6 +96,7 @@ private:
uint32 path_id;
bool repeating;
bool stalled;
+ PathSource i_pathSource;
};
/** FlightPathMovementGenerator generates movement of the player for the paths
diff --git a/src/server/game/Movement/Spline/MoveSpline.cpp b/src/server/game/Movement/Spline/MoveSpline.cpp
index 3d3be3769b..513a789ef9 100644
--- a/src/server/game/Movement/Spline/MoveSpline.cpp
+++ b/src/server/game/Movement/Spline/MoveSpline.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/game/Movement/Spline/MoveSpline.h b/src/server/game/Movement/Spline/MoveSpline.h
index 5ebe5f5aa5..40aee12547 100644
--- a/src/server/game/Movement/Spline/MoveSpline.h
+++ b/src/server/game/Movement/Spline/MoveSpline.h
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
@@ -117,6 +117,7 @@ namespace Movement
[[nodiscard]] bool isCyclic() const { return splineflags.cyclic; }
[[nodiscard]] bool isFalling() const { return splineflags.falling; }
[[nodiscard]] bool isWalking() const { return splineflags.walkmode; }
+ [[nodiscard]] bool isBoarding() const { return splineflags.transportEnter || splineflags.transportExit; }
[[nodiscard]] Vector3 FinalDestination() const { return Initialized() ? spline.getPoint(spline.last()) : Vector3(); }
[[nodiscard]] Vector3 CurrentDestination() const { return Initialized() ? spline.getPoint(point_Idx + 1) : Vector3(); }
[[nodiscard]] int32 currentPathIdx() const;
diff --git a/src/server/game/Movement/Spline/MoveSplineFlag.h b/src/server/game/Movement/Spline/MoveSplineFlag.h
index 17e8128156..3020e46c29 100644
--- a/src/server/game/Movement/Spline/MoveSplineFlag.h
+++ b/src/server/game/Movement/Spline/MoveSplineFlag.h
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/game/Movement/Spline/MoveSplineInit.cpp b/src/server/game/Movement/Spline/MoveSplineInit.cpp
index c2f6664b68..8cdb1ffdf3 100644
--- a/src/server/game/Movement/Spline/MoveSplineInit.cpp
+++ b/src/server/game/Movement/Spline/MoveSplineInit.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
@@ -23,6 +23,7 @@
#include "Unit.h"
#include "Vehicle.h"
#include "WorldPacket.h"
+#include "Log.h"
namespace Movement
{
@@ -103,7 +104,13 @@ namespace Movement
bool isOrientationOnly = args.path.size() == 2 && args.path[0] == args.path[1];
- if ((moveFlags & MOVEMENTFLAG_ROOT) || isOrientationOnly)
+ if (moveFlags & MOVEMENTFLAG_ROOT) // This case should essentially never occur - hence the trace logging - hints to issues elsewhere
+ {
+ LOG_TRACE("movement", "Invalid movement during root. Entry: {} IsImmobilized {}, moveflags {}", unit->GetEntry(), unit->IsImmobilizedState() ? "true" : "false", moveFlags);
+ moveFlags &= ~MOVEMENTFLAG_MASK_MOVING;
+ }
+
+ if (isOrientationOnly)
moveFlags &= ~MOVEMENTFLAG_MASK_MOVING;
if (!args.HasVelocity)
diff --git a/src/server/game/Movement/Spline/MoveSplineInit.h b/src/server/game/Movement/Spline/MoveSplineInit.h
index a98da34465..e0761129c9 100644
--- a/src/server/game/Movement/Spline/MoveSplineInit.h
+++ b/src/server/game/Movement/Spline/MoveSplineInit.h
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
@@ -29,14 +29,6 @@ namespace Movement
// xinef: moved declaration here so it can be accessed out of MoveSplineInit.cpp
UnitMoveType SelectSpeedType(uint32 moveFlags);
- enum AnimType
- {
- ToGround = 0, // 460 = ToGround, index of AnimationData.dbc
- FlyToFly = 1, // 461 = FlyToFly?
- ToFly = 2, // 458 = ToFly
- FlyToGround = 3 // 463 = FlyToGround
- };
-
// Transforms coordinates from global to transport offsets
class TransportPathTransform
{
@@ -89,7 +81,7 @@ namespace Movement
/* Plays animation after movement done
* can't be combined with parabolic movement
*/
- void SetAnimation(AnimType anim);
+ void SetAnimation(AnimTier anim);
/* Adds final facing animation
* sets unit's facing to specified point/angle after all path done
@@ -191,7 +183,7 @@ namespace Movement
args.flags.EnableParabolic();
}
- inline void MoveSplineInit::SetAnimation(AnimType anim)
+ inline void MoveSplineInit::SetAnimation(AnimTier anim)
{
args.time_perc = 0.f;
args.flags.EnableAnimation((uint8)anim);
diff --git a/src/server/game/Movement/Spline/MoveSplineInitArgs.h b/src/server/game/Movement/Spline/MoveSplineInitArgs.h
index 68ad95b142..ed4a268b77 100644
--- a/src/server/game/Movement/Spline/MoveSplineInitArgs.h
+++ b/src/server/game/Movement/Spline/MoveSplineInitArgs.h
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/game/Movement/Spline/MovementPacketBuilder.cpp b/src/server/game/Movement/Spline/MovementPacketBuilder.cpp
index b360c6b3dc..7aa6838d8c 100644
--- a/src/server/game/Movement/Spline/MovementPacketBuilder.cpp
+++ b/src/server/game/Movement/Spline/MovementPacketBuilder.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/game/Movement/Spline/MovementPacketBuilder.h b/src/server/game/Movement/Spline/MovementPacketBuilder.h
index 711eccc33e..7177f72745 100644
--- a/src/server/game/Movement/Spline/MovementPacketBuilder.h
+++ b/src/server/game/Movement/Spline/MovementPacketBuilder.h
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/game/Movement/Spline/MovementTypedefs.h b/src/server/game/Movement/Spline/MovementTypedefs.h
index 512bcc7dc1..c28d7e6c6f 100644
--- a/src/server/game/Movement/Spline/MovementTypedefs.h
+++ b/src/server/game/Movement/Spline/MovementTypedefs.h
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/game/Movement/Spline/MovementUtil.cpp b/src/server/game/Movement/Spline/MovementUtil.cpp
index 2b5a2e1b66..86f293dd36 100644
--- a/src/server/game/Movement/Spline/MovementUtil.cpp
+++ b/src/server/game/Movement/Spline/MovementUtil.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/game/Movement/Spline/Spline.cpp b/src/server/game/Movement/Spline/Spline.cpp
index a4f1916792..9c65619b54 100644
--- a/src/server/game/Movement/Spline/Spline.cpp
+++ b/src/server/game/Movement/Spline/Spline.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/game/Movement/Spline/Spline.h b/src/server/game/Movement/Spline/Spline.h
index b8800eb2c0..9645eb6075 100644
--- a/src/server/game/Movement/Spline/Spline.h
+++ b/src/server/game/Movement/Spline/Spline.h
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/game/Movement/Spline/SplineImpl.h b/src/server/game/Movement/Spline/SplineImpl.h
index 48b9b2ac05..2b4d8e5445 100644
--- a/src/server/game/Movement/Spline/SplineImpl.h
+++ b/src/server/game/Movement/Spline/SplineImpl.h
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/game/Movement/Waypoints/WaypointMgr.cpp b/src/server/game/Movement/Waypoints/WaypointMgr.cpp
index 7a2596fbf7..5d673b35a7 100644
--- a/src/server/game/Movement/Waypoints/WaypointMgr.cpp
+++ b/src/server/game/Movement/Waypoints/WaypointMgr.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
@@ -30,9 +30,6 @@ WaypointMgr::~WaypointMgr()
{
for (WaypointPathContainer::iterator itr = _waypointStore.begin(); itr != _waypointStore.end(); ++itr)
{
- for (WaypointPath::const_iterator it = itr->second.begin(); it != itr->second.end(); ++it)
- delete *it;
-
itr->second.clear();
}
@@ -64,7 +61,7 @@ void WaypointMgr::Load()
do
{
Field* fields = result->Fetch();
- WaypointData* wp = new WaypointData();
+ WaypointData data;
uint32 pathId = fields[0].Get<uint32>();
WaypointPath& path = _waypointStore[pathId];
@@ -79,28 +76,40 @@ void WaypointMgr::Load()
Acore::NormalizeMapCoord(x);
Acore::NormalizeMapCoord(y);
- wp->id = fields[1].Get<uint32>();
- wp->x = x;
- wp->y = y;
- wp->z = z;
- wp->orientation = o;
- wp->move_type = fields[6].Get<uint32>();
+ data.id = fields[1].Get<uint32>();
+ data.x = x;
+ data.y = y;
+ data.z = z;
+ data.orientation = o;
+ data.move_type = fields[6].Get<uint32>();
- if (wp->move_type >= WAYPOINT_MOVE_TYPE_MAX)
+ if (data.move_type >= WAYPOINT_MOVE_TYPE_MAX)
{
//LOG_ERROR("sql.sql", "Waypoint {} in waypoint_data has invalid move_type, ignoring", wp->id);
- delete wp;
continue;
}
- wp->delay = fields[7].Get<uint32>();
- wp->event_id = fields[8].Get<uint32>();
- wp->event_chance = fields[9].Get<int16>();
+ data.delay = fields[7].Get<uint32>();
+ data.event_id = fields[8].Get<uint32>();
+ data.event_chance = fields[9].Get<int16>();
- path.push_back(wp);
+ path.emplace(data.id, data);
++count;
} while (result->NextRow());
+ for (auto itr = _waypointStore.begin(); itr != _waypointStore.end(); )
+ {
+ uint32 first = itr->second.begin()->first;
+ uint32 last = itr->second.rbegin()->first;
+ if (last - first + 1 != itr->second.size())
+ {
+ LOG_ERROR("sql.sql", "Waypoint {} in waypoint_data has non-contiguous pointids, skipping", itr->first);
+ itr = _waypointStore.erase(itr);
+ }
+ else
+ ++itr;
+ }
+
LOG_INFO("server.loading", ">> Loaded {} waypoints in {} ms", count, GetMSTimeDiffToNow(oldMSTime));
LOG_INFO("server.loading", " ");
}
@@ -110,9 +119,6 @@ void WaypointMgr::ReloadPath(uint32 id)
WaypointPathContainer::iterator itr = _waypointStore.find(id);
if (itr != _waypointStore.end())
{
- for (WaypointPath::const_iterator it = itr->second.begin(); it != itr->second.end(); ++it)
- delete *it;
-
_waypointStore.erase(itr);
}
@@ -130,7 +136,7 @@ void WaypointMgr::ReloadPath(uint32 id)
do
{
Field* fields = result->Fetch();
- WaypointData* wp = new WaypointData();
+ WaypointData data;
float x = fields[1].Get<float>();
float y = fields[2].Get<float>();
@@ -142,24 +148,23 @@ void WaypointMgr::ReloadPath(uint32 id)
Acore::NormalizeMapCoord(x);
Acore::NormalizeMapCoord(y);
- wp->id = fields[0].Get<uint32>();
- wp->x = x;
- wp->y = y;
- wp->z = z;
- wp->orientation = o;
- wp->move_type = fields[5].Get<uint32>();
+ data.id = fields[0].Get<uint32>();
+ data.x = x;
+ data.y = y;
+ data.z = z;
+ data.orientation = o;
+ data.move_type = fields[5].Get<uint32>();
- if (wp->move_type >= WAYPOINT_MOVE_TYPE_MAX)
+ if (data.move_type >= WAYPOINT_MOVE_TYPE_MAX)
{
//LOG_ERROR("sql.sql", "Waypoint {} in waypoint_data has invalid move_type, ignoring", wp->id);
- delete wp;
continue;
}
- wp->delay = fields[6].Get<uint32>();
- wp->event_id = fields[7].Get<uint32>();
- wp->event_chance = fields[8].Get<uint8>();
+ data.delay = fields[6].Get<uint32>();
+ data.event_id = fields[7].Get<uint32>();
+ data.event_chance = fields[8].Get<uint8>();
- path.push_back(wp);
+ path.emplace(data.id, data);
} while (result->NextRow());
}
diff --git a/src/server/game/Movement/Waypoints/WaypointMgr.h b/src/server/game/Movement/Waypoints/WaypointMgr.h
index ea588a28c5..f9c0d59df5 100644
--- a/src/server/game/Movement/Waypoints/WaypointMgr.h
+++ b/src/server/game/Movement/Waypoints/WaypointMgr.h
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
@@ -22,6 +22,7 @@
#include <optional>
#include <unordered_map>
#include <vector>
+#include <map>
enum WaypointMoveType
{
@@ -39,12 +40,12 @@ struct WaypointData
float x, y, z;
std::optional<float> orientation;
uint32 delay;
- uint32 event_id;
- uint32 move_type;
- uint8 event_chance;
+ uint32 event_id = 0;
+ uint32 move_type = 0;
+ uint8 event_chance = 0;
};
-typedef std::vector<WaypointData*> WaypointPath;
+typedef std::map<uint32, WaypointData> WaypointPath;
typedef std::unordered_map<uint32, WaypointPath> WaypointPathContainer;
class WaypointMgr
diff --git a/src/server/game/OutdoorPvP/OutdoorPvP.cpp b/src/server/game/OutdoorPvP/OutdoorPvP.cpp
index 330d99c3f6..9ca84858d7 100644
--- a/src/server/game/OutdoorPvP/OutdoorPvP.cpp
+++ b/src/server/game/OutdoorPvP/OutdoorPvP.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
@@ -635,7 +635,7 @@ void OutdoorPvP::BroadcastPacket(WorldPacket& data) const
for (auto const& playerSet : _players)
for (auto itr : playerSet)
if (Player* const player = ObjectAccessor::FindPlayer(itr))
- player->GetSession()->SendPacket(&data);
+ player->SendDirectMessage(&data);
}
void OutdoorPvP::RegisterZone(uint32 zoneId)
diff --git a/src/server/game/OutdoorPvP/OutdoorPvP.h b/src/server/game/OutdoorPvP/OutdoorPvP.h
index fe773f1d3b..60ef22ed81 100644
--- a/src/server/game/OutdoorPvP/OutdoorPvP.h
+++ b/src/server/game/OutdoorPvP/OutdoorPvP.h
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/game/OutdoorPvP/OutdoorPvPMgr.cpp b/src/server/game/OutdoorPvP/OutdoorPvPMgr.cpp
index a27e534d75..7a8b6b986c 100644
--- a/src/server/game/OutdoorPvP/OutdoorPvPMgr.cpp
+++ b/src/server/game/OutdoorPvP/OutdoorPvPMgr.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/game/OutdoorPvP/OutdoorPvPMgr.h b/src/server/game/OutdoorPvP/OutdoorPvPMgr.h
index 8737c0b5c7..1c1abf4921 100644
--- a/src/server/game/OutdoorPvP/OutdoorPvPMgr.h
+++ b/src/server/game/OutdoorPvP/OutdoorPvPMgr.h
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/game/Petitions/PetitionMgr.cpp b/src/server/game/Petitions/PetitionMgr.cpp
index 7e946923ee..fc9633f016 100644
--- a/src/server/game/Petitions/PetitionMgr.cpp
+++ b/src/server/game/Petitions/PetitionMgr.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/game/Petitions/PetitionMgr.h b/src/server/game/Petitions/PetitionMgr.h
index cd7d47eadc..e28a983c47 100644
--- a/src/server/game/Petitions/PetitionMgr.h
+++ b/src/server/game/Petitions/PetitionMgr.h
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/game/Pools/PoolMgr.cpp b/src/server/game/Pools/PoolMgr.cpp
index 2a31e74740..479fd6ede2 100644
--- a/src/server/game/Pools/PoolMgr.cpp
+++ b/src/server/game/Pools/PoolMgr.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/game/Pools/PoolMgr.h b/src/server/game/Pools/PoolMgr.h
index 89e6754471..cf251352c8 100644
--- a/src/server/game/Pools/PoolMgr.h
+++ b/src/server/game/Pools/PoolMgr.h
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/game/PrecompiledHeaders/gamePCH.h b/src/server/game/PrecompiledHeaders/gamePCH.h
index 1547ad29e9..89f2c6230e 100644
--- a/src/server/game/PrecompiledHeaders/gamePCH.h
+++ b/src/server/game/PrecompiledHeaders/gamePCH.h
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/game/Quests/QuestDef.cpp b/src/server/game/Quests/QuestDef.cpp
index 12edb29a2c..dff4763a44 100644
--- a/src/server/game/Quests/QuestDef.cpp
+++ b/src/server/game/Quests/QuestDef.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/game/Quests/QuestDef.h b/src/server/game/Quests/QuestDef.h
index 247ac1ec21..97bd2f7590 100644
--- a/src/server/game/Quests/QuestDef.h
+++ b/src/server/game/Quests/QuestDef.h
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/game/Quests/enuminfo_QuestDef.cpp b/src/server/game/Quests/enuminfo_QuestDef.cpp
index 6fbf2beb9c..61c519cd41 100644
--- a/src/server/game/Quests/enuminfo_QuestDef.cpp
+++ b/src/server/game/Quests/enuminfo_QuestDef.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/game/Reputation/ReputationMgr.cpp b/src/server/game/Reputation/ReputationMgr.cpp
index 2aae16a1c2..c9061158cd 100644
--- a/src/server/game/Reputation/ReputationMgr.cpp
+++ b/src/server/game/Reputation/ReputationMgr.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/game/Reputation/ReputationMgr.h b/src/server/game/Reputation/ReputationMgr.h
index 1d9cbdad70..79d855ec05 100644
--- a/src/server/game/Reputation/ReputationMgr.h
+++ b/src/server/game/Reputation/ReputationMgr.h
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/game/Scripting/MapScripts.cpp b/src/server/game/Scripting/MapScripts.cpp
index 76e945a9c5..321b02c920 100644
--- a/src/server/game/Scripting/MapScripts.cpp
+++ b/src/server/game/Scripting/MapScripts.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
@@ -442,7 +442,7 @@ void Map::ScriptsProcess()
if (step.script->MoveTo.TravelTime != 0)
{
float speed = unit->GetDistance(step.script->MoveTo.DestX, step.script->MoveTo.DestY, step.script->MoveTo.DestZ) / ((float)step.script->MoveTo.TravelTime * 0.001f);
- unit->MonsterMoveWithSpeed(step.script->MoveTo.DestX, step.script->MoveTo.DestY, step.script->MoveTo.DestZ, speed);
+ unit->GetMotionMaster()->MovePoint(0, step.script->MoveTo.DestX, step.script->MoveTo.DestY, step.script->MoveTo.DestZ, FORCED_MOVEMENT_NONE, speed);
}
else
unit->NearTeleportTo(step.script->MoveTo.DestX, step.script->MoveTo.DestY, step.script->MoveTo.DestZ, unit->GetOrientation());
@@ -757,7 +757,7 @@ void Map::ScriptsProcess()
case SCRIPT_COMMAND_DESPAWN_SELF:
// Target or source must be Creature.
if (Creature* cSource = _GetScriptCreatureSourceOrTarget(source, target, step.script, true))
- cSource->DespawnOrUnsummon(step.script->DespawnSelf.DespawnDelay);
+ cSource->DespawnOrUnsummon(Milliseconds(step.script->DespawnSelf.DespawnDelay));
break;
case SCRIPT_COMMAND_LOAD_PATH:
@@ -767,7 +767,7 @@ void Map::ScriptsProcess()
if (!sWaypointMgr->GetPath(step.script->LoadPath.PathID))
LOG_ERROR("maps.script", "{} source object has an invalid path ({}), skipping.", step.script->GetDebugInfo(), step.script->LoadPath.PathID);
else
- unit->GetMotionMaster()->MovePath(step.script->LoadPath.PathID, step.script->LoadPath.IsRepeatable);
+ unit->GetMotionMaster()->MoveWaypoint(step.script->LoadPath.PathID, step.script->LoadPath.IsRepeatable);
}
break;
@@ -880,7 +880,6 @@ void Map::ScriptsProcess()
if (!cSource->IsAlive())
return;
- cSource->GetMotionMaster()->MovementExpired();
cSource->GetMotionMaster()->MoveIdle();
switch (step.script->Movement.MovementType)
@@ -889,7 +888,7 @@ void Map::ScriptsProcess()
cSource->GetMotionMaster()->MoveRandom((float)step.script->Movement.MovementDistance);
break;
case WAYPOINT_MOTION_TYPE:
- cSource->GetMotionMaster()->MovePath(step.script->Movement.Path, false);
+ cSource->GetMotionMaster()->MoveWaypoint(step.script->Movement.Path, false);
break;
}
}
diff --git a/src/server/game/Scripting/ScriptDefines/ElunaScript.cpp b/src/server/game/Scripting/ScriptDefines/ALEScript.cpp
index fbaa7af765..480ddaa510 100644
--- a/src/server/game/Scripting/ScriptDefines/ElunaScript.cpp
+++ b/src/server/game/Scripting/ScriptDefines/ALEScript.cpp
@@ -1,26 +1,26 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
* with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#include "ElunaScript.h"
+#include "ALEScript.h"
#include "ScriptMgr.h"
-ElunaScript::ElunaScript(const char* name) : ScriptObject(name)
+ALEScript::ALEScript(const char* name) : ScriptObject(name)
{
- ScriptRegistry<ElunaScript>::AddScript(this);
+ ScriptRegistry<ALEScript>::AddScript(this);
}
-template class AC_GAME_API ScriptRegistry<ElunaScript>;
+template class AC_GAME_API ScriptRegistry<ALEScript>;
diff --git a/src/server/game/Scripting/ScriptDefines/ElunaScript.h b/src/server/game/Scripting/ScriptDefines/ALEScript.h
index da028a7baf..a95c05d48e 100644
--- a/src/server/game/Scripting/ScriptDefines/ElunaScript.h
+++ b/src/server/game/Scripting/ScriptDefines/ALEScript.h
@@ -1,29 +1,29 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
* with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#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/AccountScript.cpp b/src/server/game/Scripting/ScriptDefines/AccountScript.cpp
index 2749cd1a73..3527fcdc13 100644
--- a/src/server/game/Scripting/ScriptDefines/AccountScript.cpp
+++ b/src/server/game/Scripting/ScriptDefines/AccountScript.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/game/Scripting/ScriptDefines/AccountScript.h b/src/server/game/Scripting/ScriptDefines/AccountScript.h
index 3a06a1e989..038663ee32 100644
--- a/src/server/game/Scripting/ScriptDefines/AccountScript.h
+++ b/src/server/game/Scripting/ScriptDefines/AccountScript.h
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/game/Scripting/ScriptDefines/AchievementCriteriaScript.cpp b/src/server/game/Scripting/ScriptDefines/AchievementCriteriaScript.cpp
index 9e0e44e677..f216726736 100644
--- a/src/server/game/Scripting/ScriptDefines/AchievementCriteriaScript.cpp
+++ b/src/server/game/Scripting/ScriptDefines/AchievementCriteriaScript.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/game/Scripting/ScriptDefines/AchievementCriteriaScript.h b/src/server/game/Scripting/ScriptDefines/AchievementCriteriaScript.h
index 9e097fbe08..9de6ad4463 100644
--- a/src/server/game/Scripting/ScriptDefines/AchievementCriteriaScript.h
+++ b/src/server/game/Scripting/ScriptDefines/AchievementCriteriaScript.h
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/game/Scripting/ScriptDefines/AchievementScript.cpp b/src/server/game/Scripting/ScriptDefines/AchievementScript.cpp
index 9bc742b73c..af84907379 100644
--- a/src/server/game/Scripting/ScriptDefines/AchievementScript.cpp
+++ b/src/server/game/Scripting/ScriptDefines/AchievementScript.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/game/Scripting/ScriptDefines/AchievementScript.h b/src/server/game/Scripting/ScriptDefines/AchievementScript.h
index 84aa3746e4..04c7e62041 100644
--- a/src/server/game/Scripting/ScriptDefines/AchievementScript.h
+++ b/src/server/game/Scripting/ScriptDefines/AchievementScript.h
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/game/Scripting/ScriptDefines/AllBattlegroundScript.cpp b/src/server/game/Scripting/ScriptDefines/AllBattlegroundScript.cpp
index af617ddba3..0c9c3c8f45 100644
--- a/src/server/game/Scripting/ScriptDefines/AllBattlegroundScript.cpp
+++ b/src/server/game/Scripting/ScriptDefines/AllBattlegroundScript.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/game/Scripting/ScriptDefines/AllBattlegroundScript.h b/src/server/game/Scripting/ScriptDefines/AllBattlegroundScript.h
index 9e8baba151..9ab6eea782 100644
--- a/src/server/game/Scripting/ScriptDefines/AllBattlegroundScript.h
+++ b/src/server/game/Scripting/ScriptDefines/AllBattlegroundScript.h
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/game/Scripting/ScriptDefines/AllCommandScript.cpp b/src/server/game/Scripting/ScriptDefines/AllCommandScript.cpp
index cf01d40919..0a5e795bb6 100644
--- a/src/server/game/Scripting/ScriptDefines/AllCommandScript.cpp
+++ b/src/server/game/Scripting/ScriptDefines/AllCommandScript.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/game/Scripting/ScriptDefines/AllCommandScript.h b/src/server/game/Scripting/ScriptDefines/AllCommandScript.h
index e56615b152..87d124739b 100644
--- a/src/server/game/Scripting/ScriptDefines/AllCommandScript.h
+++ b/src/server/game/Scripting/ScriptDefines/AllCommandScript.h
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/game/Scripting/ScriptDefines/AllCreatureScript.cpp b/src/server/game/Scripting/ScriptDefines/AllCreatureScript.cpp
index f34599d815..1093a4479c 100644
--- a/src/server/game/Scripting/ScriptDefines/AllCreatureScript.cpp
+++ b/src/server/game/Scripting/ScriptDefines/AllCreatureScript.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/game/Scripting/ScriptDefines/AllCreatureScript.h b/src/server/game/Scripting/ScriptDefines/AllCreatureScript.h
index 71e230e8b3..d734f06c3a 100644
--- a/src/server/game/Scripting/ScriptDefines/AllCreatureScript.h
+++ b/src/server/game/Scripting/ScriptDefines/AllCreatureScript.h
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/game/Scripting/ScriptDefines/AllGameObjectScript.cpp b/src/server/game/Scripting/ScriptDefines/AllGameObjectScript.cpp
index 55bd6cd16c..2a1f09d672 100644
--- a/src/server/game/Scripting/ScriptDefines/AllGameObjectScript.cpp
+++ b/src/server/game/Scripting/ScriptDefines/AllGameObjectScript.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/game/Scripting/ScriptDefines/AllGameObjectScript.h b/src/server/game/Scripting/ScriptDefines/AllGameObjectScript.h
index 2dd5ba2a76..496bc5300e 100644
--- a/src/server/game/Scripting/ScriptDefines/AllGameObjectScript.h
+++ b/src/server/game/Scripting/ScriptDefines/AllGameObjectScript.h
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/game/Scripting/ScriptDefines/AllItemScript.cpp b/src/server/game/Scripting/ScriptDefines/AllItemScript.cpp
index c276bb5d0c..ecc51c5cda 100644
--- a/src/server/game/Scripting/ScriptDefines/AllItemScript.cpp
+++ b/src/server/game/Scripting/ScriptDefines/AllItemScript.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/game/Scripting/ScriptDefines/AllItemScript.h b/src/server/game/Scripting/ScriptDefines/AllItemScript.h
index 94c54c4b06..c28cf6acb7 100644
--- a/src/server/game/Scripting/ScriptDefines/AllItemScript.h
+++ b/src/server/game/Scripting/ScriptDefines/AllItemScript.h
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/game/Scripting/ScriptDefines/AllMapScript.cpp b/src/server/game/Scripting/ScriptDefines/AllMapScript.cpp
index a02ae745ce..5f14b352d0 100644
--- a/src/server/game/Scripting/ScriptDefines/AllMapScript.cpp
+++ b/src/server/game/Scripting/ScriptDefines/AllMapScript.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/game/Scripting/ScriptDefines/AllMapScript.h b/src/server/game/Scripting/ScriptDefines/AllMapScript.h
index 86e7a0e6d2..31b97c7d69 100644
--- a/src/server/game/Scripting/ScriptDefines/AllMapScript.h
+++ b/src/server/game/Scripting/ScriptDefines/AllMapScript.h
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/game/Scripting/ScriptDefines/AllScriptsObjects.h b/src/server/game/Scripting/ScriptDefines/AllScriptsObjects.h
index 9196c32845..92dc41756e 100644
--- a/src/server/game/Scripting/ScriptDefines/AllScriptsObjects.h
+++ b/src/server/game/Scripting/ScriptDefines/AllScriptsObjects.h
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
@@ -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/AllSpellScript.cpp b/src/server/game/Scripting/ScriptDefines/AllSpellScript.cpp
index 44f0866ee2..d47939fe0b 100644
--- a/src/server/game/Scripting/ScriptDefines/AllSpellScript.cpp
+++ b/src/server/game/Scripting/ScriptDefines/AllSpellScript.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
@@ -24,16 +24,6 @@ void ScriptMgr::OnCalcMaxDuration(Aura const* aura, int32& maxDuration)
CALL_ENABLED_HOOKS(AllSpellScript, ALLSPELLHOOK_ON_CALC_MAX_DURATION, script->OnCalcMaxDuration(aura, maxDuration));
}
-bool ScriptMgr::CanModAuraEffectDamageDone(AuraEffect const* auraEff, Unit* target, AuraApplication const* aurApp, uint8 mode, bool apply)
-{
- CALL_ENABLED_BOOLEAN_HOOKS(AllSpellScript, ALLSPELLHOOK_CAN_MOD_AURA_EFFECT_DAMAGE_DONE, !script->CanModAuraEffectDamageDone(auraEff, target, aurApp, mode, apply));
-}
-
-bool ScriptMgr::CanModAuraEffectModDamagePercentDone(AuraEffect const* auraEff, Unit* target, AuraApplication const* aurApp, uint8 mode, bool apply)
-{
- CALL_ENABLED_BOOLEAN_HOOKS(AllSpellScript, ALLSPELLHOOK_CAN_MOD_AURA_EFFECT_MOD_DAMAGE_PERCENT_DONE, !script->CanModAuraEffectModDamagePercentDone(auraEff, target, aurApp, mode, apply));
-}
-
void ScriptMgr::OnSpellCheckCast(Spell* spell, bool strict, SpellCastResult& res)
{
CALL_ENABLED_HOOKS(AllSpellScript, ALLSPELLHOOK_ON_SPELL_CHECK_CAST, script->OnSpellCheckCast(spell, strict, res));
diff --git a/src/server/game/Scripting/ScriptDefines/AllSpellScript.h b/src/server/game/Scripting/ScriptDefines/AllSpellScript.h
index 3dd2711bdb..df069bcb11 100644
--- a/src/server/game/Scripting/ScriptDefines/AllSpellScript.h
+++ b/src/server/game/Scripting/ScriptDefines/AllSpellScript.h
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
@@ -24,8 +24,6 @@
enum AllSpellHook
{
ALLSPELLHOOK_ON_CALC_MAX_DURATION,
- ALLSPELLHOOK_CAN_MOD_AURA_EFFECT_DAMAGE_DONE,
- ALLSPELLHOOK_CAN_MOD_AURA_EFFECT_MOD_DAMAGE_PERCENT_DONE,
ALLSPELLHOOK_ON_SPELL_CHECK_CAST,
ALLSPELLHOOK_CAN_PREPARE,
ALLSPELLHOOK_CAN_SCALING_EVERYTHING,
@@ -56,10 +54,6 @@ public:
// Calculate max duration in applying aura
virtual void OnCalcMaxDuration(Aura const* /*aura*/, int32& /*maxDuration*/) { }
- [[nodiscard]] virtual bool CanModAuraEffectDamageDone(AuraEffect const* /*auraEff*/, Unit* /*target*/, AuraApplication const* /*aurApp*/, uint8 /*mode*/, bool /*apply*/) { return true; }
-
- [[nodiscard]] virtual bool CanModAuraEffectModDamagePercentDone(AuraEffect const* /*auraEff*/, Unit* /*target*/, AuraApplication const* /*aurApp*/, uint8 /*mode*/, bool /*apply*/) { return true; }
-
virtual void OnSpellCheckCast(Spell* /*spell*/, bool /*strict*/, SpellCastResult& /*res*/) { }
[[nodiscard]] virtual bool CanPrepare(Spell* /*spell*/, SpellCastTargets const* /*targets*/, AuraEffect const* /*triggeredByAura*/) { return true; }
diff --git a/src/server/game/Scripting/ScriptDefines/AreaTriggerScript.cpp b/src/server/game/Scripting/ScriptDefines/AreaTriggerScript.cpp
index 6d3429606f..bb809d7cdc 100644
--- a/src/server/game/Scripting/ScriptDefines/AreaTriggerScript.cpp
+++ b/src/server/game/Scripting/ScriptDefines/AreaTriggerScript.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
@@ -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>([&](ElunaScript* script)
+ auto ret = IsValidBoolScript<ALEScript>([&](ALEScript* script)
{
return script->CanAreaTrigger(player, trigger);
});
diff --git a/src/server/game/Scripting/ScriptDefines/AreaTriggerScript.h b/src/server/game/Scripting/ScriptDefines/AreaTriggerScript.h
index 1ce1e59d06..186a87bc70 100644
--- a/src/server/game/Scripting/ScriptDefines/AreaTriggerScript.h
+++ b/src/server/game/Scripting/ScriptDefines/AreaTriggerScript.h
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/game/Scripting/ScriptDefines/ArenaScript.cpp b/src/server/game/Scripting/ScriptDefines/ArenaScript.cpp
index b0869c7996..af3baf3328 100644
--- a/src/server/game/Scripting/ScriptDefines/ArenaScript.cpp
+++ b/src/server/game/Scripting/ScriptDefines/ArenaScript.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/game/Scripting/ScriptDefines/ArenaScript.h b/src/server/game/Scripting/ScriptDefines/ArenaScript.h
index e9a3f1c800..152dd75842 100644
--- a/src/server/game/Scripting/ScriptDefines/ArenaScript.h
+++ b/src/server/game/Scripting/ScriptDefines/ArenaScript.h
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/game/Scripting/ScriptDefines/ArenaTeamScript.cpp b/src/server/game/Scripting/ScriptDefines/ArenaTeamScript.cpp
index e232e646a4..a5cc123c15 100644
--- a/src/server/game/Scripting/ScriptDefines/ArenaTeamScript.cpp
+++ b/src/server/game/Scripting/ScriptDefines/ArenaTeamScript.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/game/Scripting/ScriptDefines/ArenaTeamScript.h b/src/server/game/Scripting/ScriptDefines/ArenaTeamScript.h
index 0e80dee804..1a6c997046 100644
--- a/src/server/game/Scripting/ScriptDefines/ArenaTeamScript.h
+++ b/src/server/game/Scripting/ScriptDefines/ArenaTeamScript.h
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/game/Scripting/ScriptDefines/AuctionHouseScript.cpp b/src/server/game/Scripting/ScriptDefines/AuctionHouseScript.cpp
index be3e010cf2..bb978bc811 100644
--- a/src/server/game/Scripting/ScriptDefines/AuctionHouseScript.cpp
+++ b/src/server/game/Scripting/ScriptDefines/AuctionHouseScript.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/game/Scripting/ScriptDefines/AuctionHouseScript.h b/src/server/game/Scripting/ScriptDefines/AuctionHouseScript.h
index e2d014b976..c821da64a7 100644
--- a/src/server/game/Scripting/ScriptDefines/AuctionHouseScript.h
+++ b/src/server/game/Scripting/ScriptDefines/AuctionHouseScript.h
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/game/Scripting/ScriptDefines/BattlegroundMapScript.cpp b/src/server/game/Scripting/ScriptDefines/BattlegroundMapScript.cpp
index 1d0ac139ab..6f084bd5e1 100644
--- a/src/server/game/Scripting/ScriptDefines/BattlegroundMapScript.cpp
+++ b/src/server/game/Scripting/ScriptDefines/BattlegroundMapScript.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/game/Scripting/ScriptDefines/BattlegroundMapScript.h b/src/server/game/Scripting/ScriptDefines/BattlegroundMapScript.h
index c0c9c4518a..090206c0d2 100644
--- a/src/server/game/Scripting/ScriptDefines/BattlegroundMapScript.h
+++ b/src/server/game/Scripting/ScriptDefines/BattlegroundMapScript.h
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/game/Scripting/ScriptDefines/BattlegroundScript.cpp b/src/server/game/Scripting/ScriptDefines/BattlegroundScript.cpp
index 89cb1462e1..b91d159396 100644
--- a/src/server/game/Scripting/ScriptDefines/BattlegroundScript.cpp
+++ b/src/server/game/Scripting/ScriptDefines/BattlegroundScript.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/game/Scripting/ScriptDefines/BattlegroundScript.h b/src/server/game/Scripting/ScriptDefines/BattlegroundScript.h
index 70b59f2d46..b91502e86c 100644
--- a/src/server/game/Scripting/ScriptDefines/BattlegroundScript.h
+++ b/src/server/game/Scripting/ScriptDefines/BattlegroundScript.h
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/game/Scripting/ScriptDefines/CommandScript.cpp b/src/server/game/Scripting/ScriptDefines/CommandScript.cpp
index 5d930ec0ab..e9e672d88f 100644
--- a/src/server/game/Scripting/ScriptDefines/CommandScript.cpp
+++ b/src/server/game/Scripting/ScriptDefines/CommandScript.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/game/Scripting/ScriptDefines/CommandScript.h b/src/server/game/Scripting/ScriptDefines/CommandScript.h
index 397332481b..7c89cdf5e1 100644
--- a/src/server/game/Scripting/ScriptDefines/CommandScript.h
+++ b/src/server/game/Scripting/ScriptDefines/CommandScript.h
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/game/Scripting/ScriptDefines/ConditionScript.cpp b/src/server/game/Scripting/ScriptDefines/ConditionScript.cpp
index eab4efb6f8..64a73c3fd9 100644
--- a/src/server/game/Scripting/ScriptDefines/ConditionScript.cpp
+++ b/src/server/game/Scripting/ScriptDefines/ConditionScript.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/game/Scripting/ScriptDefines/ConditionScript.h b/src/server/game/Scripting/ScriptDefines/ConditionScript.h
index 3f7295e823..c530458697 100644
--- a/src/server/game/Scripting/ScriptDefines/ConditionScript.h
+++ b/src/server/game/Scripting/ScriptDefines/ConditionScript.h
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/game/Scripting/ScriptDefines/CreatureScript.cpp b/src/server/game/Scripting/ScriptDefines/CreatureScript.cpp
index d1a76580d1..6e4f36927e 100644
--- a/src/server/game/Scripting/ScriptDefines/CreatureScript.cpp
+++ b/src/server/game/Scripting/ScriptDefines/CreatureScript.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/game/Scripting/ScriptDefines/CreatureScript.h b/src/server/game/Scripting/ScriptDefines/CreatureScript.h
index 4fab28f94e..508ba2b49f 100644
--- a/src/server/game/Scripting/ScriptDefines/CreatureScript.h
+++ b/src/server/game/Scripting/ScriptDefines/CreatureScript.h
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/game/Scripting/ScriptDefines/DatabaseScript.cpp b/src/server/game/Scripting/ScriptDefines/DatabaseScript.cpp
index 550564373e..df84d21564 100644
--- a/src/server/game/Scripting/ScriptDefines/DatabaseScript.cpp
+++ b/src/server/game/Scripting/ScriptDefines/DatabaseScript.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/game/Scripting/ScriptDefines/DatabaseScript.h b/src/server/game/Scripting/ScriptDefines/DatabaseScript.h
index 3340676fa8..708f0a9864 100644
--- a/src/server/game/Scripting/ScriptDefines/DatabaseScript.h
+++ b/src/server/game/Scripting/ScriptDefines/DatabaseScript.h
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/game/Scripting/ScriptDefines/DynamicObjectScript.cpp b/src/server/game/Scripting/ScriptDefines/DynamicObjectScript.cpp
index a3dc5ebfab..d2826b1c41 100644
--- a/src/server/game/Scripting/ScriptDefines/DynamicObjectScript.cpp
+++ b/src/server/game/Scripting/ScriptDefines/DynamicObjectScript.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/game/Scripting/ScriptDefines/DynamicObjectScript.h b/src/server/game/Scripting/ScriptDefines/DynamicObjectScript.h
index b29f5a6bcc..da51a86d59 100644
--- a/src/server/game/Scripting/ScriptDefines/DynamicObjectScript.h
+++ b/src/server/game/Scripting/ScriptDefines/DynamicObjectScript.h
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/game/Scripting/ScriptDefines/FormulaScript.cpp b/src/server/game/Scripting/ScriptDefines/FormulaScript.cpp
index 7eb79ae0e5..da9fe26a05 100644
--- a/src/server/game/Scripting/ScriptDefines/FormulaScript.cpp
+++ b/src/server/game/Scripting/ScriptDefines/FormulaScript.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/game/Scripting/ScriptDefines/FormulaScript.h b/src/server/game/Scripting/ScriptDefines/FormulaScript.h
index 2145e0f0c5..a95a676037 100644
--- a/src/server/game/Scripting/ScriptDefines/FormulaScript.h
+++ b/src/server/game/Scripting/ScriptDefines/FormulaScript.h
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/game/Scripting/ScriptDefines/GameEventScript.cpp b/src/server/game/Scripting/ScriptDefines/GameEventScript.cpp
index 1c47e071e1..75d7133119 100644
--- a/src/server/game/Scripting/ScriptDefines/GameEventScript.cpp
+++ b/src/server/game/Scripting/ScriptDefines/GameEventScript.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/game/Scripting/ScriptDefines/GameEventScript.h b/src/server/game/Scripting/ScriptDefines/GameEventScript.h
index 7902d56af3..6829cd651f 100644
--- a/src/server/game/Scripting/ScriptDefines/GameEventScript.h
+++ b/src/server/game/Scripting/ScriptDefines/GameEventScript.h
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/game/Scripting/ScriptDefines/GameObjectScript.cpp b/src/server/game/Scripting/ScriptDefines/GameObjectScript.cpp
index f8b15a7ab9..ddc5fdbaf5 100644
--- a/src/server/game/Scripting/ScriptDefines/GameObjectScript.cpp
+++ b/src/server/game/Scripting/ScriptDefines/GameObjectScript.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/game/Scripting/ScriptDefines/GameObjectScript.h b/src/server/game/Scripting/ScriptDefines/GameObjectScript.h
index 418a28883a..174ca61ba3 100644
--- a/src/server/game/Scripting/ScriptDefines/GameObjectScript.h
+++ b/src/server/game/Scripting/ScriptDefines/GameObjectScript.h
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/game/Scripting/ScriptDefines/GlobalScript.cpp b/src/server/game/Scripting/ScriptDefines/GlobalScript.cpp
index 3d2ccc4524..28285e9c23 100644
--- a/src/server/game/Scripting/ScriptDefines/GlobalScript.cpp
+++ b/src/server/game/Scripting/ScriptDefines/GlobalScript.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/game/Scripting/ScriptDefines/GlobalScript.h b/src/server/game/Scripting/ScriptDefines/GlobalScript.h
index c683650f4b..b22a22fb95 100644
--- a/src/server/game/Scripting/ScriptDefines/GlobalScript.h
+++ b/src/server/game/Scripting/ScriptDefines/GlobalScript.h
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/game/Scripting/ScriptDefines/GroupScript.cpp b/src/server/game/Scripting/ScriptDefines/GroupScript.cpp
index aed5e68ffb..5e808a3b17 100644
--- a/src/server/game/Scripting/ScriptDefines/GroupScript.cpp
+++ b/src/server/game/Scripting/ScriptDefines/GroupScript.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/game/Scripting/ScriptDefines/GroupScript.h b/src/server/game/Scripting/ScriptDefines/GroupScript.h
index 96f396418d..0995e3e919 100644
--- a/src/server/game/Scripting/ScriptDefines/GroupScript.h
+++ b/src/server/game/Scripting/ScriptDefines/GroupScript.h
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/game/Scripting/ScriptDefines/GuildScript.cpp b/src/server/game/Scripting/ScriptDefines/GuildScript.cpp
index 480c9968ca..ee141e598f 100644
--- a/src/server/game/Scripting/ScriptDefines/GuildScript.cpp
+++ b/src/server/game/Scripting/ScriptDefines/GuildScript.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/game/Scripting/ScriptDefines/GuildScript.h b/src/server/game/Scripting/ScriptDefines/GuildScript.h
index ebdfad81f7..206b3a8828 100644
--- a/src/server/game/Scripting/ScriptDefines/GuildScript.h
+++ b/src/server/game/Scripting/ScriptDefines/GuildScript.h
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/game/Scripting/ScriptDefines/InstanceMapScript.cpp b/src/server/game/Scripting/ScriptDefines/InstanceMapScript.cpp
index c930b829bb..ada552c0a6 100644
--- a/src/server/game/Scripting/ScriptDefines/InstanceMapScript.cpp
+++ b/src/server/game/Scripting/ScriptDefines/InstanceMapScript.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/game/Scripting/ScriptDefines/InstanceMapScript.h b/src/server/game/Scripting/ScriptDefines/InstanceMapScript.h
index 74b5024ba3..b4632e5d59 100644
--- a/src/server/game/Scripting/ScriptDefines/InstanceMapScript.h
+++ b/src/server/game/Scripting/ScriptDefines/InstanceMapScript.h
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/game/Scripting/ScriptDefines/ItemScript.h b/src/server/game/Scripting/ScriptDefines/ItemScript.h
index baa8c07f1b..e29af46402 100644
--- a/src/server/game/Scripting/ScriptDefines/ItemScript.h
+++ b/src/server/game/Scripting/ScriptDefines/ItemScript.h
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/game/Scripting/ScriptDefines/LootScript.cpp b/src/server/game/Scripting/ScriptDefines/LootScript.cpp
index a6231b4a48..c17ca9d2b1 100644
--- a/src/server/game/Scripting/ScriptDefines/LootScript.cpp
+++ b/src/server/game/Scripting/ScriptDefines/LootScript.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/game/Scripting/ScriptDefines/LootScript.h b/src/server/game/Scripting/ScriptDefines/LootScript.h
index 445abdddcc..c501bedf05 100644
--- a/src/server/game/Scripting/ScriptDefines/LootScript.h
+++ b/src/server/game/Scripting/ScriptDefines/LootScript.h
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/game/Scripting/ScriptDefines/MailScript.cpp b/src/server/game/Scripting/ScriptDefines/MailScript.cpp
index 0f867fb08b..3191ad356c 100644
--- a/src/server/game/Scripting/ScriptDefines/MailScript.cpp
+++ b/src/server/game/Scripting/ScriptDefines/MailScript.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/game/Scripting/ScriptDefines/MailScript.h b/src/server/game/Scripting/ScriptDefines/MailScript.h
index 4591168a5d..479ca8d3b6 100644
--- a/src/server/game/Scripting/ScriptDefines/MailScript.h
+++ b/src/server/game/Scripting/ScriptDefines/MailScript.h
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/game/Scripting/ScriptDefines/MiscScript.cpp b/src/server/game/Scripting/ScriptDefines/MiscScript.cpp
index 7ec76e4e7c..1bc6d6faa9 100644
--- a/src/server/game/Scripting/ScriptDefines/MiscScript.cpp
+++ b/src/server/game/Scripting/ScriptDefines/MiscScript.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/game/Scripting/ScriptDefines/MiscScript.h b/src/server/game/Scripting/ScriptDefines/MiscScript.h
index 607c34dce1..17fe66d24a 100644
--- a/src/server/game/Scripting/ScriptDefines/MiscScript.h
+++ b/src/server/game/Scripting/ScriptDefines/MiscScript.h
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/game/Scripting/ScriptDefines/ModuleScript.cpp b/src/server/game/Scripting/ScriptDefines/ModuleScript.cpp
index 3205d24548..95256bfcea 100644
--- a/src/server/game/Scripting/ScriptDefines/ModuleScript.cpp
+++ b/src/server/game/Scripting/ScriptDefines/ModuleScript.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/game/Scripting/ScriptDefines/ModuleScript.h b/src/server/game/Scripting/ScriptDefines/ModuleScript.h
index 7ae228caec..2d0201e048 100644
--- a/src/server/game/Scripting/ScriptDefines/ModuleScript.h
+++ b/src/server/game/Scripting/ScriptDefines/ModuleScript.h
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/game/Scripting/ScriptDefines/MovementHandlerScript.cpp b/src/server/game/Scripting/ScriptDefines/MovementHandlerScript.cpp
index a0fa539b9d..e55fdfb006 100644
--- a/src/server/game/Scripting/ScriptDefines/MovementHandlerScript.cpp
+++ b/src/server/game/Scripting/ScriptDefines/MovementHandlerScript.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/game/Scripting/ScriptDefines/MovementHandlerScript.h b/src/server/game/Scripting/ScriptDefines/MovementHandlerScript.h
index 82f80af6c6..df45266ed1 100644
--- a/src/server/game/Scripting/ScriptDefines/MovementHandlerScript.h
+++ b/src/server/game/Scripting/ScriptDefines/MovementHandlerScript.h
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/game/Scripting/ScriptDefines/OutdoorPvPScript.cpp b/src/server/game/Scripting/ScriptDefines/OutdoorPvPScript.cpp
index d7fff6cdbf..49fadf77b8 100644
--- a/src/server/game/Scripting/ScriptDefines/OutdoorPvPScript.cpp
+++ b/src/server/game/Scripting/ScriptDefines/OutdoorPvPScript.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/game/Scripting/ScriptDefines/OutdoorPvPScript.h b/src/server/game/Scripting/ScriptDefines/OutdoorPvPScript.h
index 9fc7f39513..fc8d2dea4e 100644
--- a/src/server/game/Scripting/ScriptDefines/OutdoorPvPScript.h
+++ b/src/server/game/Scripting/ScriptDefines/OutdoorPvPScript.h
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/game/Scripting/ScriptDefines/PetScript.cpp b/src/server/game/Scripting/ScriptDefines/PetScript.cpp
index 2734e80776..7778c809b7 100644
--- a/src/server/game/Scripting/ScriptDefines/PetScript.cpp
+++ b/src/server/game/Scripting/ScriptDefines/PetScript.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/game/Scripting/ScriptDefines/PetScript.h b/src/server/game/Scripting/ScriptDefines/PetScript.h
index b7731bf581..12090149bd 100644
--- a/src/server/game/Scripting/ScriptDefines/PetScript.h
+++ b/src/server/game/Scripting/ScriptDefines/PetScript.h
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/game/Scripting/ScriptDefines/PlayerScript.cpp b/src/server/game/Scripting/ScriptDefines/PlayerScript.cpp
index 26ba8cba5b..b032688930 100644
--- a/src/server/game/Scripting/ScriptDefines/PlayerScript.cpp
+++ b/src/server/game/Scripting/ScriptDefines/PlayerScript.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
@@ -169,36 +169,11 @@ void ScriptMgr::OnPlayerDuelEnd(Player* winner, Player* loser, DuelCompleteType
CALL_ENABLED_HOOKS(PlayerScript, PLAYERHOOK_ON_DUEL_END, script->OnPlayerDuelEnd(winner, loser, type));
}
-void ScriptMgr::OnPlayerChat(Player* player, uint32 type, uint32 lang, std::string& msg)
-{
- CALL_ENABLED_HOOKS(PlayerScript, PLAYERHOOK_ON_CHAT, script->OnPlayerChat(player, type, lang, msg));
-}
-
void ScriptMgr::OnPlayerBeforeSendChatMessage(Player* player, uint32& type, uint32& lang, std::string& msg)
{
CALL_ENABLED_HOOKS(PlayerScript, PLAYERHOOK_ON_BEFORE_SEND_CHAT_MESSAGE, script->OnPlayerBeforeSendChatMessage(player, type, lang, msg));
}
-void ScriptMgr::OnPlayerChat(Player* player, uint32 type, uint32 lang, std::string& msg, Player* receiver)
-{
- CALL_ENABLED_HOOKS(PlayerScript, PLAYERHOOK_ON_CHAT_WITH_RECEIVER, script->OnPlayerChat(player, type, lang, msg, receiver));
-}
-
-void ScriptMgr::OnPlayerChat(Player* player, uint32 type, uint32 lang, std::string& msg, Group* group)
-{
- CALL_ENABLED_HOOKS(PlayerScript, PLAYERHOOK_ON_CHAT_WITH_GROUP, script->OnPlayerChat(player, type, lang, msg, group));
-}
-
-void ScriptMgr::OnPlayerChat(Player* player, uint32 type, uint32 lang, std::string& msg, Guild* guild)
-{
- CALL_ENABLED_HOOKS(PlayerScript, PLAYERHOOK_ON_CHAT_WITH_GUILD, script->OnPlayerChat(player, type, lang, msg, guild));
-}
-
-void ScriptMgr::OnPlayerChat(Player* player, uint32 type, uint32 lang, std::string& msg, Channel* channel)
-{
- CALL_ENABLED_HOOKS(PlayerScript, PLAYERHOOK_ON_CHAT_WITH_CHANNEL, script->OnPlayerChat(player, type, lang, msg, channel));
-}
-
void ScriptMgr::OnPlayerEmote(Player* player, uint32 emote)
{
CALL_ENABLED_HOOKS(PlayerScript, PLAYERHOOK_ON_EMOTE, script->OnPlayerEmote(player, emote));
diff --git a/src/server/game/Scripting/ScriptDefines/PlayerScript.h b/src/server/game/Scripting/ScriptDefines/PlayerScript.h
index 2faa19539c..3b6dfe7284 100644
--- a/src/server/game/Scripting/ScriptDefines/PlayerScript.h
+++ b/src/server/game/Scripting/ScriptDefines/PlayerScript.h
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
@@ -55,12 +55,7 @@ enum PlayerHook
PLAYERHOOK_ON_DUEL_REQUEST,
PLAYERHOOK_ON_DUEL_START,
PLAYERHOOK_ON_DUEL_END,
- PLAYERHOOK_ON_CHAT,
PLAYERHOOK_ON_BEFORE_SEND_CHAT_MESSAGE,
- PLAYERHOOK_ON_CHAT_WITH_RECEIVER,
- PLAYERHOOK_ON_CHAT_WITH_GROUP,
- PLAYERHOOK_ON_CHAT_WITH_GUILD,
- PLAYERHOOK_ON_CHAT_WITH_CHANNEL,
PLAYERHOOK_ON_EMOTE,
PLAYERHOOK_ON_TEXT_EMOTE,
PLAYERHOOK_ON_SPELL_CAST,
@@ -303,18 +298,8 @@ public:
virtual void OnPlayerDuelEnd(Player* /*winner*/, Player* /*loser*/, DuelCompleteType /*type*/) { }
// The following methods are called when a player sends a chat message.
- virtual void OnPlayerChat(Player* /*player*/, uint32 /*type*/, uint32 /*lang*/, std::string& /*msg*/) { }
-
virtual void OnPlayerBeforeSendChatMessage(Player* /*player*/, uint32& /*type*/, uint32& /*lang*/, std::string& /*msg*/) { }
- virtual void OnPlayerChat(Player* /*player*/, uint32 /*type*/, uint32 /*lang*/, std::string& /*msg*/, Player* /*receiver*/) { }
-
- virtual void OnPlayerChat(Player* /*player*/, uint32 /*type*/, uint32 /*lang*/, std::string& /*msg*/, Group* /*group*/) { }
-
- virtual void OnPlayerChat(Player* /*player*/, uint32 /*type*/, uint32 /*lang*/, std::string& /*msg*/, Guild* /*guild*/) { }
-
- virtual void OnPlayerChat(Player* /*player*/, uint32 /*type*/, uint32 /*lang*/, std::string& /*msg*/, Channel* /*channel*/) { }
-
// Both of the below are called on emote opcodes.
virtual void OnPlayerEmote(Player* /*player*/, uint32 /*emote*/) { }
diff --git a/src/server/game/Scripting/ScriptDefines/ServerScript.cpp b/src/server/game/Scripting/ScriptDefines/ServerScript.cpp
index 1384d680be..9794127f09 100644
--- a/src/server/game/Scripting/ScriptDefines/ServerScript.cpp
+++ b/src/server/game/Scripting/ScriptDefines/ServerScript.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/game/Scripting/ScriptDefines/ServerScript.h b/src/server/game/Scripting/ScriptDefines/ServerScript.h
index 89c29b1f0d..5f3a7787b0 100644
--- a/src/server/game/Scripting/ScriptDefines/ServerScript.h
+++ b/src/server/game/Scripting/ScriptDefines/ServerScript.h
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/game/Scripting/ScriptDefines/SpellScriptLoader.cpp b/src/server/game/Scripting/ScriptDefines/SpellScriptLoader.cpp
index 06aecaa12e..b95c35700c 100644
--- a/src/server/game/Scripting/ScriptDefines/SpellScriptLoader.cpp
+++ b/src/server/game/Scripting/ScriptDefines/SpellScriptLoader.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/game/Scripting/ScriptDefines/SpellScriptLoader.h b/src/server/game/Scripting/ScriptDefines/SpellScriptLoader.h
index 826d5288ea..841ccb5f22 100644
--- a/src/server/game/Scripting/ScriptDefines/SpellScriptLoader.h
+++ b/src/server/game/Scripting/ScriptDefines/SpellScriptLoader.h
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/game/Scripting/ScriptDefines/TicketScript.cpp b/src/server/game/Scripting/ScriptDefines/TicketScript.cpp
index a7e72076fd..9d2663799c 100644
--- a/src/server/game/Scripting/ScriptDefines/TicketScript.cpp
+++ b/src/server/game/Scripting/ScriptDefines/TicketScript.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/game/Scripting/ScriptDefines/TicketScript.h b/src/server/game/Scripting/ScriptDefines/TicketScript.h
index 43bf616aed..7a5ab745f2 100644
--- a/src/server/game/Scripting/ScriptDefines/TicketScript.h
+++ b/src/server/game/Scripting/ScriptDefines/TicketScript.h
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/game/Scripting/ScriptDefines/TransportScript.cpp b/src/server/game/Scripting/ScriptDefines/TransportScript.cpp
index f6eb1df821..d9a4639579 100644
--- a/src/server/game/Scripting/ScriptDefines/TransportScript.cpp
+++ b/src/server/game/Scripting/ScriptDefines/TransportScript.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/game/Scripting/ScriptDefines/TransportScript.h b/src/server/game/Scripting/ScriptDefines/TransportScript.h
index df1f5ed68a..3a6fa60188 100644
--- a/src/server/game/Scripting/ScriptDefines/TransportScript.h
+++ b/src/server/game/Scripting/ScriptDefines/TransportScript.h
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/game/Scripting/ScriptDefines/UnitScript.cpp b/src/server/game/Scripting/ScriptDefines/UnitScript.cpp
index 68c53367f0..c36cfcd25a 100644
--- a/src/server/game/Scripting/ScriptDefines/UnitScript.cpp
+++ b/src/server/game/Scripting/ScriptDefines/UnitScript.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
@@ -84,21 +84,6 @@ bool ScriptMgr::IfNormalReaction(Unit const* unit, Unit const* target, Reputatio
CALL_ENABLED_BOOLEAN_HOOKS(UnitScript, UNITHOOK_IF_NORMAL_REACTION, !script->IfNormalReaction(unit, target, repRank));
}
-bool ScriptMgr::IsNeedModSpellDamagePercent(Unit const* unit, AuraEffect* auraEff, float& doneTotalMod, SpellInfo const* spellProto)
-{
- CALL_ENABLED_BOOLEAN_HOOKS(UnitScript, UNITHOOK_IS_NEEDMOD_SPELL_DAMAGE_PERCENT, !script->IsNeedModSpellDamagePercent(unit, auraEff, doneTotalMod, spellProto));
-}
-
-bool ScriptMgr::IsNeedModMeleeDamagePercent(Unit const* unit, AuraEffect* auraEff, float& doneTotalMod, SpellInfo const* spellProto)
-{
- CALL_ENABLED_BOOLEAN_HOOKS(UnitScript, UNITHOOK_IS_NEEDMOD_MELEE_DAMAGE_PERCENT, !script->IsNeedModMeleeDamagePercent(unit, auraEff, doneTotalMod, spellProto));
-}
-
-bool ScriptMgr::IsNeedModHealPercent(Unit const* unit, AuraEffect* auraEff, float& doneTotalMod, SpellInfo const* spellProto)
-{
- CALL_ENABLED_BOOLEAN_HOOKS(UnitScript, UNITHOOK_IS_NEEDMOD_HEAL_PERCENT, !script->IsNeedModHealPercent(unit, auraEff, doneTotalMod, spellProto));
-}
-
bool ScriptMgr::CanSetPhaseMask(Unit const* unit, uint32 newPhaseMask, bool update)
{
CALL_ENABLED_BOOLEAN_HOOKS(UnitScript, UNITHOOK_CAN_SET_PHASE_MASK, !script->CanSetPhaseMask(unit, newPhaseMask, update));
diff --git a/src/server/game/Scripting/ScriptDefines/UnitScript.h b/src/server/game/Scripting/ScriptDefines/UnitScript.h
index efee6defe2..046f9cc117 100644
--- a/src/server/game/Scripting/ScriptDefines/UnitScript.h
+++ b/src/server/game/Scripting/ScriptDefines/UnitScript.h
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
@@ -33,9 +33,6 @@ enum UnitHook
UNITHOOK_ON_AURA_APPLY,
UNITHOOK_ON_AURA_REMOVE,
UNITHOOK_IF_NORMAL_REACTION,
- UNITHOOK_IS_NEEDMOD_SPELL_DAMAGE_PERCENT,
- UNITHOOK_IS_NEEDMOD_MELEE_DAMAGE_PERCENT,
- UNITHOOK_IS_NEEDMOD_HEAL_PERCENT,
UNITHOOK_CAN_SET_PHASE_MASK,
UNITHOOK_IS_CUSTOM_BUILD_VALUES_UPDATE,
UNITHOOK_SHOULD_TRACK_VALUES_UPDATE_POS_BY_INDEX,
@@ -89,12 +86,6 @@ public:
[[nodiscard]] virtual bool IfNormalReaction(Unit const* /*unit*/, Unit const* /*target*/, ReputationRank& /*repRank*/) { return true; }
- [[nodiscard]] virtual bool IsNeedModSpellDamagePercent(Unit const* /*unit*/, AuraEffect* /*auraEff*/, float& /*doneTotalMod*/, SpellInfo const* /*spellProto*/) { return true; }
-
- [[nodiscard]] virtual bool IsNeedModMeleeDamagePercent(Unit const* /*unit*/, AuraEffect* /*auraEff*/, float& /*doneTotalMod*/, SpellInfo const* /*spellProto*/) { return true; }
-
- [[nodiscard]] virtual bool IsNeedModHealPercent(Unit const* /*unit*/, AuraEffect* /*auraEff*/, float& /*doneTotalMod*/, SpellInfo const* /*spellProto*/) { return true; }
-
[[nodiscard]] virtual bool CanSetPhaseMask(Unit const* /*unit*/, uint32 /*newPhaseMask*/, bool /*update*/) { return true; }
[[nodiscard]] virtual bool IsCustomBuildValuesUpdate(Unit const* /*unit*/, uint8 /*updateType*/, ByteBuffer& /*fieldBuffer*/, Player const* /*target*/, uint16 /*index*/) { return false; }
diff --git a/src/server/game/Scripting/ScriptDefines/VehicleScript.cpp b/src/server/game/Scripting/ScriptDefines/VehicleScript.cpp
index 590050f4d4..35cc6fbebd 100644
--- a/src/server/game/Scripting/ScriptDefines/VehicleScript.cpp
+++ b/src/server/game/Scripting/ScriptDefines/VehicleScript.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/game/Scripting/ScriptDefines/VehicleScript.h b/src/server/game/Scripting/ScriptDefines/VehicleScript.h
index b1e7cf7bfd..c1f6b7b87f 100644
--- a/src/server/game/Scripting/ScriptDefines/VehicleScript.h
+++ b/src/server/game/Scripting/ScriptDefines/VehicleScript.h
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/game/Scripting/ScriptDefines/WeatherScript.cpp b/src/server/game/Scripting/ScriptDefines/WeatherScript.cpp
index 5232ae0ca4..863b576226 100644
--- a/src/server/game/Scripting/ScriptDefines/WeatherScript.cpp
+++ b/src/server/game/Scripting/ScriptDefines/WeatherScript.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
@@ -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>([&](ElunaScript* script)
+ ExecuteScript<ALEScript>([&](ALEScript* script)
{
script->OnWeatherChange(weather, state, grade);
});
diff --git a/src/server/game/Scripting/ScriptDefines/WeatherScript.h b/src/server/game/Scripting/ScriptDefines/WeatherScript.h
index 60a86290b3..b85d158763 100644
--- a/src/server/game/Scripting/ScriptDefines/WeatherScript.h
+++ b/src/server/game/Scripting/ScriptDefines/WeatherScript.h
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/game/Scripting/ScriptDefines/WorldMapScript.cpp b/src/server/game/Scripting/ScriptDefines/WorldMapScript.cpp
index bacbabc92d..da35cebc37 100644
--- a/src/server/game/Scripting/ScriptDefines/WorldMapScript.cpp
+++ b/src/server/game/Scripting/ScriptDefines/WorldMapScript.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/game/Scripting/ScriptDefines/WorldMapScript.h b/src/server/game/Scripting/ScriptDefines/WorldMapScript.h
index bbfc0d83b9..40ff656c7c 100644
--- a/src/server/game/Scripting/ScriptDefines/WorldMapScript.h
+++ b/src/server/game/Scripting/ScriptDefines/WorldMapScript.h
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/game/Scripting/ScriptDefines/WorldObjectScript.cpp b/src/server/game/Scripting/ScriptDefines/WorldObjectScript.cpp
index 5a5a8de268..040465e652 100644
--- a/src/server/game/Scripting/ScriptDefines/WorldObjectScript.cpp
+++ b/src/server/game/Scripting/ScriptDefines/WorldObjectScript.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/game/Scripting/ScriptDefines/WorldObjectScript.h b/src/server/game/Scripting/ScriptDefines/WorldObjectScript.h
index 84398629e6..e83bea37b4 100644
--- a/src/server/game/Scripting/ScriptDefines/WorldObjectScript.h
+++ b/src/server/game/Scripting/ScriptDefines/WorldObjectScript.h
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/game/Scripting/ScriptDefines/WorldScript.cpp b/src/server/game/Scripting/ScriptDefines/WorldScript.cpp
index dc328a1267..e5eef46755 100644
--- a/src/server/game/Scripting/ScriptDefines/WorldScript.cpp
+++ b/src/server/game/Scripting/ScriptDefines/WorldScript.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/game/Scripting/ScriptDefines/WorldScript.h b/src/server/game/Scripting/ScriptDefines/WorldScript.h
index 1c1c0885bd..75589426e4 100644
--- a/src/server/game/Scripting/ScriptDefines/WorldScript.h
+++ b/src/server/game/Scripting/ScriptDefines/WorldScript.h
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/game/Scripting/ScriptMgr.cpp b/src/server/game/Scripting/ScriptMgr.cpp
index 3a78145cab..34ad17546d 100644
--- a/src/server/game/Scripting/ScriptMgr.cpp
+++ b/src/server/game/Scripting/ScriptMgr.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
@@ -127,7 +127,7 @@ void ScriptMgr::Unload()
SCR_CLEAR<CreatureScript>();
SCR_CLEAR<DatabaseScript>();
SCR_CLEAR<DynamicObjectScript>();
- SCR_CLEAR<ElunaScript>();
+ SCR_CLEAR<ALEScript>();
SCR_CLEAR<FormulaScript>();
SCR_CLEAR<GameEventScript>();
SCR_CLEAR<GameObjectScript>();
diff --git a/src/server/game/Scripting/ScriptMgr.h b/src/server/game/Scripting/ScriptMgr.h
index 6b3efdb86d..5aa131f042 100644
--- a/src/server/game/Scripting/ScriptMgr.h
+++ b/src/server/game/Scripting/ScriptMgr.h
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
@@ -319,12 +319,7 @@ public: /* PlayerScript */
void OnPlayerDuelRequest(Player* target, Player* challenger);
void OnPlayerDuelStart(Player* player1, Player* player2);
void OnPlayerDuelEnd(Player* winner, Player* loser, DuelCompleteType type);
- void OnPlayerChat(Player* player, uint32 type, uint32 lang, std::string& msg);
void OnPlayerBeforeSendChatMessage(Player* player, uint32& type, uint32& lang, std::string& msg);
- void OnPlayerChat(Player* player, uint32 type, uint32 lang, std::string& msg, Player* receiver);
- void OnPlayerChat(Player* player, uint32 type, uint32 lang, std::string& msg, Group* group);
- void OnPlayerChat(Player* player, uint32 type, uint32 lang, std::string& msg, Guild* guild);
- void OnPlayerChat(Player* player, uint32 type, uint32 lang, std::string& msg, Channel* channel);
void OnPlayerEmote(Player* player, uint32 emote);
void OnPlayerTextEmote(Player* player, uint32 textEmote, uint32 emoteNum, ObjectGuid guid);
void OnPlayerSpellCast(Player* player, Spell* spell, bool skipCheck);
@@ -551,9 +546,6 @@ public: /* UnitScript */
void OnAuraApply(Unit* /*unit*/, Aura* /*aura*/);
void OnAuraRemove(Unit* unit, AuraApplication* aurApp, AuraRemoveMode mode);
bool IfNormalReaction(Unit const* unit, Unit const* target, ReputationRank& repRank);
- bool IsNeedModSpellDamagePercent(Unit const* unit, AuraEffect* auraEff, float& doneTotalMod, SpellInfo const* spellProto);
- bool IsNeedModMeleeDamagePercent(Unit const* unit, AuraEffect* auraEff, float& doneTotalMod, SpellInfo const* spellProto);
- bool IsNeedModHealPercent(Unit const* unit, AuraEffect* auraEff, float& doneTotalMod, SpellInfo const* spellProto);
bool CanSetPhaseMask(Unit const* unit, uint32 newPhaseMask, bool update);
bool IsCustomBuildValuesUpdate(Unit const* unit, uint8 updateType, ByteBuffer& fieldBuffer, Player const* target, uint16 index);
bool ShouldTrackValuesUpdatePosByIndex(Unit const* unit, uint8 updateType, uint16 index);
@@ -611,8 +603,6 @@ public: /* Arena Team Script */
public: /* SpellSC */
void OnCalcMaxDuration(Aura const* aura, int32& maxDuration);
- bool CanModAuraEffectDamageDone(AuraEffect const* auraEff, Unit* target, AuraApplication const* aurApp, uint8 mode, bool apply);
- bool CanModAuraEffectModDamagePercentDone(AuraEffect const* auraEff, Unit* target, AuraApplication const* aurApp, uint8 mode, bool apply);
void OnSpellCheckCast(Spell* spell, bool strict, SpellCastResult& res);
bool CanPrepare(Spell* spell, SpellCastTargets const* targets, AuraEffect const* triggeredByAura);
bool CanScalingEverything(Spell* spell);
diff --git a/src/server/game/Scripting/ScriptMgrMacros.h b/src/server/game/Scripting/ScriptMgrMacros.h
index 10232c589c..8089597679 100644
--- a/src/server/game/Scripting/ScriptMgrMacros.h
+++ b/src/server/game/Scripting/ScriptMgrMacros.h
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/game/Scripting/ScriptObject.cpp b/src/server/game/Scripting/ScriptObject.cpp
index 1143f328d7..0afe6ad520 100644
--- a/src/server/game/Scripting/ScriptObject.cpp
+++ b/src/server/game/Scripting/ScriptObject.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/game/Scripting/ScriptObject.h b/src/server/game/Scripting/ScriptObject.h
index fe6cb2c12d..bd2021417c 100644
--- a/src/server/game/Scripting/ScriptObject.h
+++ b/src/server/game/Scripting/ScriptObject.h
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/game/Scripting/ScriptObjectFwd.h b/src/server/game/Scripting/ScriptObjectFwd.h
index dc8036fb62..dba980d447 100644
--- a/src/server/game/Scripting/ScriptObjectFwd.h
+++ b/src/server/game/Scripting/ScriptObjectFwd.h
@@ -1,14 +1,14 @@
/*
- * This file is part of the AzeerothCore Project. See AUTHORS file for Copyright information
+ * This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/game/Scripting/ScriptSystem.cpp b/src/server/game/Scripting/ScriptSystem.cpp
index d6aa37b35e..c3e29e88ae 100644
--- a/src/server/game/Scripting/ScriptSystem.cpp
+++ b/src/server/game/Scripting/ScriptSystem.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/game/Scripting/ScriptSystem.h b/src/server/game/Scripting/ScriptSystem.h
index 3a33cca7ae..087ab3b0a1 100644
--- a/src/server/game/Scripting/ScriptSystem.h
+++ b/src/server/game/Scripting/ScriptSystem.h
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/game/Server/Packet.cpp b/src/server/game/Server/Packet.cpp
index 47d4e4fbec..23f069fb25 100644
--- a/src/server/game/Server/Packet.cpp
+++ b/src/server/game/Server/Packet.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/game/Server/Packet.h b/src/server/game/Server/Packet.h
index 0bb5664ae8..766e356553 100644
--- a/src/server/game/Server/Packet.h
+++ b/src/server/game/Server/Packet.h
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/game/Server/Packets/AllPackets.h b/src/server/game/Server/Packets/AllPackets.h
index 498dafb907..e0cbdf7d1c 100644
--- a/src/server/game/Server/Packets/AllPackets.h
+++ b/src/server/game/Server/Packets/AllPackets.h
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
@@ -19,6 +19,7 @@
#define AllPackets_h__
#include "BankPackets.h"
+#include "CalendarPackets.h"
#include "CharacterPackets.h"
#include "ChatPackets.h"
#include "CombatLogPackets.h"
diff --git a/src/server/game/Server/Packets/BankPackets.cpp b/src/server/game/Server/Packets/BankPackets.cpp
index c593730826..23ceff679f 100644
--- a/src/server/game/Server/Packets/BankPackets.cpp
+++ b/src/server/game/Server/Packets/BankPackets.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/game/Server/Packets/BankPackets.h b/src/server/game/Server/Packets/BankPackets.h
index 707680579a..2f24210bd1 100644
--- a/src/server/game/Server/Packets/BankPackets.h
+++ b/src/server/game/Server/Packets/BankPackets.h
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/game/Server/Packets/CalendarPackets.cpp b/src/server/game/Server/Packets/CalendarPackets.cpp
new file mode 100644
index 0000000000..2ff2cdd0d6
--- /dev/null
+++ b/src/server/game/Server/Packets/CalendarPackets.cpp
@@ -0,0 +1,41 @@
+/*
+ * This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
+ * more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#include "CalendarPackets.h"
+
+void WorldPackets::Calendar::GetEvent::Read()
+{
+ _worldPacket >> EventId;
+}
+
+void WorldPackets::Calendar::GuildFilter::Read()
+{
+ _worldPacket >> MinimumLevel;
+ _worldPacket >> MaximumLevel;
+ _worldPacket >> MinimumRank;
+}
+
+void WorldPackets::Calendar::ArenaTeam::Read()
+{
+ _worldPacket >> ArenaTeamId;
+}
+
+void WorldPackets::Calendar::CalendarComplain::Read()
+{
+ _worldPacket >> EventId;
+ _worldPacket >> ComplainGuid;
+}
diff --git a/src/server/game/Server/Packets/CalendarPackets.h b/src/server/game/Server/Packets/CalendarPackets.h
new file mode 100644
index 0000000000..f8ee056cb6
--- /dev/null
+++ b/src/server/game/Server/Packets/CalendarPackets.h
@@ -0,0 +1,73 @@
+/*
+ * This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
+ * more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#ifndef CalendarPackets_h__
+#define CalendarPackets_h__
+
+#include "Guild.h"
+#include "Packet.h"
+
+namespace WorldPackets
+{
+ namespace Calendar
+ {
+ class GetEvent final : public ClientPacket
+ {
+ public:
+ GetEvent(WorldPacket&& packet) : ClientPacket(CMSG_CALENDAR_GET_EVENT, std::move(packet)) {}
+
+ void Read() override;
+
+ uint64 EventId = 0;
+ };
+
+ class GuildFilter final : public ClientPacket
+ {
+ public:
+ GuildFilter(WorldPacket&& packet) : ClientPacket(CMSG_CALENDAR_GUILD_FILTER, std::move(packet)) {}
+
+ void Read() override;
+
+ uint32 MinimumLevel = 1;
+ uint32 MaximumLevel = 1;
+ uint32 MinimumRank = GR_GUILDMASTER;
+ };
+
+ class ArenaTeam final : public ClientPacket
+ {
+ public:
+ ArenaTeam(WorldPacket&& packet) : ClientPacket(CMSG_CALENDAR_ARENA_TEAM, std::move(packet)) {}
+
+ void Read() override;
+
+ uint32 ArenaTeamId = 0;
+ };
+
+ class CalendarComplain final : public ClientPacket
+ {
+ public:
+ CalendarComplain(WorldPacket&& packet) : ClientPacket(CMSG_CALENDAR_COMPLAIN, std::move(packet)) {}
+
+ void Read() override;
+
+ uint64 EventId = 0;
+ ObjectGuid ComplainGuid;
+ };
+ }
+}
+
+#endif // CalendarPackets_h__
diff --git a/src/server/game/Server/Packets/CharacterPackets.cpp b/src/server/game/Server/Packets/CharacterPackets.cpp
index d641849e81..2f26595380 100644
--- a/src/server/game/Server/Packets/CharacterPackets.cpp
+++ b/src/server/game/Server/Packets/CharacterPackets.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/game/Server/Packets/CharacterPackets.h b/src/server/game/Server/Packets/CharacterPackets.h
index a1d0a952b5..0defd6e51b 100644
--- a/src/server/game/Server/Packets/CharacterPackets.h
+++ b/src/server/game/Server/Packets/CharacterPackets.h
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/game/Server/Packets/ChatPackets.cpp b/src/server/game/Server/Packets/ChatPackets.cpp
index b840b888c4..55fc089d37 100644
--- a/src/server/game/Server/Packets/ChatPackets.cpp
+++ b/src/server/game/Server/Packets/ChatPackets.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/game/Server/Packets/ChatPackets.h b/src/server/game/Server/Packets/ChatPackets.h
index aec83b167c..df17bfbecb 100644
--- a/src/server/game/Server/Packets/ChatPackets.h
+++ b/src/server/game/Server/Packets/ChatPackets.h
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/game/Server/Packets/CombatLogPackets.cpp b/src/server/game/Server/Packets/CombatLogPackets.cpp
index 1b6d6535e2..d6c4b1c4f8 100644
--- a/src/server/game/Server/Packets/CombatLogPackets.cpp
+++ b/src/server/game/Server/Packets/CombatLogPackets.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/game/Server/Packets/CombatLogPackets.h b/src/server/game/Server/Packets/CombatLogPackets.h
index 30bb759073..6902a60243 100644
--- a/src/server/game/Server/Packets/CombatLogPackets.h
+++ b/src/server/game/Server/Packets/CombatLogPackets.h
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/game/Server/Packets/CombatPackets.cpp b/src/server/game/Server/Packets/CombatPackets.cpp
index 7a82cf0b8c..a58ec7edb6 100644
--- a/src/server/game/Server/Packets/CombatPackets.cpp
+++ b/src/server/game/Server/Packets/CombatPackets.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/game/Server/Packets/CombatPackets.h b/src/server/game/Server/Packets/CombatPackets.h
index 1126d907de..b379c33f24 100644
--- a/src/server/game/Server/Packets/CombatPackets.h
+++ b/src/server/game/Server/Packets/CombatPackets.h
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/game/Server/Packets/GuildPackets.cpp b/src/server/game/Server/Packets/GuildPackets.cpp
index cbb1aeeb56..f624ca9da8 100644
--- a/src/server/game/Server/Packets/GuildPackets.cpp
+++ b/src/server/game/Server/Packets/GuildPackets.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/game/Server/Packets/GuildPackets.h b/src/server/game/Server/Packets/GuildPackets.h
index ee68324af7..b2d19c261b 100644
--- a/src/server/game/Server/Packets/GuildPackets.h
+++ b/src/server/game/Server/Packets/GuildPackets.h
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/game/Server/Packets/ItemPackets.cpp b/src/server/game/Server/Packets/ItemPackets.cpp
index e86ae3879d..e48ae274b2 100644
--- a/src/server/game/Server/Packets/ItemPackets.cpp
+++ b/src/server/game/Server/Packets/ItemPackets.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/game/Server/Packets/ItemPackets.h b/src/server/game/Server/Packets/ItemPackets.h
index 04d8841888..93fe08bb73 100644
--- a/src/server/game/Server/Packets/ItemPackets.h
+++ b/src/server/game/Server/Packets/ItemPackets.h
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/game/Server/Packets/LFGPackets.cpp b/src/server/game/Server/Packets/LFGPackets.cpp
index 4079bf52f6..777b8b399b 100644
--- a/src/server/game/Server/Packets/LFGPackets.cpp
+++ b/src/server/game/Server/Packets/LFGPackets.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/game/Server/Packets/LFGPackets.h b/src/server/game/Server/Packets/LFGPackets.h
index e91dc84c16..eb45977fdd 100644
--- a/src/server/game/Server/Packets/LFGPackets.h
+++ b/src/server/game/Server/Packets/LFGPackets.h
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/game/Server/Packets/MiscPackets.cpp b/src/server/game/Server/Packets/MiscPackets.cpp
index 1098453813..64e248dd52 100644
--- a/src/server/game/Server/Packets/MiscPackets.cpp
+++ b/src/server/game/Server/Packets/MiscPackets.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
@@ -140,3 +140,31 @@ WorldPacket const* WorldPackets::Misc::UITime::Write()
return &_worldPacket;
}
+
+void WorldPackets::Misc::Complain::Read()
+{
+ _worldPacket >> SpamType; // 0 - mail, 1 - chat
+ _worldPacket >> SpammerGuid;
+ switch (SpamType)
+ {
+ case 0:
+ _worldPacket >> Unk1; // const 0
+ _worldPacket >> Unk2; // probably mail id
+ _worldPacket >> Unk3; // const 0
+ break;
+ case 1:
+ _worldPacket >> Unk1; // probably language
+ _worldPacket >> Unk2; // message type?
+ _worldPacket >> Unk3; // probably channel id
+ _worldPacket >> Unk4; // unk random value
+ _worldPacket >> Description; // spam description string (messagetype, channel name, player name, message)
+ break;
+ }
+}
+
+WorldPacket const* WorldPackets::Misc::ComplainResult::Write()
+{
+ _worldPacket << Unk;
+
+ return &_worldPacket;
+}
diff --git a/src/server/game/Server/Packets/MiscPackets.h b/src/server/game/Server/Packets/MiscPackets.h
index 7453ad7fc4..5b0689168b 100644
--- a/src/server/game/Server/Packets/MiscPackets.h
+++ b/src/server/game/Server/Packets/MiscPackets.h
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
@@ -210,6 +210,32 @@ namespace WorldPackets
uint32 Time = 0;
};
+
+ class Complain final : public ClientPacket
+ {
+ public:
+ Complain(WorldPacket&& packet) : ClientPacket(CMSG_COMPLAIN, std::move(packet)) {}
+
+ void Read() override;
+
+ uint8 SpamType = 0; // 0 - mail, 1 - chat
+ ObjectGuid SpammerGuid;
+ uint32 Unk1 = 0;
+ uint32 Unk2 = 0;
+ uint32 Unk3 = 0;
+ uint32 Unk4 = 0;
+ std::string Description = "";
+ };
+
+ class ComplainResult final : public ServerPacket
+ {
+ public:
+ ComplainResult() : ServerPacket(SMSG_COMPLAIN_RESULT, 1) {}
+
+ WorldPacket const* Write() override;
+
+ uint8 Unk = 0;
+ };
}
}
diff --git a/src/server/game/Server/Packets/PacketUtilities.cpp b/src/server/game/Server/Packets/PacketUtilities.cpp
index e92ede5df2..36675f02ac 100644
--- a/src/server/game/Server/Packets/PacketUtilities.cpp
+++ b/src/server/game/Server/Packets/PacketUtilities.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/game/Server/Packets/PacketUtilities.h b/src/server/game/Server/Packets/PacketUtilities.h
index 62deeca650..b80d3b7b3e 100644
--- a/src/server/game/Server/Packets/PacketUtilities.h
+++ b/src/server/game/Server/Packets/PacketUtilities.h
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/game/Server/Packets/PetPackets.cpp b/src/server/game/Server/Packets/PetPackets.cpp
index 8028bce25c..03001b4d5b 100644
--- a/src/server/game/Server/Packets/PetPackets.cpp
+++ b/src/server/game/Server/Packets/PetPackets.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
@@ -50,3 +50,19 @@ WorldPacket const* WorldPackets::Pet::PetUnlearnedSpell::Write()
_worldPacket << uint32(SpellID);
return &_worldPacket;
}
+
+WorldPacket const* WorldPackets::Pet::PetActionSound::Write()
+{
+ _worldPacket << UnitGUID;
+ _worldPacket << int32(Action);
+ return &_worldPacket;
+}
+
+WorldPacket const* WorldPackets::Pet::PetDismissSound::Write()
+{
+ _worldPacket << int32(ModelId);
+ _worldPacket << float(ModelPosition.x);
+ _worldPacket << float(ModelPosition.y);
+ _worldPacket << float(ModelPosition.z);
+ return &_worldPacket;
+}
diff --git a/src/server/game/Server/Packets/PetPackets.h b/src/server/game/Server/Packets/PetPackets.h
index cbb96db700..4120e0a9f4 100644
--- a/src/server/game/Server/Packets/PetPackets.h
+++ b/src/server/game/Server/Packets/PetPackets.h
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
@@ -20,6 +20,7 @@
#include "ObjectGuid.h"
#include "Packet.h"
+#include "G3D/Vector3.h"
namespace WorldPackets
{
@@ -94,6 +95,30 @@ namespace WorldPackets
void Read() override { }
};
+
+ class PetActionSound final : public ServerPacket
+ {
+ public:
+ PetActionSound(ObjectGuid unitGUID, int32 action)
+ : ServerPacket(SMSG_PET_ACTION_SOUND, 8 + 4), UnitGUID(unitGUID), Action(action) { }
+
+ WorldPacket const* Write() override;
+
+ ObjectGuid UnitGUID;
+ int32 Action = 0;
+ };
+
+ class PetDismissSound final : public ServerPacket
+ {
+ public:
+ PetDismissSound(int32 modelId, G3D::Vector3 modelPosition)
+ : ServerPacket(SMSG_PET_DISMISS_SOUND, 4 + 12), ModelId(modelId), ModelPosition(modelPosition) { }
+
+ WorldPacket const* Write() override;
+
+ int32 ModelId = 0;
+ G3D::Vector3 ModelPosition;
+ };
}
}
diff --git a/src/server/game/Server/Packets/QueryPackets.cpp b/src/server/game/Server/Packets/QueryPackets.cpp
index 6efa96275f..c1ad0d8e5a 100644
--- a/src/server/game/Server/Packets/QueryPackets.cpp
+++ b/src/server/game/Server/Packets/QueryPackets.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/game/Server/Packets/QueryPackets.h b/src/server/game/Server/Packets/QueryPackets.h
index 85d7a76ce7..b5f773779f 100644
--- a/src/server/game/Server/Packets/QueryPackets.h
+++ b/src/server/game/Server/Packets/QueryPackets.h
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/game/Server/Packets/TotemPackets.cpp b/src/server/game/Server/Packets/TotemPackets.cpp
index 82531e3db6..02ff705e19 100644
--- a/src/server/game/Server/Packets/TotemPackets.cpp
+++ b/src/server/game/Server/Packets/TotemPackets.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/game/Server/Packets/TotemPackets.h b/src/server/game/Server/Packets/TotemPackets.h
index 98e559562b..dff16fd1c1 100644
--- a/src/server/game/Server/Packets/TotemPackets.h
+++ b/src/server/game/Server/Packets/TotemPackets.h
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/game/Server/Packets/WorldStatePackets.cpp b/src/server/game/Server/Packets/WorldStatePackets.cpp
index fde6964096..c0590703e6 100644
--- a/src/server/game/Server/Packets/WorldStatePackets.cpp
+++ b/src/server/game/Server/Packets/WorldStatePackets.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/game/Server/Packets/WorldStatePackets.h b/src/server/game/Server/Packets/WorldStatePackets.h
index 89382a7835..2a8d95072a 100644
--- a/src/server/game/Server/Packets/WorldStatePackets.h
+++ b/src/server/game/Server/Packets/WorldStatePackets.h
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/game/Server/Protocol/Opcodes.cpp b/src/server/game/Server/Protocol/Opcodes.cpp
index bc12f7764f..2e85d484f5 100644
--- a/src/server/game/Server/Protocol/Opcodes.cpp
+++ b/src/server/game/Server/Protocol/Opcodes.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
@@ -363,7 +363,7 @@ void OpcodeTable::Initialize()
/*0x0E8*/ DEFINE_SERVER_OPCODE_HANDLER(SMSG_FORCE_MOVE_ROOT, STATUS_NEVER);
/*0x0E9*/ DEFINE_HANDLER(CMSG_FORCE_MOVE_ROOT_ACK, STATUS_LOGGEDIN, PROCESS_THREADSAFE, &WorldSession::HandleMoveRootAck );
/*0x0EA*/ DEFINE_SERVER_OPCODE_HANDLER(SMSG_FORCE_MOVE_UNROOT, STATUS_NEVER);
- /*0x0EB*/ DEFINE_HANDLER(CMSG_FORCE_MOVE_UNROOT_ACK, STATUS_LOGGEDIN, PROCESS_THREADSAFE, &WorldSession::HandleMoveUnRootAck );
+ /*0x0EB*/ DEFINE_HANDLER(CMSG_FORCE_MOVE_UNROOT_ACK, STATUS_LOGGEDIN, PROCESS_THREADSAFE, &WorldSession::HandleMoveRootAck );
/*0x0EC*/ DEFINE_HANDLER(MSG_MOVE_ROOT, STATUS_NEVER, PROCESS_INPLACE, &WorldSession::Handle_NULL );
/*0x0ED*/ DEFINE_HANDLER(MSG_MOVE_UNROOT, STATUS_NEVER, PROCESS_INPLACE, &WorldSession::Handle_NULL );
/*0x0EE*/ DEFINE_HANDLER(MSG_MOVE_HEARTBEAT, STATUS_LOGGEDIN, PROCESS_THREADSAFE, &WorldSession::HandleMovementOpcodes );
@@ -374,7 +374,7 @@ void OpcodeTable::Initialize()
/*0x0F3*/ DEFINE_SERVER_OPCODE_HANDLER(SMSG_MOVE_NORMAL_FALL, STATUS_NEVER);
/*0x0F4*/ DEFINE_SERVER_OPCODE_HANDLER(SMSG_MOVE_SET_HOVER, STATUS_NEVER);
/*0x0F5*/ DEFINE_SERVER_OPCODE_HANDLER(SMSG_MOVE_UNSET_HOVER, STATUS_NEVER);
- /*0x0F6*/ DEFINE_HANDLER(CMSG_MOVE_HOVER_ACK, STATUS_LOGGEDIN, PROCESS_THREADUNSAFE, &WorldSession::HandleMoveHoverAck );
+ /*0x0F6*/ DEFINE_HANDLER(CMSG_MOVE_HOVER_ACK, STATUS_LOGGEDIN, PROCESS_THREADSAFE, &WorldSession::HandleMoveFlagChangeOpcode );
/*0x0F7*/ DEFINE_SERVER_OPCODE_HANDLER(MSG_MOVE_HOVER, STATUS_NEVER);
/*0x0F8*/ DEFINE_HANDLER(CMSG_TRIGGER_CINEMATIC_CHEAT, STATUS_NEVER, PROCESS_INPLACE, &WorldSession::Handle_NULL );
/*0x0F9*/ DEFINE_HANDLER(CMSG_OPENING_CINEMATIC, STATUS_NEVER, PROCESS_INPLACE, &WorldSession::Handle_NULL );
@@ -847,8 +847,8 @@ void OpcodeTable::Initialize()
/*0x2CC*/ DEFINE_SERVER_OPCODE_HANDLER(SMSG_RAID_INSTANCE_INFO, STATUS_NEVER);
/*0x2CD*/ DEFINE_HANDLER(CMSG_REQUEST_RAID_INFO, STATUS_LOGGEDIN, PROCESS_THREADUNSAFE, &WorldSession::HandleRequestRaidInfoOpcode );
/*0x2CE*/ DEFINE_HANDLER(CMSG_MOVE_TIME_SKIPPED, STATUS_LOGGEDIN, PROCESS_THREADSAFE, &WorldSession::HandleMoveTimeSkippedOpcode );
- /*0x2CF*/ DEFINE_HANDLER(CMSG_MOVE_FEATHER_FALL_ACK, STATUS_LOGGEDIN, PROCESS_THREADSAFE, &WorldSession::HandleFeatherFallAck );
- /*0x2D0*/ DEFINE_HANDLER(CMSG_MOVE_WATER_WALK_ACK, STATUS_LOGGEDIN, PROCESS_THREADSAFE, &WorldSession::HandleMoveWaterWalkAck );
+ /*0x2CF*/ DEFINE_HANDLER(CMSG_MOVE_FEATHER_FALL_ACK, STATUS_LOGGEDIN, PROCESS_THREADSAFE, &WorldSession::HandleMoveFlagChangeOpcode );
+ /*0x2D0*/ DEFINE_HANDLER(CMSG_MOVE_WATER_WALK_ACK, STATUS_LOGGEDIN, PROCESS_THREADSAFE, &WorldSession::HandleMoveFlagChangeOpcode );
/*0x2D1*/ DEFINE_HANDLER(CMSG_MOVE_NOT_ACTIVE_MOVER, STATUS_LOGGEDIN, PROCESS_THREADSAFE, &WorldSession::HandleMoveNotActiveMover );
/*0x2D2*/ DEFINE_SERVER_OPCODE_HANDLER(SMSG_PLAY_SOUND, STATUS_NEVER);
/*0x2D3*/ DEFINE_HANDLER(CMSG_BATTLEFIELD_STATUS, STATUS_LOGGEDIN, PROCESS_THREADUNSAFE, &WorldSession::HandleBattlefieldStatusOpcode );
@@ -965,7 +965,7 @@ void OpcodeTable::Initialize()
/*0x342*/ DEFINE_HANDLER(MSG_MOVE_STOP_SWIM_CHEAT, STATUS_NEVER, PROCESS_INPLACE, &WorldSession::Handle_NULL );
/*0x343*/ DEFINE_SERVER_OPCODE_HANDLER(SMSG_MOVE_SET_CAN_FLY, STATUS_NEVER);
/*0x344*/ DEFINE_SERVER_OPCODE_HANDLER(SMSG_MOVE_UNSET_CAN_FLY, STATUS_NEVER);
- /*0x345*/ DEFINE_HANDLER(CMSG_MOVE_SET_CAN_FLY_ACK, STATUS_LOGGEDIN, PROCESS_THREADSAFE, &WorldSession::HandleMoveSetCanFlyAckOpcode );
+ /*0x345*/ DEFINE_HANDLER(CMSG_MOVE_SET_CAN_FLY_ACK, STATUS_LOGGEDIN, PROCESS_THREADSAFE, &WorldSession::HandleMoveFlagChangeOpcode );
/*0x346*/ DEFINE_HANDLER(CMSG_MOVE_SET_FLY, STATUS_LOGGEDIN, PROCESS_THREADSAFE, &WorldSession::HandleMovementOpcodes );
/*0x347*/ DEFINE_HANDLER(CMSG_SOCKET_GEMS, STATUS_LOGGEDIN, PROCESS_INPLACE, &WorldSession::HandleSocketOpcode );
/*0x348*/ DEFINE_HANDLER(CMSG_ARENA_TEAM_CREATE, STATUS_NEVER, PROCESS_INPLACE, &WorldSession::Handle_NULL );
@@ -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_THREADSAFE, &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_THREADSAFE, &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_THREADSAFE, &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_THREADSAFE, &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/game/Server/Protocol/Opcodes.h b/src/server/game/Server/Protocol/Opcodes.h
index 3eb61151e3..cb994b3e80 100644
--- a/src/server/game/Server/Protocol/Opcodes.h
+++ b/src/server/game/Server/Protocol/Opcodes.h
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/game/Server/Protocol/PacketLog.cpp b/src/server/game/Server/Protocol/PacketLog.cpp
index 2047bf84b9..f08d088b52 100644
--- a/src/server/game/Server/Protocol/PacketLog.cpp
+++ b/src/server/game/Server/Protocol/PacketLog.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/game/Server/Protocol/PacketLog.h b/src/server/game/Server/Protocol/PacketLog.h
index 7ff34079f6..3add1959dc 100644
--- a/src/server/game/Server/Protocol/PacketLog.h
+++ b/src/server/game/Server/Protocol/PacketLog.h
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/game/Server/Protocol/ServerPktHeader.h b/src/server/game/Server/Protocol/ServerPktHeader.h
index 67ed3f7a79..d9c1895685 100644
--- a/src/server/game/Server/Protocol/ServerPktHeader.h
+++ b/src/server/game/Server/Protocol/ServerPktHeader.h
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/game/Server/WorldPacket.h b/src/server/game/Server/WorldPacket.h
index 4b18d6bb13..2bd1a9ac16 100644
--- a/src/server/game/Server/WorldPacket.h
+++ b/src/server/game/Server/WorldPacket.h
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/game/Server/WorldSession.cpp b/src/server/game/Server/WorldSession.cpp
index c8d336fe53..254328b809 100644
--- a/src/server/game/Server/WorldSession.cpp
+++ b/src/server/game/Server/WorldSession.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
@@ -125,7 +125,7 @@ WorldSession::WorldSession(uint32 id, std::string&& name, uint32 accountFlags, s
m_playerLogout(false),
m_playerRecentlyLogout(false),
m_playerSave(false),
- m_sessionDbcLocale(sWorld->GetDefaultDbcLocale()),
+ m_sessionDbcLocale(sWorld->GetAvailableDbcLocale(locale)),
m_sessionDbLocaleIndex(locale),
m_latency(0),
m_TutorialsChanged(false),
@@ -136,7 +136,8 @@ WorldSession::WorldSession(uint32 id, std::string&& name, uint32 accountFlags, s
_addonMessageReceiveCount(0),
_timeSyncClockDeltaQueue(6),
_timeSyncClockDelta(0),
- _pendingTimeSyncRequests()
+ _pendingTimeSyncRequests(),
+ _orderCounter(0)
{
memset(m_Tutorials, 0, sizeof(m_Tutorials));
@@ -1509,3 +1510,9 @@ void WorldSession::InitializeSessionCallback(CharacterDatabaseQueryHolder const&
SendClientCacheVersion(clientCacheVersion);
SendTutorialsData();
}
+
+void WorldSession::SetPacketLogging(bool state)
+{
+ if (m_Socket)
+ m_Socket->SetPacketLogging(state);
+}
diff --git a/src/server/game/Server/WorldSession.h b/src/server/game/Server/WorldSession.h
index 15c0a73685..c12fb7df0e 100644
--- a/src/server/game/Server/WorldSession.h
+++ b/src/server/game/Server/WorldSession.h
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
@@ -150,6 +150,7 @@ namespace WorldPackets
{
class MinimapPingClient;
class RandomRollClient;
+ class Complain;
}
namespace Pet
@@ -189,6 +190,14 @@ namespace WorldPackets
class ItemRefundInfo;
class ItemRefund;
}
+
+ namespace Calendar
+ {
+ class GetEvent;
+ class GuildFilter;
+ class ArenaTeam;
+ class CalendarComplain;
+ }
}
enum AccountDataType
@@ -379,6 +388,10 @@ public:
void ReadMovementInfo(WorldPacket& data, MovementInfo* mi);
void WriteMovementInfo(WorldPacket* data, MovementInfo* mi);
+ void SynchronizeMovement(MovementInfo& movementInfo);
+ void HandleMoverRelocation(MovementInfo& movementInfo, Unit* mover);
+ bool VerifyMovementInfo(MovementInfo const& movementInfo, Player* plrMover, Unit* mover, Opcodes opcode) const;
+ bool ProcessMovementInfo(MovementInfo& movementInfo, Unit* mover, Player* plrMover, WorldPacket& recvData);
void SendPacket(WorldPacket const* packet);
void SendPetNameInvalid(uint32 error, std::string const& name, DeclinedName* declinedName);
@@ -582,6 +595,10 @@ public:
// Time Synchronisation
void ResetTimeSync();
void SendTimeSync();
+
+ // Movement packet order
+ uint32 GetOrderCounter() const { return _orderCounter; }
+ void IncrementOrderCounter() { ++_orderCounter; }
public: // opcodes handlers
void Handle_NULL(WorldPacket& null); // not used
void Handle_EarlyProccess(WorldPacket& recvPacket); // just mark packets processed in WorldSocket::OnRead
@@ -601,6 +618,7 @@ public: // opcodes handlers
void SendCharCreate(ResponseCodes result);
void SendCharDelete(ResponseCodes result);
+ void SendCharLoginFailed(LoginFailureReason reason);
void SendCharRename(ResponseCodes result, CharacterRenameInfo const* renameInfo);
void SendCharCustomize(ResponseCodes result, CharacterCustomizeInfo const* customizeInfo);
void SendCharFactionChange(ResponseCodes result, CharacterFactionChangeInfo const* factionChangeInfo);
@@ -610,7 +628,6 @@ public: // opcodes handlers
void HandlePlayedTime(WorldPackets::Character::PlayedTimeClient& packet);
// new
- void HandleMoveUnRootAck(WorldPacket& recvPacket);
void HandleMoveRootAck(WorldPacket& recvPacket);
// new inspect
@@ -619,11 +636,6 @@ public: // opcodes handlers
// new party stats
void HandleInspectHonorStatsOpcode(WorldPacket& recvPacket);
- void HandleMoveWaterWalkAck(WorldPacket& recvPacket);
- void HandleFeatherFallAck(WorldPacket& recvData);
-
- void HandleMoveHoverAck(WorldPacket& recvData);
-
void HandleMountSpecialAnimOpcode(WorldPacket& recvdata);
// character view
@@ -968,7 +980,7 @@ public: // opcodes handlers
void HandleFarSightOpcode(WorldPacket& recvData);
void HandleSetDungeonDifficultyOpcode(WorldPacket& recvData);
void HandleSetRaidDifficultyOpcode(WorldPacket& recvData);
- void HandleMoveSetCanFlyAckOpcode(WorldPacket& recvData);
+ void HandleMoveFlagChangeOpcode(WorldPacket& recvData);
void HandleSetTitleOpcode(WorldPacket& recvData);
void HandleRealmSplitOpcode(WorldPacket& recvData);
void HandleTimeSyncResp(WorldPacket& recvData);
@@ -1032,7 +1044,7 @@ public: // opcodes handlers
void HandleAreaSpiritHealerQueueOpcode(WorldPacket& recvData);
void HandleCancelMountAuraOpcode(WorldPacket& recvData);
void HandleSelfResOpcode(WorldPacket& recvData);
- void HandleComplainOpcode(WorldPacket& recvData);
+ void HandleComplainOpcode(WorldPackets::Misc::Complain& packet);
void HandleRequestPetInfo(WorldPackets::Pet::RequestPetInfo& packet);
// Socket gem
@@ -1069,9 +1081,9 @@ public: // opcodes handlers
// Calendar
void HandleCalendarGetCalendar(WorldPacket& recvData);
- void HandleCalendarGetEvent(WorldPacket& recvData);
- void HandleCalendarGuildFilter(WorldPacket& recvData);
- void HandleCalendarArenaTeam(WorldPacket& recvData);
+ void HandleCalendarGetEvent(WorldPackets::Calendar::GetEvent& packet);
+ void HandleCalendarGuildFilter(WorldPackets::Calendar::GuildFilter& packet);
+ void HandleCalendarArenaTeam(WorldPackets::Calendar::ArenaTeam& packet);
void HandleCalendarAddEvent(WorldPacket& recvData);
void HandleCalendarUpdateEvent(WorldPacket& recvData);
void HandleCalendarRemoveEvent(WorldPacket& recvData);
@@ -1081,7 +1093,7 @@ public: // opcodes handlers
void HandleCalendarEventRemoveInvite(WorldPacket& recvData);
void HandleCalendarEventStatus(WorldPacket& recvData);
void HandleCalendarEventModeratorStatus(WorldPacket& recvData);
- void HandleCalendarComplain(WorldPacket& recvData);
+ void HandleCalendarComplain(WorldPackets::Calendar::CalendarComplain& packet);
void HandleCalendarGetNumPending(WorldPacket& recvData);
void HandleCalendarEventSignup(WorldPacket& recvData);
@@ -1126,6 +1138,8 @@ public: // opcodes handlers
void InitializeSession();
void InitializeSessionCallback(CharacterDatabaseQueryHolder const& realmHolder, uint32 clientCacheVersion);
+ void SetPacketLogging(bool state);
+
private:
void ProcessQueryCallbacks();
@@ -1236,6 +1250,8 @@ private:
uint32 _timeSyncNextCounter;
uint32 _timeSyncTimer;
+ uint32 _orderCounter;
+
WorldSession(WorldSession const& right) = delete;
WorldSession& operator=(WorldSession const& right) = delete;
};
diff --git a/src/server/game/Server/WorldSessionMgr.cpp b/src/server/game/Server/WorldSessionMgr.cpp
index 5bad2e10a5..b430996692 100644
--- a/src/server/game/Server/WorldSessionMgr.cpp
+++ b/src/server/game/Server/WorldSessionMgr.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
@@ -398,29 +398,6 @@ void WorldSessionMgr::SendGlobalGMMessage(WorldPacket const* packet, WorldSessio
}
}
-/// Send a packet to all players (or players selected team) in the zone (except self if mentioned)
-bool WorldSessionMgr::SendZoneMessage(uint32 zone, WorldPacket const* packet, WorldSession* self, TeamId teamId)
-{
- bool foundPlayerToSend = false;
- SessionMap::const_iterator itr;
-
- for (itr = _sessions.begin(); itr != _sessions.end(); ++itr)
- {
- if (itr->second &&
- itr->second->GetPlayer() &&
- itr->second->GetPlayer()->IsInWorld() &&
- itr->second->GetPlayer()->GetZoneId() == zone &&
- itr->second != self &&
- (teamId == TEAM_NEUTRAL || itr->second->GetPlayer()->GetTeamId() == teamId))
- {
- itr->second->SendPacket(packet);
- foundPlayerToSend = true;
- }
- }
-
- return foundPlayerToSend;
-}
-
/// Send a server message to the user(s)
void WorldSessionMgr::SendServerMessage(ServerMessageType messageID, std::string stringParam /*= ""*/, Player* player /*= nullptr*/)
{
@@ -435,14 +412,6 @@ void WorldSessionMgr::SendServerMessage(ServerMessageType messageID, std::string
SendGlobalMessage(chatServerMessage.Write());
}
-/// Send a System Message to all players in the zone (except self if mentioned)
-void WorldSessionMgr::SendZoneText(uint32 zone, std::string text, WorldSession* self, TeamId teamId)
-{
- WorldPacket data;
- ChatHandler::BuildChatPacket(data, CHAT_MSG_SYSTEM, LANG_UNIVERSAL, nullptr, nullptr, text.c_str());
- SendZoneMessage(zone, &data, self, teamId);
-}
-
void WorldSessionMgr::DoForAllOnlinePlayers(std::function<void(Player*)> exec)
{
std::shared_lock lock(*HashMapHolder<Player>::GetLock());
diff --git a/src/server/game/Server/WorldSessionMgr.h b/src/server/game/Server/WorldSessionMgr.h
index 364dad1ed0..af85ed7a0f 100644
--- a/src/server/game/Server/WorldSessionMgr.h
+++ b/src/server/game/Server/WorldSessionMgr.h
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
@@ -81,8 +81,6 @@ public:
void SendGlobalMessage(WorldPacket const* packet, WorldSession* self = nullptr, TeamId teamId = TEAM_NEUTRAL);
void SendGlobalGMMessage(WorldPacket const* packet, WorldSession* self = nullptr, TeamId teamId = TEAM_NEUTRAL);
- bool SendZoneMessage(uint32 zone, WorldPacket const* packet, WorldSession* self = nullptr, TeamId teamId = TEAM_NEUTRAL);
- void SendZoneText(uint32 zone, std::string text, WorldSession* self = nullptr, TeamId teamId = TEAM_NEUTRAL);
void SendServerMessage(ServerMessageType messageID, std::string stringParam = "", Player* player = nullptr);
void DoForAllOnlinePlayers(std::function<void(Player*)> exec);
diff --git a/src/server/game/Server/WorldSocket.cpp b/src/server/game/Server/WorldSocket.cpp
index 51705d18e0..452a16ad17 100644
--- a/src/server/game/Server/WorldSocket.cpp
+++ b/src/server/game/Server/WorldSocket.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
@@ -117,7 +117,7 @@ void EncryptableAndCompressiblePacket::CompressIfNeeded()
}
WorldSocket::WorldSocket(tcp::socket&& socket)
- : Socket(std::move(socket)), _OverSpeedPings(0), _worldSession(nullptr), _authed(false), _sendBufferSize(4096)
+ : Socket(std::move(socket)), _OverSpeedPings(0), _worldSession(nullptr), _authed(false), _sendBufferSize(4096), _loggingPackets(false)
{
Acore::Crypto::GetRandomBytes(_authSeed);
_headerBuffer.Resize(sizeof(ClientPktHeader));
@@ -406,7 +406,7 @@ WorldSocket::ReadDataHandlerResult WorldSocket::ReadDataHandler()
WorldPacket packet(opcode, std::move(_packetBuffer));
WorldPacket* packetToQueue;
- if (sPacketLog->CanLogPacket())
+ if (sPacketLog->CanLogPacket() && IsLoggingPackets())
sPacketLog->LogPacket(packet, CLIENT_TO_SERVER, GetRemoteIpAddress(), GetRemotePort());
std::unique_lock<std::mutex> sessionGuard(_worldSessionLock, std::defer_lock);
@@ -520,7 +520,7 @@ void WorldSocket::SendPacket(WorldPacket const& packet)
if (!IsOpen())
return;
- if (sPacketLog->CanLogPacket())
+ if (sPacketLog->CanLogPacket() && IsLoggingPackets())
sPacketLog->LogPacket(packet, SERVER_TO_CLIENT, GetRemoteIpAddress(), GetRemotePort());
_bufferQueue.Enqueue(new EncryptableAndCompressiblePacket(packet, _authCrypt.IsInitialized()));
diff --git a/src/server/game/Server/WorldSocket.h b/src/server/game/Server/WorldSocket.h
index aa65dfa093..347e9b5068 100644
--- a/src/server/game/Server/WorldSocket.h
+++ b/src/server/game/Server/WorldSocket.h
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
@@ -85,6 +85,9 @@ public:
void SetSendBufferSize(std::size_t sendBufferSize) { _sendBufferSize = sendBufferSize; }
+ bool IsLoggingPackets() const { return _loggingPackets; }
+ void SetPacketLogging(bool state) { _loggingPackets = state; }
+
protected:
void OnClose() override;
void ReadHandler() override;
@@ -133,6 +136,8 @@ private:
QueryCallbackProcessor _queryProcessor;
std::string _ipCountry;
+
+ bool _loggingPackets;
};
#endif
diff --git a/src/server/game/Server/WorldSocketMgr.cpp b/src/server/game/Server/WorldSocketMgr.cpp
index 15e75e188b..07e9d4dce9 100644
--- a/src/server/game/Server/WorldSocketMgr.cpp
+++ b/src/server/game/Server/WorldSocketMgr.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/game/Server/WorldSocketMgr.h b/src/server/game/Server/WorldSocketMgr.h
index cf37c3c988..a93a12fa61 100644
--- a/src/server/game/Server/WorldSocketMgr.h
+++ b/src/server/game/Server/WorldSocketMgr.h
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/game/Skills/SkillDiscovery.cpp b/src/server/game/Skills/SkillDiscovery.cpp
index aaced18f8a..89b5da2381 100644
--- a/src/server/game/Skills/SkillDiscovery.cpp
+++ b/src/server/game/Skills/SkillDiscovery.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/game/Skills/SkillDiscovery.h b/src/server/game/Skills/SkillDiscovery.h
index 262b010323..3665f926b7 100644
--- a/src/server/game/Skills/SkillDiscovery.h
+++ b/src/server/game/Skills/SkillDiscovery.h
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/game/Skills/SkillExtraItems.cpp b/src/server/game/Skills/SkillExtraItems.cpp
index e6b757a2f7..b16f0b504b 100644
--- a/src/server/game/Skills/SkillExtraItems.cpp
+++ b/src/server/game/Skills/SkillExtraItems.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/game/Skills/SkillExtraItems.h b/src/server/game/Skills/SkillExtraItems.h
index f260bedeed..0db55f3d3f 100644
--- a/src/server/game/Skills/SkillExtraItems.h
+++ b/src/server/game/Skills/SkillExtraItems.h
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/game/Spells/Auras/SpellAuraDefines.h b/src/server/game/Spells/Auras/SpellAuraDefines.h
index cebfaf9a9b..327cd044e8 100644
--- a/src/server/game/Spells/Auras/SpellAuraDefines.h
+++ b/src/server/game/Spells/Auras/SpellAuraDefines.h
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/game/Spells/Auras/SpellAuraEffects.cpp b/src/server/game/Spells/Auras/SpellAuraEffects.cpp
index eb470bd9e3..7ffb4065f8 100644
--- a/src/server/game/Spells/Auras/SpellAuraEffects.cpp
+++ b/src/server/game/Spells/Auras/SpellAuraEffects.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
@@ -212,7 +212,7 @@ pAuraEffectHandler AuraEffectHandler[TOTAL_AURAS] =
&AuraEffect::HandleModStateImmunityMask, //147 SPELL_AURA_MECHANIC_IMMUNITY_MASK
&AuraEffect::HandleAuraRetainComboPoints, //148 SPELL_AURA_RETAIN_COMBO_POINTS
&AuraEffect::HandleNoImmediateEffect, //149 SPELL_AURA_REDUCE_PUSHBACK
- &AuraEffect::HandleShieldBlockValue, //150 SPELL_AURA_MOD_SHIELD_BLOCKVALUE_PCT
+ &AuraEffect::HandleShieldBlockValuePercent, //150 SPELL_AURA_MOD_SHIELD_BLOCKVALUE_PCT
&AuraEffect::HandleAuraTrackStealthed, //151 SPELL_AURA_TRACK_STEALTHED
&AuraEffect::HandleNoImmediateEffect, //152 SPELL_AURA_MOD_DETECTED_RANGE implemented in Creature::GetAggroRange
&AuraEffect::HandleNoImmediateEffect, //153 SPELL_AURA_SPLIT_DAMAGE_FLAT
@@ -393,7 +393,6 @@ AuraEffect::AuraEffect(Aura* base, uint8 effIndex, int32* baseAmount, Unit* cast
m_amount = CalculateAmount(caster);
m_casterLevel = caster ? caster->GetLevel() : 0;
m_applyResilience = caster && caster->CanApplyResilience();
- m_auraGroup = sSpellMgr->GetSpellGroup(GetId());
CalculateSpellMod();
@@ -727,9 +726,12 @@ void AuraEffect::ChangeAmount(int32 newAmount, bool mark, bool onStackOrReapply)
std::list<AuraApplication*> effectApplications;
GetApplicationList(effectApplications);
- for (std::list<AuraApplication*>::const_iterator apptItr = effectApplications.begin(); apptItr != effectApplications.end(); ++apptItr)
- if ((*apptItr)->HasEffect(GetEffIndex()))
- HandleEffect(*apptItr, handleMask, false);
+ for (AuraApplication* aurApp : effectApplications)
+ if (aurApp->HasEffect(GetEffIndex()))
+ {
+ aurApp->GetTarget()->_RegisterAuraEffect(this, false);
+ HandleEffect(aurApp, handleMask, false);
+ }
if (handleMask & AURA_EFFECT_HANDLE_CHANGE_AMOUNT)
{
@@ -740,9 +742,15 @@ void AuraEffect::ChangeAmount(int32 newAmount, bool mark, bool onStackOrReapply)
CalculateSpellMod();
}
- for (std::list<AuraApplication*>::const_iterator apptItr = effectApplications.begin(); apptItr != effectApplications.end(); ++apptItr)
- if ((*apptItr)->HasEffect(GetEffIndex()))
- HandleEffect(*apptItr, handleMask, true);
+ for (AuraApplication* aurApp : effectApplications)
+ if (aurApp->HasEffect(GetEffIndex()))
+ {
+ if (aurApp->GetRemoveMode() != AURA_REMOVE_NONE)
+ continue;
+
+ aurApp->GetTarget()->_RegisterAuraEffect(this, true);
+ HandleEffect(aurApp, handleMask, true);
+ }
}
void AuraEffect::HandleEffect(AuraApplication* aurApp, uint8 mode, bool apply)
@@ -3000,14 +3008,17 @@ void AuraEffect::HandleAuraModDisarm(AuraApplication const* aurApp, uint8 mode,
// Handle damage modification, shapeshifted druids are not affected
if (target->IsPlayer() && (!target->IsInFeralForm() || target->GetShapeshiftForm() == FORM_GHOSTWOLF))
{
- if (Item* pItem = target->ToPlayer()->GetItemByPos(INVENTORY_SLOT_BAG_0, slot))
+ Player* player = target->ToPlayer();
+ if (Item* pItem = player->GetItemByPos(INVENTORY_SLOT_BAG_0, slot))
{
- uint8 attacktype = Player::GetAttackBySlot(slot);
+ WeaponAttackType attackType = Player::GetAttackBySlot(slot);
- if (attacktype < MAX_ATTACK)
+ player->ApplyItemDependentAuras(pItem, !apply);
+ if (attackType < MAX_ATTACK)
{
- target->ToPlayer()->_ApplyWeaponDamage(slot, pItem->GetTemplate(), nullptr, !apply);
- target->ToPlayer()->_ApplyWeaponDependentAuraMods(pItem, WeaponAttackType(attacktype), !apply);
+ player->_ApplyWeaponDamage(slot, pItem->GetTemplate(), nullptr, !apply);
+ if (!apply) // apply case already handled on item dependent aura removal (if any)
+ player->UpdateWeaponDependentAuras(attackType);
}
}
}
@@ -3439,9 +3450,17 @@ void AuraEffect::HandleModThreat(AuraApplication const* aurApp, uint8 mode, bool
return;
Unit* target = aurApp->GetTarget();
- for (int8 i = 0; i < MAX_SPELL_SCHOOL; ++i)
+ for (uint8 i = 0; i < MAX_SPELL_SCHOOL; ++i)
if (GetMiscValue() & (1 << i))
- ApplyPercentModFloatVar(target->m_threatModifier[i], float(GetAmount()), apply);
+ {
+ if (apply)
+ AddPct(target->m_threatModifier[i], GetAmount());
+ else
+ {
+ float amount = target->GetTotalAuraMultiplierByMiscMask(SPELL_AURA_MOD_THREAT, 1 << i);
+ target->m_threatModifier[i] = amount;
+ }
+ }
}
void AuraEffect::HandleAuraModTotalThreat(AuraApplication const* aurApp, uint8 mode, bool apply) const
@@ -4318,7 +4337,7 @@ void AuraEffect::HandleAuraModResistanceExclusive(AuraApplication const* aurApp,
Unit* target = aurApp->GetTarget();
- for (int8 x = SPELL_SCHOOL_NORMAL; x < MAX_SPELL_SCHOOL; x++)
+ for (uint8 x = SPELL_SCHOOL_NORMAL; x < MAX_SPELL_SCHOOL; x++)
{
if (GetMiscValue() & int32(1 << x))
{
@@ -4326,9 +4345,9 @@ void AuraEffect::HandleAuraModResistanceExclusive(AuraApplication const* aurApp,
if (amount < GetAmount())
{
float value = float(GetAmount() - amount);
- target->HandleStatModifier(UnitMods(UNIT_MOD_RESISTANCE_START + x), BASE_VALUE, value, apply);
- if (target->IsPlayer())
- target->ApplyResistanceBuffModsMod(SpellSchools(x), aurApp->IsPositive(), value, apply);
+ target->HandleStatFlatModifier(UnitMods(UNIT_MOD_RESISTANCE_START + x), BASE_VALUE, value, apply);
+ if (target->IsPlayer() || target->IsPet())
+ target->UpdateResistanceBuffModsMod(SpellSchools(x));
}
}
}
@@ -4345,9 +4364,9 @@ void AuraEffect::HandleAuraModResistance(AuraApplication const* aurApp, uint8 mo
{
if (GetMiscValue() & int32(1 << x))
{
- target->HandleStatModifier(UnitMods(UNIT_MOD_RESISTANCE_START + x), TOTAL_VALUE, float(GetAmount()), apply);
+ target->HandleStatFlatModifier(UnitMods(UNIT_MOD_RESISTANCE_START + x), TOTAL_VALUE, float(GetAmount()), apply);
if (target->IsPlayer() || target->IsPet())
- target->ApplyResistanceBuffModsMod(SpellSchools(x), GetAmount() > 0, (float)GetAmount(), apply);
+ target->UpdateResistanceBuffModsMod(SpellSchools(x));
}
}
}
@@ -4358,32 +4377,39 @@ void AuraEffect::HandleAuraModBaseResistancePCT(AuraApplication const* aurApp, u
return;
Unit* target = aurApp->GetTarget();
- for (int8 x = SPELL_SCHOOL_NORMAL; x < MAX_SPELL_SCHOOL; x++)
+ for (uint8 x = SPELL_SCHOOL_NORMAL; x < MAX_SPELL_SCHOOL; x++)
{
if (GetMiscValue() & int32(1 << x))
{
- target->HandleStatModifier(UnitMods(UNIT_MOD_RESISTANCE_START + x), BASE_PCT, float(GetAmount()), apply);
+ if (apply)
+ target->ApplyStatPctModifier(UnitMods(UNIT_MOD_RESISTANCE_START + x), BASE_PCT, float(GetAmount()));
+ else
+ {
+ float amount = target->GetTotalAuraMultiplierByMiscMask(SPELL_AURA_MOD_BASE_RESISTANCE_PCT, 1 << x);
+ target->SetStatPctModifier(UnitMods(UNIT_MOD_RESISTANCE_START + x), BASE_PCT, amount);
+ }
}
}
}
-void AuraEffect::HandleModResistancePercent(AuraApplication const* aurApp, uint8 mode, bool apply) const
+void AuraEffect::HandleModResistancePercent(AuraApplication const* aurApp, uint8 mode, bool /*apply*/) const
{
if (!(mode & (AURA_EFFECT_HANDLE_CHANGE_AMOUNT_MASK | AURA_EFFECT_HANDLE_STAT)))
return;
Unit* target = aurApp->GetTarget();
- for (int8 i = SPELL_SCHOOL_NORMAL; i < MAX_SPELL_SCHOOL; i++)
+ for (uint8 i = SPELL_SCHOOL_NORMAL; i < MAX_SPELL_SCHOOL; i++)
{
if (GetMiscValue() & int32(1 << i))
{
- target->HandleStatModifier(UnitMods(UNIT_MOD_RESISTANCE_START + i), TOTAL_PCT, float(GetAmount()), apply);
+ float amount = target->GetTotalAuraMultiplierByMiscMask(SPELL_AURA_MOD_RESISTANCE_PCT, 1 << i);
+ if (target->GetPctModifierValue(UnitMods(UNIT_MOD_RESISTANCE_START + i), TOTAL_PCT) == amount)
+ continue;
+
+ target->SetStatPctModifier(UnitMods(UNIT_MOD_RESISTANCE_START + i), TOTAL_PCT, amount);
if (target->IsPlayer() || target->IsPet())
- {
- target->ApplyResistanceBuffModsPercentMod(SpellSchools(i), true, (float)GetAmount(), apply);
- target->ApplyResistanceBuffModsPercentMod(SpellSchools(i), false, (float)GetAmount(), apply);
- }
+ target->UpdateResistanceBuffModsMod(SpellSchools(i));
}
}
}
@@ -4398,7 +4424,7 @@ void AuraEffect::HandleModBaseResistance(AuraApplication const* aurApp, uint8 mo
{
if (GetMiscValue() & (1 << i))
{
- target->HandleStatModifier(UnitMods(UNIT_MOD_RESISTANCE_START + i), TOTAL_VALUE, float(GetAmount()), apply);
+ target->HandleStatFlatModifier(UnitMods(UNIT_MOD_RESISTANCE_START + i), TOTAL_VALUE, float(GetAmount()), apply);
}
}
}
@@ -4430,23 +4456,28 @@ void AuraEffect::HandleAuraModStat(AuraApplication const* aurApp, uint8 mode, bo
if (!(mode & (AURA_EFFECT_HANDLE_CHANGE_AMOUNT_MASK | AURA_EFFECT_HANDLE_STAT)))
return;
- Unit* target = aurApp->GetTarget();
-
if (GetMiscValue() < -2 || GetMiscValue() > 4)
{
LOG_ERROR("spells.aura.effect", "WARNING: Spell {} effect {} has an unsupported misc value ({}) for SPELL_AURA_MOD_STAT ", GetId(), GetEffIndex(), GetMiscValue());
return;
}
+ Unit* target = aurApp->GetTarget();
+ int32 spellGroupVal = target->GetHighestExclusiveSameEffectSpellGroupValue(this, SPELL_AURA_MOD_STAT, true, GetMiscValue());
+ if (std::abs(spellGroupVal) >= std::abs(GetAmount()))
+ return;
+
for (int32 i = STAT_STRENGTH; i < MAX_STATS; i++)
{
// -1 or -2 is all stats (misc < -2 checked in function beginning)
if (GetMiscValue() < 0 || GetMiscValue() == i)
{
- //target->ApplyStatMod(Stats(i), m_amount, apply);
- target->HandleStatModifier(UnitMods(UNIT_MOD_STAT_START + i), TOTAL_VALUE, float(GetAmount()), apply);
+ if (spellGroupVal)
+ target->HandleStatFlatModifier(UnitMods(UNIT_MOD_STAT_START + i), TOTAL_VALUE, float(GetAmount()), !apply);
+
+ target->HandleStatFlatModifier(UnitMods(UNIT_MOD_STAT_START + i), TOTAL_VALUE, float(GetAmount()), apply);
if (target->IsPlayer() || target->IsPet())
- target->ApplyStatBuffMod(Stats(i), (float)GetAmount(), apply);
+ target->UpdateStatBuffMod(Stats(i));
}
}
}
@@ -4470,8 +4501,16 @@ void AuraEffect::HandleModPercentStat(AuraApplication const* aurApp, uint8 mode,
for (int32 i = STAT_STRENGTH; i < MAX_STATS; ++i)
{
- if (GetMiscValue() == i || GetMiscValue() == -1)
- target->HandleStatModifier(UnitMods(UNIT_MOD_STAT_START + i), BASE_PCT, float(m_amount), apply);
+ if (apply)
+ target->ApplyStatPctModifier(UnitMods(UNIT_MOD_STAT_START + i), BASE_PCT, float(GetAmount()));
+ else
+ {
+ float amount = target->GetTotalAuraMultiplier(SPELL_AURA_MOD_PERCENT_STAT, [i](AuraEffect const* aurEff)
+ {
+ return (aurEff->GetMiscValue() == i || aurEff->GetMiscValue() == -1);
+ });
+ target->SetStatPctModifier(UnitMods(UNIT_MOD_STAT_START + i), BASE_PCT, amount);
+ }
}
}
@@ -4549,7 +4588,7 @@ void AuraEffect::HandleModHealingDone(AuraApplication const* aurApp, uint8 mode,
target->ToPlayer()->UpdateSpellDamageAndHealingBonus();
}
-void AuraEffect::HandleModTotalPercentStat(AuraApplication const* aurApp, uint8 mode, bool apply) const
+void AuraEffect::HandleModTotalPercentStat(AuraApplication const* aurApp, uint8 mode, bool /*apply*/) const
{
if (!(mode & (AURA_EFFECT_HANDLE_CHANGE_AMOUNT_MASK | AURA_EFFECT_HANDLE_STAT)))
return;
@@ -4565,39 +4604,22 @@ void AuraEffect::HandleModTotalPercentStat(AuraApplication const* aurApp, uint8
// save current health state
float healthPct = target->GetHealthPct();
bool alive = target->IsAlive();
- float value = GetAmount();
-
- if (GetId() == 67480) // xinef: hack fix for blessing of sanctuary stats stack with blessing of kings...
- {
- if (value) // not turned off
- value = 10.0f;
- for (int32 i = STAT_STRENGTH; i < MAX_STATS; i++)
- {
- if (i == STAT_STRENGTH || i == STAT_STAMINA)
- {
- if (apply && (target->IsPlayer() || target->IsPet()))
- target->ApplyStatPercentBuffMod(Stats(i), value, apply);
-
- target->HandleStatModifier(UnitMods(UNIT_MOD_STAT_START + i), TOTAL_PCT, value, apply);
-
- if (!apply && (target->IsPlayer() || target->IsPet()))
- target->ApplyStatPercentBuffMod(Stats(i), value, apply);
- }
- }
- return;
- }
for (int32 i = STAT_STRENGTH; i < MAX_STATS; i++)
{
if (GetMiscValue() == i || GetMiscValue() == -1)
{
- if (apply && (target->IsPlayer() || target->IsPet()))
- target->ApplyStatPercentBuffMod(Stats(i), value, apply);
+ float amount = target->GetTotalAuraMultiplier(SPELL_AURA_MOD_TOTAL_STAT_PERCENTAGE, [i](AuraEffect const* aurEff)
+ {
+ return (aurEff->GetMiscValue() == i || aurEff->GetMiscValue() == -1);
+ });
- target->HandleStatModifier(UnitMods(UNIT_MOD_STAT_START + i), TOTAL_PCT, value, apply);
+ if (target->GetPctModifierValue(UnitMods(UNIT_MOD_STAT_START + i), TOTAL_PCT) == amount)
+ continue;
- if (!apply && (target->IsPlayer() || target->IsPet()))
- target->ApplyStatPercentBuffMod(Stats(i), value, apply);
+ target->SetStatPctModifier(UnitMods(UNIT_MOD_STAT_START + i), TOTAL_PCT, amount);
+ if (target->IsPlayer() || target->IsPet())
+ target->UpdateStatBuffMod(Stats(i));
}
}
@@ -4693,7 +4715,7 @@ void AuraEffect::HandleAuraModIncreaseHealth(AuraApplication const* aurApp, uint
if (apply)
{
- target->HandleStatModifier(UNIT_MOD_HEALTH, TOTAL_VALUE, float(GetAmount()), apply);
+ target->HandleStatFlatModifier(UNIT_MOD_HEALTH, TOTAL_VALUE, float(GetAmount()), apply);
target->ModifyHealth(GetAmount());
}
else
@@ -4702,7 +4724,7 @@ void AuraEffect::HandleAuraModIncreaseHealth(AuraApplication const* aurApp, uint
target->ModifyHealth(-GetAmount());
else
target->SetHealth(1);
- target->HandleStatModifier(UNIT_MOD_HEALTH, TOTAL_VALUE, float(GetAmount()), apply);
+ target->HandleStatFlatModifier(UNIT_MOD_HEALTH, TOTAL_VALUE, float(GetAmount()), apply);
}
}
@@ -4716,7 +4738,7 @@ void AuraEffect::HandleAuraModIncreaseMaxHealth(AuraApplication const* aurApp, u
uint32 oldhealth = target->GetHealth();
double healthPercentage = (double)oldhealth / (double)target->GetMaxHealth();
- target->HandleStatModifier(UNIT_MOD_HEALTH, TOTAL_VALUE, float(GetAmount()), apply);
+ target->HandleStatFlatModifier(UNIT_MOD_HEALTH, TOTAL_VALUE, float(GetAmount()), apply);
// refresh percentage
if (oldhealth > 0)
@@ -4746,7 +4768,7 @@ void AuraEffect::HandleAuraModIncreaseEnergy(AuraApplication const* aurApp, uint
UnitMods unitMod = UnitMods(static_cast<uint16>(UNIT_MOD_POWER_START) + PowerType);
- target->HandleStatModifier(unitMod, TOTAL_VALUE, float(GetAmount()), apply);
+ target->HandleStatFlatModifier(unitMod, TOTAL_VALUE, float(GetAmount()), apply);
}
void AuraEffect::HandleAuraModIncreaseEnergyPercent(AuraApplication const* aurApp, uint8 mode, bool apply) const
@@ -4765,17 +4787,16 @@ void AuraEffect::HandleAuraModIncreaseEnergyPercent(AuraApplication const* aurAp
// return;
UnitMods unitMod = UnitMods(static_cast<uint16>(UNIT_MOD_POWER_START) + PowerType);
- float amount = float(GetAmount());
if (apply)
{
- target->HandleStatModifier(unitMod, TOTAL_PCT, amount, apply);
- target->ModifyPowerPct(PowerType, amount, apply);
+ float amount = float(GetAmount());
+ target->ApplyStatPctModifier(unitMod, TOTAL_PCT, amount);
}
else
{
- target->ModifyPowerPct(PowerType, amount, apply);
- target->HandleStatModifier(unitMod, TOTAL_PCT, amount, apply);
+ float amount = target->GetTotalAuraMultiplierByMiscValue(SPELL_AURA_MOD_INCREASE_ENERGY_PERCENT, GetMiscValue());
+ target->SetStatPctModifier(unitMod, TOTAL_PCT, amount);
}
}
@@ -4788,7 +4809,14 @@ void AuraEffect::HandleAuraModIncreaseHealthPercent(AuraApplication const* aurAp
// Unit will keep hp% after MaxHealth being modified if unit is alive.
float percent = target->GetHealthPct();
- target->HandleStatModifier(UNIT_MOD_HEALTH, TOTAL_PCT, float(GetAmount()), apply);
+
+ if (apply)
+ target->ApplyStatPctModifier(UNIT_MOD_HEALTH, TOTAL_PCT, float(GetAmount()));
+ else
+ {
+ float amount = target->GetTotalAuraMultiplier(SPELL_AURA_MOD_INCREASE_HEALTH_PERCENT);
+ target->SetStatPctModifier(UNIT_MOD_HEALTH, TOTAL_PCT, amount);
+ }
// Xinef: pct was rounded down and could "kill" creature by setting its health to 0 making npc zombie
if (target->IsAlive())
@@ -4803,7 +4831,13 @@ void AuraEffect::HandleAuraIncreaseBaseHealthPercent(AuraApplication const* aurA
Unit* target = aurApp->GetTarget();
- target->HandleStatModifier(UNIT_MOD_HEALTH, BASE_PCT, float(GetAmount()), apply);
+ if (apply)
+ target->ApplyStatPctModifier(UNIT_MOD_HEALTH, BASE_PCT, float(GetAmount()));
+ else
+ {
+ float amount = target->GetTotalAuraMultiplier(SPELL_AURA_MOD_BASE_HEALTH_PCT);
+ target->SetStatPctModifier(UNIT_MOD_HEALTH, BASE_PCT, amount);
+ }
}
/********************************/
@@ -4857,34 +4891,17 @@ void AuraEffect::HandleAuraModRegenInterrupt(AuraApplication const* aurApp, uint
HandleModManaRegen(aurApp, mode, apply);
}
-void AuraEffect::HandleAuraModWeaponCritPercent(AuraApplication const* aurApp, uint8 mode, bool apply) const
+void AuraEffect::HandleAuraModWeaponCritPercent(AuraApplication const* aurApp, uint8 mode, bool /*apply*/) const
{
if (!(mode & (AURA_EFFECT_HANDLE_CHANGE_AMOUNT_MASK | AURA_EFFECT_HANDLE_STAT)))
return;
- Unit* target = aurApp->GetTarget();
+ Player* target = aurApp->GetTarget()->ToPlayer();
- if (!target->IsPlayer())
+ if (!target)
return;
- for (int i = 0; i < MAX_ATTACK; ++i)
- if (Item* pItem = target->ToPlayer()->GetWeaponForAttack(WeaponAttackType(i), true))
- target->ToPlayer()->_ApplyWeaponDependentAuraCritMod(pItem, WeaponAttackType(i), this, apply);
-
- // mods must be applied base at equipped weapon class and subclass comparison
- // with spell->EquippedItemClass and EquippedItemSubClassMask and EquippedItemInventoryTypeMask
- // GetMiscValue() comparison with item generated damage types
-
- if (GetSpellInfo()->EquippedItemClass == -1)
- {
- target->ToPlayer()->HandleBaseModValue(CRIT_PERCENTAGE, FLAT_MOD, float (GetAmount()), apply);
- target->ToPlayer()->HandleBaseModValue(OFFHAND_CRIT_PERCENTAGE, FLAT_MOD, float (GetAmount()), apply);
- target->ToPlayer()->HandleBaseModValue(RANGED_CRIT_PERCENTAGE, FLAT_MOD, float (GetAmount()), apply);
- }
- else
- {
- // done in Player::_ApplyWeaponDependentAuraMods
- }
+ target->UpdateAllWeaponDependentCritAuras();
}
void AuraEffect::HandleModHitChance(AuraApplication const* aurApp, uint8 mode, bool apply) const
@@ -4960,9 +4977,7 @@ void AuraEffect::HandleAuraModCritPct(AuraApplication const* aurApp, uint8 mode,
return;
}
- target->ToPlayer()->HandleBaseModValue(CRIT_PERCENTAGE, FLAT_MOD, float (GetAmount()), apply);
- target->ToPlayer()->HandleBaseModValue(OFFHAND_CRIT_PERCENTAGE, FLAT_MOD, float (GetAmount()), apply);
- target->ToPlayer()->HandleBaseModValue(RANGED_CRIT_PERCENTAGE, FLAT_MOD, float (GetAmount()), apply);
+ target->ToPlayer()->UpdateAllWeaponDependentCritAuras();
// included in Player::UpdateSpellCritChance calculation
target->ToPlayer()->UpdateAllSpellCritChances();
@@ -4986,6 +5001,13 @@ void AuraEffect::HandleModCastingSpeed(AuraApplication const* aurApp, uint8 mode
return;
}
+ int32 spellGroupVal = target->GetHighestExclusiveSameEffectSpellGroupValue(this, GetAuraType());
+ if (std::abs(spellGroupVal) >= std::abs(GetAmount()))
+ return;
+
+ if (spellGroupVal)
+ target->ApplyCastTimePercentMod(float(spellGroupVal), !apply);
+
target->ApplyCastTimePercentMod((float)GetAmount(), apply);
}
@@ -5007,6 +5029,17 @@ void AuraEffect::HandleModCombatSpeedPct(AuraApplication const* aurApp, uint8 mo
return;
Unit* target = aurApp->GetTarget();
+ int32 spellGroupVal = target->GetHighestExclusiveSameEffectSpellGroupValue(this, SPELL_AURA_MELEE_SLOW);
+ if (std::abs(spellGroupVal) >= std::abs(GetAmount()))
+ return;
+
+ if (spellGroupVal)
+ {
+ target->ApplyCastTimePercentMod(float(spellGroupVal), !apply);
+ target->ApplyAttackTimePercentMod(BASE_ATTACK, float(spellGroupVal), !apply);
+ target->ApplyAttackTimePercentMod(OFF_ATTACK, float(spellGroupVal), !apply);
+ target->ApplyAttackTimePercentMod(RANGED_ATTACK, float(spellGroupVal), !apply);
+ }
target->ApplyCastTimePercentMod(float(GetAmount()), apply);
target->ApplyAttackTimePercentMod(BASE_ATTACK, float(GetAmount()), apply);
@@ -5031,7 +5064,15 @@ void AuraEffect::HandleModMeleeSpeedPct(AuraApplication const* aurApp, uint8 mod
return;
Unit* target = aurApp->GetTarget();
+ int32 spellGroupVal = target->GetHighestExclusiveSameEffectSpellGroupValue(this, SPELL_AURA_MOD_MELEE_HASTE);
+ if (std::abs(spellGroupVal) >= std::abs(GetAmount()))
+ return;
+ if (spellGroupVal)
+ {
+ target->ApplyAttackTimePercentMod(BASE_ATTACK, float(spellGroupVal), !apply);
+ target->ApplyAttackTimePercentMod(OFF_ATTACK, float(spellGroupVal), !apply);
+ }
target->ApplyAttackTimePercentMod(BASE_ATTACK, float(GetAmount()), apply);
target->ApplyAttackTimePercentMod(OFF_ATTACK, float(GetAmount()), apply);
}
@@ -5073,7 +5114,7 @@ void AuraEffect::HandleModRating(AuraApplication const* aurApp, uint8 mode, bool
if (!target->IsPlayer())
return;
- for (uint32 rating = 0; rating < MAX_COMBAT_RATING; ++rating)
+ for (uint8 rating = 0; rating < MAX_COMBAT_RATING; ++rating)
if (GetMiscValue() & (1 << rating))
target->ToPlayer()->ApplyRatingMod(CombatRating(rating), GetAmount(), apply);
}
@@ -5089,7 +5130,7 @@ void AuraEffect::HandleModRatingFromStat(AuraApplication const* aurApp, uint8 mo
return;
// Just recalculate ratings
- for (uint32 rating = 0; rating < MAX_COMBAT_RATING; ++rating)
+ for (uint8 rating = 0; rating < MAX_COMBAT_RATING; ++rating)
if (GetMiscValue() & (1 << rating))
target->ToPlayer()->ApplyRatingMod(CombatRating(rating), 0, apply);
}
@@ -5105,7 +5146,7 @@ void AuraEffect::HandleAuraModAttackPower(AuraApplication const* aurApp, uint8 m
Unit* target = aurApp->GetTarget();
- target->HandleStatModifier(UNIT_MOD_ATTACK_POWER, TOTAL_VALUE, float(GetAmount()), apply);
+ target->HandleStatFlatModifier(UNIT_MOD_ATTACK_POWER, TOTAL_VALUE, float(GetAmount()), apply);
}
void AuraEffect::HandleAuraModRangedAttackPower(AuraApplication const* aurApp, uint8 mode, bool apply) const
@@ -5118,7 +5159,7 @@ void AuraEffect::HandleAuraModRangedAttackPower(AuraApplication const* aurApp, u
if ((target->getClassMask() & CLASSMASK_WAND_USERS) != 0)
return;
- target->HandleStatModifier(UNIT_MOD_ATTACK_POWER_RANGED, TOTAL_VALUE, float(GetAmount()), apply);
+ target->HandleStatFlatModifier(UNIT_MOD_ATTACK_POWER_RANGED, TOTAL_VALUE, float(GetAmount()), apply);
}
void AuraEffect::HandleAuraModAttackPowerPercent(AuraApplication const* aurApp, uint8 mode, bool apply) const
@@ -5129,7 +5170,13 @@ void AuraEffect::HandleAuraModAttackPowerPercent(AuraApplication const* aurApp,
Unit* target = aurApp->GetTarget();
//UNIT_FIELD_ATTACK_POWER_MULTIPLIER = multiplier - 1
- target->HandleStatModifier(UNIT_MOD_ATTACK_POWER, TOTAL_PCT, float(GetAmount()), apply);
+ if (apply)
+ target->ApplyStatPctModifier(UNIT_MOD_ATTACK_POWER, TOTAL_PCT, float(GetAmount()));
+ else
+ {
+ float amount = target->GetTotalAuraMultiplier(SPELL_AURA_MOD_ATTACK_POWER_PCT);
+ target->SetStatPctModifier(UNIT_MOD_ATTACK_POWER, TOTAL_PCT, amount);
+ }
}
void AuraEffect::HandleAuraModRangedAttackPowerPercent(AuraApplication const* aurApp, uint8 mode, bool apply) const
@@ -5143,7 +5190,13 @@ void AuraEffect::HandleAuraModRangedAttackPowerPercent(AuraApplication const* au
return;
//UNIT_FIELD_RANGED_ATTACK_POWER_MULTIPLIER = multiplier - 1
- target->HandleStatModifier(UNIT_MOD_ATTACK_POWER_RANGED, TOTAL_PCT, float(GetAmount()), apply);
+ if (apply)
+ target->ApplyStatPctModifier(UNIT_MOD_ATTACK_POWER_RANGED, TOTAL_PCT, float(GetAmount()));
+ else
+ {
+ float amount = target->GetTotalAuraMultiplier(SPELL_AURA_MOD_RANGED_ATTACK_POWER_PCT);
+ target->SetStatPctModifier(UNIT_MOD_ATTACK_POWER_RANGED, TOTAL_PCT, amount);
+ }
}
void AuraEffect::HandleAuraModRangedAttackPowerOfStatPercent(AuraApplication const* aurApp, uint8 mode, bool /*apply*/) const
@@ -5184,141 +5237,89 @@ void AuraEffect::HandleModDamageDone(AuraApplication const* aurApp, uint8 mode,
Unit* target = aurApp->GetTarget();
- // apply item specific bonuses for already equipped weapon
+ if ((GetMiscValue() & SPELL_SCHOOL_MASK_NORMAL) != 0)
+ target->UpdateAllDamageDoneMods();
+
+ // Magic damage modifiers implemented in Unit::SpellBaseDamageBonus
+ // This information for client side use only
if (target->IsPlayer())
{
- for (int i = 0; i < MAX_ATTACK; ++i)
- if (Item* pItem = target->ToPlayer()->GetWeaponForAttack(WeaponAttackType(i), true))
- target->ToPlayer()->_ApplyWeaponDependentAuraDamageMod(pItem, WeaponAttackType(i), this, apply);
- }
- // GetMiscValue() is bitmask of spell schools
- // 1 (0-bit) - normal school damage (SPELL_SCHOOL_MASK_NORMAL)
- // 126 - full bitmask all magic damages (SPELL_SCHOOL_MASK_MAGIC) including wands
- // 127 - full bitmask any damages
- //
- // mods must be applied base at equipped weapon class and subclass comparison
- // with spell->EquippedItemClass and EquippedItemSubClassMask and EquippedItemInventoryTypeMask
- // GetMiscValue() comparison with item generated damage types
+ uint16 baseField = GetAmount() >= 0 ? PLAYER_FIELD_MOD_DAMAGE_DONE_POS : PLAYER_FIELD_MOD_DAMAGE_DONE_NEG;
+ for (uint16 i = 0; i < MAX_SPELL_SCHOOL; ++i)
+ if (GetMiscValue() & (1 << i))
+ target->ApplyModUInt32Value(baseField + i, GetAmount(), apply);
- if ((GetMiscValue() & SPELL_SCHOOL_MASK_NORMAL) != 0 && sScriptMgr->CanModAuraEffectDamageDone(this, target, aurApp, mode, apply))
- {
- // apply generic physical damage bonuses including wand case
- if (GetSpellInfo()->EquippedItemClass == -1 || !target->IsPlayer())
- {
- target->HandleStatModifier(UNIT_MOD_DAMAGE_MAINHAND, TOTAL_VALUE, float(GetAmount()), apply);
- target->HandleStatModifier(UNIT_MOD_DAMAGE_OFFHAND, TOTAL_VALUE, float(GetAmount()), apply);
- target->HandleStatModifier(UNIT_MOD_DAMAGE_RANGED, TOTAL_VALUE, float(GetAmount()), apply);
-
- if (target->IsPlayer())
- {
- if (GetAmount() > 0)
- target->ApplyModInt32Value(PLAYER_FIELD_MOD_DAMAGE_DONE_POS, GetAmount(), apply);
- else
- target->ApplyModInt32Value(PLAYER_FIELD_MOD_DAMAGE_DONE_NEG, GetAmount(), apply);
- }
- }
- else
- {
- // done in Player::_ApplyWeaponDependentAuraMods
- }
+ if (Guardian* pet = target->ToPlayer()->GetGuardianPet())
+ pet->UpdateAttackPowerAndDamage();
}
+}
- // Skip non magic case for Speedup
- if ((GetMiscValue() & SPELL_SCHOOL_MASK_MAGIC) == 0)
+void AuraEffect::HandleModDamagePercentDone(AuraApplication const* aurApp, uint8 mode, bool /*apply*/) const
+{
+ if (!(mode & (AURA_EFFECT_HANDLE_CHANGE_AMOUNT_MASK | AURA_EFFECT_HANDLE_STAT)))
return;
- if (GetSpellInfo()->EquippedItemClass != -1 || GetSpellInfo()->EquippedItemInventoryTypeMask != 0)
- {
- // wand magic case (skip generic to all item spell bonuses)
- // done in Player::_ApplyWeaponDependentAuraMods
-
- // Skip item specific requirements for not wand magic damage
+ Unit* target = aurApp->GetTarget();
+ if (!target)
return;
- }
- // Magic damage modifiers implemented in Unit::SpellDamageBonus
- // This information for client side use only
+ if ((GetMiscValue() & SPELL_SCHOOL_MASK_NORMAL))
+ target->UpdateAllDamagePctDoneMods();
+
if (target->IsPlayer())
{
- if (GetAmount() > 0)
+ for (uint8 i = 0; i < MAX_SPELL_SCHOOL; ++i)
{
- for (uint32 i = SPELL_SCHOOL_HOLY; i < MAX_SPELL_SCHOOL; i++)
+ if (GetMiscValue() & (1 << i))
{
- if ((GetMiscValue() & (1 << i)) != 0)
- target->ApplyModInt32Value(PLAYER_FIELD_MOD_DAMAGE_DONE_POS + i, GetAmount(), apply);
+ // only aura type modifying PLAYER_FIELD_MOD_DAMAGE_DONE_PCT
+ float amount = target->GetTotalAuraMultiplierByMiscMask(SPELL_AURA_MOD_DAMAGE_PERCENT_DONE, 1 << i);
+ target->SetFloatValue(PLAYER_FIELD_MOD_DAMAGE_DONE_PCT + i, amount);
}
}
- else
- {
- for (uint32 i = SPELL_SCHOOL_HOLY; i < MAX_SPELL_SCHOOL; i++)
- {
- if ((GetMiscValue() & (1 << i)) != 0)
- target->ApplyModInt32Value(PLAYER_FIELD_MOD_DAMAGE_DONE_NEG + i, GetAmount(), apply);
- }
- }
- if (Guardian* pet = target->ToPlayer()->GetGuardianPet())
- pet->UpdateAttackPowerAndDamage();
}
}
-void AuraEffect::HandleModDamagePercentDone(AuraApplication const* aurApp, uint8 mode, bool apply) const
+void AuraEffect::HandleModOffhandDamagePercent(AuraApplication const* aurApp, uint8 mode, bool /*apply*/) const
{
if (!(mode & (AURA_EFFECT_HANDLE_CHANGE_AMOUNT_MASK | AURA_EFFECT_HANDLE_STAT)))
return;
Unit* target = aurApp->GetTarget();
- if (!target)
- return;
-
- if (!sScriptMgr->CanModAuraEffectModDamagePercentDone(this, target, aurApp, mode, apply))
- return;
- if (target->IsPlayer())
- {
- for (int i = 0; i < MAX_ATTACK; ++i)
- if (Item* item = target->ToPlayer()->GetWeaponForAttack(WeaponAttackType(i), false))
- target->ToPlayer()->_ApplyWeaponDependentAuraDamageMod(item, WeaponAttackType(i), this, apply);
- }
-
- if ((GetMiscValue() & SPELL_SCHOOL_MASK_NORMAL) && (GetSpellInfo()->EquippedItemClass == -1 || !target->IsPlayer()))
- {
- target->HandleStatModifier(UNIT_MOD_DAMAGE_MAINHAND, TOTAL_PCT, float(GetAmount()), apply);
- target->HandleStatModifier(UNIT_MOD_DAMAGE_OFFHAND, TOTAL_PCT, float(GetAmount()), apply);
- target->HandleStatModifier(UNIT_MOD_DAMAGE_RANGED, TOTAL_PCT, float(GetAmount()), apply);
-
- if (target->IsPlayer())
- target->ToPlayer()->ApplyPercentModFloatValue(PLAYER_FIELD_MOD_DAMAGE_DONE_PCT, float (GetAmount()), apply);
- }
- else
- {
- // done in Player::_ApplyWeaponDependentAuraMods for SPELL_SCHOOL_MASK_NORMAL && EquippedItemClass != -1 and also for wand case
- }
+ // also handles spell group stacks
+ target->UpdateDamagePctDoneMods(OFF_ATTACK);
}
-void AuraEffect::HandleModOffhandDamagePercent(AuraApplication const* aurApp, uint8 mode, bool apply) const
+void AuraEffect::HandleShieldBlockValue(AuraApplication const* aurApp, uint8 mode, bool apply) const
{
if (!(mode & (AURA_EFFECT_HANDLE_CHANGE_AMOUNT_MASK | AURA_EFFECT_HANDLE_STAT)))
return;
- Unit* target = aurApp->GetTarget();
+ Player* target = aurApp->GetTarget()->ToPlayer();
+ if (!target)
+ return;
- target->HandleStatModifier(UNIT_MOD_DAMAGE_OFFHAND, TOTAL_PCT, float(GetAmount()), apply);
+ target->HandleBaseModFlatValue(SHIELD_BLOCK_VALUE, float(GetAmount()), apply);
}
-void AuraEffect::HandleShieldBlockValue(AuraApplication const* aurApp, uint8 mode, bool apply) const
+void AuraEffect::HandleShieldBlockValuePercent(AuraApplication const* aurApp, uint8 mode, bool apply) const
{
if (!(mode & (AURA_EFFECT_HANDLE_CHANGE_AMOUNT_MASK | AURA_EFFECT_HANDLE_STAT)))
return;
- Unit* target = aurApp->GetTarget();
-
- BaseModType modType = FLAT_MOD;
- if (GetAuraType() == SPELL_AURA_MOD_SHIELD_BLOCKVALUE_PCT)
- modType = PCT_MOD;
+ Player* target = aurApp->GetTarget()->ToPlayer();
+ if (!target)
+ return;
- if (target->IsPlayer())
- target->ToPlayer()->HandleBaseModValue(SHIELD_BLOCK_VALUE, modType, float(GetAmount()), apply);
+ if (apply)
+ target->ApplyBaseModPctValue(SHIELD_BLOCK_VALUE, float(GetAmount()));
+ else
+ {
+ float amount = target->GetTotalAuraMultiplier(SPELL_AURA_MOD_SHIELD_BLOCKVALUE_PCT);
+ target->SetBaseModPctValue(SHIELD_BLOCK_VALUE, amount);
+ }
}
/********************************/
@@ -6177,7 +6178,7 @@ void AuraEffect::HandleAuraSetVehicle(AuraApplication const* aurApp, uint8 mode,
if (apply)
{
data.Initialize(SMSG_ON_CANCEL_EXPECTED_RIDE_VEHICLE_AURA, 0);
- target->ToPlayer()->GetSession()->SendPacket(&data);
+ target->ToPlayer()->SendDirectMessage(&data);
}
}
diff --git a/src/server/game/Spells/Auras/SpellAuraEffects.h b/src/server/game/Spells/Auras/SpellAuraEffects.h
index 7fdf0df91f..8349c83fc2 100644
--- a/src/server/game/Spells/Auras/SpellAuraEffects.h
+++ b/src/server/game/Spells/Auras/SpellAuraEffects.h
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
@@ -112,8 +112,6 @@ public:
float GetPctMods() const { return m_pctMods; }
void SetPctMods(float pctMods) { m_pctMods = pctMods; }
- // xinef: stacking
- uint32 GetAuraGroup() const { return m_auraGroup; }
int32 GetOldAmount() const { return m_oldAmount; }
void SetOldAmount(int32 amount) { m_oldAmount = amount; }
void SetEnabled(bool enabled) { m_isAuraEnabled = enabled; }
@@ -131,8 +129,6 @@ private:
float m_critChance;
float m_pctMods;
- // xinef: stacking
- uint32 m_auraGroup;
int32 m_oldAmount;
bool m_isAuraEnabled;
// xinef: channel information for channel triggering
@@ -299,6 +295,7 @@ public:
void HandleModDamagePercentDone(AuraApplication const* aurApp, uint8 mode, bool apply) const;
void HandleModOffhandDamagePercent(AuraApplication const* aurApp, uint8 mode, bool apply) const;
void HandleShieldBlockValue(AuraApplication const* aurApp, uint8 mode, bool apply) const;
+ void HandleShieldBlockValuePercent(AuraApplication const* aurApp, uint8 mode, bool apply) const;
// power cost
void HandleModPowerCostPCT(AuraApplication const* aurApp, uint8 mode, bool apply) const;
void HandleModPowerCost(AuraApplication const* aurApp, uint8 mode, bool apply) const;
diff --git a/src/server/game/Spells/Auras/SpellAuras.cpp b/src/server/game/Spells/Auras/SpellAuras.cpp
index 02758c1b90..0b3b35d59e 100644
--- a/src/server/game/Spells/Auras/SpellAuras.cpp
+++ b/src/server/game/Spells/Auras/SpellAuras.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
@@ -181,67 +181,6 @@ void AuraApplication::_HandleEffect(uint8 effIndex, bool apply)
// Remove all triggered by aura spells vs unlimited duration
aurEff->CleanupTriggeredSpells(GetTarget());
}
-
- // Stacking!
- if (uint32 groupId = aurEff->GetAuraGroup())
- {
- SpellGroupStackFlags sFlag = sSpellMgr->GetGroupStackFlags(groupId);
- if (!aurEff->IsPeriodic() && (sFlag & SPELL_GROUP_STACK_FLAG_EFFECT_EXCLUSIVE))
- {
- AuraApplication* strongestApp = apply ? this : nullptr;
- AuraEffect* strongestEff = apply ? aurEff : nullptr;
- int32 amount = apply ? std::abs(aurEff->GetAmount()) : 0;
- Unit* target = GetTarget();
- Unit::AuraEffectList const& auraList = target->GetAuraEffectsByType(aurEff->GetAuraType());
- for (Unit::AuraEffectList::const_iterator iter = auraList.begin(); iter != auraList.end(); ++iter)
- {
- if ((*iter)->GetAuraGroup() != groupId || (*iter) == strongestEff || (*iter)->GetBase()->IsRemoved())
- continue;
-
- // xinef: skip different misc values
- if (aurEff->GetAuraType() != SPELL_AURA_230 /*SPELL_AURA_MOD_INCREASE_HEALTH_2*/ && aurEff->GetAuraType() != SPELL_AURA_MOD_CASTING_SPEED_NOT_STACK &&
- aurEff->GetMiscValue() != (*iter)->GetMiscValue())
- continue;
-
- // xinef: should not happen
- AuraApplication* aurApp = (*iter)->GetBase()->GetApplicationOfTarget(target->GetGUID());
- if (!aurApp)
- continue;
-
- if (amount < std::abs((*iter)->GetForcedAmount()))
- {
- // xinef: if we have strongest aura and it is active, turn it off
- // xinef: otherwise just save new aura;
- if (strongestApp && strongestEff && strongestApp->IsActive(strongestEff->GetEffIndex()))
- {
- strongestEff->HandleEffect(strongestApp, AURA_EFFECT_HANDLE_CHANGE_AMOUNT, false);
- if (!strongestEff->GetSpellInfo()->HasAreaAuraEffect())
- strongestEff->SetEnabled(false);
- strongestApp->SetDisableMask(strongestEff->GetEffIndex());
- }
- strongestApp = aurApp;
- strongestEff = (*iter);
- amount = std::abs((*iter)->GetAmount());
- }
- // xinef: itered aura is weaker, deactivate if active
- else if (aurApp->IsActive((*iter)->GetEffIndex()))
- {
- (*iter)->HandleEffect(aurApp, AURA_EFFECT_HANDLE_CHANGE_AMOUNT, false);
- if (!(*iter)->GetSpellInfo()->HasAreaAuraEffect())
- (*iter)->SetEnabled(false);
- aurApp->SetDisableMask((*iter)->GetEffIndex());
- }
- }
-
- // xinef: if we have new strongest aura, and it is not active
- if (strongestApp && strongestEff && !strongestApp->IsActive(strongestEff->GetEffIndex()))
- {
- strongestApp->RemoveDisableMask(strongestEff->GetEffIndex());
- strongestEff->SetEnabled(true);
- strongestEff->HandleEffect(strongestApp, AURA_EFFECT_HANDLE_CHANGE_AMOUNT, true);
- }
- }
- }
SetNeedClientUpdate();
}
@@ -661,6 +600,9 @@ void Aura::UpdateTargetMap(Unit* caster, bool apply)
if (!itr->second || itr->first->IsImmunedToSpell(GetSpellInfo()) || !CanBeAppliedOn(itr->first))
addUnit = false;
+ if (addUnit && !itr->first->IsHighestExclusiveAura(this, true))
+ addUnit = false;
+
if (addUnit)
{
// persistent area aura does not hit flying targets
@@ -684,7 +626,7 @@ void Aura::UpdateTargetMap(Unit* caster, bool apply)
for (Unit::AuraApplicationMap::iterator iter = itr->first->GetAppliedAuras().begin(); iter != itr->first->GetAppliedAuras().end(); ++iter)
{
Aura const* aura = iter->second->GetBase();
- if (!CanStackWith(aura, false))
+ if (!CanStackWith(aura))
{
addUnit = false;
break;
@@ -1069,6 +1011,16 @@ void Aura::RefreshSpellMods()
player->RestoreAllSpellMods(0, this);
}
+bool Aura::HasMoreThanOneEffectForType(AuraType auraType) const
+{
+ uint32 count = 0;
+ for (SpellEffectInfo const& spellEffectInfo : GetSpellInfo()->GetEffects())
+ if (HasEffect(spellEffectInfo.EffectIndex) && spellEffectInfo.ApplyAuraName == auraType)
+ ++count;
+
+ return count > 1;
+}
+
bool Aura::IsArea() const
{
for (uint8 i = 0; i < MAX_SPELL_EFFECTS; ++i)
@@ -1589,7 +1541,7 @@ void Aura::HandleAuraSpecificMods(AuraApplication const* aurApp, Unit* caster, b
// Alchemy: Mixology
if (caster && caster->HasAura(53042) && caster->IsPlayer() && !caster->ToPlayer()->GetSession()->PlayerLoading())
{
- if (sSpellMgr->GetSpellGroup(GetId()) == 1) /*Elixirs*/
+ if (sSpellMgr->IsSpellMemberOfSpellGroup(GetId(), SPELL_GROUP_ELIXIR_BATTLE) || sSpellMgr->IsSpellMemberOfSpellGroup(GetId(), SPELL_GROUP_ELIXIR_GUARDIAN))
{
if (caster->HasSpell(GetSpellInfo()->Effects[EFFECT_0].TriggerSpell))
{
@@ -2018,7 +1970,7 @@ bool Aura::IsAuraStronger(Aura const* newAura) const
return false;
}
-bool Aura::CanStackWith(Aura const* existingAura, bool remove) const
+bool Aura::CanStackWith(Aura const* existingAura) const
{
// Can stack with self
if (this == existingAura)
@@ -2056,47 +2008,19 @@ bool Aura::CanStackWith(Aura const* existingAura, bool remove) const
return false;
// check spell group stack rules
- // xinef: this assures us that both spells are in same group!
- SpellGroupStackFlags stackFlags = sSpellMgr->CheckSpellGroupStackRules(m_spellInfo, existingSpellInfo, remove, IsArea());
- if (stackFlags)
+ switch (sSpellMgr->CheckSpellGroupStackRules(m_spellInfo, existingSpellInfo))
{
- // xinef: same caster rule is bounded by spellfamily
- if (sameCaster && m_spellInfo->SpellFamilyName == existingSpellInfo->SpellFamilyName &&
- (stackFlags & SPELL_GROUP_STACK_FLAG_NOT_SAME_CASTER))
+ case SPELL_GROUP_STACK_RULE_EXCLUSIVE:
+ case SPELL_GROUP_STACK_RULE_EXCLUSIVE_HIGHEST: // if it reaches this point, existing aura is lower/equal
return false;
-
- // xinef: normal exclusive stacking, remove if auras are equal by effects
- if (stackFlags & SPELL_GROUP_STACK_FLAG_EXCLUSIVE)
- {
- if (GetSpellInfo()->IsAuraEffectEqual(existingSpellInfo) || GetSpellInfo()->IsRankOf(existingSpellInfo))
- {
- if (remove)
- return IsAuraStronger(existingAura);
- else
- return existingAura->IsAuraStronger(this);
- }
- }
-
- // xinef: check priority before effect mask
- SpellGroupSpecialFlags thisAuraFlag = sSpellMgr->GetSpellGroupSpecialFlags(GetId());
- SpellGroupSpecialFlags existingAuraFlag = sSpellMgr->GetSpellGroupSpecialFlags(existingSpellInfo->Id);
- if (thisAuraFlag >= SPELL_GROUP_SPECIAL_FLAG_PRIORITY1 && thisAuraFlag <= SPELL_GROUP_SPECIAL_FLAG_PRIORITY4 &&
- existingAuraFlag >= SPELL_GROUP_SPECIAL_FLAG_PRIORITY1 && existingAuraFlag <= SPELL_GROUP_SPECIAL_FLAG_PRIORITY4)
- {
- if (thisAuraFlag < existingAuraFlag)
- {
+ case SPELL_GROUP_STACK_RULE_EXCLUSIVE_FROM_SAME_CASTER:
+ if (sameCaster)
return false;
- }
- }
-
- // xinef: forced strongest aura in group by flag
- if (stackFlags & SPELL_GROUP_STACK_FLAG_FORCED_STRONGEST)
- return !remove;
- if (stackFlags & SPELL_GROUP_STACK_FLAG_FORCED_WEAKEST)
- return remove;
-
- // xinef: forced return, handle all cases using available flags!
- return !(stackFlags & SPELL_GROUP_STACK_FLAG_NEVER_STACK);
+ break;
+ case SPELL_GROUP_STACK_RULE_DEFAULT:
+ case SPELL_GROUP_STACK_RULE_EXCLUSIVE_SAME_EFFECT:
+ default:
+ break;
}
if (m_spellInfo->SpellFamilyName != existingSpellInfo->SpellFamilyName)
diff --git a/src/server/game/Spells/Auras/SpellAuras.h b/src/server/game/Spells/Auras/SpellAuras.h
index c1433c3814..8731299f8b 100644
--- a/src/server/game/Spells/Auras/SpellAuras.h
+++ b/src/server/game/Spells/Auras/SpellAuras.h
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
@@ -153,6 +153,7 @@ public:
uint8 GetCasterLevel() const { return m_casterLevel; }
+ bool HasMoreThanOneEffectForType(AuraType auraType) const;
bool IsArea() const;
bool IsPassive() const;
bool IsDeathPersistent() const;
@@ -188,7 +189,7 @@ public:
void HandleAuraSpecificMods(AuraApplication const* aurApp, Unit* caster, bool apply, bool onReapply);
bool CanBeAppliedOn(Unit* target);
bool CheckAreaTarget(Unit* target);
- bool CanStackWith(Aura const* checkAura, bool remove) const;
+ bool CanStackWith(Aura const* existingAura) const;
bool IsAuraStronger(Aura const* newAura) const;
// Proc system
diff --git a/src/server/game/Spells/Spell.cpp b/src/server/game/Spells/Spell.cpp
index 4ae8bfca43..608b9614b8 100644
--- a/src/server/game/Spells/Spell.cpp
+++ b/src/server/game/Spells/Spell.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
@@ -19,7 +19,6 @@
#include "ArenaSpectator.h"
#include "BattlefieldMgr.h"
#include "Battleground.h"
-#include "BattlegroundIC.h"
#include "CharmInfo.h"
#include "CellImpl.h"
#include "Common.h"
@@ -33,7 +32,6 @@
#include "InstanceScript.h"
#include "Log.h"
#include "LootMgr.h"
-#include "MapMgr.h"
#include "ObjectAccessor.h"
#include "ObjectMgr.h"
#include "Opcodes.h"
@@ -41,6 +39,7 @@
#include "Player.h"
#include "ScriptMgr.h"
#include "SharedDefines.h"
+#include "SpellAuraDefines.h"
#include "SpellAuraEffects.h"
#include "SpellInfo.h"
#include "SpellMgr.h"
@@ -643,6 +642,8 @@ Spell::Spell(Unit* caster, SpellInfo const* info, TriggerCastFlags triggerFlags,
gameObjTarget = nullptr;
destTarget = nullptr;
damage = 0;
+ m_reflectionTarget = nullptr;
+ m_reflectionTargetGuid.Clear();
effectHandleMode = SPELL_EFFECT_HANDLE_LAUNCH;
m_diminishLevel = DIMINISHING_LEVEL_1;
m_diminishGroup = DIMINISHING_NONE;
@@ -1238,11 +1239,7 @@ void Spell::SelectImplicitConeTargets(SpellEffIndex effIndex, SpellImplicitTarge
// Other special target selection goes here
if (uint32 maxTargets = m_spellValue->MaxAffectedTargets)
{
- Unit::AuraEffectList const& Auras = m_caster->GetAuraEffectsByType(SPELL_AURA_MOD_MAX_AFFECTED_TARGETS);
- for (Unit::AuraEffectList::const_iterator j = Auras.begin(); j != Auras.end(); ++j)
- if ((*j)->IsAffectedOnSpell(m_spellInfo))
- maxTargets += (*j)->GetAmount();
-
+ maxTargets += m_caster->GetTotalAuraModifierByAffectMask(SPELL_AURA_MOD_MAX_AFFECTED_TARGETS, m_spellInfo);
Acore::Containers::RandomResize(targets, maxTargets);
}
@@ -1325,11 +1322,7 @@ void Spell::SelectImplicitAreaTargets(SpellEffIndex effIndex, SpellImplicitTarge
// Other special target selection goes here
if (uint32 maxTargets = m_spellValue->MaxAffectedTargets)
{
- Unit::AuraEffectList const& Auras = m_caster->GetAuraEffectsByType(SPELL_AURA_MOD_MAX_AFFECTED_TARGETS);
- for (Unit::AuraEffectList::const_iterator j = Auras.begin(); j != Auras.end(); ++j)
- if ((*j)->IsAffectedOnSpell(m_spellInfo))
- maxTargets += (*j)->GetAmount();
-
+ maxTargets += m_caster->GetTotalAuraModifierByAffectMask(SPELL_AURA_MOD_MAX_AFFECTED_TARGETS, m_spellInfo);
Acore::Containers::RandomResize(targets, maxTargets);
}
@@ -1384,7 +1377,7 @@ void Spell::SelectImplicitCasterDestTargets(SpellEffIndex effIndex, SpellImplici
float ground = m_caster->GetMapHeight(x, y, z, true);
float liquidLevel = VMAP_INVALID_HEIGHT_VALUE;
- LiquidData const& liquidData = m_caster->GetMap()->GetLiquidData(m_caster->GetPhaseMask(), x, y, z, m_caster->GetCollisionHeight(), MAP_ALL_LIQUIDS);
+ LiquidData const& liquidData = m_caster->GetMap()->GetLiquidData(m_caster->GetPhaseMask(), x, y, z, m_caster->GetCollisionHeight(), {});
if (liquidData.Status)
liquidLevel = liquidData.Level;
@@ -2392,7 +2385,7 @@ void Spell::AddUnitTarget(Unit* target, uint32 effectMask, bool checkIfValid /*=
targetInfo.reflectResult = SPELL_MISS_PARRY;
// Increase time interval for reflected spells by 1.5
- m_caster->m_Events.AddEvent(new ReflectEvent(m_caster, targetInfo.targetGUID, m_spellInfo), m_caster->m_Events.CalculateTime(targetInfo.timeDelay));
+ m_caster->m_Events.AddEventAtOffset(new ReflectEvent(m_caster, targetInfo.targetGUID, m_spellInfo), Milliseconds(targetInfo.timeDelay));
targetInfo.timeDelay += targetInfo.timeDelay >> 1;
m_spellFlags |= SPELL_FLAG_REFLECTED;
@@ -2591,6 +2584,7 @@ void Spell::DoAllEffectOnTarget(TargetInfo* target)
//Spells with this flag cannot trigger if effect is casted on self
bool canEffectTrigger = !m_spellInfo->HasAttribute(SPELL_ATTR3_SUPPRESS_CASTER_PROCS) && unitTarget->CanProc() && (CanExecuteTriggersOnHit(mask) || missInfo == SPELL_MISS_IMMUNE2);
bool reflectedSpell = missInfo == SPELL_MISS_REFLECT;
+ Unit* reflectionSource = nullptr;
Unit* spellHitTarget = nullptr;
if (missInfo == SPELL_MISS_NONE) // In case spell hit target, do all effect on that target
@@ -2602,6 +2596,7 @@ void Spell::DoAllEffectOnTarget(TargetInfo* target)
{
spellHitTarget = m_caster;
unitTarget = m_caster;
+ reflectionSource = effectUnit;
if (m_caster->IsCreature())
m_caster->ToCreature()->LowerPlayerDamageReq(target->damage);
}
@@ -2609,7 +2604,24 @@ void Spell::DoAllEffectOnTarget(TargetInfo* target)
if (spellHitTarget)
{
+ if (reflectionSource)
+ {
+ m_reflectionTarget = reflectionSource;
+ m_reflectionTargetGuid = reflectionSource->GetGUID();
+ m_reflectionTargetPosition.Relocate(reflectionSource);
+ }
+ else
+ {
+ m_reflectionTarget = nullptr;
+ m_reflectionTargetGuid.Clear();
+ m_reflectionTargetPosition = Position();
+ }
+
SpellMissInfo missInfo2 = DoSpellHitOnUnit(spellHitTarget, mask, target->scaleAura);
+
+ m_reflectionTarget = nullptr;
+ m_reflectionTargetGuid.Clear();
+ m_reflectionTargetPosition = Position();
if (missInfo2 != SPELL_MISS_NONE)
{
if (missInfo2 != SPELL_MISS_MISS)
@@ -3439,7 +3451,7 @@ SpellCastResult Spell::prepare(SpellCastTargets const* targets, AuraEffect const
// create and add update event for this spell
_spellEvent = new SpellEvent(this);
- m_caster->m_Events.AddEvent(_spellEvent, m_caster->m_Events.CalculateTime(1));
+ m_caster->m_Events.AddEventAtOffset(_spellEvent, 1ms);
if (sDisableMgr->IsDisabledFor(DISABLE_TYPE_SPELL, m_spellInfo->Id, m_caster))
{
@@ -4612,7 +4624,7 @@ void Spell::SendCastResult(Player* caster, SpellInfo const* spellInfo, uint8 cas
WorldPacket data(SMSG_CAST_FAILED, 1 + 4 + 1);
WriteCastResultInfo(data, caster, spellInfo, castCount, result, customError);
- caster->GetSession()->SendPacket(&data);
+ caster->SendDirectMessage(&data);
}
void Spell::SendCastResult(SpellCastResult result)
@@ -4649,7 +4661,7 @@ void Spell::SendPetCastResult(SpellCastResult result)
WorldPacket data(SMSG_PET_CAST_FAILED, 1 + 4 + 1);
WriteCastResultInfo(data, player, m_spellInfo, m_cast_count, result, m_customError);
- player->GetSession()->SendPacket(&data);
+ player->SendDirectMessage(&data);
}
void Spell::SendSpellStart()
@@ -5184,7 +5196,7 @@ void Spell::SendResurrectRequest(Player* target)
// override delay sent with SMSG_CORPSE_RECLAIM_DELAY, set instant resurrection for spells with this attribute
if (m_spellInfo->HasAttribute(SPELL_ATTR3_NO_RES_TIMER))
data << uint32(0);
- target->GetSession()->SendPacket(&data);
+ target->SendDirectMessage(&data);
}
void Spell::TakeCastItem()
@@ -6055,6 +6067,8 @@ SpellCastResult Spell::CheckCast(bool strict)
}
}
+ uint8 approximateAuraEffectMask = 0;
+ uint8 nonAuraEffectMask = 0;
for (uint8 i = 0; i < MAX_SPELL_EFFECTS; ++i)
{
// for effects of spells that have only one target
@@ -6540,6 +6554,11 @@ SpellCastResult Spell::CheckCast(bool strict)
default:
break;
}
+
+ if (m_spellInfo->Effects[i].IsAura())
+ approximateAuraEffectMask |= 1 << i;
+ else if (m_spellInfo->Effects[i].IsEffect())
+ nonAuraEffectMask |= 1 << i;
}
for (uint8 i = 0; i < MAX_SPELL_EFFECTS; ++i)
@@ -6588,8 +6607,13 @@ SpellCastResult Spell::CheckCast(bool strict)
if (target->IsCreature() && target->ToCreature()->IsVehicle())
return SPELL_FAILED_BAD_IMPLICIT_TARGETS;
+ // Allow SPELL_AURA_MOD_POSSESS to work on mounted players,
+ // but keep the old restriction for everything else.
if (target->IsMounted())
- return SPELL_FAILED_CANT_BE_CHARMED;
+ {
+ if (!(target->IsPlayer() && m_spellInfo->Effects[i].ApplyAuraName == SPELL_AURA_MOD_POSSESS))
+ return SPELL_FAILED_CANT_BE_CHARMED;
+ }
if (target->GetCharmerGUID())
return SPELL_FAILED_CHARMED;
@@ -6697,6 +6721,13 @@ SpellCastResult Spell::CheckCast(bool strict)
default:
break;
}
+
+ // check if target already has the same type, but more powerful aura
+ if (!nonAuraEffectMask && (approximateAuraEffectMask & (1 << i)) && !m_spellInfo->IsTargetingArea())
+ if (Unit* target = m_targets.GetUnitTarget())
+ if (!target->IsHighestExclusiveAuraEffect(m_spellInfo, AuraType(m_spellInfo->Effects[i].ApplyAuraName),
+ m_spellInfo->Effects[i].CalcValue(m_caster, &m_spellValue->EffectBasePoints[i]), approximateAuraEffectMask, false))
+ return SPELL_FAILED_AURA_BOUNCED;
}
// check trade slot case (last, for allow catch any another cast problems)
@@ -6947,27 +6978,36 @@ bool Spell::CanAutoCast(Unit* target)
{
ObjectGuid targetguid = target->GetGUID();
- for (uint32 j = 0; j < MAX_SPELL_EFFECTS; ++j)
+ for (SpellEffectInfo const& spellEffectInfo : m_spellInfo->GetEffects())
{
- if (m_spellInfo->Effects[j].Effect == SPELL_EFFECT_APPLY_AURA)
+ if (!spellEffectInfo.IsAura())
+ continue;
+
+ AuraType const& auraType = spellEffectInfo.ApplyAuraName;
+ Unit::AuraEffectList const& auras = target->GetAuraEffectsByType(auraType);
+ for (Unit::AuraEffectList::const_iterator auraIt = auras.begin(); auraIt != auras.end(); ++auraIt)
{
- if (m_spellInfo->StackAmount <= 1)
+ if (GetSpellInfo()->Id == (*auraIt)->GetSpellInfo()->Id)
+ return false;
+
+ switch (sSpellMgr->CheckSpellGroupStackRules(GetSpellInfo(), (*auraIt)->GetSpellInfo()))
{
- if (target->HasAuraEffect(m_spellInfo->Id, j))
+ case SPELL_GROUP_STACK_RULE_EXCLUSIVE:
return false;
- }
- else
- {
- if (AuraEffect* aureff = target->GetAuraEffect(m_spellInfo->Id, j))
- if (aureff->GetBase()->GetStackAmount() >= m_spellInfo->StackAmount)
+ case SPELL_GROUP_STACK_RULE_EXCLUSIVE_FROM_SAME_CASTER:
+ if (GetCaster() == (*auraIt)->GetCaster())
return false;
+ break;
+ case SPELL_GROUP_STACK_RULE_EXCLUSIVE_SAME_EFFECT: // this one has further checks, but i don't think they're necessary for autocast logic
+ case SPELL_GROUP_STACK_RULE_EXCLUSIVE_HIGHEST:
+ if (abs(spellEffectInfo.BasePoints) <= abs((*auraIt)->GetAmount()))
+ return false;
+ break;
+ case SPELL_GROUP_STACK_RULE_DEFAULT:
+ default:
+ break;
}
}
- else if (m_spellInfo->Effects[j].IsAreaAuraEffect())
- {
- if (target->HasAuraEffect(m_spellInfo->Id, j))
- return false;
- }
}
SpellCastResult result = CheckPetCast(target);
@@ -7884,7 +7924,7 @@ bool Spell::CheckEffectTarget(Unit const* target, uint32 eff) const
case SPELL_AURA_AOE_CHARM:
if (target->IsCreature() && target->IsVehicle())
return false;
- if (target->IsMounted())
+ if (target->IsMounted() && m_spellInfo->Effects[eff].ApplyAuraName != SPELL_AURA_MOD_POSSESS)
return false;
if (target->GetCharmerGUID())
return false;
@@ -8166,7 +8206,7 @@ bool SpellEvent::IsDeletable() const
return m_Spell->IsDeletable();
}
-bool ReflectEvent::Execute(uint64 /*e_time*/, uint32 /*p_time*/)
+bool ReflectEvent::Execute(uint64 /*e_time*/, uint32 /*p_time*/)
{
Unit* target = ObjectAccessor::GetUnit(*_caster, _targetGUID);
if (target && _caster->IsInMap(target))
diff --git a/src/server/game/Spells/Spell.h b/src/server/game/Spells/Spell.h
index 3025e803e6..0f8cde5d37 100644
--- a/src/server/game/Spells/Spell.h
+++ b/src/server/game/Spells/Spell.h
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
@@ -666,6 +666,9 @@ public:
WorldLocation* destTarget;
int32 damage;
SpellEffectHandleMode effectHandleMode;
+ Unit* m_reflectionTarget;
+ ObjectGuid m_reflectionTargetGuid;
+ Position m_reflectionTargetPosition;
// used in effects handlers
Aura* m_spellAura;
diff --git a/src/server/game/Spells/SpellDefines.h b/src/server/game/Spells/SpellDefines.h
index 89dda8dfe1..eaa6541981 100644
--- a/src/server/game/Spells/SpellDefines.h
+++ b/src/server/game/Spells/SpellDefines.h
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/game/Spells/SpellEffects.cpp b/src/server/game/Spells/SpellEffects.cpp
index d8dcba2d5b..d725b682ec 100644
--- a/src/server/game/Spells/SpellEffects.cpp
+++ b/src/server/game/Spells/SpellEffects.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
@@ -1952,13 +1952,10 @@ void Spell::EffectEnergize(SpellEffIndex effIndex)
Unit::AuraApplicationMap& Auras = unitTarget->GetAppliedAuras();
for (Unit::AuraApplicationMap::iterator itr = Auras.begin(); itr != Auras.end(); ++itr)
{
- SpellGroupSpecialFlags sFlag = sSpellMgr->GetSpellGroupSpecialFlags(itr->second->GetBase()->GetId());
- if (!guardianFound)
- if (sFlag & SPELL_GROUP_SPECIAL_FLAG_ELIXIR_GUARDIAN)
- guardianFound = true;
- if (!battleFound)
- if (sFlag & SPELL_GROUP_SPECIAL_FLAG_ELIXIR_BATTLE)
- battleFound = true;
+ if (!guardianFound && sSpellMgr->IsSpellMemberOfSpellGroup(itr->second->GetBase()->GetId(), SPELL_GROUP_ELIXIR_GUARDIAN))
+ guardianFound = true;
+ if (!battleFound && sSpellMgr->IsSpellMemberOfSpellGroup(itr->second->GetBase()->GetId(), SPELL_GROUP_ELIXIR_BATTLE))
+ battleFound = true;
if (battleFound && guardianFound)
break;
}
@@ -1966,9 +1963,9 @@ void Spell::EffectEnergize(SpellEffIndex effIndex)
// get all available elixirs by mask and spell level
std::set<uint32> availableElixirs;
if (!guardianFound)
- sSpellMgr->GetSetOfSpellsInSpellGroupWithFlag(1, SPELL_GROUP_SPECIAL_FLAG_ELIXIR_GUARDIAN, availableElixirs);
+ sSpellMgr->GetSetOfSpellsInSpellGroup(SPELL_GROUP_ELIXIR_GUARDIAN, availableElixirs);
if (!battleFound)
- sSpellMgr->GetSetOfSpellsInSpellGroupWithFlag(1, SPELL_GROUP_SPECIAL_FLAG_ELIXIR_BATTLE, availableElixirs);
+ sSpellMgr->GetSetOfSpellsInSpellGroup(SPELL_GROUP_ELIXIR_BATTLE, availableElixirs);
for (std::set<uint32>::iterator itr = availableElixirs.begin(); itr != availableElixirs.end();)
{
SpellInfo const* spellInfo = sSpellMgr->AssertSpellInfo(*itr);
@@ -2429,8 +2426,14 @@ void Spell::EffectSummonType(SpellEffIndex effIndex)
}
break;
}
- case SUMMON_TYPE_JEEVES:
case SUMMON_TYPE_MINIPET:
+ // For companions, recalculate the position to ensure they spawn at the intended π/4 angle.
+ destTarget->Relocate(m_originalCaster->GetNearPosition(
+ m_originalCaster->GetDistance2d(destTarget->GetPositionX(), destTarget->GetPositionY()),
+ MINI_PET_SUMMON_ANGLE
+ ));
+ [[fallthrough]];
+ case SUMMON_TYPE_JEEVES:
{
summon = m_caster->GetMap()->SummonCreature(entry, *destTarget, properties, duration, m_originalCaster, m_spellInfo->Id, 0, personalSpawn);
if (!summon || !summon->HasUnitTypeMask(UNIT_MASK_MINION))
@@ -2446,8 +2449,9 @@ void Spell::EffectSummonType(SpellEffIndex effIndex)
//summon->AI()->EnterEvadeMode();
if (properties->Type != SUMMON_TYPE_JEEVES)
{
+ summon->SetFacingToObject(m_originalCaster);
summon->GetMotionMaster()->Clear(false);
- summon->GetMotionMaster()->MoveFollow(m_originalCaster, PET_FOLLOW_DIST, summon->GetFollowAngle(), MOTION_SLOT_ACTIVE);
+ summon->GetMotionMaster()->MoveFollow(m_originalCaster, PET_FOLLOW_DIST, MINI_PET_FOLLOW_ANGLE, MOTION_SLOT_ACTIVE);
}
break;
}
@@ -3591,7 +3595,7 @@ void Spell::EffectWeaponDmg(SpellEffIndex effIndex)
unitMod = UNIT_MOD_DAMAGE_RANGED;
break;
}
- float weapon_total_pct = m_caster->GetModifierValue(unitMod, TOTAL_PCT);
+ float weapon_total_pct = m_caster->GetPctModifierValue(unitMod, TOTAL_PCT);
fixed_bonus = int32(fixed_bonus * weapon_total_pct);
spell_bonus = int32(spell_bonus * weapon_total_pct);
}
@@ -4155,8 +4159,8 @@ void Spell::EffectDuel(SpellEffIndex effIndex)
WorldPacket data(SMSG_DUEL_REQUESTED, 8 + 8);
data << pGameObj->GetGUID();
data << caster->GetGUID();
- caster->GetSession()->SendPacket(&data);
- target->GetSession()->SendPacket(&data);
+ caster->SendDirectMessage(&data);
+ target->SendDirectMessage(&data);
// create duel-info
bool isMounted = (GetSpellInfo()->Id == 62875);
@@ -4238,7 +4242,7 @@ void Spell::EffectSummonPlayer(SpellEffIndex /*effIndex*/)
data << m_caster->GetGUID(); // summoner guid
data << uint32(m_caster->GetZoneId()); // summoner zone
data << uint32(MAX_PLAYER_SUMMON_DELAY * IN_MILLISECONDS); // auto decline after msecs
- player->GetSession()->SendPacket(&data);
+ player->SendDirectMessage(&data);
}
void Spell::EffectActivateObject(SpellEffIndex effIndex)
@@ -5006,7 +5010,24 @@ void Spell::EffectKnockBack(SpellEffIndex effIndex)
return;
float x, y;
- if (m_spellInfo->Effects[effIndex].Effect == SPELL_EFFECT_KNOCK_BACK_DEST)
+ Unit* reflectionSource = m_reflectionTarget;
+
+ if (!reflectionSource && !m_reflectionTargetGuid.IsEmpty())
+ {
+ if (Unit* resolvedSource = ObjectAccessor::GetUnit(*m_caster, m_reflectionTargetGuid))
+ reflectionSource = resolvedSource;
+ }
+
+ if (reflectionSource)
+ {
+ reflectionSource->GetPosition(x, y);
+ }
+ else if (!m_reflectionTargetGuid.IsEmpty())
+ {
+ x = m_reflectionTargetPosition.GetPositionX();
+ y = m_reflectionTargetPosition.GetPositionY();
+ }
+ else if (m_spellInfo->Effects[effIndex].Effect == SPELL_EFFECT_KNOCK_BACK_DEST)
{
if (m_targets.HasDst())
destTarget->GetPosition(x, y);
@@ -5206,7 +5227,7 @@ void Spell::EffectResurrectPet(SpellEffIndex /*effIndex*/)
{
// Position passed to SummonPet is irrelevant with current implementation,
// pet will be relocated without using these coords in Pet::LoadPetFromDB
- player->SummonPet(0, 0.0f, 0.0f, 0.0f, 0.0f, SUMMON_PET, 0s, damage);
+ player->SummonPet(0, 0.0f, 0.0f, 0.0f, 0.0f, SUMMON_PET, 0ms, damage);
return;
}
@@ -6338,5 +6359,5 @@ void Spell::EffectSummonRaFFriend(SpellEffIndex /*effIndex*/)
data << m_caster->GetGUID();
data << uint32(m_caster->GetZoneId());
data << uint32(MAX_PLAYER_SUMMON_DELAY * IN_MILLISECONDS); // auto decline after msecs
- player->GetSession()->SendPacket(&data);
+ player->SendDirectMessage(&data);
}
diff --git a/src/server/game/Spells/SpellInfo.cpp b/src/server/game/Spells/SpellInfo.cpp
index 64a25a2b4a..74b89e99bd 100644
--- a/src/server/game/Spells/SpellInfo.cpp
+++ b/src/server/game/Spells/SpellInfo.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
@@ -326,9 +326,9 @@ std::array<SpellImplicitTargetInfo::StaticData, TOTAL_SPELL_TARGETS> SpellImplic
SpellEffectInfo::SpellEffectInfo(SpellEntry const* spellEntry, SpellInfo const* spellInfo, uint8 effIndex)
{
_spellInfo = spellInfo;
- _effIndex = effIndex;
+ EffectIndex = effIndex;
Effect = spellEntry->Effect[effIndex];
- ApplyAuraName = spellEntry->EffectApplyAuraName[effIndex];
+ ApplyAuraName = AuraType(spellEntry->EffectApplyAuraName[effIndex]);
Amplitude = spellEntry->EffectAmplitude[effIndex];
DieSides = spellEntry->EffectDieSides[effIndex];
RealPointsPerLevel = spellEntry->EffectRealPointsPerLevel[effIndex];
@@ -456,7 +456,7 @@ int32 SpellEffectInfo::CalcValue(Unit const* caster, int32 const* bp, Unit const
value += PointsPerComboPoint * comboPoints;
}
- value = caster->ApplyEffectModifiers(_spellInfo, _effIndex, value);
+ value = caster->ApplyEffectModifiers(_spellInfo, EffectIndex, value);
// amount multiplication based on caster's level
if (!caster->IsControlledByPlayer() &&
@@ -501,7 +501,7 @@ int32 SpellEffectInfo::CalcValue(Unit const* caster, int32 const* bp, Unit const
break;
}
- if ((sSpellMgr->GetSpellInfo(_spellInfo->Effects[_effIndex].TriggerSpell) && sSpellMgr->GetSpellInfo(_spellInfo->Effects[_effIndex].TriggerSpell)->HasAttribute(SPELL_ATTR0_SCALES_WITH_CREATURE_LEVEL)) && _spellInfo->HasAttribute(SPELL_ATTR0_SCALES_WITH_CREATURE_LEVEL))
+ if ((sSpellMgr->GetSpellInfo(_spellInfo->Effects[EffectIndex].TriggerSpell) && sSpellMgr->GetSpellInfo(_spellInfo->Effects[EffectIndex].TriggerSpell)->HasAttribute(SPELL_ATTR0_SCALES_WITH_CREATURE_LEVEL)) && _spellInfo->HasAttribute(SPELL_ATTR0_SCALES_WITH_CREATURE_LEVEL))
canEffectScale = false;
if (canEffectScale)
@@ -1579,122 +1579,6 @@ SpellCastResult SpellInfo::CheckLocation(uint32 map_id, uint32 zone_id, uint32 a
return SPELL_CAST_OK;
}
-
-bool SpellInfo::IsStrongerAuraActive(Unit const* caster, Unit const* target) const
-{
- if (!target)
- return false;
-
- // xinef: check spell group
- uint32 groupId = sSpellMgr->GetSpellGroup(Id);
- if (!groupId)
- return false;
-
- SpellGroupSpecialFlags sFlag = sSpellMgr->GetSpellGroupSpecialFlags(Id);
- if (sFlag & SPELL_GROUP_SPECIAL_FLAG_SKIP_STRONGER_CHECK)
- return false;
-
- for (uint8 i = EFFECT_0; i < MAX_SPELL_EFFECTS; ++i)
- {
- // xinef: Skip Empty effects
- if (!Effects[i].IsEffect())
- continue;
-
- // xinef: if non-aura effect is preset - return false
- if (!Effects[i].IsAura())
- return false;
-
- // xinef: aura is periodic - return false
- if (Effects[i].Amplitude)
- return false;
-
- // xinef: exclude dummy auras
- if (Effects[i].ApplyAuraName == SPELL_AURA_DUMMY)
- return false;
- }
-
- for (uint8 i = EFFECT_0; i < MAX_SPELL_EFFECTS; ++i)
- {
- // xinef: skip non-aura efects
- if (!Effects[i].IsAura())
- return false;
-
- Unit::AuraEffectList const& auraList = target->GetAuraEffectsByType((AuraType)Effects[i].ApplyAuraName);
- for (Unit::AuraEffectList::const_iterator iter = auraList.begin(); iter != auraList.end(); ++iter)
- {
- // xinef: aura is not groupped or in different group
- uint32 auraGroup = (*iter)->GetAuraGroup();
- if (!auraGroup || auraGroup != groupId)
- continue;
-
- if (IsRankOf((*iter)->GetSpellInfo()) && (sFlag & SPELL_GROUP_SPECIAL_FLAG_SKIP_STRONGER_SAME_SPELL))
- {
- continue;
- }
-
- // xinef: check priority before effect mask
- if (sFlag >= SPELL_GROUP_SPECIAL_FLAG_PRIORITY1 && sFlag <= SPELL_GROUP_SPECIAL_FLAG_PRIORITY4)
- {
- SpellGroupSpecialFlags sFlagCurr = sSpellMgr->GetSpellGroupSpecialFlags((*iter)->GetId());
- if (sFlagCurr >= SPELL_GROUP_SPECIAL_FLAG_PRIORITY1 && sFlagCurr <= SPELL_GROUP_SPECIAL_FLAG_PRIORITY4 && sFlagCurr < sFlag)
- {
- return true;
- }
- }
-
- // xinef: check aura effect equal auras only, some auras have different effects on different ranks - check rank also
- if (!IsAuraEffectEqual((*iter)->GetSpellInfo()) && !IsRankOf((*iter)->GetSpellInfo()))
- continue;
-
- // xinef: misc value mismatches
- // xinef: commented, checked above
- //if (Effects[i].MiscValue != (*iter)->GetMiscValue())
- // continue;
-
- // xinef: should not happen, or effect is not active - stronger one is present
- AuraApplication* aurApp = (*iter)->GetBase()->GetApplicationOfTarget(target->GetGUID());
- if (!aurApp || !aurApp->IsActive((*iter)->GetEffIndex()))
- continue;
-
- // xinef: assume that all spells are either positive or negative, otherwise they should not be in one group
- // xinef: take custom values into account
-
- int32 basePoints = Effects[i].BasePoints;
- int32 duration = GetMaxDuration();
-
- // xinef: should have the same id, can be different if spell is triggered
- // xinef: have to fix spell mods for triggered spell, turn off current spellmodtakingspell for preparing and restore after
- if (Player const* player = caster->GetSpellModOwner())
- if (player->m_spellModTakingSpell && player->m_spellModTakingSpell->m_spellInfo->Id == Id)
- basePoints = player->m_spellModTakingSpell->GetSpellValue()->EffectBasePoints[i];
-
- int32 curValue = std::abs(Effects[i].CalcValue(caster, &basePoints));
- int32 auraValue = (sFlag & SPELL_GROUP_SPECIAL_FLAG_BASE_AMOUNT_CHECK) ?
- std::abs((*iter)->GetSpellInfo()->Effects[(*iter)->GetEffIndex()].CalcValue((*iter)->GetCaster())) :
- std::abs((*iter)->GetAmount());
-
- // xinef: for same spells, divide amount by stack amount
- if (Id == (*iter)->GetId())
- auraValue /= (*iter)->GetBase()->GetStackAmount();
-
- if (curValue < auraValue)
- return true;
-
- // xinef: little hack, if current spell is the same as aura spell, asume it is not stronger
- // xinef: if values are the same, duration mods should be taken into account but they are almost always passive
- if (curValue == auraValue)
- {
- if (Id == (*iter)->GetId())
- continue;
- if (!(*iter)->GetBase()->IsPassive() && duration < (*iter)->GetBase()->GetDuration())
- return true;
- }
- }
- }
-
- return false;
-}
-
bool SpellInfo::IsAuraEffectEqual(SpellInfo const* otherSpellInfo) const
{
uint8 matchCount = 0;
@@ -1824,7 +1708,7 @@ SpellCastResult SpellInfo::CheckTarget(Unit const* caster, WorldObject const* ta
{
if (Player const* player = unitTarget->ToPlayer())
{
- if (player->GetWeaponForAttack(WeaponAttackType(BASE_ATTACK + i), true))
+ if (player->GetWeaponForAttack(WeaponAttackType(i), true))
{
valid = true;
break;
@@ -1938,10 +1822,6 @@ SpellCastResult SpellInfo::CheckTarget(Unit const* caster, WorldObject const* ta
if (HasEffect(SPELL_EFFECT_SELF_RESURRECT) || HasEffect(SPELL_EFFECT_RESURRECT) || HasEffect(SPELL_EFFECT_RESURRECT_NEW))
return SPELL_FAILED_TARGET_CANNOT_BE_RESURRECTED;
- // xinef: check if stronger aura is active
- if (IsStrongerAuraActive(caster, unitTarget))
- return SPELL_FAILED_AURA_BOUNCED;
-
return SPELL_CAST_OK;
}
@@ -2316,6 +2196,8 @@ SpellSpecificType SpellInfo::LoadSpellSpecific() const
case SPELL_AURA_TRACK_RESOURCES:
case SPELL_AURA_TRACK_STEALTHED:
return SPELL_SPECIFIC_TRACKER;
+ default:
+ break;
}
}
}
@@ -2399,6 +2281,8 @@ uint32 SpellInfo::GetMaxTicks() const
if (Effects[x].Amplitude != 0)
return DotDuration / Effects[x].Amplitude;
break;
+ default:
+ break;
}
}
@@ -2889,50 +2773,3 @@ void SpellInfo::_UnloadImplicitTargetConditionLists()
delete cur;
}
}
-
-bool SpellInfo::CheckElixirStacking(Unit const* caster) const
-{
- if (!caster)
- {
- return true;
- }
-
- // xinef: check spell group
- uint32 groupId = sSpellMgr->GetSpellGroup(Id);
- if (groupId != SPELL_GROUP_GUARDIAN_AND_BATTLE_ELIXIRS)
- {
- return true;
- }
-
- SpellGroupSpecialFlags sFlag = sSpellMgr->GetSpellGroupSpecialFlags(Id);
- for (uint8 i = EFFECT_0; i < MAX_SPELL_EFFECTS; ++i)
- {
- if (!Effects[i].IsAura())
- {
- continue;
- }
-
- Unit::AuraApplicationMap const& Auras = caster->GetAppliedAuras();
- for (Unit::AuraApplicationMap::const_iterator itr = Auras.begin(); itr != Auras.end(); ++itr)
- {
- // xinef: aura is not groupped or in different group
- uint32 auraGroup = sSpellMgr->GetSpellGroup(itr->first);
- if (auraGroup != groupId)
- {
- continue;
- }
-
- // Cannot apply guardian/battle elixir if flask is present
- if (sFlag == SPELL_GROUP_SPECIAL_FLAG_ELIXIR_BATTLE || sFlag == SPELL_GROUP_SPECIAL_FLAG_ELIXIR_GUARDIAN)
- {
- SpellGroupSpecialFlags sAuraFlag = sSpellMgr->GetSpellGroupSpecialFlags(itr->first);
- if ((sAuraFlag & SPELL_GROUP_SPECIAL_FLAG_FLASK) == SPELL_GROUP_SPECIAL_FLAG_FLASK)
- {
- return false;
- }
- }
- }
- }
-
- return true;
-}
diff --git a/src/server/game/Spells/SpellInfo.h b/src/server/game/Spells/SpellInfo.h
index 534ad254a6..50b6d88d40 100644
--- a/src/server/game/Spells/SpellInfo.h
+++ b/src/server/game/Spells/SpellInfo.h
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
@@ -248,10 +248,10 @@ private:
class SpellEffectInfo
{
SpellInfo const* _spellInfo;
- uint8 _effIndex;
public:
+ uint8 EffectIndex;
uint32 Effect;
- uint32 ApplyAuraName;
+ AuraType ApplyAuraName;
uint32 Amplitude;
int32 DieSides;
float RealPointsPerLevel;
@@ -272,7 +272,7 @@ public:
flag96 SpellClassMask;
std::list<Condition*>* ImplicitTargetConditions;
- SpellEffectInfo() : _spellInfo(nullptr), _effIndex(0), Effect(0), ApplyAuraName(0), Amplitude(0), DieSides(0),
+ SpellEffectInfo() : _spellInfo(nullptr), EffectIndex(0), Effect(0), ApplyAuraName(SPELL_AURA_NONE), Amplitude(0), DieSides(0),
RealPointsPerLevel(0), BasePoints(0), PointsPerComboPoint(0), ValueMultiplier(0), DamageMultiplier(0),
BonusMultiplier(0), MiscValue(0), MiscValueB(0), Mechanic(MECHANIC_NONE), RadiusEntry(nullptr), ChainTarget(0),
ItemType(0), TriggerSpell(0), ImplicitTargetConditions(nullptr) {}
@@ -482,8 +482,6 @@ public:
SpellCastResult CheckExplicitTarget(Unit const* caster, WorldObject const* target, Item const* itemTarget = nullptr) const;
bool CheckTargetCreatureType(Unit const* target) const;
- // xinef: aura stacking
- bool IsStrongerAuraActive(Unit const* caster, Unit const* target) const;
bool IsAuraEffectEqual(SpellInfo const* otherSpellInfo) const;
bool ValidateAttribute6SpellDamageMods(Unit const* caster, const AuraEffect* auraEffect, bool isDot) const;
@@ -539,8 +537,6 @@ public:
// unloading helpers
void _UnloadImplicitTargetConditionLists();
- bool CheckElixirStacking(Unit const* caster) const;
-
private:
std::array<SpellEffectInfo, MAX_SPELL_EFFECTS>& _GetEffects() { return Effects; }
SpellEffectInfo& _GetEffect(SpellEffIndex index) { ASSERT(index < Effects.size()); return Effects[index]; }
diff --git a/src/server/game/Spells/SpellInfoCorrections.cpp b/src/server/game/Spells/SpellInfoCorrections.cpp
index 9873af3253..0615f39c00 100644
--- a/src/server/game/Spells/SpellInfoCorrections.cpp
+++ b/src/server/game/Spells/SpellInfoCorrections.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
@@ -570,14 +570,6 @@ void SpellMgr::LoadSpellInfoCorrections()
spellInfo->AttributesEx3 |= SPELL_ATTR3_SUPPRESS_CASTER_PROCS;
});
- // Blessing of sanctuary stats
- ApplySpellFix({ 67480 }, [](SpellInfo* spellInfo)
- {
- spellInfo->Effects[EFFECT_0].MiscValue = -1;
- spellInfo->SpellFamilyName = SPELLFAMILY_UNK1; // allows stacking
- spellInfo->Effects[EFFECT_1].ApplyAuraName = SPELL_AURA_DUMMY; // just a marker
- });
-
ApplySpellFix({
6940, // Hand of Sacrifice
64205 // Divine Sacrifice
@@ -2187,12 +2179,6 @@ void SpellMgr::LoadSpellInfoCorrections()
spellInfo->Effects[EFFECT_0].TargetA = SpellImplicitTargetInfo(1);
});
- // Halls of Lightning, Arcing Burn
- ApplySpellFix({ 52671, 59834 }, [](SpellInfo* spellInfo)
- {
- spellInfo->AttributesEx3 |= SPELL_ATTR3_DOT_STACKING_RULE;
- });
-
// Trial of the Champion, Death's Respite
ApplySpellFix({ 68306 }, [](SpellInfo* spellInfo)
{
@@ -5137,6 +5123,13 @@ void SpellMgr::LoadSpellInfoCorrections()
spellInfo->ChannelInterruptFlags &= ~AURA_INTERRUPT_FLAG_TURNING;
});
+ // Summon Scourged Captive
+ ApplySpellFix({ 51597 }, [](SpellInfo* spellInfo)
+ {
+ spellInfo->Effects[EFFECT_0].BasePoints = 1;
+ spellInfo->Effects[EFFECT_0].DieSides = 0;
+ });
+
// The Green Tower
ApplySpellFix({ 18097 }, [](SpellInfo* spellInfo)
{
@@ -5151,6 +5144,32 @@ void SpellMgr::LoadSpellInfoCorrections()
spellInfo->AttributesEx3 |= SPELL_ATTR3_ALWAYS_HIT;
});
+ // Earth Shield
+ ApplySpellFix({ 55599, 58981 }, [](SpellInfo* spellInfo)
+ {
+ spellInfo->AttributesEx5 |= SPELL_ATTR5_LIMIT_N;
+ });
+
+ // Acid Splash
+ ApplySpellFix({ 52446, 59363 }, [](SpellInfo* spellInfo)
+ {
+ spellInfo->AttributesEx3 |= SPELL_ATTR3_DOT_STACKING_RULE;
+ });
+
+ // King Mrlg-Mrgl's Spare Suit
+ ApplySpellFix({ 45278 }, [](SpellInfo* spellInfo)
+ {
+ spellInfo->ProcCharges = 1;
+ });
+
+ ApplySpellFix({
+ 56917, // To Icecrown Airship - Teleport to Airship (A)
+ 57417, // To Icecrown Airship - Teleport to Airship (H)
+ }, [](SpellInfo* spellInfo)
+ {
+ spellInfo->RangeEntry = sSpellRangeStore.LookupEntry(6); // 100 yards
+ });
+
for (uint32 i = 0; i < GetSpellInfoStoreSize(); ++i)
{
SpellInfo* spellInfo = mSpellInfoMap[i];
@@ -5272,14 +5291,6 @@ void SpellMgr::LoadSpellInfoCorrections()
factionTemplateEntry = const_cast<FactionTemplateEntry*>(sFactionTemplateStore.LookupEntry(1921)); // The Taunka
factionTemplateEntry->hostileMask |= 8;
- // Remove 1 from guards friendly mask, making able to attack players
- factionTemplateEntry = const_cast<FactionTemplateEntry*>(sFactionTemplateStore.LookupEntry(1857)); // Area 52 Bruiser
- factionTemplateEntry->friendlyMask &= ~1;
- factionTemplateEntry = const_cast<FactionTemplateEntry*>(sFactionTemplateStore.LookupEntry(1806)); // Netherstorm Agent
- factionTemplateEntry->friendlyMask &= ~1;
- factionTemplateEntry = const_cast<FactionTemplateEntry*>(sFactionTemplateStore.LookupEntry(1812)); // K3 Bruiser
- factionTemplateEntry->friendlyMask &= ~1;
-
// Remove vehicles attr, making accessories selectable
VehicleSeatEntry* vse = const_cast<VehicleSeatEntry*>(sVehicleSeatStore.LookupEntry(4689)); // Siege Engine, Accessory
vse->m_flags &= ~VEHICLE_SEAT_FLAG_PASSENGER_NOT_SELECTABLE;
diff --git a/src/server/game/Spells/SpellMgr.cpp b/src/server/game/Spells/SpellMgr.cpp
index b9ee0a9b31..ba297d4588 100644
--- a/src/server/game/Spells/SpellMgr.cpp
+++ b/src/server/game/Spells/SpellMgr.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
@@ -18,12 +18,9 @@
#include "SpellMgr.h"
#include "BattlefieldMgr.h"
#include "BattlegroundIC.h"
-#include "BattlegroundMgr.h"
#include "Chat.h"
#include "DBCStores.h"
-#include "GameGraveyard.h"
#include "InstanceScript.h"
-#include "MapMgr.h"
#include "ObjectMgr.h"
#include "Player.h"
#include "ScriptMgr.h"
@@ -648,82 +645,143 @@ SpellTargetPosition const* SpellMgr::GetSpellTargetPosition(uint32 spell_id, Spe
return nullptr;
}
-SpellGroupStackFlags SpellMgr::GetGroupStackFlags(uint32 groupid) const
+SpellSpellGroupMapBounds SpellMgr::GetSpellSpellGroupMapBounds(uint32 spell_id) const
{
- SpellGroupStackMap::const_iterator itr = mSpellGroupStackMap.find(groupid);
- if (itr != mSpellGroupStackMap.end())
- return itr->second;
-
- return SPELL_GROUP_STACK_FLAG_NONE;
+ spell_id = GetFirstSpellInChain(spell_id);
+ return mSpellSpellGroup.equal_range(spell_id);
}
-uint32 SpellMgr::GetSpellGroup(uint32 spell_id) const
+bool SpellMgr::IsSpellMemberOfSpellGroup(uint32 spell_id, SpellGroup group_id) const
{
- uint32 first_rank = GetFirstSpellInChain(spell_id);
- SpellGroupMap::const_iterator itr = mSpellGroupMap.find(first_rank);
- if (itr != mSpellGroupMap.end())
- return itr->second.groupId;
-
- return 0;
+ SpellSpellGroupMapBounds spellGroup = GetSpellSpellGroupMapBounds(spell_id);
+ for (SpellSpellGroupMap::const_iterator itr = spellGroup.first; itr != spellGroup.second; ++itr)
+ {
+ if (itr->second == group_id)
+ return true;
+ }
+ return false;
}
-SpellGroupSpecialFlags SpellMgr::GetSpellGroupSpecialFlags(uint32 spell_id) const
+SpellGroupSpellMapBounds SpellMgr::GetSpellGroupSpellMapBounds(SpellGroup group_id) const
{
- uint32 first_rank = GetFirstSpellInChain(spell_id);
- SpellGroupMap::const_iterator itr = mSpellGroupMap.find(first_rank);
- if (itr != mSpellGroupMap.end())
- return itr->second.specialFlags;
-
- return SPELL_GROUP_SPECIAL_FLAG_NONE;
+ return mSpellGroupSpell.equal_range(group_id);
}
-SpellGroupStackFlags SpellMgr::CheckSpellGroupStackRules(SpellInfo const* spellInfo1, SpellInfo const* spellInfo2, bool remove, bool areaAura) const
+void SpellMgr::GetSetOfSpellsInSpellGroup(SpellGroup group_id, std::set<uint32>& foundSpells) const
{
- uint32 spellid_1 = spellInfo1->GetFirstRankSpell()->Id;
- uint32 spellid_2 = spellInfo2->GetFirstRankSpell()->Id;
-
- uint32 groupId = GetSpellGroup(spellid_1);
+ std::set<SpellGroup> usedGroups;
+ GetSetOfSpellsInSpellGroup(group_id, foundSpells, usedGroups);
+}
- SpellGroupSpecialFlags flag1 = GetSpellGroupSpecialFlags(spellid_1);
+void SpellMgr::GetSetOfSpellsInSpellGroup(SpellGroup group_id, std::set<uint32>& foundSpells, std::set<SpellGroup>& usedGroups) const
+{
+ if (usedGroups.find(group_id) != usedGroups.end())
+ return;
+ usedGroups.insert(group_id);
- // xinef: dunno why i added this
- if (spellid_1 == spellid_2 && remove && !areaAura)
+ SpellGroupSpellMapBounds groupSpell = GetSpellGroupSpellMapBounds(group_id);
+ for (SpellGroupSpellMap::const_iterator itr = groupSpell.first; itr != groupSpell.second; ++itr)
{
- if (flag1 & SPELL_GROUP_SPECIAL_FLAG_SAME_SPELL_CHECK)
+ if (itr->second < 0)
{
- return SPELL_GROUP_STACK_FLAG_EXCLUSIVE;
+ SpellGroup currGroup = (SpellGroup)abs(itr->second);
+ GetSetOfSpellsInSpellGroup(currGroup, foundSpells, usedGroups);
+ }
+ else
+ {
+ foundSpells.insert(itr->second);
}
-
- return SPELL_GROUP_STACK_FLAG_NONE;
}
+}
- if (groupId > 0 && groupId == GetSpellGroup(spellid_2))
+bool SpellMgr::AddSameEffectStackRuleSpellGroups(SpellInfo const* spellInfo, uint32 auraType, int32 amount, std::map<SpellGroup, int32>& groups) const
+{
+ uint32 spellId = spellInfo->GetFirstRankSpell()->Id;
+ auto spellGroupBounds = GetSpellSpellGroupMapBounds(spellId);
+ // Find group with SPELL_GROUP_STACK_RULE_EXCLUSIVE_SAME_EFFECT if it belongs to one
+ for (auto itr = spellGroupBounds.first; itr != spellGroupBounds.second; ++itr)
{
- SpellGroupSpecialFlags flag2 = GetSpellGroupSpecialFlags(spellid_2);
- SpellGroupStackFlags additionFlag = SPELL_GROUP_STACK_FLAG_NONE;
- // xinef: first flags are used for elixir stacking rules
- if (flag1 & SPELL_GROUP_SPECIAL_FLAG_STACK_EXCLUSIVE_MAX && flag2 & SPELL_GROUP_SPECIAL_FLAG_STACK_EXCLUSIVE_MAX)
+ SpellGroup group = itr->second;
+ auto found = mSpellSameEffectStack.find(group);
+ if (found != mSpellSameEffectStack.end())
{
- if (flag1 & flag2)
- return SPELL_GROUP_STACK_FLAG_NEVER_STACK;
+ // check auraTypes
+ if (!found->second.count(auraType))
+ continue;
+
+ // Put the highest amount in the map
+ auto groupItr = groups.find(group);
+ if (groupItr == groups.end())
+ groups.emplace(group, amount);
+ else
+ {
+ int32 curr_amount = groups[group];
+ // Take absolute value because this also counts for the highest negative aura
+ if (std::abs(curr_amount) < std::abs(amount))
+ groupItr->second = amount;
+ }
+ // return because a spell should be in only one SPELL_GROUP_STACK_RULE_EXCLUSIVE_SAME_EFFECT group per auraType
+ return true;
}
- // xinef: check only flag1 (new spell)
- else if (flag1 & SPELL_GROUP_SPECIAL_FLAG_FORCED_STRONGEST)
- additionFlag = SPELL_GROUP_STACK_FLAG_FORCED_STRONGEST;
- else if (flag2 & SPELL_GROUP_SPECIAL_FLAG_FORCED_STRONGEST)
- additionFlag = SPELL_GROUP_STACK_FLAG_FORCED_WEAKEST;
+ }
+ // Not in a SPELL_GROUP_STACK_RULE_EXCLUSIVE_SAME_EFFECT group, so return false
+ return false;
+}
+
+SpellGroupStackRule SpellMgr::CheckSpellGroupStackRules(SpellInfo const* spellInfo1, SpellInfo const* spellInfo2) const
+{
+ ASSERT(spellInfo1);
+ ASSERT(spellInfo2);
- return SpellGroupStackFlags(GetGroupStackFlags(groupId) | additionFlag);
+ uint32 spell_id1 = spellInfo1->GetFirstRankSpell()->Id;
+ uint32 spell_id2 = spellInfo2->GetFirstRankSpell()->Id;
+
+ // find SpellGroups which are common for both spells
+ SpellSpellGroupMapBounds spellGroup1 = GetSpellSpellGroupMapBounds(spell_id1);
+ std::set<SpellGroup> groups;
+ for (SpellSpellGroupMap::const_iterator itr = spellGroup1.first; itr != spellGroup1.second; ++itr)
+ {
+ if (IsSpellMemberOfSpellGroup(spell_id2, itr->second))
+ {
+ bool add = true;
+ SpellGroupSpellMapBounds groupSpell = GetSpellGroupSpellMapBounds(itr->second);
+ for (SpellGroupSpellMap::const_iterator itr2 = groupSpell.first; itr2 != groupSpell.second; ++itr2)
+ {
+ if (itr2->second < 0)
+ {
+ SpellGroup currGroup = (SpellGroup)abs(itr2->second);
+ if (IsSpellMemberOfSpellGroup(spell_id1, currGroup) && IsSpellMemberOfSpellGroup(spell_id2, currGroup))
+ {
+ add = false;
+ break;
+ }
+ }
+ }
+ if (add)
+ groups.insert(itr->second);
+ }
}
- return SPELL_GROUP_STACK_FLAG_NONE;
+ SpellGroupStackRule rule = SPELL_GROUP_STACK_RULE_DEFAULT;
+
+ for (std::set<SpellGroup>::iterator itr = groups.begin(); itr!= groups.end(); ++itr)
+ {
+ SpellGroupStackMap::const_iterator found = mSpellGroupStack.find(*itr);
+ if (found != mSpellGroupStack.end())
+ rule = found->second;
+ if (rule)
+ break;
+ }
+ return rule;
}
-void SpellMgr::GetSetOfSpellsInSpellGroupWithFlag(uint32 group_id, SpellGroupSpecialFlags flag, std::set<uint32>& availableElixirs) const
+SpellGroupStackRule SpellMgr::GetSpellGroupStackRule(SpellGroup group) const
{
- for (SpellGroupMap::const_iterator itr = mSpellGroupMap.begin(); itr != mSpellGroupMap.end(); ++itr)
- if (itr->second.groupId == group_id && itr->second.specialFlags == flag)
- availableElixirs.insert(itr->first); // insert spell id
+ SpellGroupStackMap::const_iterator itr = mSpellGroupStack.find(group);
+ if (itr != mSpellGroupStack.end())
+ return itr->second;
+
+ return SPELL_GROUP_STACK_RULE_DEFAULT;
}
SpellProcEventEntry const* SpellMgr::GetSpellProcEvent(uint32 spellId) const
@@ -1627,10 +1685,11 @@ void SpellMgr::LoadSpellGroups()
{
uint32 oldMSTime = getMSTime();
- mSpellGroupMap.clear(); // need for reload case
+ mSpellSpellGroup.clear(); // need for reload case
+ mSpellGroupSpell.clear();
- // 0 1 2
- QueryResult result = WorldDatabase.Query("SELECT id, spell_id, special_flag FROM spell_group");
+ // 0 1
+ QueryResult result = WorldDatabase.Query("SELECT id, spell_id FROM spell_group");
if (!result)
{
LOG_WARN("server.loading", ">> Loaded 0 spell group definitions. DB table `spell_group` is empty.");
@@ -1638,48 +1697,68 @@ void SpellMgr::LoadSpellGroups()
return;
}
+ std::set<uint32> groups;
uint32 count = 0;
do
{
Field* fields = result->Fetch();
uint32 group_id = fields[0].Get<uint32>();
- int32 spell_id = fields[1].Get<uint32>();
- SpellGroupSpecialFlags specialFlag = (SpellGroupSpecialFlags)fields[2].Get<uint32>();
- SpellInfo const* spellInfo = GetSpellInfo(spell_id);
-
- if (!spellInfo)
+ if (group_id <= SPELL_GROUP_DB_RANGE_MIN && group_id >= SPELL_GROUP_CORE_RANGE_MAX)
{
- LOG_ERROR("sql.sql", "Spell {} listed in `spell_group` does not exist", spell_id);
- continue;
- }
- else if (spellInfo->GetRank() > 1)
- {
- LOG_ERROR("sql.sql", "Spell {} listed in `spell_group` is not first rank of spell", spell_id);
+ LOG_ERROR("sql.sql", "SpellGroup id {} listed in `spell_group` is in core range, but is not defined in core!", group_id);
continue;
}
+ int32 spell_id = fields[1].Get<int32>();
+
+ groups.insert(group_id);
+ mSpellGroupSpell.emplace(SpellGroup(group_id), spell_id);
+
+ } while (result->NextRow());
- if (mSpellGroupMap.find(spell_id) != mSpellGroupMap.end())
+ for (auto itr = mSpellGroupSpell.begin(); itr!= mSpellGroupSpell.end();)
+ {
+ if (itr->second < 0)
{
- LOG_ERROR("sql.sql", "Spell {} listed in `spell_group` has more than one group", spell_id);
- continue;
+ if (groups.find(abs(itr->second)) == groups.end())
+ {
+ LOG_ERROR("sql.sql", "SpellGroup id {} listed in `spell_group` does not exist", abs(itr->second));
+ itr = mSpellGroupSpell.erase(itr);
+ }
+ else
+ ++itr;
}
-
- if (specialFlag >= SPELL_GROUP_SPECIAL_FLAG_MAX)
+ else
{
- LOG_ERROR("sql.sql", "Spell {} listed in `spell_group` has invalid special flag!", spell_id);
- continue;
+ SpellInfo const* spellInfo = GetSpellInfo(itr->second);
+ if (!spellInfo)
+ {
+ LOG_ERROR("sql.sql", "Spell {} listed in `spell_group` does not exist", itr->second);
+ itr = mSpellGroupSpell.erase(itr);
+ }
+ else if (spellInfo->GetRank() > 1)
+ {
+ LOG_ERROR("sql.sql", "Spell {} listed in `spell_group` is not first rank of spell.", itr->second);
+ itr = mSpellGroupSpell.erase(itr);
+ }
+ else
+ ++itr;
}
+ }
- SpellStackInfo ssi;
- ssi.groupId = group_id;
- ssi.specialFlags = specialFlag;
- mSpellGroupMap[spell_id] = ssi;
+ for (auto groupItr = groups.begin(); groupItr != groups.end(); ++groupItr)
+ {
+ std::set<uint32> spells;
+ GetSetOfSpellsInSpellGroup(SpellGroup(*groupItr), spells);
- ++count;
- } while (result->NextRow());
+ for (auto spellItr = spells.begin(); spellItr != spells.end(); ++spellItr)
+ {
+ ++count;
+ mSpellSpellGroup.emplace(*spellItr, SpellGroup(*groupItr));
+ }
+ }
- LOG_INFO("server.loading", ">> Loaded {} Spell Group Definitions in {} ms", count, GetMSTimeDiffToNow(oldMSTime));
+ LOG_INFO("server.loading", ">> Loaded {} spell group Definitions in {} ms", count, GetMSTimeDiffToNow(oldMSTime));
LOG_INFO("server.loading", " ");
}
@@ -1687,7 +1766,10 @@ void SpellMgr::LoadSpellGroupStackRules()
{
uint32 oldMSTime = getMSTime();
- mSpellGroupStackMap.clear(); // need for reload case
+ mSpellGroupStack.clear(); // need for reload case
+ mSpellSameEffectStack.clear();
+
+ std::vector<uint32> sameEffectGroups;
// 0 1
QueryResult result = WorldDatabase.Query("SELECT group_id, stack_rule FROM spell_group_stack_rules");
@@ -1705,32 +1787,132 @@ void SpellMgr::LoadSpellGroupStackRules()
uint32 group_id = fields[0].Get<uint32>();
uint8 stack_rule = fields[1].Get<int8>();
- if (stack_rule >= SPELL_GROUP_STACK_FLAG_MAX)
+ if (stack_rule >= SPELL_GROUP_STACK_RULE_MAX)
{
- LOG_ERROR("sql.sql", "SpellGroupStackRule {} listed in `spell_group_stack_rules` does not exist", stack_rule);
+ LOG_ERROR("sql.sql", "SpellGroupStackRule {} listed in `spell_group_stack_rules` does not exist.", stack_rule);
continue;
}
- bool present = false;
- for (SpellGroupMap::const_iterator itr = mSpellGroupMap.begin(); itr != mSpellGroupMap.end(); ++itr)
- if (itr->second.groupId == group_id)
- {
- present = true;
- break;
- }
-
- if (!present)
+ auto bounds = GetSpellGroupSpellMapBounds((SpellGroup)group_id);
+ if (bounds.first == bounds.second)
{
- LOG_ERROR("sql.sql", "SpellGroup id {} listed in `spell_group_stack_rules` does not exist", group_id);
+ LOG_ERROR("sql.sql", "SpellGroup id {} listed in `spell_group_stack_rules` does not exist.", group_id);
continue;
}
- mSpellGroupStackMap[group_id] = (SpellGroupStackFlags)stack_rule;
+ mSpellGroupStack.emplace(SpellGroup(group_id), SpellGroupStackRule(stack_rule));
+
+ // different container for same effect stack rules, need to check effect types
+ if (stack_rule == SPELL_GROUP_STACK_RULE_EXCLUSIVE_SAME_EFFECT)
+ sameEffectGroups.push_back(group_id);
++count;
} while (result->NextRow());
- LOG_INFO("server.loading", ">> Loaded {} Spell Group Stack Rules in {} ms", count, GetMSTimeDiffToNow(oldMSTime));
+ LOG_INFO("server.loading", ">> Loaded {} spell group stack rules in {} ms", count, GetMSTimeDiffToNow(oldMSTime));
+ LOG_INFO("server.loading", " ");
+
+ count = 0;
+ oldMSTime = getMSTime();
+
+ for (uint32 group_id : sameEffectGroups)
+ {
+ std::set<uint32> spellIds;
+ GetSetOfSpellsInSpellGroup(SpellGroup(group_id), spellIds);
+
+ std::unordered_set<uint32> auraTypes;
+
+ // we have to 'guess' what effect this group corresponds to
+ {
+ std::unordered_multiset<uint32 /*auraName*/> frequencyContainer;
+
+ // only waylay for the moment (shared group)
+ std::vector<std::vector<uint32 /*auraName*/>> const SubGroups =
+ {
+ { SPELL_AURA_MOD_MELEE_HASTE, SPELL_AURA_MOD_MELEE_RANGED_HASTE, SPELL_AURA_MOD_RANGED_HASTE }
+ };
+
+ for (uint32 spellId : spellIds)
+ {
+ SpellInfo const* spellInfo = AssertSpellInfo(spellId);
+ for (SpellEffectInfo const& spellEffectInfo : spellInfo->GetEffects())
+ {
+ if (!spellEffectInfo.IsAura())
+ continue;
+
+ uint32 auraName = spellEffectInfo.ApplyAuraName;
+ for (std::vector<uint32> const& subGroup : SubGroups)
+ {
+ if (std::find(subGroup.begin(), subGroup.end(), auraName) != subGroup.end())
+ {
+ // count as first aura
+ auraName = subGroup.front();
+ break;
+ }
+ }
+
+ frequencyContainer.insert(auraName);
+ }
+ }
+
+ uint32 auraType = 0;
+ size_t auraTypeCount = 0;
+ for (uint32 auraName : frequencyContainer)
+ {
+ size_t currentCount = frequencyContainer.count(auraName);
+ if (currentCount > auraTypeCount)
+ {
+ auraType = auraName;
+ auraTypeCount = currentCount;
+ }
+ }
+
+ for (std::vector<uint32> const& subGroup : SubGroups)
+ {
+ if (auraType == subGroup.front())
+ {
+ auraTypes.insert(subGroup.begin(), subGroup.end());
+ break;
+ }
+ }
+
+ if (auraTypes.empty())
+ auraTypes.insert(auraType);
+ }
+
+ // re-check spells against guessed group
+ for (uint32 spellId : spellIds)
+ {
+ SpellInfo const* spellInfo = AssertSpellInfo(spellId);
+
+ bool found = false;
+ while (spellInfo)
+ {
+ for (uint32 auraType : auraTypes)
+ {
+ if (spellInfo->HasAura(AuraType(auraType)))
+ {
+ found = true;
+ break;
+ }
+ }
+
+ if (found)
+ break;
+
+ spellInfo = spellInfo->GetNextRankSpell();
+ }
+
+ // not found either, log error
+ if (!found)
+ LOG_ERROR("sql.sql", "SpellId {} listed in `spell_group` with stack rule 3 does not share aura assigned for group {}", spellId, group_id);
+ }
+
+ mSpellSameEffectStack[SpellGroup(group_id)] = auraTypes;
+ ++count;
+ }
+
+ LOG_INFO("server.loading", ">> Loaded {} SPELL_GROUP_STACK_RULE_EXCLUSIVE_SAME_EFFECT stack rules in {} ms", count, GetMSTimeDiffToNow(oldMSTime));
LOG_INFO("server.loading", " ");
}
@@ -2920,6 +3102,8 @@ void SpellMgr::LoadSpellInfoCustomAttributes()
case SPELL_AURA_WATER_BREATHING:
spellInfo->AttributesCu |= SPELL_ATTR0_CU_NO_INITIAL_THREAT;
break;
+ default:
+ break;
}
switch (spellInfo->Effects[j].ApplyAuraName)
@@ -3494,6 +3678,9 @@ void SpellMgr::LoadSpellInfoCustomAttributes()
if (triggerSpell->AttributesCu & SPELL_ATTR0_CU_BINARY_SPELL)
allNonBinary = false;
}
+ break;
+ default:
+ break;
}
}
}
diff --git a/src/server/game/Spells/SpellMgr.h b/src/server/game/Spells/SpellMgr.h
index 3a9700b6d8..30220e1516 100644
--- a/src/server/game/Spells/SpellMgr.h
+++ b/src/server/game/Spells/SpellMgr.h
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
@@ -20,7 +20,6 @@
// For static or at-server-startup loaded spell data
-#include "Common.h"
#include "Log.h"
#include "SharedDefines.h"
#include "Unit.h"
@@ -330,56 +329,49 @@ struct SpellBonusEntry
typedef std::unordered_map<uint32, SpellBonusEntry> SpellBonusMap;
-enum SpellGroupSpecialFlags
+enum SpellGroup
{
- SPELL_GROUP_SPECIAL_FLAG_NONE = 0x000,
- SPELL_GROUP_SPECIAL_FLAG_ELIXIR_BATTLE = 0x001,
- SPELL_GROUP_SPECIAL_FLAG_ELIXIR_GUARDIAN = 0x002,
- SPELL_GROUP_SPECIAL_FLAG_ELIXIR_UNSTABLE = 0x004,
- SPELL_GROUP_SPECIAL_FLAG_ELIXIR_SHATTRATH = 0x008,
- SPELL_GROUP_SPECIAL_FLAG_STACK_EXCLUSIVE_MAX = 0x00F,
- SPELL_GROUP_SPECIAL_FLAG_FORCED_STRONGEST = 0x010, // xinef: specially helpful flag if some spells have different auras, but only one should be present
- SPELL_GROUP_SPECIAL_FLAG_SKIP_STRONGER_CHECK = 0x020,
- SPELL_GROUP_SPECIAL_FLAG_BASE_AMOUNT_CHECK = 0x040,
- SPELL_GROUP_SPECIAL_FLAG_PRIORITY1 = 0x100,
- SPELL_GROUP_SPECIAL_FLAG_PRIORITY2 = 0x200,
- SPELL_GROUP_SPECIAL_FLAG_PRIORITY3 = 0x400,
- SPELL_GROUP_SPECIAL_FLAG_PRIORITY4 = 0x800,
- SPELL_GROUP_SPECIAL_FLAG_SAME_SPELL_CHECK = 0x1000,
- SPELL_GROUP_SPECIAL_FLAG_SKIP_STRONGER_SAME_SPELL = 0x2000,
- SPELL_GROUP_SPECIAL_FLAG_MAX = 0x4000,
-
- SPELL_GROUP_SPECIAL_FLAG_FLASK = SPELL_GROUP_SPECIAL_FLAG_ELIXIR_BATTLE | SPELL_GROUP_SPECIAL_FLAG_ELIXIR_GUARDIAN
+ SPELL_GROUP_NONE = 0,
+ SPELL_GROUP_ELIXIR_BATTLE = 1,
+ SPELL_GROUP_ELIXIR_GUARDIAN = 2,
+ SPELL_GROUP_CORE_RANGE_MAX = 3
};
-enum SpellGroupStackFlags
+namespace std
{
- SPELL_GROUP_STACK_FLAG_NONE = 0x00,
- SPELL_GROUP_STACK_FLAG_EXCLUSIVE = 0x01,
- SPELL_GROUP_STACK_FLAG_NOT_SAME_CASTER = 0x02,
- SPELL_GROUP_STACK_FLAG_FLAGGED = 0x04, // xinef: just a marker
- SPELL_GROUP_STACK_FLAG_NEVER_STACK = 0x08,
- SPELL_GROUP_STACK_FLAG_EFFECT_EXCLUSIVE = 0x10,
- SPELL_GROUP_STACK_FLAG_MAX = 0x20,
-
- // Internal use
- SPELL_GROUP_STACK_FLAG_FORCED_STRONGEST = 0x100,
- SPELL_GROUP_STACK_FLAG_FORCED_WEAKEST = 0x200,
-};
+ template<>
+ struct hash<SpellGroup>
+ {
+ size_t operator()(SpellGroup const& group) const
+ {
+ return hash<uint32>()(uint32(group));
+ }
+ };
+}
-enum SpellGroupIDs
-{
- SPELL_GROUP_GUARDIAN_AND_BATTLE_ELIXIRS = 1
-};
+#define SPELL_GROUP_DB_RANGE_MIN 1000
-struct SpellStackInfo
+// spell_id, group_id
+typedef std::unordered_multimap<uint32, SpellGroup> SpellSpellGroupMap;
+typedef std::pair<SpellSpellGroupMap::const_iterator, SpellSpellGroupMap::const_iterator> SpellSpellGroupMapBounds;
+
+// group_id, spell_id
+typedef std::unordered_multimap<SpellGroup, int32> SpellGroupSpellMap;
+typedef std::pair<SpellGroupSpellMap::const_iterator, SpellGroupSpellMap::const_iterator> SpellGroupSpellMapBounds;
+
+enum SpellGroupStackRule
{
- uint32 groupId;
- SpellGroupSpecialFlags specialFlags;
+ SPELL_GROUP_STACK_RULE_DEFAULT,
+ SPELL_GROUP_STACK_RULE_EXCLUSIVE,
+ SPELL_GROUP_STACK_RULE_EXCLUSIVE_FROM_SAME_CASTER,
+ SPELL_GROUP_STACK_RULE_EXCLUSIVE_SAME_EFFECT,
+ SPELL_GROUP_STACK_RULE_EXCLUSIVE_HIGHEST,
+ SPELL_GROUP_STACK_RULE_MAX
};
-// spell_id, group_id
-typedef std::map<uint32, SpellStackInfo> SpellGroupMap;
-typedef std::map<uint32, SpellGroupStackFlags> SpellGroupStackMap;
+
+typedef std::unordered_map<SpellGroup, SpellGroupStackRule> SpellGroupStackMap;
+
+typedef std::unordered_map<SpellGroup, std::unordered_set<uint32 /*auraName*/>> SameEffectStackMap;
struct SpellThreatEntry
{
@@ -679,12 +671,18 @@ public:
// Spell target coordinates
[[nodiscard]] SpellTargetPosition const* GetSpellTargetPosition(uint32 spell_id, SpellEffIndex effIndex) const;
- // Spell Groups
- [[nodiscard]] uint32 GetSpellGroup(uint32 spellid) const;
- [[nodiscard]] SpellGroupSpecialFlags GetSpellGroupSpecialFlags(uint32 spell_id) const;
- [[nodiscard]] SpellGroupStackFlags GetGroupStackFlags(uint32 groupid) const;
- SpellGroupStackFlags CheckSpellGroupStackRules(SpellInfo const* spellInfo1, SpellInfo const* spellInfo2, bool remove, bool areaAura) const;
- void GetSetOfSpellsInSpellGroupWithFlag(uint32 group_id, SpellGroupSpecialFlags flag, std::set<uint32>& availableElixirs) const;
+ // Spell Groups table
+ SpellSpellGroupMapBounds GetSpellSpellGroupMapBounds(uint32 spell_id) const;
+ bool IsSpellMemberOfSpellGroup(uint32 spell_id, SpellGroup group_id) const;
+
+ SpellGroupSpellMapBounds GetSpellGroupSpellMapBounds(SpellGroup group_id) const;
+ void GetSetOfSpellsInSpellGroup(SpellGroup group_id, std::set<uint32>& foundSpells) const;
+ void GetSetOfSpellsInSpellGroup(SpellGroup group_id, std::set<uint32>& foundSpells, std::set<SpellGroup>& usedGroups) const;
+
+ // Spell Group Stack Rules table
+ bool AddSameEffectStackRuleSpellGroups(SpellInfo const* spellInfo, uint32 auraType, int32 amount, std::map<SpellGroup, int32>& groups) const;
+ SpellGroupStackRule CheckSpellGroupStackRules(SpellInfo const* spellInfo1, SpellInfo const* spellInfo2) const;
+ SpellGroupStackRule GetSpellGroupStackRule(SpellGroup group_id) const;
// Spell proc event table
[[nodiscard]] SpellProcEventEntry const* GetSpellProcEvent(uint32 spellId) const;
@@ -798,8 +796,10 @@ private:
SpellRequiredMap mSpellReq;
SpellLearnSkillMap mSpellLearnSkills;
SpellTargetPositionMap mSpellTargetPositions;
- SpellGroupMap mSpellGroupMap;
- SpellGroupStackMap mSpellGroupStackMap;
+ SpellSpellGroupMap mSpellSpellGroup;
+ SpellGroupSpellMap mSpellGroupSpell;
+ SpellGroupStackMap mSpellGroupStack;
+ SameEffectStackMap mSpellSameEffectStack;
SpellProcEventMap mSpellProcEventMap;
SpellProcMap mSpellProcMap;
SpellBonusMap mSpellBonusMap;
diff --git a/src/server/game/Spells/SpellScript.cpp b/src/server/game/Spells/SpellScript.cpp
index 930861de5b..d726e2ea86 100644
--- a/src/server/game/Spells/SpellScript.cpp
+++ b/src/server/game/Spells/SpellScript.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/game/Spells/SpellScript.h b/src/server/game/Spells/SpellScript.h
index 5ada4e0f41..8ab04fd704 100644
--- a/src/server/game/Spells/SpellScript.h
+++ b/src/server/game/Spells/SpellScript.h
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/game/Texts/ChatTextBuilder.cpp b/src/server/game/Texts/ChatTextBuilder.cpp
index ad0ff1fed3..1f6c3ff731 100644
--- a/src/server/game/Texts/ChatTextBuilder.cpp
+++ b/src/server/game/Texts/ChatTextBuilder.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/game/Texts/ChatTextBuilder.h b/src/server/game/Texts/ChatTextBuilder.h
index 724f9f7b22..54bc48379e 100644
--- a/src/server/game/Texts/ChatTextBuilder.h
+++ b/src/server/game/Texts/ChatTextBuilder.h
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/game/Texts/CreatureTextMgr.cpp b/src/server/game/Texts/CreatureTextMgr.cpp
index c471c78154..501bea861f 100644
--- a/src/server/game/Texts/CreatureTextMgr.cpp
+++ b/src/server/game/Texts/CreatureTextMgr.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
@@ -83,7 +83,7 @@ void CreatureTextMgr::LoadCreatureTexts()
uint32 oldMSTime = getMSTime();
mTextMap.clear(); // for reload case
- mTextRepeatMap.clear(); //reset all currently used temp texts
+ //all currently used temp texts are NOT reset
WorldDatabasePreparedStatement* stmt = WorldDatabase.GetPreparedStatement(WORLD_SEL_CREATURE_TEXT);
PreparedQueryResult result = WorldDatabase.Query(stmt);
@@ -218,7 +218,7 @@ uint32 CreatureTextMgr::SendChat(Creature* source, uint8 textGroup, WorldObject
}
CreatureTextGroup const& textGroupContainer = itr->second; //has all texts in the group
- CreatureTextRepeatIds repeatGroup = GetRepeatGroup(source, textGroup);//has all textIDs from the group that were already said
+ CreatureTextRepeatIds repeatGroup = source->GetTextRepeatGroup(textGroup);//has all textIDs from the group that were already said
CreatureTextGroup tempGroup;//will use this to talk after sorting repeatGroup
for (CreatureTextGroup::const_iterator giter = textGroupContainer.begin(); giter != textGroupContainer.end(); ++giter)
@@ -227,52 +227,14 @@ uint32 CreatureTextMgr::SendChat(Creature* source, uint8 textGroup, WorldObject
if (tempGroup.empty())
{
- CreatureTextRepeatMap::iterator mapItr = mTextRepeatMap.find(source->GetGUID());
- if (mapItr != mTextRepeatMap.end())
- {
- CreatureTextRepeatGroup::iterator groupItr = mapItr->second.find(textGroup);
- groupItr->second.clear();
- }
-
+ source->ClearTextRepeatGroup(textGroup);
tempGroup = textGroupContainer;
}
- uint8 count = 0;
- float lastChance = -1;
- bool isEqualChanced = true;
-
- float totalChance = 0;
-
- for (CreatureTextGroup::const_iterator iter = tempGroup.begin(); iter != tempGroup.end(); ++iter)
- {
- if (lastChance >= 0 && lastChance != iter->probability)
- isEqualChanced = false;
-
- lastChance = iter->probability;
- totalChance += iter->probability;
- ++count;
- }
-
- int32 offset = -1;
- if (!isEqualChanced)
+ auto iter = Acore::Containers::SelectRandomWeightedContainerElement(tempGroup, [](CreatureTextEntry const& t) -> double
{
- for (CreatureTextGroup::const_iterator iter = tempGroup.begin(); iter != tempGroup.end(); ++iter)
- {
- uint32 chance = uint32(iter->probability);
- uint32 r = urand(0, 100);
- ++offset;
- if (r <= chance)
- break;
- }
- }
-
- uint32 pos = 0;
- if (isEqualChanced || offset < 0)
- pos = urand(0, count - 1);
- else if (offset >= 0)
- pos = offset;
-
- CreatureTextGroup::const_iterator iter = tempGroup.begin() + pos;
+ return t.probability;
+ });
ChatMsg finalType = (msgType == CHAT_MSG_ADDON) ? iter->type : msgType;
Language finalLang = (language == LANG_ADDON) ? iter->lang : language;
@@ -301,9 +263,8 @@ uint32 CreatureTextMgr::SendChat(Creature* source, uint8 textGroup, WorldObject
CreatureTextBuilder builder(finalSource, finalSource->getGender(), finalType, iter->group, iter->id, finalLang, target);
SendChatPacket(finalSource, builder, finalType, target, range, teamId, gmOnly);
}
- if (isEqualChanced || (!isEqualChanced && totalChance == 100.0f))
- SetRepeatId(source, textGroup, iter->id);
+ source->SetTextRepeatId(textGroup, iter->id);
return iter->duration;
}
@@ -348,7 +309,7 @@ void CreatureTextMgr::SendNonChatPacket(WorldObject* source, WorldPacket const*
if (!target || !target->IsPlayer())
return;
- target->ToPlayer()->GetSession()->SendPacket(data);
+ target->ToPlayer()->SendDirectMessage(data);
return;
}
break;
@@ -365,7 +326,7 @@ void CreatureTextMgr::SendNonChatPacket(WorldObject* source, WorldPacket const*
Map::PlayerList const& players = source->GetMap()->GetPlayers();
for (Map::PlayerList::const_iterator itr = players.begin(); itr != players.end(); ++itr)
if (itr->GetSource()->GetAreaId() == areaId && (teamId == TEAM_NEUTRAL || itr->GetSource()->GetTeamId() == teamId) && (!gmOnly || itr->GetSource()->IsGameMaster()))
- itr->GetSource()->GetSession()->SendPacket(data);
+ itr->GetSource()->SendDirectMessage(data);
return;
}
case TEXT_RANGE_ZONE:
@@ -374,7 +335,7 @@ void CreatureTextMgr::SendNonChatPacket(WorldObject* source, WorldPacket const*
Map::PlayerList const& players = source->GetMap()->GetPlayers();
for (Map::PlayerList::const_iterator itr = players.begin(); itr != players.end(); ++itr)
if (itr->GetSource()->GetZoneId() == zoneId && (teamId == TEAM_NEUTRAL || itr->GetSource()->GetTeamId() == teamId) && (!gmOnly || itr->GetSource()->IsGameMaster()))
- itr->GetSource()->GetSession()->SendPacket(data);
+ itr->GetSource()->SendDirectMessage(data);
return;
}
case TEXT_RANGE_MAP:
@@ -382,7 +343,7 @@ void CreatureTextMgr::SendNonChatPacket(WorldObject* source, WorldPacket const*
Map::PlayerList const& players = source->GetMap()->GetPlayers();
for (Map::PlayerList::const_iterator itr = players.begin(); itr != players.end(); ++itr)
if ((teamId == TEAM_NEUTRAL || itr->GetSource()->GetTeamId() == teamId) && (!gmOnly || itr->GetSource()->IsGameMaster()))
- itr->GetSource()->GetSession()->SendPacket(data);
+ itr->GetSource()->SendDirectMessage(data);
return;
}
case TEXT_RANGE_WORLD:
@@ -391,7 +352,7 @@ void CreatureTextMgr::SendNonChatPacket(WorldObject* source, WorldPacket const*
for (WorldSessionMgr::SessionMap::const_iterator itr = sessionMap.begin(); itr != sessionMap.end(); ++itr)
if (Player* player = itr->second->GetPlayer())
if ((teamId == TEAM_NEUTRAL || player->GetTeamId() == teamId) && (!gmOnly || player->IsGameMaster()))
- player->GetSession()->SendPacket(data);
+ player->SendDirectMessage(data);
return;
}
case TEXT_RANGE_NORMAL:
@@ -410,34 +371,6 @@ void CreatureTextMgr::SendEmote(Unit* source, uint32 emote)
source->HandleEmoteCommand(emote);
}
-void CreatureTextMgr::SetRepeatId(Creature* source, uint8 textGroup, uint8 id)
-{
- if (!source)
- return;
-
- CreatureTextRepeatIds& repeats = mTextRepeatMap[source->GetGUID()][textGroup];
- if (std::find(repeats.begin(), repeats.end(), id) == repeats.end())
- repeats.push_back(id);
- else
- LOG_ERROR("sql.sql", "CreatureTextMgr: TextGroup {} for Creature {} ({}), id {} already added",
- uint32(textGroup), source->GetName(), source->GetGUID().ToString(), uint32(id));
-}
-
-CreatureTextRepeatIds CreatureTextMgr::GetRepeatGroup(Creature* source, uint8 textGroup)
-{
- ASSERT(source);//should never happen
- CreatureTextRepeatIds ids;
-
- CreatureTextRepeatMap::const_iterator mapItr = mTextRepeatMap.find(source->GetGUID());
- if (mapItr != mTextRepeatMap.end())
- {
- CreatureTextRepeatGroup::const_iterator groupItr = (*mapItr).second.find(textGroup);
- if (groupItr != mapItr->second.end())
- ids = groupItr->second;
- }
- return ids;
-}
-
bool CreatureTextMgr::TextExist(uint32 sourceEntry, uint8 textGroup)
{
if (!sourceEntry)
diff --git a/src/server/game/Texts/CreatureTextMgr.h b/src/server/game/Texts/CreatureTextMgr.h
index d84d91c8dd..37a3934965 100644
--- a/src/server/game/Texts/CreatureTextMgr.h
+++ b/src/server/game/Texts/CreatureTextMgr.h
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
@@ -77,11 +77,6 @@ typedef std::unordered_map<uint32, CreatureTextHolder> CreatureTextMap; // a
typedef std::map<CreatureTextId, CreatureTextLocale> LocaleCreatureTextMap;
-//used for handling non-repeatable random texts
-typedef std::vector<uint8> CreatureTextRepeatIds;
-typedef std::unordered_map<uint8, CreatureTextRepeatIds> CreatureTextRepeatGroup;
-typedef std::unordered_map<ObjectGuid, CreatureTextRepeatGroup> CreatureTextRepeatMap;//guid based
-
class CreatureTextMgr
{
CreatureTextMgr() { }
@@ -105,14 +100,10 @@ public:
template<class Builder> void SendChatPacket(WorldObject* source, Builder const& builder, ChatMsg msgType, WorldObject const* target = nullptr, CreatureTextRange range = TEXT_RANGE_NORMAL, TeamId teamId = TEAM_NEUTRAL, bool gmOnly = false) const;
private:
- CreatureTextRepeatIds GetRepeatGroup(Creature* source, uint8 textGroup);
- void SetRepeatId(Creature* source, uint8 textGroup, uint8 id);
-
void SendNonChatPacket(WorldObject* source, WorldPacket const* data, ChatMsg msgType, WorldObject const* target, CreatureTextRange range, TeamId teamId, bool gmOnly) const;
float GetRangeForChatType(ChatMsg msgType) const;
CreatureTextMap mTextMap;
- CreatureTextRepeatMap mTextRepeatMap;
LocaleCreatureTextMap mLocaleTextMap;
};
diff --git a/src/server/game/Tickets/TicketMgr.cpp b/src/server/game/Tickets/TicketMgr.cpp
index 543b40cd54..7c6337b301 100644
--- a/src/server/game/Tickets/TicketMgr.cpp
+++ b/src/server/game/Tickets/TicketMgr.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/game/Tickets/TicketMgr.h b/src/server/game/Tickets/TicketMgr.h
index d345567166..7293f23c3e 100644
--- a/src/server/game/Tickets/TicketMgr.h
+++ b/src/server/game/Tickets/TicketMgr.h
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/game/Time/GameTime.cpp b/src/server/game/Time/GameTime.cpp
index 3dbcbc0f25..123b4402aa 100644
--- a/src/server/game/Time/GameTime.cpp
+++ b/src/server/game/Time/GameTime.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/game/Time/GameTime.h b/src/server/game/Time/GameTime.h
index 3350a14d40..40d96f6a57 100644
--- a/src/server/game/Time/GameTime.h
+++ b/src/server/game/Time/GameTime.h
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/game/Time/UpdateTime.cpp b/src/server/game/Time/UpdateTime.cpp
index 3b584a6155..d555ce2e09 100644
--- a/src/server/game/Time/UpdateTime.cpp
+++ b/src/server/game/Time/UpdateTime.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
@@ -162,7 +162,7 @@ void WorldUpdateTime::SetRecordUpdateTimeInterval(Milliseconds t)
void WorldUpdateTime::RecordUpdateTime(Milliseconds gameTimeMs, uint32 diff, uint32 sessionCount)
{
- if (_recordUpdateTimeInverval > 0s && diff > _recordUpdateTimeMin.count())
+ if (_recordUpdateTimeInverval > 0ms && diff > _recordUpdateTimeMin.count())
{
if (GetMSTimeDiff(_lastRecordTime, gameTimeMs) > _recordUpdateTimeInverval)
{
diff --git a/src/server/game/Time/UpdateTime.h b/src/server/game/Time/UpdateTime.h
index d6618f4305..8d163dc7bd 100644
--- a/src/server/game/Time/UpdateTime.h
+++ b/src/server/game/Time/UpdateTime.h
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/game/Tools/CharacterDatabaseCleaner.cpp b/src/server/game/Tools/CharacterDatabaseCleaner.cpp
index 4c4d69f53b..329a6283ce 100644
--- a/src/server/game/Tools/CharacterDatabaseCleaner.cpp
+++ b/src/server/game/Tools/CharacterDatabaseCleaner.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/game/Tools/CharacterDatabaseCleaner.h b/src/server/game/Tools/CharacterDatabaseCleaner.h
index 30a4832544..382d5ccfb8 100644
--- a/src/server/game/Tools/CharacterDatabaseCleaner.h
+++ b/src/server/game/Tools/CharacterDatabaseCleaner.h
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/game/Tools/PlayerDump.cpp b/src/server/game/Tools/PlayerDump.cpp
index 95fbdd7872..1f4cb8cc2d 100644
--- a/src/server/game/Tools/PlayerDump.cpp
+++ b/src/server/game/Tools/PlayerDump.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/game/Tools/PlayerDump.h b/src/server/game/Tools/PlayerDump.h
index 64b3f4b6cb..fb4af53d6c 100644
--- a/src/server/game/Tools/PlayerDump.h
+++ b/src/server/game/Tools/PlayerDump.h
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/game/Warden/Modules/WardenModuleMac.h b/src/server/game/Warden/Modules/WardenModuleMac.h
index 90ec6651d4..b7c729a2dd 100644
--- a/src/server/game/Warden/Modules/WardenModuleMac.h
+++ b/src/server/game/Warden/Modules/WardenModuleMac.h
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/game/Warden/Modules/WardenModuleWin.h b/src/server/game/Warden/Modules/WardenModuleWin.h
index 5e3d7647db..4798aadc9a 100644
--- a/src/server/game/Warden/Modules/WardenModuleWin.h
+++ b/src/server/game/Warden/Modules/WardenModuleWin.h
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/game/Warden/Warden.cpp b/src/server/game/Warden/Warden.cpp
index a3e0295b53..1cad8c86b4 100644
--- a/src/server/game/Warden/Warden.cpp
+++ b/src/server/game/Warden/Warden.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/game/Warden/Warden.h b/src/server/game/Warden/Warden.h
index 88d972a0f4..797a664c46 100644
--- a/src/server/game/Warden/Warden.h
+++ b/src/server/game/Warden/Warden.h
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/game/Warden/WardenCheckMgr.cpp b/src/server/game/Warden/WardenCheckMgr.cpp
index a061ec4e81..bac4424f60 100644
--- a/src/server/game/Warden/WardenCheckMgr.cpp
+++ b/src/server/game/Warden/WardenCheckMgr.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/game/Warden/WardenCheckMgr.h b/src/server/game/Warden/WardenCheckMgr.h
index db5a98c669..0b70c2a3e4 100644
--- a/src/server/game/Warden/WardenCheckMgr.h
+++ b/src/server/game/Warden/WardenCheckMgr.h
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/game/Warden/WardenMac.cpp b/src/server/game/Warden/WardenMac.cpp
index d3e7f4a605..75e25990bd 100644
--- a/src/server/game/Warden/WardenMac.cpp
+++ b/src/server/game/Warden/WardenMac.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/game/Warden/WardenMac.h b/src/server/game/Warden/WardenMac.h
index 30e3dc51f2..3d1888d44d 100644
--- a/src/server/game/Warden/WardenMac.h
+++ b/src/server/game/Warden/WardenMac.h
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/game/Warden/WardenPayloadMgr.cpp b/src/server/game/Warden/WardenPayloadMgr.cpp
index d6a06edc34..e6ef106b1c 100644
--- a/src/server/game/Warden/WardenPayloadMgr.cpp
+++ b/src/server/game/Warden/WardenPayloadMgr.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/game/Warden/WardenPayloadMgr.h b/src/server/game/Warden/WardenPayloadMgr.h
index aa71595197..8cc5bd4d87 100644
--- a/src/server/game/Warden/WardenPayloadMgr.h
+++ b/src/server/game/Warden/WardenPayloadMgr.h
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/game/Warden/WardenWin.cpp b/src/server/game/Warden/WardenWin.cpp
index 520dd6d015..906f153928 100644
--- a/src/server/game/Warden/WardenWin.cpp
+++ b/src/server/game/Warden/WardenWin.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/game/Warden/WardenWin.h b/src/server/game/Warden/WardenWin.h
index 2d88c4156e..1fbebea555 100644
--- a/src/server/game/Warden/WardenWin.h
+++ b/src/server/game/Warden/WardenWin.h
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/game/Warden/enuminfo_WardenCheckMgr.cpp b/src/server/game/Warden/enuminfo_WardenCheckMgr.cpp
index 61bd60f377..ac62c1ae0e 100644
--- a/src/server/game/Warden/enuminfo_WardenCheckMgr.cpp
+++ b/src/server/game/Warden/enuminfo_WardenCheckMgr.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/game/Weather/Weather.cpp b/src/server/game/Weather/Weather.cpp
index bc22e7db66..ee4fbb85aa 100644
--- a/src/server/game/Weather/Weather.cpp
+++ b/src/server/game/Weather/Weather.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
@@ -20,16 +20,16 @@
*/
#include "Weather.h"
+#include "Map.h"
#include "MiscPackets.h"
#include "Player.h"
#include "ScriptMgr.h"
#include "Util.h"
#include "World.h"
-#include "WorldSessionMgr.h"
/// Create the Weather object
-Weather::Weather(uint32 zone, WeatherData const* weatherChances)
- : m_zone(zone), m_weatherChances(weatherChances)
+Weather::Weather(Map* map, uint32 zone, WeatherData const* weatherChances)
+ : m_map(map), m_zone(zone), m_weatherChances(weatherChances)
{
m_timer.SetInterval(sWorld->getIntConfig(CONFIG_INTERVAL_CHANGEWEATHER));
m_type = WEATHER_TYPE_FINE;
@@ -190,6 +190,12 @@ void Weather::SendWeatherUpdateToPlayer(Player* player)
player->SendDirectMessage(weather.Write());
}
+void Weather::SendFineWeatherUpdateToPlayer(Player* player)
+{
+ WorldPackets::Misc::Weather weather(WEATHER_STATE_FINE);
+ player->SendDirectMessage(weather.Write());
+}
+
/// Send the new weather to all players in the zone
bool Weather::UpdateWeather()
{
@@ -204,7 +210,7 @@ bool Weather::UpdateWeather()
WorldPackets::Misc::Weather weather(state, m_grade);
//- Returns false if there were no players found to update
- if (!sWorldSessionMgr->SendZoneMessage(m_zone, weather.Write()))
+ if (!m_map->SendZoneMessage(m_zone, weather.Write()))
return false;
///- Log the event
diff --git a/src/server/game/Weather/Weather.h b/src/server/game/Weather/Weather.h
index 9bba945272..8f4b5c866e 100644
--- a/src/server/game/Weather/Weather.h
+++ b/src/server/game/Weather/Weather.h
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
@@ -25,6 +25,7 @@
#include "SharedDefines.h"
#include "Timer.h"
+class Map;
class Player;
#define WEATHER_SEASONS 4
@@ -63,7 +64,7 @@ enum WeatherState : uint32
class Weather
{
public:
- Weather(uint32 zone, WeatherData const* weatherChances);
+ Weather(Map* map, uint32 zone, WeatherData const* weatherChances);
~Weather() = default;
bool Update(uint32 diff);
@@ -71,6 +72,7 @@ public:
bool UpdateWeather();
void SendWeatherUpdateToPlayer(Player* player);
+ static void SendFineWeatherUpdateToPlayer(Player* player);
void SetWeather(WeatherType type, float grade);
/// For which zone is this weather?
@@ -79,6 +81,7 @@ public:
private:
[[nodiscard]] WeatherState GetWeatherState() const;
+ Map* m_map;
uint32 m_zone;
WeatherType m_type;
float m_grade;
diff --git a/src/server/game/Weather/WeatherMgr.cpp b/src/server/game/Weather/WeatherMgr.cpp
index f7b98911e4..bf4bd05e74 100644
--- a/src/server/game/Weather/WeatherMgr.cpp
+++ b/src/server/game/Weather/WeatherMgr.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
@@ -20,63 +20,25 @@
*/
#include "WeatherMgr.h"
+#include "Containers.h"
+#include "DatabaseEnv.h"
#include "Log.h"
-#include "MiscPackets.h"
#include "ObjectMgr.h"
-#include "Player.h"
+#include "QueryResult.h"
+#include "Timer.h"
#include "Weather.h"
-#include "WorldSession.h"
namespace WeatherMgr
{
namespace
{
- typedef std::unordered_map<uint32, std::unique_ptr<Weather>> WeatherMap;
- typedef std::unordered_map<uint32, WeatherData> WeatherZoneMap;
-
- WeatherMap m_weathers;
- WeatherZoneMap mWeatherZoneMap;
-
- WeatherData const* GetWeatherData(uint32 zone_id)
- {
- WeatherZoneMap::const_iterator itr = mWeatherZoneMap.find(zone_id);
- return (itr != mWeatherZoneMap.end()) ? &itr->second : nullptr;
- }
- }
-
- /// Find a Weather object by the given zoneid
- Weather* FindWeather(uint32 id)
- {
- WeatherMap::const_iterator itr = m_weathers.find(id);
- return (itr != m_weathers.end()) ? itr->second.get() : 0;
- }
-
- /// Remove a Weather object for the given zoneid
- void RemoveWeather(uint32 id)
- {
- // not called at the moment. Kept for completeness
- WeatherMap::iterator itr = m_weathers.find(id);
-
- if (itr != m_weathers.end())
- m_weathers.erase(itr);
+ std::unordered_map<uint32, WeatherData> _weatherData;
}
- /// Add a Weather object to the list
- Weather* AddWeather(uint32 zone_id)
+ WeatherData const* GetWeatherData(uint32 zone_id)
{
- WeatherData const* weatherChances = GetWeatherData(zone_id);
-
- // zone does not have weather, ignore
- if (!weatherChances)
- return nullptr;
-
- Weather* w = new Weather(zone_id, weatherChances);
- m_weathers[w->GetZone()].reset(w);
- w->ReGenerate();
- w->UpdateWeather();
-
- return w;
+ return Acore::Containers::MapGetValuePtr(_weatherData, zone_id);
}
void LoadWeatherData()
@@ -105,7 +67,7 @@ namespace WeatherMgr
uint32 zone_id = fields[0].Get<uint32>();
- WeatherData& wzc = mWeatherZoneMap[zone_id];
+ WeatherData& wzc = _weatherData[zone_id];
for (uint8 season = 0; season < WEATHER_SEASONS; ++season)
{
@@ -140,27 +102,4 @@ namespace WeatherMgr
LOG_INFO("server.loading", ">> Loaded {} Weather Definitions in {} ms", count, GetMSTimeDiffToNow(oldMSTime));
LOG_INFO("server.loading", " ");
}
-
- void SendFineWeatherUpdateToPlayer(Player* player)
- {
- WorldPackets::Misc::Weather weather(WEATHER_STATE_FINE);
- player->SendDirectMessage(weather.Write());
- }
-
- void Update(uint32 diff)
- {
- ///- Send an update signal to Weather objects
- WeatherMap::iterator itr, next;
- for (itr = m_weathers.begin(); itr != m_weathers.end(); itr = next)
- {
- next = itr;
- ++next;
-
- ///- and remove Weather objects for zones with no player
- // As interval > WorldTick
- if (!itr->second->Update(diff))
- m_weathers.erase(itr);
- }
- }
-
} // namespace
diff --git a/src/server/game/Weather/WeatherMgr.h b/src/server/game/Weather/WeatherMgr.h
index 046934d8b2..0d87a7cf4d 100644
--- a/src/server/game/Weather/WeatherMgr.h
+++ b/src/server/game/Weather/WeatherMgr.h
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
@@ -25,19 +25,12 @@
#include "Define.h"
class Weather;
-class Player;
+struct WeatherData;
namespace WeatherMgr
{
void LoadWeatherData();
-
- Weather* FindWeather(uint32 id);
- Weather* AddWeather(uint32 zone_id);
- void RemoveWeather(uint32 zone_id);
-
- void SendFineWeatherUpdateToPlayer(Player* player);
-
- void Update(uint32 diff);
+ WeatherData const* GetWeatherData(uint32 zone_id);
}
#endif
diff --git a/src/server/game/World/IWorld.h b/src/server/game/World/IWorld.h
index bf1af8cf8b..03e70e55c1 100644
--- a/src/server/game/World/IWorld.h
+++ b/src/server/game/World/IWorld.h
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/game/World/World.cpp b/src/server/game/World/World.cpp
index fd56951ede..83adc9e63d 100644
--- a/src/server/game/World/World.cpp
+++ b/src/server/game/World/World.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
@@ -884,7 +884,6 @@ void World::SetInitialWorldSettings()
stmt->SetData(2, GitRevision::GetFullVersion());
LoginDatabase.Execute(stmt);
- _timers[WUPDATE_WEATHERS].SetInterval(1 * IN_MILLISECONDS);
_timers[WUPDATE_UPTIME].SetInterval(getIntConfig(CONFIG_UPTIME_UPDATE)*MINUTE * IN_MILLISECONDS);
//Update "uptime" table based on configuration entry in minutes.
@@ -1186,13 +1185,6 @@ void World::Update(uint32 diff)
sWorldSessionMgr->UpdateSessions(diff);
}
- /// <li> Handle weather updates when the timer has passed
- if (_timers[WUPDATE_WEATHERS].Passed())
- {
- _timers[WUPDATE_WEATHERS].Reset();
- WeatherMgr::Update(uint32(_timers[WUPDATE_WEATHERS].GetInterval()));
- }
-
/// <li> Clean logs table
if (getIntConfig(CONFIG_LOGDB_CLEARTIME) > 0) // if not enabled, ignore the timer
{
diff --git a/src/server/game/World/World.h b/src/server/game/World/World.h
index 2f91696054..942665b4df 100644
--- a/src/server/game/World/World.h
+++ b/src/server/game/World/World.h
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
@@ -58,7 +58,6 @@ enum ShutdownExitCode : uint8
/// Timers for different object refresh rates
enum WorldTimers
{
- WUPDATE_WEATHERS,
WUPDATE_UPTIME,
WUPDATE_EVENTS,
WUPDATE_CLEANDB,
diff --git a/src/server/game/World/WorldConfig.cpp b/src/server/game/World/WorldConfig.cpp
index eedd61eaf4..6ae1b16cec 100644
--- a/src/server/game/World/WorldConfig.cpp
+++ b/src/server/game/World/WorldConfig.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
@@ -85,6 +85,9 @@ void WorldConfig::BuildConfigCache()
SetConfigValue<float>(RATE_BUYVALUE_ITEM_HEIRLOOM, "Rate.BuyValue.Item.Heirloom", 1.0f);
SetConfigValue<float>(RATE_REPUTATION_GAIN, "Rate.Reputation.Gain", 1.0f);
+ SetConfigValue<float>(RATE_REPUTATION_GAIN_AB, "Rate.Reputation.Gain.AB", 1.0f);
+ SetConfigValue<float>(RATE_REPUTATION_GAIN_AV, "Rate.Reputation.Gain.AV", 1.0f);
+ SetConfigValue<float>(RATE_REPUTATION_GAIN_WSG, "Rate.Reputation.Gain.WSG", 1.0f);
SetConfigValue<float>(RATE_REPUTATION_LOWLEVEL_KILL, "Rate.Reputation.LowLevel.Kill", 1.0f);
SetConfigValue<float>(RATE_REPUTATION_LOWLEVEL_QUEST, "Rate.Reputation.LowLevel.Quest", 1.0f);
SetConfigValue<float>(RATE_REPUTATION_RECRUIT_A_FRIEND_BONUS, "Rate.Reputation.RecruitAFriendBonus", 0.1f);
@@ -552,8 +555,8 @@ void WorldConfig::BuildConfigCache()
// Dungeon finder
SetConfigValue<uint32>(CONFIG_LFG_OPTIONSMASK, "DungeonFinder.OptionsMask", 5);
-
SetConfigValue<bool>(CONFIG_LFG_CAST_DESERTER, "DungeonFinder.CastDeserter", true);
+ SetConfigValue<bool>(CONFIG_LFG_ALLOW_COMPLETED, "DungeonFinder.AllowCompleted", true);
// DBC_ItemAttributes
SetConfigValue<bool>(CONFIG_DBC_ENFORCE_ITEM_ATTRIBUTES, "DBC.EnforceItemAttributes", true);
diff --git a/src/server/game/World/WorldConfig.h b/src/server/game/World/WorldConfig.h
index ce089b65a3..7a34aad36e 100644
--- a/src/server/game/World/WorldConfig.h
+++ b/src/server/game/World/WorldConfig.h
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
@@ -94,6 +94,7 @@ enum ServerConfigs
CONFIG_ALLOW_TICKETS,
CONFIG_DELETE_CHARACTER_TICKET_TRACE,
CONFIG_LFG_CAST_DESERTER,
+ CONFIG_LFG_ALLOW_COMPLETED,
CONFIG_DBC_ENFORCE_ITEM_ATTRIBUTES,
CONFIG_PRESERVE_CUSTOM_CHANNELS,
CONFIG_PDUMP_NO_PATHS,
@@ -437,6 +438,9 @@ enum ServerConfigs
RATE_XP_PET_NEXT_LEVEL,
RATE_REPAIRCOST,
RATE_REPUTATION_GAIN,
+ RATE_REPUTATION_GAIN_AB,
+ RATE_REPUTATION_GAIN_AV,
+ RATE_REPUTATION_GAIN_WSG,
RATE_REPUTATION_LOWLEVEL_KILL,
RATE_REPUTATION_LOWLEVEL_QUEST,
RATE_REPUTATION_RECRUIT_A_FRIEND_BONUS,
diff --git a/src/server/game/World/WorldState.cpp b/src/server/game/World/WorldState.cpp
index ebb11b8bfe..9613f8938f 100644
--- a/src/server/game/World/WorldState.cpp
+++ b/src/server/game/World/WorldState.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
@@ -852,7 +852,7 @@ void WorldState::HandleSunsReachSubPhaseTransition(int32 subPhaseMask, bool init
if (!initial)
{
std::lock_guard<std::mutex> guard(m_sunsReachData.m_sunsReachReclamationMutex);
- for (ObjectGuid& guid : m_sunsReachData.m_sunsReachReclamationPlayers)
+ for (ObjectGuid const& guid : m_sunsReachData.m_sunsReachReclamationPlayers)
if (Player* player = ObjectAccessor::FindPlayer(guid))
{
if (start)
@@ -1778,7 +1778,7 @@ bool WorldState::SummonPallid(Map* map, ScourgeInvasionData::CityAttack& zone, c
else
pathID = spawnLoc == 0 ? PATH_STORMWIND_KEEP : PATH_STORMWIND_TRADE_DISTRICT;
- pallid->GetMotionMaster()->MovePath(pathID, false);
+ pallid->GetMotionMaster()->MoveWaypoint(pathID, false);
sWorldState->SetPallidGuid(zone.zoneId, pallid->GetGUID());
}
diff --git a/src/server/game/World/WorldState.h b/src/server/game/World/WorldState.h
index b850010ac0..8a9142a0bd 100644
--- a/src/server/game/World/WorldState.h
+++ b/src/server/game/World/WorldState.h
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/game/World/WorldStateDefines.h b/src/server/game/World/WorldStateDefines.h
index a1ce0d11ea..d2d14d1020 100644
--- a/src/server/game/World/WorldStateDefines.h
+++ b/src/server/game/World/WorldStateDefines.h
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/scripts/Commands/PlayerCommand.cpp b/src/server/scripts/Commands/PlayerCommand.cpp
index d4fd06796e..a3a94426e8 100644
--- a/src/server/scripts/Commands/PlayerCommand.cpp
+++ b/src/server/scripts/Commands/PlayerCommand.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/scripts/Commands/PlayerCommand.h b/src/server/scripts/Commands/PlayerCommand.h
index 10410e9aca..95311c5fd7 100644
--- a/src/server/scripts/Commands/PlayerCommand.h
+++ b/src/server/scripts/Commands/PlayerCommand.h
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/scripts/Commands/cs_account.cpp b/src/server/scripts/Commands/cs_account.cpp
index 22859f0195..ad9f1f66e9 100644
--- a/src/server/scripts/Commands/cs_account.cpp
+++ b/src/server/scripts/Commands/cs_account.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/scripts/Commands/cs_achievement.cpp b/src/server/scripts/Commands/cs_achievement.cpp
index ccf1210023..be1ea77f21 100644
--- a/src/server/scripts/Commands/cs_achievement.cpp
+++ b/src/server/scripts/Commands/cs_achievement.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/scripts/Commands/cs_arena.cpp b/src/server/scripts/Commands/cs_arena.cpp
index 69fa60e562..4adb0f7363 100644
--- a/src/server/scripts/Commands/cs_arena.cpp
+++ b/src/server/scripts/Commands/cs_arena.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
@@ -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;
}
diff --git a/src/server/scripts/Commands/cs_bag.cpp b/src/server/scripts/Commands/cs_bag.cpp
index 874405dcf2..fd365b8757 100644
--- a/src/server/scripts/Commands/cs_bag.cpp
+++ b/src/server/scripts/Commands/cs_bag.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/scripts/Commands/cs_ban.cpp b/src/server/scripts/Commands/cs_ban.cpp
index 41ba77fdf2..466364be8f 100644
--- a/src/server/scripts/Commands/cs_ban.cpp
+++ b/src/server/scripts/Commands/cs_ban.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/scripts/Commands/cs_bf.cpp b/src/server/scripts/Commands/cs_bf.cpp
index 4345838ab0..84df1c0887 100644
--- a/src/server/scripts/Commands/cs_bf.cpp
+++ b/src/server/scripts/Commands/cs_bf.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/scripts/Commands/cs_cache.cpp b/src/server/scripts/Commands/cs_cache.cpp
index 396f4dd0b6..2e05f54720 100644
--- a/src/server/scripts/Commands/cs_cache.cpp
+++ b/src/server/scripts/Commands/cs_cache.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/scripts/Commands/cs_cast.cpp b/src/server/scripts/Commands/cs_cast.cpp
index 8cca45bc1b..654e2cf003 100644
--- a/src/server/scripts/Commands/cs_cast.cpp
+++ b/src/server/scripts/Commands/cs_cast.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/scripts/Commands/cs_character.cpp b/src/server/scripts/Commands/cs_character.cpp
index 43708ef3c3..11fc6d312d 100644
--- a/src/server/scripts/Commands/cs_character.cpp
+++ b/src/server/scripts/Commands/cs_character.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/scripts/Commands/cs_cheat.cpp b/src/server/scripts/Commands/cs_cheat.cpp
index 340176e196..84d22411e6 100644
--- a/src/server/scripts/Commands/cs_cheat.cpp
+++ b/src/server/scripts/Commands/cs_cheat.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
@@ -156,13 +156,13 @@ public:
if (enable)
{
handler->GetSession()->GetPlayer()->SetCommandStatusOn(CHEAT_WATERWALK);
- handler->GetSession()->GetPlayer()->SetMovement(MOVE_WATER_WALK); // ON
+ handler->GetSession()->GetPlayer()->SetWaterWalking(true); // ON
handler->SendSysMessage("Waterwalking is ON. You can walk on water.");
}
else
{
handler->GetSession()->GetPlayer()->SetCommandStatusOff(CHEAT_WATERWALK);
- handler->GetSession()->GetPlayer()->SetMovement(MOVE_LAND_WALK); // OFF
+ handler->GetSession()->GetPlayer()->SetWaterWalking(false); // OFF
handler->SendSysMessage("Waterwalking is OFF. You can't walk on water.");
}
diff --git a/src/server/scripts/Commands/cs_debug.cpp b/src/server/scripts/Commands/cs_debug.cpp
index 40bb89b93b..5c440f8a80 100644
--- a/src/server/scripts/Commands/cs_debug.cpp
+++ b/src/server/scripts/Commands/cs_debug.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
@@ -100,7 +100,8 @@ public:
{ "dummy", HandleDebugDummyCommand, SEC_ADMINISTRATOR, Console::No },
{ "mapdata", HandleDebugMapDataCommand, SEC_ADMINISTRATOR, Console::No },
{ "boundary", HandleDebugBoundaryCommand, SEC_ADMINISTRATOR, Console::No },
- { "visibilitydata", HandleDebugVisibilityDataCommand, SEC_ADMINISTRATOR, Console::No }
+ { "visibilitydata", HandleDebugVisibilityDataCommand, SEC_ADMINISTRATOR, Console::No },
+ { "zonestats", HandleDebugZoneStatsCommand, SEC_MODERATOR, Console::Yes}
};
static ChatCommandTable commandTable =
{
@@ -432,7 +433,7 @@ public:
}
data.hexlike();
- player->GetSession()->SendPacket(&data);
+ player->SendDirectMessage(&data);
handler->PSendSysMessage(LANG_COMMAND_OPCODESENT, data.GetOpcode(), unit->GetName());
return true;
}
@@ -1434,6 +1435,31 @@ public:
handler->PSendSysMessage("Zone wide visible objects in zone: {}", zoneWideVisibleObjectsInZone);
return true;
}
+
+ static bool HandleDebugZoneStatsCommand(ChatHandler* handler, Optional<PlayerIdentifier> playerTarget)
+ {
+ if (!playerTarget)
+ playerTarget = PlayerIdentifier::FromTargetOrSelf(handler);
+
+ if (!playerTarget)
+ {
+ handler->SendErrorMessage(LANG_PLAYER_NOT_FOUND);
+ return false;
+ }
+
+ Player* player = playerTarget->GetConnectedPlayer();
+
+ if (!player)
+ {
+ handler->SendErrorMessage(LANG_PLAYER_NOT_FOUND);
+ return false;
+ }
+
+ uint32 zoneId = player->GetZoneId();
+ AreaTableEntry const* zoneEntry = sAreaTableStore.LookupEntry(zoneId);
+ handler->PSendSysMessage("Player count in zone {} ({}): {}.", zoneId, (zoneEntry ? zoneEntry->area_name[LOCALE_enUS] : "<unknown>"), player->GetMap()->GetPlayerCountInZone(zoneId));
+ return true;
+ }
};
void AddSC_debug_commandscript()
diff --git a/src/server/scripts/Commands/cs_deserter.cpp b/src/server/scripts/Commands/cs_deserter.cpp
index 0daf4eab13..f6e3594037 100644
--- a/src/server/scripts/Commands/cs_deserter.cpp
+++ b/src/server/scripts/Commands/cs_deserter.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/scripts/Commands/cs_disable.cpp b/src/server/scripts/Commands/cs_disable.cpp
index 4a7fd669f1..f38e387d3e 100644
--- a/src/server/scripts/Commands/cs_disable.cpp
+++ b/src/server/scripts/Commands/cs_disable.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/scripts/Commands/cs_event.cpp b/src/server/scripts/Commands/cs_event.cpp
index 0f5264e8ce..1b101e0869 100644
--- a/src/server/scripts/Commands/cs_event.cpp
+++ b/src/server/scripts/Commands/cs_event.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/scripts/Commands/cs_gear.cpp b/src/server/scripts/Commands/cs_gear.cpp
index 5304ac8661..1916359d73 100644
--- a/src/server/scripts/Commands/cs_gear.cpp
+++ b/src/server/scripts/Commands/cs_gear.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/scripts/Commands/cs_gm.cpp b/src/server/scripts/Commands/cs_gm.cpp
index 302fb5803b..b1379ff240 100644
--- a/src/server/scripts/Commands/cs_gm.cpp
+++ b/src/server/scripts/Commands/cs_gm.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
@@ -92,24 +92,18 @@ public:
if (!target)
target = handler->GetSession()->GetPlayer();
- WorldPacket data(12);
-
bool canFly = false;
if (enable.has_value())
{
- data.SetOpcode(*enable ? SMSG_MOVE_SET_CAN_FLY : SMSG_MOVE_UNSET_CAN_FLY);
canFly = *enable;
+ target->SetCanFly(canFly);
}
else
{
- canFly = handler->GetSession()->GetPlayer()->CanFly();
- data.SetOpcode(canFly ? SMSG_MOVE_UNSET_CAN_FLY : SMSG_MOVE_SET_CAN_FLY);
- canFly = !canFly;
+ canFly = !handler->GetSession()->GetPlayer()->CanFly();
+ target->SetCanFly(canFly);
}
- data << target->GetPackGUID();
- data << uint32(0); // unknown
- target->SendMessageToSet(&data, true);
handler->PSendSysMessage(LANG_COMMAND_FLYMODE_STATUS, handler->GetNameLink(target), canFly ? "on" : "off");
return true;
}
diff --git a/src/server/scripts/Commands/cs_go.cpp b/src/server/scripts/Commands/cs_go.cpp
index 0e6bca4220..2e59bf7cfd 100644
--- a/src/server/scripts/Commands/cs_go.cpp
+++ b/src/server/scripts/Commands/cs_go.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
@@ -137,10 +137,7 @@ public:
// Make sure we don't pass double quotes into the SQL query. Otherwise it causes a MySQL error
std::string str = name.data(); // Making subtractions to the last character does not with in string_view
- if (str.front() == '"')
- str = str.substr(1);
- if (str.back() == '"')
- str = str.substr(0, str.size() - 1);
+ WorldDatabase.EscapeString(str);
QueryResult result = WorldDatabase.Query("SELECT entry FROM creature_template WHERE name = \"{}\" LIMIT 1", str);
if (!result)
diff --git a/src/server/scripts/Commands/cs_gobject.cpp b/src/server/scripts/Commands/cs_gobject.cpp
index b3f9fa9596..e4f1615b9e 100644
--- a/src/server/scripts/Commands/cs_gobject.cpp
+++ b/src/server/scripts/Commands/cs_gobject.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/scripts/Commands/cs_group.cpp b/src/server/scripts/Commands/cs_group.cpp
index 53d172c76c..7be8d6674f 100644
--- a/src/server/scripts/Commands/cs_group.cpp
+++ b/src/server/scripts/Commands/cs_group.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/scripts/Commands/cs_guild.cpp b/src/server/scripts/Commands/cs_guild.cpp
index 9075f2db15..45c55ddf0e 100644
--- a/src/server/scripts/Commands/cs_guild.cpp
+++ b/src/server/scripts/Commands/cs_guild.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/scripts/Commands/cs_honor.cpp b/src/server/scripts/Commands/cs_honor.cpp
index 60642d5d2f..32cbb26a28 100644
--- a/src/server/scripts/Commands/cs_honor.cpp
+++ b/src/server/scripts/Commands/cs_honor.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/scripts/Commands/cs_instance.cpp b/src/server/scripts/Commands/cs_instance.cpp
index dfa9715717..a6ee3bc5ce 100644
--- a/src/server/scripts/Commands/cs_instance.cpp
+++ b/src/server/scripts/Commands/cs_instance.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/scripts/Commands/cs_inventory.cpp b/src/server/scripts/Commands/cs_inventory.cpp
index 09dc883811..50490bb625 100644
--- a/src/server/scripts/Commands/cs_inventory.cpp
+++ b/src/server/scripts/Commands/cs_inventory.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/scripts/Commands/cs_item.cpp b/src/server/scripts/Commands/cs_item.cpp
index fa4dc80961..711f2532e7 100644
--- a/src/server/scripts/Commands/cs_item.cpp
+++ b/src/server/scripts/Commands/cs_item.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/scripts/Commands/cs_learn.cpp b/src/server/scripts/Commands/cs_learn.cpp
index fab2c75bc5..1d1825fa84 100644
--- a/src/server/scripts/Commands/cs_learn.cpp
+++ b/src/server/scripts/Commands/cs_learn.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/scripts/Commands/cs_lfg.cpp b/src/server/scripts/Commands/cs_lfg.cpp
index e984dbb651..bfdee42883 100644
--- a/src/server/scripts/Commands/cs_lfg.cpp
+++ b/src/server/scripts/Commands/cs_lfg.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/scripts/Commands/cs_list.cpp b/src/server/scripts/Commands/cs_list.cpp
index 57558cb66d..8778d8af75 100644
--- a/src/server/scripts/Commands/cs_list.cpp
+++ b/src/server/scripts/Commands/cs_list.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/scripts/Commands/cs_lookup.cpp b/src/server/scripts/Commands/cs_lookup.cpp
index d24fdfa0e9..5dd54c3ebe 100644
--- a/src/server/scripts/Commands/cs_lookup.cpp
+++ b/src/server/scripts/Commands/cs_lookup.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/scripts/Commands/cs_message.cpp b/src/server/scripts/Commands/cs_message.cpp
index b5183781f1..b6f051ee89 100644
--- a/src/server/scripts/Commands/cs_message.cpp
+++ b/src/server/scripts/Commands/cs_message.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/scripts/Commands/cs_misc.cpp b/src/server/scripts/Commands/cs_misc.cpp
index 41546214ce..80201c9696 100644
--- a/src/server/scripts/Commands/cs_misc.cpp
+++ b/src/server/scripts/Commands/cs_misc.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
@@ -193,7 +193,9 @@ public:
{ "skirmish", HandleSkirmishCommand, SEC_ADMINISTRATOR, Console::No },
{ "mailbox", HandleMailBoxCommand, SEC_MODERATOR, Console::No },
{ "string", HandleStringCommand, SEC_GAMEMASTER, Console::No },
- { "opendoor", HandleOpenDoorCommand, SEC_GAMEMASTER, Console::No }
+ { "opendoor", HandleOpenDoorCommand, SEC_GAMEMASTER, Console::No },
+ { "bm", HandleBMCommand, SEC_GAMEMASTER, Console::No },
+ { "packetlog", HandlePacketLog, SEC_GAMEMASTER, Console::No }
};
return commandTable;
@@ -485,7 +487,7 @@ public:
uint32 queueSlot = 0;
WorldPacket data;
sBattlegroundMgr->BuildBattlegroundStatusPacket(&data, bg, queueSlot, STATUS_IN_PROGRESS, 0, bg->GetStartTime(), bg->GetArenaType(), teamId);
- player->GetSession()->SendPacket(&data);
+ player->SendDirectMessage(&data);
// Remove from LFG queues
sLFGMgr->LeaveAllLfgQueues(player->GetGUID(), false);
@@ -504,6 +506,7 @@ public:
if (!session)
{
+ handler->SendErrorMessage(LANG_USE_BOL);
return false;
}
@@ -537,9 +540,6 @@ public:
SetCommentatorMod(false);
return true;
}
-
- handler->SendErrorMessage(LANG_USE_BOL);
- return false;
}
static bool HandleDevCommand(ChatHandler* handler, Optional<bool> enableArg)
@@ -548,6 +548,7 @@ public:
if (!session)
{
+ handler->SendErrorMessage(LANG_USE_BOL);
return false;
}
@@ -582,9 +583,6 @@ public:
SetDevMod(false);
return true;
}
-
- handler->SendErrorMessage(LANG_USE_BOL);
- return false;
}
static bool HandleGPSCommand(ChatHandler* handler, Optional<PlayerIdentifier> target)
@@ -1895,13 +1893,7 @@ public:
Player* player = handler->GetSession()->GetPlayer();
uint32 zoneid = player->GetZoneId();
- Weather* weather = WeatherMgr::FindWeather(zoneid);
-
- if (!weather)
- {
- weather = WeatherMgr::AddWeather(zoneid);
- }
-
+ Weather* weather = player->GetMap()->GetOrGenerateZoneDefaultWeather(zoneid);
if (!weather)
{
handler->SendErrorMessage(LANG_NO_WEATHER);
@@ -3075,6 +3067,75 @@ public:
handler->SendErrorMessage(LANG_CMD_NO_DOOR_FOUND, range ? *range : 5.0f);
return false;
}
+
+ static bool HandleBMCommand(ChatHandler* handler, Optional<bool> enableArg)
+ {
+ WorldSession* session = handler->GetSession();
+
+ if (!session)
+ return false;
+
+ auto SetBMMod = [&](bool enable)
+ {
+ char const* enabled = "ON";
+ char const* disabled = "OFF";
+ handler->SendNotification(LANG_COMMAND_BEASTMASTER_MODE, enable ? enabled : disabled);
+
+ session->GetPlayer()->SetBeastMaster(enable);
+ };
+
+ if (!enableArg)
+ {
+ if (!AccountMgr::IsPlayerAccount(session->GetSecurity()) && session->GetPlayer()->IsDeveloper())
+ SetBMMod(true);
+ else
+ SetBMMod(false);
+
+ return true;
+ }
+
+ if (*enableArg)
+ {
+ SetBMMod(true);
+ return true;
+ }
+ else
+ {
+ SetBMMod(false);
+ return true;
+ }
+
+ handler->SendErrorMessage(LANG_USE_BOL);
+ return false;
+ }
+
+ static bool HandlePacketLog(ChatHandler* handler, Optional<bool> enableArg)
+ {
+ WorldSession* session = handler->GetSession();
+
+ if (!session)
+ return false;
+
+ if (enableArg)
+ {
+ if (*enableArg)
+ {
+ session->SetPacketLogging(true);
+ handler->SendNotification(LANG_ON);
+ return true;
+ }
+ else
+ {
+ session->SetPacketLogging(false);
+ handler->SendNotification(LANG_OFF);
+ return true;
+ }
+ }
+
+ handler->SendErrorMessage(LANG_USE_BOL);
+ return false;
+ }
+
};
void AddSC_misc_commandscript()
diff --git a/src/server/scripts/Commands/cs_mmaps.cpp b/src/server/scripts/Commands/cs_mmaps.cpp
index 20b9fadff5..f41c9cb1e5 100644
--- a/src/server/scripts/Commands/cs_mmaps.cpp
+++ b/src/server/scripts/Commands/cs_mmaps.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
@@ -29,6 +29,7 @@
#include "GridNotifiers.h"
#include "GridNotifiersImpl.h"
#include "MMapFactory.h"
+#include "MMapMgr.h"
#include "Map.h"
#include "PathGenerator.h"
#include "Player.h"
@@ -136,6 +137,40 @@ public:
GridCoord const gridCoord = Acore::ComputeGridCoord(player->GetPositionX(), player->GetPositionY());
handler->PSendSysMessage("{}{}{}.mmtile", player->GetMapId(), gridCoord.x_coord, gridCoord.y_coord);
+
+ std::string fileName = Acore::StringFormat(MMAP::TILE_FILE_NAME_FORMAT, sConfigMgr->GetOption<std::string>("DataDir", "."), player->GetMapId(), gridCoord.x_coord, gridCoord.y_coord);
+ FILE* file = fopen(fileName.c_str(), "rb");
+ if (!file)
+ {
+ LOG_DEBUG("maps", "MMAP:loadMap: Could not open mmtile file '{}'", fileName);
+ return false;
+ }
+
+ // read header
+ MmapTileHeader fileHeader;
+ if (fread(&fileHeader, sizeof(MmapTileHeader), 1, file) != 1 || fileHeader.mmapMagic != MMAP_MAGIC)
+ {
+ LOG_ERROR("maps", "MMAP:loadMap: Bad header in mmap {:03}{:02}{:02}.mmtile", player->GetMapId(), gridCoord.x_coord, gridCoord.y_coord);
+ fclose(file);
+ return false;
+ }
+ fclose(file);
+ handler->PSendSysMessage("Recast config used:");
+ handler->PSendSysMessage("- walkableSlopeAngle: {}", fileHeader.recastConfig.walkableSlopeAngle);
+
+ const float cellHeight = fileHeader.recastConfig.cellSizeVertical;
+ handler->PSendSysMessage("- walkableHeight: {} ({} units)", fileHeader.recastConfig.walkableHeight * cellHeight, fileHeader.recastConfig.walkableHeight);
+ handler->PSendSysMessage("- walkableClimb: {} ({} units)", fileHeader.recastConfig.walkableClimb * cellHeight, fileHeader.recastConfig.walkableClimb);
+ handler->PSendSysMessage("- walkableRadius: {} ({} units)", fileHeader.recastConfig.walkableRadius * cellHeight, fileHeader.recastConfig.walkableRadius);
+
+ handler->PSendSysMessage("- maxSimplificationError: {}", fileHeader.recastConfig.maxSimplificationError);
+ handler->PSendSysMessage("- vertexPerMapEdge: {}", fileHeader.recastConfig.vertexPerMapEdge);
+ handler->PSendSysMessage("- vertexPerTileEdge: {}", fileHeader.recastConfig.vertexPerTileEdge);
+ handler->PSendSysMessage("- tilesPerMapEdge: {}", fileHeader.recastConfig.tilesPerMapEdge);
+ handler->PSendSysMessage("- baseUnitDim: {}", fileHeader.recastConfig.baseUnitDim);
+ handler->PSendSysMessage("- cellSizeHorizontal: {}", fileHeader.recastConfig.cellSizeHorizontal);
+ handler->PSendSysMessage("- cellSizeVertical: {}", fileHeader.recastConfig.cellSizeVertical);
+
handler->PSendSysMessage("gridloc [{}, {}]", gridCoord.x_coord, gridCoord.y_coord);
// calculate navmesh tile location
diff --git a/src/server/scripts/Commands/cs_modify.cpp b/src/server/scripts/Commands/cs_modify.cpp
index 733f88a7a6..c2b2f6d808 100644
--- a/src/server/scripts/Commands/cs_modify.cpp
+++ b/src/server/scripts/Commands/cs_modify.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
@@ -328,7 +328,7 @@ public:
data << uint8(op);
data << uint16(val);
data << uint16(mark ? *mark : 65535);
- target->GetSession()->SendPacket(&data);
+ target->SendDirectMessage(&data);
return true;
}
@@ -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/Commands/cs_npc.cpp b/src/server/scripts/Commands/cs_npc.cpp
index 9bd0f4d970..09cc7dd39a 100644
--- a/src/server/scripts/Commands/cs_npc.cpp
+++ b/src/server/scripts/Commands/cs_npc.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/scripts/Commands/cs_pet.cpp b/src/server/scripts/Commands/cs_pet.cpp
index 22b74bfa38..d2c8d5b1d6 100644
--- a/src/server/scripts/Commands/cs_pet.cpp
+++ b/src/server/scripts/Commands/cs_pet.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/scripts/Commands/cs_player.cpp b/src/server/scripts/Commands/cs_player.cpp
index acaa520cf2..240db01a06 100644
--- a/src/server/scripts/Commands/cs_player.cpp
+++ b/src/server/scripts/Commands/cs_player.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/scripts/Commands/cs_player_settings.cpp b/src/server/scripts/Commands/cs_player_settings.cpp
index 01ec08fe56..06f038b91c 100644
--- a/src/server/scripts/Commands/cs_player_settings.cpp
+++ b/src/server/scripts/Commands/cs_player_settings.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/scripts/Commands/cs_quest.cpp b/src/server/scripts/Commands/cs_quest.cpp
index 401c4c059d..9730b32210 100644
--- a/src/server/scripts/Commands/cs_quest.cpp
+++ b/src/server/scripts/Commands/cs_quest.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
@@ -37,6 +37,7 @@ public:
{ "complete", HandleQuestComplete, SEC_GAMEMASTER, Console::Yes },
{ "remove", HandleQuestRemove, SEC_GAMEMASTER, Console::Yes },
{ "reward", HandleQuestReward, SEC_GAMEMASTER, Console::Yes },
+ { "status", HandleQuestStatus, SEC_GAMEMASTER, Console::Yes },
};
static ChatCommandTable commandTable =
{
@@ -724,6 +725,53 @@ public:
handler->SetSentErrorMessage(false);
return true;
}
+
+ static bool HandleQuestStatus(ChatHandler* handler, Quest const* quest, Optional<PlayerIdentifier> playerTarget)
+ {
+ if (!playerTarget)
+ playerTarget = PlayerIdentifier::FromTargetOrSelf(handler);
+
+ if (!playerTarget)
+ {
+ handler->SendErrorMessage(LANG_PLAYER_NOT_FOUND);
+ return false;
+ }
+
+ uint32 entry = quest->GetQuestId();
+ std::string status;
+ if (Player* player = playerTarget->GetConnectedPlayer())
+ {
+ QuestStatus qs = player->GetQuestStatus(entry);
+ switch (qs)
+ {
+ case QUEST_STATUS_NONE:
+ status = "Not Taken";
+ break;
+ case QUEST_STATUS_COMPLETE:
+ status = "Complete";
+ break;
+ case QUEST_STATUS_INCOMPLETE:
+ status = "Incomplete";
+ break;
+ case QUEST_STATUS_FAILED:
+ status = "Failed";
+ break;
+ case QUEST_STATUS_REWARDED:
+ status = "Rewarded";
+ break;
+ default:
+ status = "Unknown";
+ break;
+ }
+
+ handler->PSendSysMessage(LANG_CMD_QUEST_STATUS, quest->GetTitle(), entry, status);
+
+ if (!player->CanTakeQuest(quest, true))
+ handler->PSendSysMessage(LANG_CMD_QUEST_UNAVAILABLE, entry, status);
+ }
+
+ return true;
+ }
};
void AddSC_quest_commandscript()
diff --git a/src/server/scripts/Commands/cs_reload.cpp b/src/server/scripts/Commands/cs_reload.cpp
index e66067b6da..4a58d73b92 100644
--- a/src/server/scripts/Commands/cs_reload.cpp
+++ b/src/server/scripts/Commands/cs_reload.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/scripts/Commands/cs_reset.cpp b/src/server/scripts/Commands/cs_reset.cpp
index 3b4d4deb84..e99039bbac 100644
--- a/src/server/scripts/Commands/cs_reset.cpp
+++ b/src/server/scripts/Commands/cs_reset.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/scripts/Commands/cs_script_loader.cpp b/src/server/scripts/Commands/cs_script_loader.cpp
index eeb4eb4f65..d07ab959f1 100644
--- a/src/server/scripts/Commands/cs_script_loader.cpp
+++ b/src/server/scripts/Commands/cs_script_loader.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/scripts/Commands/cs_send.cpp b/src/server/scripts/Commands/cs_send.cpp
index 2874976ac0..ee74a22a0b 100644
--- a/src/server/scripts/Commands/cs_send.cpp
+++ b/src/server/scripts/Commands/cs_send.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/scripts/Commands/cs_server.cpp b/src/server/scripts/Commands/cs_server.cpp
index 9878fced92..98bfbbac3d 100644
--- a/src/server/scripts/Commands/cs_server.cpp
+++ b/src/server/scripts/Commands/cs_server.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/scripts/Commands/cs_spectator.cpp b/src/server/scripts/Commands/cs_spectator.cpp
index 4819e0b010..86fbf64135 100644
--- a/src/server/scripts/Commands/cs_spectator.cpp
+++ b/src/server/scripts/Commands/cs_spectator.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/scripts/Commands/cs_tele.cpp b/src/server/scripts/Commands/cs_tele.cpp
index 8f8c542b0c..aed43e5030 100644
--- a/src/server/scripts/Commands/cs_tele.cpp
+++ b/src/server/scripts/Commands/cs_tele.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/scripts/Commands/cs_ticket.cpp b/src/server/scripts/Commands/cs_ticket.cpp
index 84d5db8cbc..0cd174b702 100644
--- a/src/server/scripts/Commands/cs_ticket.cpp
+++ b/src/server/scripts/Commands/cs_ticket.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
@@ -146,7 +146,7 @@ public:
{
WorldPacket data(SMSG_GMTICKET_DELETETICKET, 4);
data << uint32(GMTICKET_RESPONSE_TICKET_DELETED);
- submitter->GetSession()->SendPacket(&data);
+ submitter->SendDirectMessage(&data);
ChatHandler(submitter->GetSession()).SendSysMessage(LANG_TICKET_CLOSED);
}
return true;
@@ -259,7 +259,7 @@ public:
// Force abandon ticket
WorldPacket data(SMSG_GMTICKET_DELETETICKET, 4);
data << uint32(GMTICKET_RESPONSE_TICKET_DELETED);
- player->GetSession()->SendPacket(&data);
+ player->SendDirectMessage(&data);
}
return true;
@@ -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)
diff --git a/src/server/scripts/Commands/cs_titles.cpp b/src/server/scripts/Commands/cs_titles.cpp
index c35ad7d2ad..51c254724e 100644
--- a/src/server/scripts/Commands/cs_titles.cpp
+++ b/src/server/scripts/Commands/cs_titles.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/scripts/Commands/cs_worldstate.cpp b/src/server/scripts/Commands/cs_worldstate.cpp
index facd34784f..e6d9c833dd 100644
--- a/src/server/scripts/Commands/cs_worldstate.cpp
+++ b/src/server/scripts/Commands/cs_worldstate.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/scripts/Commands/cs_wp.cpp b/src/server/scripts/Commands/cs_wp.cpp
index d0d4c1cf1c..b4b80686a4 100644
--- a/src/server/scripts/Commands/cs_wp.cpp
+++ b/src/server/scripts/Commands/cs_wp.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/scripts/Custom/custom_script_loader.cpp b/src/server/scripts/Custom/custom_script_loader.cpp
index be48c89cbb..8f381e96f2 100644
--- a/src/server/scripts/Custom/custom_script_loader.cpp
+++ b/src/server/scripts/Custom/custom_script_loader.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/scripts/EasternKingdoms/AlteracValley/alterac_valley.cpp b/src/server/scripts/EasternKingdoms/AlteracValley/alterac_valley.cpp
index bd71099346..792506086c 100644
--- a/src/server/scripts/EasternKingdoms/AlteracValley/alterac_valley.cpp
+++ b/src/server/scripts/EasternKingdoms/AlteracValley/alterac_valley.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
@@ -213,7 +213,7 @@ public:
ScriptedAI::EnterEvadeMode();
return;
}
- events.ScheduleEvent(EVENT_CHECK_RESET, 5000);
+ events.ScheduleEvent(EVENT_CHECK_RESET, 5s);
break;
}
}
diff --git a/src/server/scripts/EasternKingdoms/AlteracValley/boss_balinda.cpp b/src/server/scripts/EasternKingdoms/AlteracValley/boss_balinda.cpp
index a7a749c976..7020a484fc 100644
--- a/src/server/scripts/EasternKingdoms/AlteracValley/boss_balinda.cpp
+++ b/src/server/scripts/EasternKingdoms/AlteracValley/boss_balinda.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/scripts/EasternKingdoms/AlteracValley/boss_drekthar.cpp b/src/server/scripts/EasternKingdoms/AlteracValley/boss_drekthar.cpp
index fddb202e87..03d5ccb926 100644
--- a/src/server/scripts/EasternKingdoms/AlteracValley/boss_drekthar.cpp
+++ b/src/server/scripts/EasternKingdoms/AlteracValley/boss_drekthar.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/scripts/EasternKingdoms/AlteracValley/boss_galvangar.cpp b/src/server/scripts/EasternKingdoms/AlteracValley/boss_galvangar.cpp
index 6f4544ae1d..780c7185bc 100644
--- a/src/server/scripts/EasternKingdoms/AlteracValley/boss_galvangar.cpp
+++ b/src/server/scripts/EasternKingdoms/AlteracValley/boss_galvangar.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/scripts/EasternKingdoms/AlteracValley/boss_vanndar.cpp b/src/server/scripts/EasternKingdoms/AlteracValley/boss_vanndar.cpp
index bf868c78ca..6e3b7c3ae4 100644
--- a/src/server/scripts/EasternKingdoms/AlteracValley/boss_vanndar.cpp
+++ b/src/server/scripts/EasternKingdoms/AlteracValley/boss_vanndar.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockDepths/blackrock_depths.cpp b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockDepths/blackrock_depths.cpp
index 214b923550..14ab0e15ee 100644
--- a/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockDepths/blackrock_depths.cpp
+++ b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockDepths/blackrock_depths.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
@@ -27,12 +27,13 @@
enum IronhandData
{
- IRONHAND_FLAMES_TIMER = 16000,
- IRONHAND_FLAMES_TIMER_RAND = 3000,
IRONHAND_N_GROUPS = 3,
SPELL_GOUT_OF_FLAMES = 15529
};
+constexpr Milliseconds IRONHAND_FLAMES_TIMER = 16s;
+constexpr Milliseconds IRONHAND_FLAMES_TIMER_RAND = 3s;
+
class go_shadowforge_brazier : public GameObjectScript
{
public:
@@ -110,7 +111,7 @@ public:
{
case SPELL_GOUT_OF_FLAMES:
DoCast(SPELL_GOUT_OF_FLAMES);
- events.RescheduleEvent(SPELL_GOUT_OF_FLAMES, urand(IRONHAND_FLAMES_TIMER - IRONHAND_FLAMES_TIMER_RAND, IRONHAND_FLAMES_TIMER + IRONHAND_FLAMES_TIMER_RAND));
+ events.RescheduleEvent(SPELL_GOUT_OF_FLAMES, IRONHAND_FLAMES_TIMER - IRONHAND_FLAMES_TIMER_RAND, IRONHAND_FLAMES_TIMER + IRONHAND_FLAMES_TIMER_RAND);
break;
default:
break;
@@ -358,7 +359,8 @@ public:
case 0:
Talk(SAY_TEXT5);
HandleGameObject(DATA_ARENA4, false);
- Start(false, false);
+ me->SetWalk(true);
+ Start(false);
eventTimer = 0;
break;
case 1:
@@ -603,7 +605,10 @@ public:
creature->CastSpell(creature, SPELL_DRUNKEN_RAGE, false);
if (npc_escortAI* escortAI = CAST_AI(npc_rocknot::npc_rocknotAI, creature->AI()))
- escortAI->Start(false, false);
+ {
+ creature->SetWalk(true);
+ escortAI->Start(false);
+ }
}
}
diff --git a/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockDepths/blackrock_depths.h b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockDepths/blackrock_depths.h
index 0ba8145c30..82c5870495 100644
--- a/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockDepths/blackrock_depths.h
+++ b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockDepths/blackrock_depths.h
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockDepths/boss_ambassador_flamelash.cpp b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockDepths/boss_ambassador_flamelash.cpp
index 71025059c6..e60657290c 100644
--- a/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockDepths/boss_ambassador_flamelash.cpp
+++ b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockDepths/boss_ambassador_flamelash.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockDepths/boss_anubshiah.cpp b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockDepths/boss_anubshiah.cpp
index dadfb58c60..f706bf5a0c 100644
--- a/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockDepths/boss_anubshiah.cpp
+++ b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockDepths/boss_anubshiah.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
@@ -28,14 +28,11 @@ enum Spells
SPELL_ENVELOPING_WEB = 15471
};
-enum Timers
-{
- TIMER_SHADOWBOLT = 7000,
- TIMER_CURSE_TONGUES = 24000,
- TIMER_CURSE_WEAKNESS = 12000,
- TIMER_DEMON_ARMOR = 3000, // virtually only cast once
- TIMER_ENVELOPING_WEB = 16000
-};
+constexpr Milliseconds TIMER_SHADOWBOLT = 7s;
+constexpr Milliseconds TIMER_CURSE_TONGUES = 24s;
+constexpr Milliseconds TIMER_CURSE_WEAKNESS = 12s;
+constexpr Milliseconds TIMER_DEMON_ARMOR = 3s; //virtually only cast once
+constexpr Milliseconds TIMER_ENVELOPING_WEB = 16s;
class boss_anubshiah : public CreatureScript
{
@@ -54,11 +51,11 @@ public:
void JustEngagedWith(Unit* /*who*/) override
{
_JustEngagedWith();
- events.ScheduleEvent(SPELL_SHADOWBOLT, 0.2 * (int)TIMER_SHADOWBOLT);
- events.ScheduleEvent(SPELL_CURSE_TONGUES, 0.2 * (int)TIMER_CURSE_TONGUES);
- events.ScheduleEvent(SPELL_CURSE_WEAKNESS, 0.2 * (int)TIMER_CURSE_WEAKNESS);
- events.ScheduleEvent(SPELL_DEMON_ARMOR, 0.2 * (int)TIMER_DEMON_ARMOR);
- events.ScheduleEvent(SPELL_ENVELOPING_WEB, 0.2 * (int)TIMER_ENVELOPING_WEB);
+ events.ScheduleEvent(SPELL_SHADOWBOLT, TIMER_SHADOWBOLT / 5);
+ events.ScheduleEvent(SPELL_CURSE_TONGUES, TIMER_CURSE_TONGUES / 5);
+ events.ScheduleEvent(SPELL_CURSE_WEAKNESS, TIMER_CURSE_WEAKNESS / 5);
+ events.ScheduleEvent(SPELL_DEMON_ARMOR, TIMER_DEMON_ARMOR / 5);
+ events.ScheduleEvent(SPELL_ENVELOPING_WEB, TIMER_ENVELOPING_WEB / 5);
}
void UpdateAI(uint32 diff) override
@@ -80,21 +77,21 @@ public:
{
case SPELL_SHADOWBOLT:
DoCastVictim(SPELL_SHADOWBOLT);
- events.ScheduleEvent(SPELL_SHADOWBOLT, urand(TIMER_SHADOWBOLT - 2000, TIMER_SHADOWBOLT + 2000));
+ events.ScheduleEvent(SPELL_SHADOWBOLT, TIMER_SHADOWBOLT - 2s, TIMER_SHADOWBOLT + 2s);
break;
case SPELL_CURSE_TONGUES:
if (Unit* target = SelectTarget(SelectTargetMethod::Random, 0, 100, true))
{
DoCast(target, SPELL_CURSE_TONGUES);
}
- events.ScheduleEvent(SPELL_CURSE_TONGUES, urand(TIMER_CURSE_TONGUES - 2000, TIMER_CURSE_TONGUES + 2000));
+ events.ScheduleEvent(SPELL_CURSE_TONGUES, TIMER_CURSE_TONGUES - 2s, TIMER_CURSE_TONGUES + 2s);
break;
case SPELL_CURSE_WEAKNESS:
if (Unit* target = SelectTarget(SelectTargetMethod::Random, 0, 100, true))
{
DoCast(target, SPELL_CURSE_WEAKNESS);
}
- events.ScheduleEvent(SPELL_CURSE_WEAKNESS, urand(TIMER_CURSE_WEAKNESS - 2000, TIMER_CURSE_WEAKNESS + 2000));
+ events.ScheduleEvent(SPELL_CURSE_WEAKNESS, TIMER_CURSE_WEAKNESS - 2s, TIMER_CURSE_WEAKNESS + 2s);
break;
case SPELL_DEMON_ARMOR:
DoCast(me, SPELL_DEMON_ARMOR);
@@ -103,7 +100,7 @@ public:
case SPELL_ENVELOPING_WEB:
if (Unit* target = SelectTarget(SelectTargetMethod::Random, 0, 100, true))
DoCast(target, SPELL_ENVELOPING_WEB);
- events.ScheduleEvent(SPELL_ENVELOPING_WEB, urand(TIMER_ENVELOPING_WEB - 2000, TIMER_ENVELOPING_WEB + 2000));
+ events.ScheduleEvent(SPELL_ENVELOPING_WEB, TIMER_ENVELOPING_WEB - 2s, TIMER_ENVELOPING_WEB + 2s);
break;
default:
break;
diff --git a/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockDepths/boss_emperor_dagran_thaurissan.cpp b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockDepths/boss_emperor_dagran_thaurissan.cpp
index 1d0f481454..cb97adeb7b 100644
--- a/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockDepths/boss_emperor_dagran_thaurissan.cpp
+++ b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockDepths/boss_emperor_dagran_thaurissan.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockDepths/boss_eviscerator.cpp b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockDepths/boss_eviscerator.cpp
index 5d12ea5ac1..3952b9f9cd 100644
--- a/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockDepths/boss_eviscerator.cpp
+++ b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockDepths/boss_eviscerator.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
@@ -26,12 +26,9 @@ enum Spells
SPELL_SHIELD = 7121
};
-enum Timers
-{
- TIMER_SHADOWBOLT_VOLLEY = 7000,
- TIMER_REND = 20000,
- TIMER_SHIELD = 12000
-};
+constexpr Milliseconds TIMER_SHADOWBOLT_VOLLEY = 7s;
+constexpr Milliseconds TIMER_REND = 20s;
+constexpr Milliseconds TIMER_SHIELD = 12s;
class boss_eviscerator : public CreatureScript
{
@@ -52,9 +49,9 @@ public:
void JustEngagedWith(Unit* /*who*/) override
{
_JustEngagedWith();
- events.ScheduleEvent(SPELL_SHADOWBOLT_VOLLEY, 0.2 * (int)TIMER_SHADOWBOLT_VOLLEY);
- events.ScheduleEvent(SPELL_REND, 0.2 * (int) TIMER_REND);
- events.ScheduleEvent(SPELL_SHIELD, 0.2 * (int) TIMER_SHIELD);
+ events.ScheduleEvent(SPELL_SHADOWBOLT_VOLLEY, TIMER_SHADOWBOLT_VOLLEY / 5);
+ events.ScheduleEvent(SPELL_REND, TIMER_REND / 5);
+ events.ScheduleEvent(SPELL_SHIELD, TIMER_SHIELD / 5);
}
void DamageTaken(Unit* /* doneBy */, uint32& /* damage */, DamageEffectType /* damagetype */, SpellSchoolMask damageSchoolMask) override
@@ -86,11 +83,11 @@ public:
{
case SPELL_SHADOWBOLT_VOLLEY:
DoCastVictim(SPELL_SHADOWBOLT_VOLLEY);
- events.ScheduleEvent(SPELL_SHADOWBOLT_VOLLEY, urand(TIMER_SHADOWBOLT_VOLLEY - 2000, TIMER_SHADOWBOLT_VOLLEY + 2000));
+ events.ScheduleEvent(SPELL_SHADOWBOLT_VOLLEY, TIMER_SHADOWBOLT_VOLLEY - 2s, TIMER_SHADOWBOLT_VOLLEY + 2s);
break;
case SPELL_REND:
DoCastVictim(SPELL_REND);
- events.ScheduleEvent(SPELL_REND, urand(TIMER_REND - 2000, TIMER_REND + 2000));
+ events.ScheduleEvent(SPELL_REND, TIMER_REND - 2s, TIMER_REND + 2s);
break;
case SPELL_SHIELD:
SpellShieldReady = true;
diff --git a/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockDepths/boss_general_angerforge.cpp b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockDepths/boss_general_angerforge.cpp
index df2d91e836..d04b97ecaf 100644
--- a/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockDepths/boss_general_angerforge.cpp
+++ b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockDepths/boss_general_angerforge.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockDepths/boss_gorosh_the_dervish.cpp b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockDepths/boss_gorosh_the_dervish.cpp
index 6621829836..43d93e3976 100644
--- a/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockDepths/boss_gorosh_the_dervish.cpp
+++ b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockDepths/boss_gorosh_the_dervish.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
@@ -26,12 +26,9 @@ enum Spells
SPELL_BLOODLUST = 21049
};
-enum Timers
-{
- TIMER_WHIRLWIND = 12000,
- TIMER_MORTAL = 22000,
- TIMER_BLOODLUST = 30000
-};
+constexpr Milliseconds TIMER_WHIRLWIND = 12s;
+constexpr Milliseconds TIMER_MORTAL = 22s;
+constexpr Milliseconds TIMER_BLOODLUST = 30s;
class boss_gorosh_the_dervish : public CreatureScript
{
@@ -47,14 +44,14 @@ public:
{
boss_gorosh_the_dervishAI(Creature* creature) : BossAI(creature, DATA_GOROSH) { }
- uint32 nextWhirlwindTime;
+ Milliseconds nextWhirlwindTime;
void JustEngagedWith(Unit* /*who*/) override
{
_JustEngagedWith();
- events.ScheduleEvent(SPELL_WHIRLWIND, 0.2 * (int) TIMER_WHIRLWIND);
- events.ScheduleEvent(SPELL_MORTALSTRIKE, 0.2 * (int) TIMER_MORTAL);
- events.ScheduleEvent(SPELL_BLOODLUST, 0.2 * (int) TIMER_BLOODLUST);
+ events.ScheduleEvent(SPELL_WHIRLWIND, TIMER_WHIRLWIND / 5);
+ events.ScheduleEvent(SPELL_MORTALSTRIKE, TIMER_MORTAL / 5);
+ events.ScheduleEvent(SPELL_BLOODLUST, TIMER_BLOODLUST / 5);
}
void UpdateAI(uint32 diff) override
@@ -78,22 +75,22 @@ public:
if (me->GetDistance2d(me->GetVictim()) < 10.0f)
{
DoCastVictim(SPELL_WHIRLWIND);
- nextWhirlwindTime = urand(TIMER_WHIRLWIND - 2000, TIMER_WHIRLWIND + 2000);
+ nextWhirlwindTime = randtime(TIMER_WHIRLWIND - 2s, TIMER_WHIRLWIND + 2s);
}
else
{
// reschedule sooner
- nextWhirlwindTime = 0.3 * urand(TIMER_WHIRLWIND - 2000, TIMER_WHIRLWIND + 2000);
+ nextWhirlwindTime = randtime(TIMER_WHIRLWIND - 2s, TIMER_WHIRLWIND + 2s) / 3;
}
events.ScheduleEvent(SPELL_WHIRLWIND, nextWhirlwindTime);
break;
case SPELL_MORTALSTRIKE:
DoCastVictim(SPELL_MORTALSTRIKE);
- events.ScheduleEvent(SPELL_MORTALSTRIKE, urand(TIMER_MORTAL - 2000, TIMER_MORTAL + 2000));
+ events.ScheduleEvent(SPELL_MORTALSTRIKE, TIMER_MORTAL - 2s, TIMER_MORTAL + 2s);
break;
case SPELL_BLOODLUST:
DoCastSelf(SPELL_BLOODLUST);
- events.ScheduleEvent(SPELL_BLOODLUST, urand(TIMER_BLOODLUST - 2000, TIMER_BLOODLUST + 2000));
+ events.ScheduleEvent(SPELL_BLOODLUST, TIMER_BLOODLUST - 2s, TIMER_BLOODLUST + 2s);
break;
default:
break;
diff --git a/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockDepths/boss_grizzle.cpp b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockDepths/boss_grizzle.cpp
index cbe77cd858..eff5848345 100644
--- a/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockDepths/boss_grizzle.cpp
+++ b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockDepths/boss_grizzle.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
@@ -26,11 +26,8 @@ enum Grizzle
EMOTE_FRENZY_KILL = 0
};
-enum Timer
-{
- TIMER_GROUNDTREMOR = 10000,
- TIMER_FRENZY = 15000
-};
+constexpr Milliseconds TIMER_GROUNDTREMOR = 10s;
+constexpr Milliseconds TIMER_FRENZY = 15s;
class boss_grizzle : public CreatureScript
{
@@ -46,13 +43,13 @@ public:
{
boss_grizzleAI(Creature* creature) : BossAI(creature, DATA_GRIZZLE) {}
- uint32 nextTremorTime;
+ Milliseconds nextTremorTime;
void JustEngagedWith(Unit* /*who*/) override
{
_JustEngagedWith();
- events.ScheduleEvent(SPELL_GROUNDTREMOR, 0.2 * (int) TIMER_GROUNDTREMOR);
- events.ScheduleEvent(SPELL_FRENZY, 0.2 * (int) TIMER_FRENZY);
+ events.ScheduleEvent(SPELL_GROUNDTREMOR, TIMER_GROUNDTREMOR / 5);
+ events.ScheduleEvent(SPELL_FRENZY, TIMER_FRENZY / 5);
}
void UpdateAI(uint32 diff) override
@@ -77,17 +74,17 @@ public:
if (me->GetDistance2d(me->GetVictim()) < 10.0f)
{
DoCastVictim(SPELL_GROUNDTREMOR);
- nextTremorTime = urand(TIMER_GROUNDTREMOR - 2000, TIMER_GROUNDTREMOR + 2000);
+ nextTremorTime = randtime(TIMER_GROUNDTREMOR - 2s, TIMER_GROUNDTREMOR + 2s);
}
else
{
- nextTremorTime = 0.3*urand(TIMER_GROUNDTREMOR - 2000, TIMER_GROUNDTREMOR + 2000);
+ nextTremorTime = randtime(TIMER_GROUNDTREMOR - 2s, TIMER_GROUNDTREMOR + 2s) / 3;
}
events.ScheduleEvent(SPELL_GROUNDTREMOR, nextTremorTime);
break;
case SPELL_FRENZY:
DoCastSelf(SPELL_FRENZY);
- events.ScheduleEvent(SPELL_FRENZY, urand(TIMER_FRENZY - 2000, TIMER_FRENZY + 2000));
+ events.ScheduleEvent(SPELL_FRENZY, TIMER_FRENZY - 2s, TIMER_FRENZY + 2s);
Talk(EMOTE_FRENZY_KILL);
break;
default:
diff --git a/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockDepths/boss_hedrum.cpp b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockDepths/boss_hedrum.cpp
index 6861d1b895..787c727808 100644
--- a/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockDepths/boss_hedrum.cpp
+++ b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockDepths/boss_hedrum.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
@@ -26,12 +26,9 @@ enum Spells
SPELL_WEB_EXPLOSION = 15474
};
-enum Timers
-{
- TIMER_PARALYZING = 20000,
- TIMER_BANEFUL = 24000,
- TIMER_WEB_EXPLOSION = 20000
-};
+constexpr Milliseconds TIMER_PARALYZING = 20s;
+constexpr Milliseconds TIMER_BANEFUL = 24s;
+constexpr Milliseconds TIMER_WEB_EXPLOSION = 20s;
class boss_hedrum : public CreatureScript
{
@@ -50,9 +47,9 @@ public:
void JustEngagedWith(Unit* /*who*/) override
{
_JustEngagedWith();
- events.ScheduleEvent(SPELL_PARALYZING, 0.2 * (int) TIMER_PARALYZING);
- events.ScheduleEvent(SPELL_BANEFUL, 0.2 * (int) TIMER_BANEFUL);
- events.ScheduleEvent(SPELL_WEB_EXPLOSION, 0.2 * (int) TIMER_WEB_EXPLOSION);
+ events.ScheduleEvent(SPELL_PARALYZING, TIMER_PARALYZING / 5);
+ events.ScheduleEvent(SPELL_BANEFUL, TIMER_BANEFUL / 5);
+ events.ScheduleEvent(SPELL_WEB_EXPLOSION, TIMER_WEB_EXPLOSION / 5);
}
void UpdateAI(uint32 diff) override
@@ -74,18 +71,18 @@ public:
{
case SPELL_PARALYZING:
DoCastVictim(SPELL_PARALYZING);
- events.ScheduleEvent(SPELL_PARALYZING, urand(TIMER_PARALYZING - 2000, TIMER_PARALYZING + 2000));
+ events.ScheduleEvent(SPELL_PARALYZING, TIMER_PARALYZING - 2s, TIMER_PARALYZING + 2s);
break;
case SPELL_BANEFUL:
DoCastVictim(SPELL_BANEFUL);
- events.ScheduleEvent(SPELL_BANEFUL, urand(TIMER_BANEFUL - 2000, TIMER_BANEFUL + 2000));
+ events.ScheduleEvent(SPELL_BANEFUL, TIMER_BANEFUL - 2s, TIMER_BANEFUL + 2s);
break;
case SPELL_WEB_EXPLOSION:
if (me->GetDistance2d(me->GetVictim()) < 100.0f)
{
DoCast(SPELL_WEB_EXPLOSION);
}
- events.ScheduleEvent(SPELL_WEB_EXPLOSION, urand(TIMER_WEB_EXPLOSION - 2000, TIMER_WEB_EXPLOSION + 2000));
+ events.ScheduleEvent(SPELL_WEB_EXPLOSION, TIMER_WEB_EXPLOSION - 2s, TIMER_WEB_EXPLOSION + 2s);
break;
default:
break;
diff --git a/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockDepths/boss_high_interrogator_gerstahn.cpp b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockDepths/boss_high_interrogator_gerstahn.cpp
index afe90c9adb..87202e6f0b 100644
--- a/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockDepths/boss_high_interrogator_gerstahn.cpp
+++ b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockDepths/boss_high_interrogator_gerstahn.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockDepths/boss_magmus.cpp b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockDepths/boss_magmus.cpp
index 038f2b1044..8551a20b15 100644
--- a/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockDepths/boss_magmus.cpp
+++ b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockDepths/boss_magmus.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockDepths/boss_moira_bronzebeard.cpp b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockDepths/boss_moira_bronzebeard.cpp
index 5d27104936..ddcbfaa9e1 100644
--- a/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockDepths/boss_moira_bronzebeard.cpp
+++ b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockDepths/boss_moira_bronzebeard.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
@@ -28,14 +28,11 @@ enum Spells
SPELL_WORDPAIN = 15654,
};
-enum SpellTimers
-{
- TIMER_HEAL = 12000,
- TIMER_MINDBLAST = 16000,
- TIMER_RENEW = 12000,
- TIMER_SHADOWBOLT = 16000,
- TIMER_WORDPAIN = 12000,
-};
+constexpr Milliseconds TIMER_HEAL = 12s;
+constexpr Milliseconds TIMER_MINDBLAST = 16s;
+constexpr Milliseconds TIMER_RENEW = 12s;
+constexpr Milliseconds TIMER_SHADOWBOLT = 16s;
+constexpr Milliseconds TIMER_WORDPAIN = 12s;
struct boss_moira_bronzebeardAI : public BossAI
{
@@ -44,9 +41,9 @@ struct boss_moira_bronzebeardAI : public BossAI
void JustEngagedWith(Unit* /*who*/) override
{
_JustEngagedWith();
- events.ScheduleEvent(SPELL_MINDBLAST, 0.5 * (int) TIMER_MINDBLAST);
- events.ScheduleEvent(SPELL_HEAL, 0.5 * (int) TIMER_HEAL);
- events.ScheduleEvent(SPELL_RENEW, 0.5 * (int) TIMER_RENEW);
+ events.ScheduleEvent(SPELL_MINDBLAST, TIMER_MINDBLAST / 2);
+ events.ScheduleEvent(SPELL_HEAL, TIMER_HEAL / 2);
+ events.ScheduleEvent(SPELL_RENEW, TIMER_RENEW / 2);
}
void UpdateAI(uint32 diff) override
@@ -67,7 +64,7 @@ struct boss_moira_bronzebeardAI : public BossAI
{
case SPELL_MINDBLAST:
DoCastVictim(SPELL_MINDBLAST);
- events.ScheduleEvent(SPELL_MINDBLAST, urand(TIMER_MINDBLAST - 2000, TIMER_MINDBLAST + 2000));
+ events.ScheduleEvent(SPELL_MINDBLAST, TIMER_MINDBLAST - 2s, TIMER_MINDBLAST + 2s);
break;
case SPELL_HEAL:
CastOnEmperorIfPossible(SPELL_HEAL, TIMER_HEAL);
@@ -82,7 +79,7 @@ struct boss_moira_bronzebeardAI : public BossAI
DoMeleeAttackIfReady();
}
- void CastOnEmperorIfPossible(uint32 spell, uint32 timer)
+ void CastOnEmperorIfPossible(uint32 spell, Milliseconds timer)
{
Creature* emperor = ObjectAccessor::GetCreature(*me, instance->GetGuidData(DATA_EMPEROR));
if (emperor && emperor->HealthBelowPct(90))
@@ -93,7 +90,7 @@ struct boss_moira_bronzebeardAI : public BossAI
{
DoCastSelf(spell);
}
- events.ScheduleEvent(spell, urand(timer - 2000, timer + 2000));
+ events.ScheduleEvent(spell, timer - 2s, timer + 2s);
}
};
@@ -107,10 +104,10 @@ struct boss_high_priestess_thaurissanAI : public boss_moira_bronzebeardAI
{
_JustEngagedWith();
Talk(0);
- events.ScheduleEvent(SPELL_WORDPAIN, 0.5 * (int)TIMER_WORDPAIN);
- events.ScheduleEvent(SPELL_HEAL, 0.5 * (int) TIMER_HEAL);
- events.ScheduleEvent(SPELL_RENEW, 0.5 * (int) TIMER_RENEW);
- events.ScheduleEvent(SPELL_SHADOWBOLT, 0.5 * (int) TIMER_SHADOWBOLT);
+ events.ScheduleEvent(SPELL_WORDPAIN, TIMER_WORDPAIN / 2);
+ events.ScheduleEvent(SPELL_HEAL, TIMER_HEAL / 2);
+ events.ScheduleEvent(SPELL_RENEW, TIMER_RENEW / 2);
+ events.ScheduleEvent(SPELL_SHADOWBOLT, TIMER_SHADOWBOLT / 2);
}
void UpdateAI(uint32 diff) override
@@ -131,7 +128,7 @@ struct boss_high_priestess_thaurissanAI : public boss_moira_bronzebeardAI
{
case SPELL_WORDPAIN:
DoCastVictim(SPELL_WORDPAIN);
- events.ScheduleEvent(SPELL_WORDPAIN, urand(TIMER_WORDPAIN - 2000, TIMER_WORDPAIN + 2000));
+ events.ScheduleEvent(SPELL_WORDPAIN, TIMER_WORDPAIN - 2s, TIMER_WORDPAIN + 2s);
break;
case SPELL_HEAL:
CastOnEmperorIfPossible(SPELL_HEAL, TIMER_HEAL);
@@ -141,7 +138,7 @@ struct boss_high_priestess_thaurissanAI : public boss_moira_bronzebeardAI
break;
case SPELL_SHADOWBOLT:
DoCastVictim(SPELL_SHADOWBOLT);
- events.ScheduleEvent(SPELL_SHADOWBOLT, urand(TIMER_SHADOWBOLT - 2000, TIMER_SHADOWBOLT + 2000));
+ events.ScheduleEvent(SPELL_SHADOWBOLT, TIMER_SHADOWBOLT - 2s, TIMER_SHADOWBOLT + 2s);
break;
default:
break;
diff --git a/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockDepths/boss_okthor.cpp b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockDepths/boss_okthor.cpp
index c5168332ae..0fd86d6be0 100644
--- a/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockDepths/boss_okthor.cpp
+++ b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockDepths/boss_okthor.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
@@ -27,13 +27,10 @@ enum Spells
SPELL_SLOW = 19137
};
-enum Timers
-{
- TIMER_ARCANE_BOLT = 7000,
- TIMER_ARCANE_EXPLOSION = 24000,
- TIMER_POLYMORPH = 12000,
- TIMER_SLOW = 15000
-};
+constexpr Milliseconds TIMER_ARCANE_BOLT = 7s;
+constexpr Milliseconds TIMER_ARCANE_EXPLOSION = 24s;
+constexpr Milliseconds TIMER_POLYMORPH = 12s;
+constexpr Milliseconds TIMER_SLOW = 15s;
class boss_okthor : public CreatureScript
{
@@ -49,15 +46,15 @@ public:
{
boss_okthorAI(Creature* creature) : BossAI(creature, DATA_OKTHOR) {}
- uint32 nextArcaneExplosionTime;
+ Milliseconds nextArcaneExplosionTime;
void JustEngagedWith(Unit* /*who*/) override
{
_JustEngagedWith();
- events.ScheduleEvent(SPELL_ARCANE_BOLT, 0.2 * (int) TIMER_ARCANE_BOLT);
- events.ScheduleEvent(SPELL_ARCANE_EXPLOSION, 0.2 * (int) TIMER_ARCANE_EXPLOSION);
- events.ScheduleEvent(SPELL_POLYMORPH, 0.2 * (int) TIMER_POLYMORPH);
- events.ScheduleEvent(SPELL_SLOW, 500);
+ events.ScheduleEvent(SPELL_ARCANE_BOLT, TIMER_ARCANE_BOLT / 5);
+ events.ScheduleEvent(SPELL_ARCANE_EXPLOSION, TIMER_ARCANE_EXPLOSION / 5);
+ events.ScheduleEvent(SPELL_POLYMORPH, TIMER_POLYMORPH / 5);
+ events.ScheduleEvent(SPELL_SLOW, 500ms);
}
void UpdateAI(uint32 diff) override
@@ -82,17 +79,17 @@ public:
{
DoCast(target, SPELL_ARCANE_BOLT);
}
- events.ScheduleEvent(SPELL_ARCANE_BOLT, urand(TIMER_ARCANE_BOLT - 2000, TIMER_ARCANE_BOLT + 2000));
+ events.ScheduleEvent(SPELL_ARCANE_BOLT, TIMER_ARCANE_BOLT - 2s, TIMER_ARCANE_BOLT + 2s);
break;
case SPELL_ARCANE_EXPLOSION:
if (me->GetDistance2d(me->GetVictim()) < 50.0f)
{
DoCast(SPELL_ARCANE_EXPLOSION);
- nextArcaneExplosionTime = urand(TIMER_ARCANE_EXPLOSION - 2000, TIMER_ARCANE_EXPLOSION + 2000);
+ nextArcaneExplosionTime = randtime(TIMER_ARCANE_EXPLOSION - 2s, TIMER_ARCANE_EXPLOSION + 2s);
}
else
{
- nextArcaneExplosionTime = 0.3*urand(TIMER_ARCANE_EXPLOSION - 2000, TIMER_ARCANE_EXPLOSION + 2000);
+ nextArcaneExplosionTime = randtime(TIMER_ARCANE_EXPLOSION - 2s, TIMER_ARCANE_EXPLOSION + 2s) / 3;
}
events.ScheduleEvent(SPELL_ARCANE_EXPLOSION, nextArcaneExplosionTime);
break;
@@ -101,7 +98,7 @@ public:
{
DoCast(target, SPELL_POLYMORPH);
}
- events.ScheduleEvent(SPELL_POLYMORPH, urand(TIMER_POLYMORPH - 2000, TIMER_POLYMORPH + 2000));
+ events.ScheduleEvent(SPELL_POLYMORPH, TIMER_POLYMORPH - 2s, TIMER_POLYMORPH + 2s);
break;
case SPELL_SLOW:
if (me->GetDistance2d(me->GetVictim()) < 50.0f)
diff --git a/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockDepths/boss_tomb_of_seven.cpp b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockDepths/boss_tomb_of_seven.cpp
index a9432797e3..3feabc95f6 100644
--- a/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockDepths/boss_tomb_of_seven.cpp
+++ b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockDepths/boss_tomb_of_seven.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockDepths/instance_blackrock_depths.cpp b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockDepths/instance_blackrock_depths.cpp
index 243d6e71c5..f6c487ba9a 100644
--- a/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockDepths/instance_blackrock_depths.cpp
+++ b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockDepths/instance_blackrock_depths.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
@@ -606,7 +606,7 @@ public:
if (Creature* argelmach = instance->GetCreature(ArgelmachGUID))
{
argelmach->HandleEmoteCommand(EMOTE_ONESHOT_SHOUT);
- argelmach->m_Events.AddEvent(new RestoreAttack(argelmach), argelmach->m_Events.CalculateTime(3000));
+ argelmach->m_Events.AddEventAtOffset(new RestoreAttack(argelmach), 3s);
for (ObjectGuid const& argelmachAddGUID : ArgelmachAdds)
{
diff --git a/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockSpire/blackrock_spire.h b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockSpire/blackrock_spire.h
index fa9446d06c..8b33f180bd 100644
--- a/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockSpire/blackrock_spire.h
+++ b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockSpire/blackrock_spire.h
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockSpire/boss_drakkisath.cpp b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockSpire/boss_drakkisath.cpp
index 3935c78a12..d979336cb9 100644
--- a/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockSpire/boss_drakkisath.cpp
+++ b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockSpire/boss_drakkisath.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockSpire/boss_gyth.cpp b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockSpire/boss_gyth.cpp
index 2beaacff3d..f04431c5c8 100644
--- a/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockSpire/boss_gyth.cpp
+++ b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockSpire/boss_gyth.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
@@ -96,7 +96,7 @@ public:
void IsSummonedBy(WorldObject* /*summoner*/) override
{
- events.ScheduleEvent(EVENT_SUMMONED_1, 1000);
+ events.ScheduleEvent(EVENT_SUMMONED_1, 1s);
}
void JustSummoned(Creature* summon) override
@@ -128,7 +128,7 @@ public:
events.ScheduleEvent(EVENT_SUMMONED_2, 2s);
break;
case EVENT_SUMMONED_2:
- me->GetMotionMaster()->MovePath(GYTH_PATH_1, false);
+ me->GetMotionMaster()->MoveWaypoint(GYTH_PATH_1, false);
break;
default:
break;
diff --git a/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockSpire/boss_halycon.cpp b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockSpire/boss_halycon.cpp
index 1875c67fac..bd2ffde133 100644
--- a/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockSpire/boss_halycon.cpp
+++ b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockSpire/boss_halycon.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockSpire/boss_highlord_omokk.cpp b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockSpire/boss_highlord_omokk.cpp
index f80ab90e95..b7e03f34f3 100644
--- a/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockSpire/boss_highlord_omokk.cpp
+++ b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockSpire/boss_highlord_omokk.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockSpire/boss_lord_valthalak.cpp b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockSpire/boss_lord_valthalak.cpp
index 66ecf747ec..0eeab9e2ad 100644
--- a/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockSpire/boss_lord_valthalak.cpp
+++ b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockSpire/boss_lord_valthalak.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
@@ -71,7 +71,7 @@ public:
void IsSummonedBy(WorldObject* /*summoner*/) override
{
- StartTalking(TALK_SUMMON, 8 * IN_MILLISECONDS);
+ StartTalking(TALK_SUMMON, 8s);
}
void JustEngagedWith(Unit* who) override
@@ -92,7 +92,7 @@ public:
instance->SetData(DATA_LORD_VALTHALAK, DONE);
}
- void StartTalking(uint32 talkGroupId, uint32 timer)
+ void StartTalking(uint32 talkGroupId, Milliseconds timer)
{
me->SetReactState(REACT_PASSIVE);
me->SetUnitFlag(UNIT_FLAG_NON_ATTACKABLE | UNIT_FLAG_NOT_SELECTABLE);
@@ -123,7 +123,7 @@ public:
events.CancelEvent(EVENT_SUMMON_SPECTRAL_ASSASSIN);
- StartTalking(TALK_40_HP, 5 * IN_MILLISECONDS);
+ StartTalking(TALK_40_HP, 5s);
}
if (!frenzy15 && me->HealthBelowPctDamaged(15, damage))
@@ -132,7 +132,7 @@ public:
events.ScheduleEvent(EVENT_SHADOW_BOLT_VOLLEY, 12s, 19s, 0, EVENT_PHASE_FIGHT);
- StartTalking(TALK_15_HP, 5 * IN_MILLISECONDS);
+ StartTalking(TALK_15_HP, 5s);
}
}
diff --git a/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockSpire/boss_mor_grayhoof.cpp b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockSpire/boss_mor_grayhoof.cpp
index c416371cd6..0020470107 100644
--- a/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockSpire/boss_mor_grayhoof.cpp
+++ b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockSpire/boss_mor_grayhoof.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
@@ -53,7 +53,7 @@ enum Spells
SPELL_FAERIE_DRAGON_FORM = 27546,
SPELL_ARCANE_EXPLOSION = 22271,
SPELL_REFLECTION = 27564,
- SPELL_CHAIN_LIGHTING = 27567,
+ SPELL_CHAIN_LIGHTNING = 27567,
SPELL_SLEEP = 20663 // Guessed
};
@@ -68,7 +68,7 @@ enum Phases
std::vector<uint32> catSpells = { SPELL_SHRED, SPELL_RAKE, SPELL_FEROCIOUS_BITE };
std::vector<uint32> humanSpells = { SPELL_HURRICANE, SPELL_MOONFIRE, SPELL_SHOCK, SPELL_HEALING_TOUCH, SPELL_REJUVENATION };
std::vector<uint32> bearSpells = { SPELL_DEMORALIZING_ROAR, SPELL_MAUL, SPELL_SWIPE };
-std::vector<uint32> faerieSpells = { SPELL_ARCANE_EXPLOSION, SPELL_REFLECTION, SPELL_CHAIN_LIGHTING, SPELL_SLEEP };
+std::vector<uint32> faerieSpells = { SPELL_ARCANE_EXPLOSION, SPELL_REFLECTION, SPELL_CHAIN_LIGHTNING, SPELL_SLEEP };
struct boss_mor_grayhoof : public BossAI
{
diff --git a/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockSpire/boss_overlord_wyrmthalak.cpp b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockSpire/boss_overlord_wyrmthalak.cpp
index f9c31a8765..4f2b2511e2 100644
--- a/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockSpire/boss_overlord_wyrmthalak.cpp
+++ b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockSpire/boss_overlord_wyrmthalak.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockSpire/boss_pyroguard_emberseer.cpp b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockSpire/boss_pyroguard_emberseer.cpp
index 6ef78bb342..55c1712914 100644
--- a/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockSpire/boss_pyroguard_emberseer.cpp
+++ b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockSpire/boss_pyroguard_emberseer.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockSpire/boss_quartermaster_zigris.cpp b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockSpire/boss_quartermaster_zigris.cpp
index 45e6502eb8..21145b2946 100644
--- a/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockSpire/boss_quartermaster_zigris.cpp
+++ b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockSpire/boss_quartermaster_zigris.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
@@ -77,7 +77,9 @@ struct boss_quartermaster_zigris : public BossAI
{
if (me->IsWithinMeleeRange(me->GetVictim()))
{
- me->GetMotionMaster()->MoveBackwards(me->GetVictim(), 10.0f);
+ float x, y, z;
+ me->GetNearPoint(me->GetVictim(), x, y, z, me->GetVictim()->GetBoundaryRadius(), 10.0f, me->GetAngle(me->GetVictim()));
+ me->GetMotionMaster()->MovePoint(0, x, y, z, FORCED_MOVEMENT_RUN); // TODO: Implement generic distancing on npc on target root
}
}
}
@@ -108,11 +110,11 @@ struct boss_quartermaster_zigris : public BossAI
if (me->IsWithinMeleeRange(me->GetVictim()))
{
DoCastVictim(SPELL_HOOKEDNET);
- events.RepeatEvent(16000);
+ events.Repeat(16s);
}
else
{
- events.RepeatEvent(3000);
+ events.Repeat(3s);
}
break;
case EVENT_SHOOT:
@@ -128,7 +130,7 @@ struct boss_quartermaster_zigris : public BossAI
me->GetMotionMaster()->Clear();
me->GetMotionMaster()->MoveChase(me->GetVictim());
}
- events.RepeatEvent(2000);
+ events.Repeat(2s);
break;
}
diff --git a/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockSpire/boss_rend_blackhand.cpp b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockSpire/boss_rend_blackhand.cpp
index 6383681943..5e64384227 100644
--- a/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockSpire/boss_rend_blackhand.cpp
+++ b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockSpire/boss_rend_blackhand.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
@@ -222,7 +222,7 @@ public:
if (GameObject* portcullis = me->FindNearestGameObject(GO_DR_PORTCULLIS, 50.0f))
waveDoorGUID = portcullis->GetGUID();
- events.ScheduleEvent(EVENT_TURN_TO_PLAYER, 0);
+ events.ScheduleEvent(EVENT_TURN_TO_PLAYER, 0ms);
events.ScheduleEvent(EVENT_START_1, 1s);
}
}
@@ -234,7 +234,7 @@ public:
{
switch (id)
{
- case 5:
+ case 6:
events.ScheduleEvent(EVENT_TELEPORT_1, 2s);
break;
}
@@ -264,7 +264,7 @@ public:
events.ScheduleEvent(EVENT_START_2, 4s);
break;
case EVENT_START_2:
- events.ScheduleEvent(EVENT_TURN_TO_PLAYER, 0);
+ events.ScheduleEvent(EVENT_TURN_TO_PLAYER, 0ms);
if (Creature* victor = ObjectAccessor::GetCreature(*me, victorGUID))
victor->HandleEmoteCommand(EMOTE_ONESHOT_POINT);
events.ScheduleEvent(EVENT_START_3, 4s);
@@ -314,14 +314,14 @@ public:
events.ScheduleEvent(EVENT_SPAWN_WAVE, 3s);
break;
case EVENT_WAVES_TEXT_2:
- events.ScheduleEvent(EVENT_TURN_TO_PLAYER, 0);
+ events.ScheduleEvent(EVENT_TURN_TO_PLAYER, 0ms);
if (Creature* victor = ObjectAccessor::GetCreature(*me, victorGUID))
victor->AI()->Talk(SAY_NEFARIUS_3);
events.ScheduleEvent(EVENT_TURN_TO_FACING_1, 4s);
events.ScheduleEvent(EVENT_SPAWN_WAVE, 3s);
break;
case EVENT_WAVES_TEXT_3:
- events.ScheduleEvent(EVENT_TURN_TO_PLAYER, 0);
+ events.ScheduleEvent(EVENT_TURN_TO_PLAYER, 0ms);
if (Creature* victor = ObjectAccessor::GetCreature(*me, victorGUID))
victor->AI()->Talk(SAY_NEFARIUS_4);
events.ScheduleEvent(EVENT_TURN_TO_FACING_1, 4s);
@@ -334,14 +334,14 @@ public:
events.ScheduleEvent(EVENT_SPAWN_WAVE, 3s);
break;
case EVENT_WAVES_TEXT_5:
- events.ScheduleEvent(EVENT_TURN_TO_PLAYER, 0);
+ events.ScheduleEvent(EVENT_TURN_TO_PLAYER, 0ms);
if (Creature* victor = ObjectAccessor::GetCreature(*me, victorGUID))
victor->AI()->Talk(SAY_NEFARIUS_5);
events.ScheduleEvent(EVENT_TURN_TO_FACING_1, 4s);
events.ScheduleEvent(EVENT_SPAWN_WAVE, 3s);
break;
case EVENT_WAVES_COMPLETE_TEXT_1:
- events.ScheduleEvent(EVENT_TURN_TO_PLAYER, 0);
+ events.ScheduleEvent(EVENT_TURN_TO_PLAYER, 0ms);
if (Creature* victor = ObjectAccessor::GetCreature(*me, victorGUID))
victor->AI()->Talk(SAY_NEFARIUS_6);
events.ScheduleEvent(EVENT_TURN_TO_FACING_1, 4s);
@@ -362,10 +362,10 @@ public:
break;
case EVENT_PATH_NEFARIUS:
if (Creature* victor = ObjectAccessor::GetCreature(*me, victorGUID))
- victor->GetMotionMaster()->MovePath(NEFARIUS_PATH_1, true);
+ victor->GetMotionMaster()->MoveWaypoint(NEFARIUS_PATH_1, true);
break;
case EVENT_PATH_REND:
- me->GetMotionMaster()->MovePath(REND_PATH_1, false);
+ me->GetMotionMaster()->MoveWaypoint(REND_PATH_1, false);
break;
case EVENT_TELEPORT_1:
me->NearTeleportTo(194.2993f, -474.0814f, 121.4505f, -0.01225555f);
diff --git a/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockSpire/boss_solakar_flamewreath.cpp b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockSpire/boss_solakar_flamewreath.cpp
index 39cb7594e4..d96758ee7d 100644
--- a/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockSpire/boss_solakar_flamewreath.cpp
+++ b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockSpire/boss_solakar_flamewreath.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockSpire/boss_the_beast.cpp b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockSpire/boss_the_beast.cpp
index 84d3c07acc..366fb17b79 100644
--- a/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockSpire/boss_the_beast.cpp
+++ b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockSpire/boss_the_beast.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
@@ -110,7 +110,7 @@ public:
if (_beastReached)
{
- me->GetMotionMaster()->MovePath(BEAST_MOVEMENT_ID, true);
+ me->GetMotionMaster()->MoveWaypoint(BEAST_MOVEMENT_ID, true);
}
}
@@ -157,8 +157,8 @@ public:
orc->AI()->Talk(SAY_BLACKHAND_DOOMED);
}
- orc->m_Events.AddEvent(new OrcMoveEvent(orc), me->m_Events.CalculateTime(3 * IN_MILLISECONDS));
- orc->m_Events.AddEvent(new OrcDeathEvent(orc), me->m_Events.CalculateTime(9 * IN_MILLISECONDS));
+ orc->m_Events.AddEventAtOffset(new OrcMoveEvent(orc), 3s);
+ orc->m_Events.AddEventAtOffset(new OrcDeathEvent(orc), 9s);
}
}
}
@@ -169,7 +169,7 @@ public:
if (!_beastReached)
{
_beastReached = true;
- me->GetMotionMaster()->MovePath(BEAST_MOVEMENT_ID, true);
+ me->GetMotionMaster()->MoveWaypoint(BEAST_MOVEMENT_ID, true);
// There is a chance player logged in between areatriggers (realm crash or restart)
// executing part of script which happens when player enters boss room
@@ -227,7 +227,7 @@ public:
case EVENT_FIREBALL:
DoCastVictim(SPELL_FIREBALL);
events.ScheduleEvent(EVENT_FIREBALL, 8s, 21s);
- if (events.GetNextEventTime(EVENT_FIREBLAST) < 3 * IN_MILLISECONDS)
+ if (events.GetTimeUntilEvent(EVENT_FIREBLAST) < 3s)
{
events.RescheduleEvent(EVENT_FIREBLAST, 3s);
}
@@ -235,7 +235,7 @@ public:
case EVENT_FIREBLAST:
DoCastVictim(SPELL_FIREBLAST);
events.ScheduleEvent(EVENT_FIREBLAST, 5s, 8s);
- if (events.GetNextEventTime(EVENT_FIREBALL) < 3 * IN_MILLISECONDS)
+ if (events.GetTimeUntilEvent(EVENT_FIREBALL) < 3s)
{
events.RescheduleEvent(EVENT_FIREBALL, 3s);
}
diff --git a/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockSpire/boss_urok_doomhowl.cpp b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockSpire/boss_urok_doomhowl.cpp
index 7c41061e4c..bdebc9ff91 100644
--- a/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockSpire/boss_urok_doomhowl.cpp
+++ b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockSpire/boss_urok_doomhowl.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockSpire/boss_warmaster_voone.cpp b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockSpire/boss_warmaster_voone.cpp
index 55ac1f26e0..3240cadd2c 100644
--- a/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockSpire/boss_warmaster_voone.cpp
+++ b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockSpire/boss_warmaster_voone.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
@@ -98,31 +98,31 @@ public:
{
case EVENT_SNAP_KICK:
DoCastVictim(SPELL_SNAPKICK);
- events.RepeatEvent(6 * IN_MILLISECONDS);
+ events.Repeat(6s);
break;
case EVENT_CLEAVE:
DoCastVictim(SPELL_CLEAVE);
- events.RepeatEvent(12 * IN_MILLISECONDS);
+ events.Repeat(12s);
break;
case EVENT_UPPERCUT:
DoCastVictim(SPELL_UPPERCUT);
- events.RepeatEvent(14 * IN_MILLISECONDS);
+ events.Repeat(14s);
break;
case EVENT_MORTAL_STRIKE:
DoCastVictim(SPELL_MORTALSTRIKE);
- events.RepeatEvent(10 * IN_MILLISECONDS);
+ events.Repeat(10s);
break;
case EVENT_PUMMEL:
DoCastVictim(SPELL_PUMMEL);
- events.RepeatEvent(16 * IN_MILLISECONDS);
+ events.Repeat(16s);
break;
case EVENT_THROW_AXE:
DoCastRandomTarget(SPELL_THROWAXE);
- events.RepeatEvent(8 * IN_MILLISECONDS);
+ events.Repeat(8s);
break;
case EVENT_THRASH:
DoCastSelf(SPELL_THRASH);
- events.RepeatEvent(10 * IN_MILLISECONDS);
+ events.Repeat(10s);
break;
}
}
diff --git a/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockSpire/instance_blackrock_spire.cpp b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockSpire/instance_blackrock_spire.cpp
index d9508f0b5a..dc7cf3d41c 100644
--- a/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockSpire/instance_blackrock_spire.cpp
+++ b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockSpire/instance_blackrock_spire.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
@@ -39,10 +39,7 @@ enum EventIds
EVENT_SOLAKAR_WAVE = 3
};
-enum Timers
-{
- TIMER_SOLAKAR_WAVE = 30000
-};
+constexpr Milliseconds TIMER_SOLAKAR_WAVE = 30s;
enum SolakarWaves
{
@@ -1049,7 +1046,7 @@ public:
break;
case EVENT_VAEL_3_DESPAWN:
DoCast(me, SPELL_VAELASTRASZ_SPAWN);
- me->DespawnOrUnsummon(1500);
+ me->DespawnOrUnsummon(1500ms);
break;
default:
break;
diff --git a/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackwingLair/blackwing_lair.h b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackwingLair/blackwing_lair.h
index 1313f4f3a4..f2a1aed32d 100644
--- a/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackwingLair/blackwing_lair.h
+++ b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackwingLair/blackwing_lair.h
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackwingLair/boss_broodlord_lashlayer.cpp b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackwingLair/boss_broodlord_lashlayer.cpp
index b0164e2cf7..55c5c7a94d 100644
--- a/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackwingLair/boss_broodlord_lashlayer.cpp
+++ b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackwingLair/boss_broodlord_lashlayer.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackwingLair/boss_chromaggus.cpp b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackwingLair/boss_chromaggus.cpp
index cf39b53a1f..64d23aa43d 100644
--- a/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackwingLair/boss_chromaggus.cpp
+++ b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackwingLair/boss_chromaggus.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
@@ -118,7 +118,7 @@ public:
return !victim->HasAura(SPELL_TIMELAPSE);
}
- void SetGUID(ObjectGuid guid, int32 id) override
+ void SetGUID(ObjectGuid const& guid, int32 id) override
{
if (id == GUID_LEVER_USER)
{
@@ -244,7 +244,7 @@ class go_chromaggus_lever : public GameObjectScript
if (Creature* creature = _instance->GetCreature(DATA_CHROMAGGUS))
{
creature->SetHomePosition(homePos);
- creature->GetMotionMaster()->MovePath(creature->GetEntry() * 10, false);
+ creature->GetMotionMaster()->MoveWaypoint(creature->GetEntry() * 10, false);
creature->AI()->SetGUID(player->GetGUID(), GUID_LEVER_USER);
}
diff --git a/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackwingLair/boss_ebonroc.cpp b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackwingLair/boss_ebonroc.cpp
index 12fab34d17..832642ef1a 100644
--- a/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackwingLair/boss_ebonroc.cpp
+++ b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackwingLair/boss_ebonroc.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
@@ -44,7 +44,7 @@ public:
void MovementInform(uint32 type, uint32 id) override
{
- if (type != WAYPOINT_MOTION_TYPE || id != 12)
+ if (type != WAYPOINT_MOTION_TYPE || id != 13)
{
return;
}
diff --git a/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackwingLair/boss_firemaw.cpp b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackwingLair/boss_firemaw.cpp
index 6673d556a0..197b1d8431 100644
--- a/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackwingLair/boss_firemaw.cpp
+++ b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackwingLair/boss_firemaw.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackwingLair/boss_flamegor.cpp b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackwingLair/boss_flamegor.cpp
index 8bbf3d1a3f..ce1028fe7b 100644
--- a/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackwingLair/boss_flamegor.cpp
+++ b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackwingLair/boss_flamegor.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackwingLair/boss_nefarian.cpp b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackwingLair/boss_nefarian.cpp
index 614976c5ae..4407416df2 100644
--- a/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackwingLair/boss_nefarian.cpp
+++ b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackwingLair/boss_nefarian.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
@@ -343,7 +343,7 @@ public:
nefarian->setActive(true);
nefarian->SetCanFly(true);
nefarian->SetDisableGravity(true);
- nefarian->GetMotionMaster()->MovePath(NEFARIAN_PATH, false);
+ nefarian->GetMotionMaster()->MoveWaypoint(NEFARIAN_PATH, false);
}
events.Reset();
@@ -406,7 +406,7 @@ public:
switch (eventId)
{
case EVENT_PATH_2:
- me->GetMotionMaster()->MovePath(NEFARIUS_PATH_2, false);
+ me->GetMotionMaster()->MoveWaypoint(NEFARIUS_PATH_2, false);
events.ScheduleEvent(EVENT_CHAOS_1, 7s);
break;
case EVENT_CHAOS_1:
@@ -435,10 +435,10 @@ public:
break;
case EVENT_SUCCESS_2:
DoCast(me, SPELL_VAELASTRASZZ_SPAWN);
- me->DespawnOrUnsummon(1000);
+ me->DespawnOrUnsummon(1s);
break;
case EVENT_PATH_3:
- me->GetMotionMaster()->MovePath(NEFARIUS_PATH_3, false);
+ me->GetMotionMaster()->MoveWaypoint(NEFARIUS_PATH_3, false);
break;
case EVENT_START_EVENT:
BeginEvent();
@@ -592,12 +592,12 @@ struct boss_nefarian : public BossAI
return;
}
- if (id == 3)
+ if (id == 4)
{
Talk(SAY_INTRO);
}
- if (id == 5)
+ if (id == 6)
{
DoCastAOE(SPELL_SHADOWFLAME_INITIAL);
Talk(SAY_SHADOWFLAME);
diff --git a/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackwingLair/boss_razorgore.cpp b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackwingLair/boss_razorgore.cpp
index 4b82654fb6..ffbfe4ca0e 100644
--- a/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackwingLair/boss_razorgore.cpp
+++ b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackwingLair/boss_razorgore.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
@@ -152,7 +152,7 @@ public:
}
}
- void SetGUID(ObjectGuid const guid, int32 /*id*/) override
+ void SetGUID(ObjectGuid const& guid, int32 /*id*/) override
{
_charmerGUID = guid;
}
diff --git a/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackwingLair/boss_vaelastrasz.cpp b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackwingLair/boss_vaelastrasz.cpp
index c2b0a641e4..3cfbf13e48 100644
--- a/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackwingLair/boss_vaelastrasz.cpp
+++ b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackwingLair/boss_vaelastrasz.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackwingLair/instance_blackwing_lair.cpp b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackwingLair/instance_blackwing_lair.cpp
index de8d3ef6c7..2dfb99fc4c 100644
--- a/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackwingLair/instance_blackwing_lair.cpp
+++ b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackwingLair/instance_blackwing_lair.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
@@ -345,7 +345,7 @@ public:
{
case NPC_BLACKWING_DRAGON:
--addsCount[0];
- if (EggEvent != DONE && _events.GetTimeUntilEvent(EVENT_RAZOR_SPAWN) == Milliseconds::max())
+ if (EggEvent != DONE && !_events.HasTimeUntilEvent(EVENT_RAZOR_SPAWN))
{
_events.ScheduleEvent(EVENT_RAZOR_SPAWN, 1s);
}
@@ -353,7 +353,7 @@ public:
case NPC_BLACKWING_LEGIONAIRE:
case NPC_BLACKWING_MAGE:
--addsCount[1];
- if (EggEvent != DONE && _events.GetTimeUntilEvent(EVENT_RAZOR_SPAWN) == Milliseconds::max())
+ if (EggEvent != DONE && !_events.HasTimeUntilEvent(EVENT_RAZOR_SPAWN))
{
_events.ScheduleEvent(EVENT_RAZOR_SPAWN, 1s);
}
@@ -413,7 +413,7 @@ public:
if (spawnMoreAdds)
{
- _events.ScheduleEvent(EVENT_RAZOR_SPAWN, 15000);
+ _events.ScheduleEvent(EVENT_RAZOR_SPAWN, 15s);
}
}
break;
diff --git a/src/server/scripts/EasternKingdoms/BlackrockMountain/MoltenCore/boss_baron_geddon.cpp b/src/server/scripts/EasternKingdoms/BlackrockMountain/MoltenCore/boss_baron_geddon.cpp
index 9f6823b3b1..448ec46ff4 100644
--- a/src/server/scripts/EasternKingdoms/BlackrockMountain/MoltenCore/boss_baron_geddon.cpp
+++ b/src/server/scripts/EasternKingdoms/BlackrockMountain/MoltenCore/boss_baron_geddon.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
@@ -91,7 +91,7 @@ public:
case EVENT_INFERNO:
{
DoCastAOE(SPELL_INFERNO);
- events.RepeatEvent(urand(21000, 26000));
+ events.Repeat(21s, 26s);
break;
}
case EVENT_IGNITE_MANA:
@@ -101,7 +101,7 @@ public:
DoCast(target, SPELL_IGNITE_MANA);
}
- events.RepeatEvent(urand(27000, 32000));
+ events.Repeat(27s, 32s);
break;
}
case EVENT_LIVING_BOMB:
@@ -111,7 +111,7 @@ public:
DoCast(target, SPELL_LIVING_BOMB);
}
- events.RepeatEvent(urand(11000, 16000));
+ events.Repeat(11s, 16s);
break;
}
}
diff --git a/src/server/scripts/EasternKingdoms/BlackrockMountain/MoltenCore/boss_garr.cpp b/src/server/scripts/EasternKingdoms/BlackrockMountain/MoltenCore/boss_garr.cpp
index 3682a67fd1..15f3995b0d 100644
--- a/src/server/scripts/EasternKingdoms/BlackrockMountain/MoltenCore/boss_garr.cpp
+++ b/src/server/scripts/EasternKingdoms/BlackrockMountain/MoltenCore/boss_garr.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
@@ -111,13 +111,13 @@ public:
case EVENT_ANTIMAGIC_PULSE:
{
DoCastSelf(SPELL_ANTIMAGIC_PULSE);
- events.RepeatEvent(20000);
+ events.Repeat(20s);
break;
}
case EVENT_MAGMA_SHACKLES:
{
DoCastSelf(SPELL_MAGMA_SHACKLES);
- events.RepeatEvent(15000);
+ events.Repeat(15s);
break;
}
}
diff --git a/src/server/scripts/EasternKingdoms/BlackrockMountain/MoltenCore/boss_gehennas.cpp b/src/server/scripts/EasternKingdoms/BlackrockMountain/MoltenCore/boss_gehennas.cpp
index a358bec9d5..53662ddcae 100644
--- a/src/server/scripts/EasternKingdoms/BlackrockMountain/MoltenCore/boss_gehennas.cpp
+++ b/src/server/scripts/EasternKingdoms/BlackrockMountain/MoltenCore/boss_gehennas.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
@@ -58,7 +58,7 @@ public:
case EVENT_GEHENNAS_CURSE:
{
DoCastVictim(SPELL_GEHENNAS_CURSE);
- events.RepeatEvent(urand(25000, 30000));
+ events.Repeat(25s, 30s);
break;
}
case EVENT_RAIN_OF_FIRE:
@@ -67,7 +67,7 @@ public:
{
DoCast(target, SPELL_RAIN_OF_FIRE, true);
}
- events.RepeatEvent(6000);
+ events.Repeat(6s);
break;
}
case EVENT_SHADOW_BOLT:
@@ -88,7 +88,7 @@ public:
DoCastVictim(SPELL_SHADOW_BOLT_VICTIM);
}
- events.RepeatEvent(5000);
+ events.Repeat(5s);
break;
}
}
diff --git a/src/server/scripts/EasternKingdoms/BlackrockMountain/MoltenCore/boss_golemagg.cpp b/src/server/scripts/EasternKingdoms/BlackrockMountain/MoltenCore/boss_golemagg.cpp
index 0dea2ea3a1..d88c1e2b34 100644
--- a/src/server/scripts/EasternKingdoms/BlackrockMountain/MoltenCore/boss_golemagg.cpp
+++ b/src/server/scripts/EasternKingdoms/BlackrockMountain/MoltenCore/boss_golemagg.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/scripts/EasternKingdoms/BlackrockMountain/MoltenCore/boss_lucifron.cpp b/src/server/scripts/EasternKingdoms/BlackrockMountain/MoltenCore/boss_lucifron.cpp
index 384b818974..dd38b6ca8b 100644
--- a/src/server/scripts/EasternKingdoms/BlackrockMountain/MoltenCore/boss_lucifron.cpp
+++ b/src/server/scripts/EasternKingdoms/BlackrockMountain/MoltenCore/boss_lucifron.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
@@ -57,19 +57,19 @@ public:
case EVENT_IMPENDING_DOOM:
{
DoCastVictim(SPELL_IMPENDING_DOOM);
- events.RepeatEvent(20000);
+ events.Repeat(20s);
break;
}
case EVENT_LUCIFRON_CURSE:
{
DoCastVictim(SPELL_LUCIFRON_CURSE);
- events.RepeatEvent(20000);
+ events.Repeat(20s);
break;
}
case EVENT_SHADOW_SHOCK:
{
DoCastVictim(SPELL_SHADOW_SHOCK);
- events.RepeatEvent(5000);
+ events.Repeat(5s);
break;
}
}
diff --git a/src/server/scripts/EasternKingdoms/BlackrockMountain/MoltenCore/boss_magmadar.cpp b/src/server/scripts/EasternKingdoms/BlackrockMountain/MoltenCore/boss_magmadar.cpp
index 978cf2f80a..f0d7563a8f 100644
--- a/src/server/scripts/EasternKingdoms/BlackrockMountain/MoltenCore/boss_magmadar.cpp
+++ b/src/server/scripts/EasternKingdoms/BlackrockMountain/MoltenCore/boss_magmadar.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
@@ -73,13 +73,13 @@ public:
{
Talk(EMOTE_FRENZY);
DoCastSelf(SPELL_FRENZY);
- events.RepeatEvent(urand(15000, 20000));
+ events.Repeat(15s, 20s);
break;
}
case EVENT_PANIC:
{
DoCastVictim(SPELL_PANIC);
- events.RepeatEvent(urand(31000, 38000));
+ events.Repeat(31s, 38s);
break;
}
case EVENT_LAVA_BOMB:
@@ -89,7 +89,7 @@ public:
DoCast(target, SPELL_LAVA_BOMB);
}
- events.RepeatEvent(urand(12000, 15000));
+ events.Repeat(12s, 15s);
break;
}
case EVENT_LAVA_BOMB_RANGED:
@@ -104,7 +104,7 @@ public:
{
DoCast(targets.front() , SPELL_LAVA_BOMB_RANGED);
}
- events.RepeatEvent(urand(12000, 15000));
+ events.Repeat(12s, 15s);
break;
}
}
diff --git a/src/server/scripts/EasternKingdoms/BlackrockMountain/MoltenCore/boss_majordomo_executus.cpp b/src/server/scripts/EasternKingdoms/BlackrockMountain/MoltenCore/boss_majordomo_executus.cpp
index ce586774f5..ad4da94c6d 100644
--- a/src/server/scripts/EasternKingdoms/BlackrockMountain/MoltenCore/boss_majordomo_executus.cpp
+++ b/src/server/scripts/EasternKingdoms/BlackrockMountain/MoltenCore/boss_majordomo_executus.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
@@ -348,7 +348,7 @@ public:
{
DoCastSelf(SPELL_DAMAGE_REFLECTION);
}
- events.RepeatEvent(30000);
+ events.Repeat(30s);
break;
}
case EVENT_TELEPORT_RANDOM:
@@ -359,14 +359,14 @@ public:
DoCast(target, SPELL_TELEPORT_RANDOM);
}
- events.RepeatEvent(30000);
+ events.Repeat(30s);
break;
}
case EVENT_TELEPORT_TARGET:
{
DoCastSelf(SPELL_HATE_TO_ZERO, true);
DoCastAOE(SPELL_TELEPORT_TARGET);
- events.RepeatEvent(30000);
+ events.Repeat(30s);
break;
}
}
@@ -430,7 +430,7 @@ public:
Talk(SAY_RAG_SUM_2);
// Next event will get triggered in MovementInform
me->SetWalk(true);
- me->GetMotionMaster()->MovePoint(POINT_RAGNAROS_SUMMON, MajordomoMoveRagPos, true, false);
+ me->GetMotionMaster()->MovePoint(POINT_RAGNAROS_SUMMON, MajordomoMoveRagPos, FORCED_MOVEMENT_NONE, 0.f, true, false);
break;
}
case EVENT_RAGNAROS_SUMMON_2:
diff --git a/src/server/scripts/EasternKingdoms/BlackrockMountain/MoltenCore/boss_ragnaros.cpp b/src/server/scripts/EasternKingdoms/BlackrockMountain/MoltenCore/boss_ragnaros.cpp
index 84dfa53781..b5d3ece2da 100644
--- a/src/server/scripts/EasternKingdoms/BlackrockMountain/MoltenCore/boss_ragnaros.cpp
+++ b/src/server/scripts/EasternKingdoms/BlackrockMountain/MoltenCore/boss_ragnaros.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
@@ -183,13 +183,13 @@ public:
}
}
- void SetGUID(ObjectGuid guid, int32 index) override
+ void SetGUID(ObjectGuid const& guid, int32 index) override
{
if (index == GO_LAVA_BURST)
{
if (_lavaBurstGUIDS.empty())
{
- extraEvents.ScheduleEvent(EVENT_LAVA_BURST_TRIGGER, 1);
+ extraEvents.ScheduleEvent(EVENT_LAVA_BURST_TRIGGER, 1ms);
}
_lavaBurstGUIDS.insert(guid);
@@ -309,7 +309,7 @@ public:
}
_lavaBurstGUIDS.erase(lavaBurstGUID);
- extraEvents.RepeatEvent(1000);
+ extraEvents.Repeat(1s);
}
else
{
@@ -350,7 +350,7 @@ public:
{
Talk(SAY_WRATH);
}
- events.RepeatEvent(25000);
+ events.Repeat(25s);
break;
}
case EVENT_HAND_OF_RAGNAROS:
@@ -362,7 +362,7 @@ public:
_isKnockbackEmoteAllowed = false;
extraEvents.RescheduleEvent(EVENT_RESET_KNOCKBACK_EMOTE, 5s);
}
- events.RepeatEvent(20000);
+ events.Repeat(20s);
break;
}
case EVENT_LAVA_BURST:
@@ -401,7 +401,7 @@ public:
extraEvents.RescheduleEvent(EVENT_RESET_KNOCKBACK_EMOTE, 5s);
}
}
- events.RepeatEvent(urand(11000, 30000));
+ events.Repeat(11s, 30s);
break;
}
case EVENT_SUBMERGE:
diff --git a/src/server/scripts/EasternKingdoms/BlackrockMountain/MoltenCore/boss_shazzrah.cpp b/src/server/scripts/EasternKingdoms/BlackrockMountain/MoltenCore/boss_shazzrah.cpp
index fc135b2817..45c9f7ad1a 100644
--- a/src/server/scripts/EasternKingdoms/BlackrockMountain/MoltenCore/boss_shazzrah.cpp
+++ b/src/server/scripts/EasternKingdoms/BlackrockMountain/MoltenCore/boss_shazzrah.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
@@ -67,7 +67,7 @@ public:
case EVENT_ARCANE_EXPLOSION:
{
DoCastVictim(SPELL_ARCANE_EXPLOSION);
- events.RepeatEvent(urand(4000, 5000));
+ events.Repeat(4s, 5s);
break;
}
case EVENT_SHAZZRAH_CURSE:
@@ -76,26 +76,26 @@ public:
{
DoCast(target, SPELL_SHAZZRAH_CURSE);
}
- events.RepeatEvent(urand(23000, 26000));
+ events.Repeat(23s, 26s);
break;
}
case EVENT_MAGIC_GROUNDING:
{
DoCastSelf(SPELL_MAGIC_GROUNDING);
- events.RepeatEvent(urand(7000, 9000));
+ events.Repeat(7s, 9s);
break;
}
case EVENT_COUNTERSPELL:
{
DoCastAOE(SPELL_COUNTERSPELL);
- events.RepeatEvent(urand(15000, 18000));
+ events.Repeat(15s, 18s);
break;
}
case EVENT_SHAZZRAH_GATE:
{
DoCastAOE(SPELL_SHAZZRAH_GATE_DUMMY);
events.RescheduleEvent(EVENT_ARCANE_EXPLOSION, 3s, 6s);
- events.RepeatEvent(45000);
+ events.Repeat(45s);
break;
}
}
diff --git a/src/server/scripts/EasternKingdoms/BlackrockMountain/MoltenCore/boss_sulfuron_harbinger.cpp b/src/server/scripts/EasternKingdoms/BlackrockMountain/MoltenCore/boss_sulfuron_harbinger.cpp
index 942a22f619..edc39e8cc7 100644
--- a/src/server/scripts/EasternKingdoms/BlackrockMountain/MoltenCore/boss_sulfuron_harbinger.cpp
+++ b/src/server/scripts/EasternKingdoms/BlackrockMountain/MoltenCore/boss_sulfuron_harbinger.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
@@ -72,7 +72,7 @@ public:
case EVENT_DEMORALIZING_SHOUT:
{
DoCastVictim(SPELL_DEMORALIZING_SHOUT);
- events.RepeatEvent(urand(12000, 18000));
+ events.Repeat(12s, 18s);
break;
}
case EVENT_INSPIRE:
@@ -84,19 +84,19 @@ public:
}
DoCastSelf(SPELL_INSPIRE);
- events.RepeatEvent(urand(13000, 20000));
+ events.Repeat(13s, 20s);
break;
}
case EVENT_KNOCKDOWN:
{
DoCastVictim(SPELL_KNOCKDOWN);
- events.RepeatEvent(urand(10000, 20000));
+ events.Repeat(10s, 20s);
break;
}
case EVENT_FLAMESPEAR:
{
DoCastRandomTarget(SPELL_FLAMESPEAR);
- events.RepeatEvent(urand(12000, 16000));
+ events.Repeat(12s, 16s);
break;
}
}
@@ -133,7 +133,7 @@ public:
events.ScheduleEvent(EVENT_DARK_STRIKE, 4s, 7s);
events.ScheduleEvent(EVENT_DARK_MENDING, 15s, 30s);
events.ScheduleEvent(EVENT_SHADOW_WORD_PAIN, 2s, 4s);
- events.ScheduleEvent(EVENT_IMMOLATE, 3500ms, 6000ms);
+ events.ScheduleEvent(EVENT_IMMOLATE, 3500ms, 6s);
}
void UpdateAI(uint32 diff) override
@@ -157,7 +157,7 @@ public:
case EVENT_DARK_STRIKE:
{
DoCastVictim(SPELL_DARK_STRIKE);
- events.RepeatEvent(urand(4000, 7000));
+ events.Repeat(4s, 7s);
break;
}
case EVENT_DARK_MENDING:
@@ -169,7 +169,7 @@ public:
DoCast(target, SPELL_DARK_MENDING);
}
}
- events.RepeatEvent(urand(15000, 20000));
+ events.Repeat(15s, 20s);
break;
}
case EVENT_SHADOW_WORD_PAIN:
@@ -178,7 +178,7 @@ public:
{
DoCast(target, SPELL_SHADOW_WORD_PAIN);
}
- events.RepeatEvent(urand(2500, 5000));
+ events.Repeat(2500ms, 5s);
break;
}
case EVENT_IMMOLATE:
@@ -187,7 +187,7 @@ public:
{
DoCast(target, SPELL_IMMOLATE);
}
- events.RepeatEvent(urand(5000, 7000));
+ events.Repeat(5s, 7s);
break;
}
}
diff --git a/src/server/scripts/EasternKingdoms/BlackrockMountain/MoltenCore/instance_molten_core.cpp b/src/server/scripts/EasternKingdoms/BlackrockMountain/MoltenCore/instance_molten_core.cpp
index 7bd064e4c0..e9163cb896 100644
--- a/src/server/scripts/EasternKingdoms/BlackrockMountain/MoltenCore/instance_molten_core.cpp
+++ b/src/server/scripts/EasternKingdoms/BlackrockMountain/MoltenCore/instance_molten_core.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/scripts/EasternKingdoms/BlackrockMountain/MoltenCore/molten_core.cpp b/src/server/scripts/EasternKingdoms/BlackrockMountain/MoltenCore/molten_core.cpp
index 9d1d0033e2..117f069267 100644
--- a/src/server/scripts/EasternKingdoms/BlackrockMountain/MoltenCore/molten_core.cpp
+++ b/src/server/scripts/EasternKingdoms/BlackrockMountain/MoltenCore/molten_core.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
@@ -199,7 +199,7 @@ class spell_mc_play_dead_aura : public AuraScript
else
{
Unit::Kill(creatureTarget, creatureTarget);
- creatureTarget->DespawnOrUnsummon(14000);
+ creatureTarget->DespawnOrUnsummon(14s);
}
}
diff --git a/src/server/scripts/EasternKingdoms/BlackrockMountain/MoltenCore/molten_core.h b/src/server/scripts/EasternKingdoms/BlackrockMountain/MoltenCore/molten_core.h
index 851ea697e6..0dea07421e 100644
--- a/src/server/scripts/EasternKingdoms/BlackrockMountain/MoltenCore/molten_core.h
+++ b/src/server/scripts/EasternKingdoms/BlackrockMountain/MoltenCore/molten_core.h
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/scripts/EasternKingdoms/Deadmines/boss_mr_smite.cpp b/src/server/scripts/EasternKingdoms/Deadmines/boss_mr_smite.cpp
index 44c7b68395..b68dada750 100644
--- a/src/server/scripts/EasternKingdoms/Deadmines/boss_mr_smite.cpp
+++ b/src/server/scripts/EasternKingdoms/Deadmines/boss_mr_smite.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
@@ -90,7 +90,7 @@ public:
if (me->HealthBelowPct(67) && !health67)
{
me->CastSpell(me, SPELL_SMITE_STOMP, false);
- events.DelayEvents(10000);
+ events.DelayEvents(10s);
me->GetMotionMaster()->Clear();
me->GetMotionMaster()->MovePoint(EQUIP_TWO_SWORDS, 1.859f, -780.72f, 9.831f);
Talk(SAY_SWAP1);
@@ -105,7 +105,7 @@ public:
if (me->HealthBelowPct(34) && !health34)
{
me->CastSpell(me, SPELL_SMITE_STOMP, false);
- events.DelayEvents(10000);
+ events.DelayEvents(10s);
me->GetMotionMaster()->Clear();
me->GetMotionMaster()->MovePoint(EQUIP_MACE, 1.859f, -780.72f, 9.831f);
Talk(SAY_SWAP2);
diff --git a/src/server/scripts/EasternKingdoms/Deadmines/deadmines.h b/src/server/scripts/EasternKingdoms/Deadmines/deadmines.h
index 6ff733ad89..17f12fe523 100644
--- a/src/server/scripts/EasternKingdoms/Deadmines/deadmines.h
+++ b/src/server/scripts/EasternKingdoms/Deadmines/deadmines.h
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/scripts/EasternKingdoms/Deadmines/instance_deadmines.cpp b/src/server/scripts/EasternKingdoms/Deadmines/instance_deadmines.cpp
index f9540d7355..a95299903c 100644
--- a/src/server/scripts/EasternKingdoms/Deadmines/instance_deadmines.cpp
+++ b/src/server/scripts/EasternKingdoms/Deadmines/instance_deadmines.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/scripts/EasternKingdoms/Gnomeregan/gnomeregan.h b/src/server/scripts/EasternKingdoms/Gnomeregan/gnomeregan.h
index 375f759e68..70ec075c11 100644
--- a/src/server/scripts/EasternKingdoms/Gnomeregan/gnomeregan.h
+++ b/src/server/scripts/EasternKingdoms/Gnomeregan/gnomeregan.h
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/scripts/EasternKingdoms/Gnomeregan/instance_gnomeregan.cpp b/src/server/scripts/EasternKingdoms/Gnomeregan/instance_gnomeregan.cpp
index e4125d70d0..a6289049a4 100644
--- a/src/server/scripts/EasternKingdoms/Gnomeregan/instance_gnomeregan.cpp
+++ b/src/server/scripts/EasternKingdoms/Gnomeregan/instance_gnomeregan.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
@@ -131,7 +131,7 @@ public:
uint32 checkTimer;
ObjectGuid playerGUID;
- void SetGUID(ObjectGuid guid, int32) override
+ void SetGUID(ObjectGuid const& guid, int32) override
{
playerGUID = guid;
}
@@ -146,7 +146,7 @@ public:
{
if (Player* player = ObjectAccessor::GetPlayer(*me, playerGUID))
player->GroupEventHappens(QUEST_A_FINE_MESS, me);
- me->DespawnOrUnsummon(1000);
+ me->DespawnOrUnsummon(1s);
}
}
}
diff --git a/src/server/scripts/EasternKingdoms/Karazhan/boss_chess_event.cpp b/src/server/scripts/EasternKingdoms/Karazhan/boss_chess_event.cpp
index 84d51f7d0c..b0d23fe950 100644
--- a/src/server/scripts/EasternKingdoms/Karazhan/boss_chess_event.cpp
+++ b/src/server/scripts/EasternKingdoms/Karazhan/boss_chess_event.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/scripts/EasternKingdoms/Karazhan/boss_curator.cpp b/src/server/scripts/EasternKingdoms/Karazhan/boss_curator.cpp
index e4e5bab494..e55b7dcdf0 100644
--- a/src/server/scripts/EasternKingdoms/Karazhan/boss_curator.cpp
+++ b/src/server/scripts/EasternKingdoms/Karazhan/boss_curator.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/scripts/EasternKingdoms/Karazhan/boss_maiden_of_virtue.cpp b/src/server/scripts/EasternKingdoms/Karazhan/boss_maiden_of_virtue.cpp
index 93e90ca33d..93d9c0d3a9 100644
--- a/src/server/scripts/EasternKingdoms/Karazhan/boss_maiden_of_virtue.cpp
+++ b/src/server/scripts/EasternKingdoms/Karazhan/boss_maiden_of_virtue.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/scripts/EasternKingdoms/Karazhan/boss_midnight.cpp b/src/server/scripts/EasternKingdoms/Karazhan/boss_midnight.cpp
index f95f8e99ad..d4e1bffaab 100644
--- a/src/server/scripts/EasternKingdoms/Karazhan/boss_midnight.cpp
+++ b/src/server/scripts/EasternKingdoms/Karazhan/boss_midnight.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/scripts/EasternKingdoms/Karazhan/boss_moroes.cpp b/src/server/scripts/EasternKingdoms/Karazhan/boss_moroes.cpp
index e9313e0f72..6bb780a831 100644
--- a/src/server/scripts/EasternKingdoms/Karazhan/boss_moroes.cpp
+++ b/src/server/scripts/EasternKingdoms/Karazhan/boss_moroes.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/scripts/EasternKingdoms/Karazhan/boss_netherspite.cpp b/src/server/scripts/EasternKingdoms/Karazhan/boss_netherspite.cpp
index c2b5838740..e7338f95fb 100644
--- a/src/server/scripts/EasternKingdoms/Karazhan/boss_netherspite.cpp
+++ b/src/server/scripts/EasternKingdoms/Karazhan/boss_netherspite.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/scripts/EasternKingdoms/Karazhan/boss_nightbane.cpp b/src/server/scripts/EasternKingdoms/Karazhan/boss_nightbane.cpp
index 70bcad38e2..a974ca77f0 100644
--- a/src/server/scripts/EasternKingdoms/Karazhan/boss_nightbane.cpp
+++ b/src/server/scripts/EasternKingdoms/Karazhan/boss_nightbane.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
@@ -183,7 +183,7 @@ struct boss_nightbane : public BossAI
me->GetMotionMaster()->MoveTakeoff(POINT_INTRO_TAKE_OFF, me->GetPositionX(), me->GetPositionY(), me->GetPositionZ() + 10.0f, 13.99879f);
}).Schedule(4s, [this](TaskContext /*context*/)
{
- me->GetMotionMaster()->MovePath(me->GetEntry()*10, false);
+ me->GetMotionMaster()->MoveWaypoint(me->GetEntry()*10, false);
});
}
}
@@ -400,7 +400,7 @@ struct boss_nightbane : public BossAI
{
scheduler.Schedule(0s, [this](TaskContext /*context*/)
{
- me->GetMotionMaster()->MovePath(me->GetEntry()*10+1, false);
+ me->GetMotionMaster()->MoveWaypoint(me->GetEntry()*10+1, false);
});
}
break;
diff --git a/src/server/scripts/EasternKingdoms/Karazhan/boss_prince_malchezaar.cpp b/src/server/scripts/EasternKingdoms/Karazhan/boss_prince_malchezaar.cpp
index e85da8d9f2..28ab0242f5 100644
--- a/src/server/scripts/EasternKingdoms/Karazhan/boss_prince_malchezaar.cpp
+++ b/src/server/scripts/EasternKingdoms/Karazhan/boss_prince_malchezaar.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/scripts/EasternKingdoms/Karazhan/boss_servant_quarters.cpp b/src/server/scripts/EasternKingdoms/Karazhan/boss_servant_quarters.cpp
index ceec78719e..69a403d4e1 100644
--- a/src/server/scripts/EasternKingdoms/Karazhan/boss_servant_quarters.cpp
+++ b/src/server/scripts/EasternKingdoms/Karazhan/boss_servant_quarters.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/scripts/EasternKingdoms/Karazhan/boss_shade_of_aran.cpp b/src/server/scripts/EasternKingdoms/Karazhan/boss_shade_of_aran.cpp
index f804a28785..051aa08c6c 100644
--- a/src/server/scripts/EasternKingdoms/Karazhan/boss_shade_of_aran.cpp
+++ b/src/server/scripts/EasternKingdoms/Karazhan/boss_shade_of_aran.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
@@ -151,7 +151,7 @@ struct boss_shade_of_aran : public BossAI
return me->GetDistance2d(roomCenter.GetPositionX(), roomCenter.GetPositionY()) < 45.0f;
}
- void SetGUID(ObjectGuid guid, int32 id) override
+ void SetGUID(ObjectGuid const& guid, int32 id) override
{
if (id == ACTION_ATIESH_REACT && !_atieshReaction)
{
diff --git a/src/server/scripts/EasternKingdoms/Karazhan/boss_tenris_mirkblood.cpp b/src/server/scripts/EasternKingdoms/Karazhan/boss_tenris_mirkblood.cpp
index bed3364478..289b2d596a 100644
--- a/src/server/scripts/EasternKingdoms/Karazhan/boss_tenris_mirkblood.cpp
+++ b/src/server/scripts/EasternKingdoms/Karazhan/boss_tenris_mirkblood.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
@@ -123,6 +123,15 @@ struct boss_tenris_mirkblood : public BossAI
return;
DoCast(victim, SPELL_SUMMON_SANGUINE_SPIRIT_ON_KILL);
+
+ if (!_mirrorTarget)
+ return;
+
+ if (victim == _mirrorTarget)
+ {
+ me->RemoveAurasDueToSpell(SPELL_BLOOD_MIRROR0);
+ me->RemoveAurasDueToSpell(SPELL_BLOOD_MIRROR1);
+ }
}
void DamageTaken(Unit* attacker, uint32& damage, DamageEffectType damageType, SpellSchoolMask damageSchoolMask) override
@@ -281,8 +290,8 @@ public:
bool OnTrigger(Player* player, AreaTrigger const* /*trigger*/) override
{
if (InstanceScript* instance = player->GetInstanceScript())
- if (instance->GetBossState(DATA_MIRKBLOOD) != DONE)
- if (Creature* mirkblood = instance->GetCreature(DATA_MIRKBLOOD))
+ if (Creature* mirkblood = instance->GetCreature(DATA_MIRKBLOOD))
+ if (mirkblood->IsAlive() && !mirkblood->IsInCombat())
mirkblood->AI()->Talk(SAY_APPROACH, player);
return false;
@@ -297,8 +306,8 @@ public:
bool OnTrigger(Player* player, AreaTrigger const* /*trigger*/) override
{
if (InstanceScript* instance = player->GetInstanceScript())
- if (instance->GetBossState(DATA_MIRKBLOOD) != DONE)
- if (Creature* mirkblood = instance->GetCreature(DATA_MIRKBLOOD))
+ if (Creature* mirkblood = instance->GetCreature(DATA_MIRKBLOOD))
+ if (mirkblood->IsAlive() && mirkblood->IsImmuneToPC())
mirkblood->SetImmuneToPC(false);
return false;
diff --git a/src/server/scripts/EasternKingdoms/Karazhan/boss_terestian_illhoof.cpp b/src/server/scripts/EasternKingdoms/Karazhan/boss_terestian_illhoof.cpp
index 3b5092fab2..13b37f3e00 100644
--- a/src/server/scripts/EasternKingdoms/Karazhan/boss_terestian_illhoof.cpp
+++ b/src/server/scripts/EasternKingdoms/Karazhan/boss_terestian_illhoof.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
@@ -88,7 +88,7 @@ struct npc_kilrek : public ScriptedAI
DoCast(Terestian, SPELL_BROKEN_PACT, true);
}
}
- me->DespawnOrUnsummon(15000);
+ me->DespawnOrUnsummon(15s);
}
void UpdateAI(uint32 diff) override
diff --git a/src/server/scripts/EasternKingdoms/Karazhan/bosses_opera.cpp b/src/server/scripts/EasternKingdoms/Karazhan/bosses_opera.cpp
index aa35b58b9f..31046a05dc 100644
--- a/src/server/scripts/EasternKingdoms/Karazhan/bosses_opera.cpp
+++ b/src/server/scripts/EasternKingdoms/Karazhan/bosses_opera.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/scripts/EasternKingdoms/Karazhan/instance_karazhan.cpp b/src/server/scripts/EasternKingdoms/Karazhan/instance_karazhan.cpp
index a283e65cc2..c683a49610 100644
--- a/src/server/scripts/EasternKingdoms/Karazhan/instance_karazhan.cpp
+++ b/src/server/scripts/EasternKingdoms/Karazhan/instance_karazhan.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/scripts/EasternKingdoms/Karazhan/karazhan.cpp b/src/server/scripts/EasternKingdoms/Karazhan/karazhan.cpp
index cf45992a8e..484a0ada74 100644
--- a/src/server/scripts/EasternKingdoms/Karazhan/karazhan.cpp
+++ b/src/server/scripts/EasternKingdoms/Karazhan/karazhan.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
@@ -170,7 +170,8 @@ public:
if (m_uiEventId == EVENT_OZ)
instance->SetData(DATA_OPERA_OZ_DEATHCOUNT, IN_PROGRESS);
- Start(false, false);
+ me->SetWalk(true);
+ Start(false);
}
void JustEngagedWith(Unit* /*who*/) override { }
@@ -217,29 +218,22 @@ public:
switch (m_uiEventId)
{
case EVENT_OZ:
- if (OzDialogue[count].textid)
- text = OzDialogue[count].textid;
- if (OzDialogue[count].timer)
- TalkTimer = OzDialogue[count].timer;
+ text = OzDialogue[count].textid;
+ TalkTimer = OzDialogue[count].timer;
break;
-
case EVENT_HOOD:
- if (HoodDialogue[count].textid)
- text = HoodDialogue[count].textid;
- if (HoodDialogue[count].timer)
- TalkTimer = HoodDialogue[count].timer;
+ text = HoodDialogue[count].textid;
+ TalkTimer = HoodDialogue[count].timer;
break;
-
case EVENT_RAJ:
- if (RAJDialogue[count].textid)
- text = RAJDialogue[count].textid;
- if (RAJDialogue[count].timer)
- TalkTimer = RAJDialogue[count].timer;
+ text = RAJDialogue[count].textid;
+ TalkTimer = RAJDialogue[count].timer;
break;
+ default:
+ return;
}
- if (text)
- CreatureAI::Talk(text);
+ CreatureAI::Talk(text);
}
void PrepareEncounter()
@@ -523,9 +517,9 @@ public:
}
}
- me->DespawnOrUnsummon(100);
+ me->DespawnOrUnsummon(100ms);
if (Creature* arca = ObjectAccessor::GetCreature((*me), ArcanagosGUID))
- arca->DespawnOrUnsummon(100);
+ arca->DespawnOrUnsummon(100ms);
return 5000;
default:
diff --git a/src/server/scripts/EasternKingdoms/Karazhan/karazhan.h b/src/server/scripts/EasternKingdoms/Karazhan/karazhan.h
index 890fdcf2d9..66749e9052 100644
--- a/src/server/scripts/EasternKingdoms/Karazhan/karazhan.h
+++ b/src/server/scripts/EasternKingdoms/Karazhan/karazhan.h
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/scripts/EasternKingdoms/MagistersTerrace/boss_felblood_kaelthas.cpp b/src/server/scripts/EasternKingdoms/MagistersTerrace/boss_felblood_kaelthas.cpp
index 8feeadedcb..d25849cd05 100644
--- a/src/server/scripts/EasternKingdoms/MagistersTerrace/boss_felblood_kaelthas.cpp
+++ b/src/server/scripts/EasternKingdoms/MagistersTerrace/boss_felblood_kaelthas.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
@@ -138,7 +138,7 @@ struct boss_felblood_kaelthas : public BossAI
ScheduleTimedEvent(0ms, [&]{
DoCastVictim(SPELL_FIREBALL);
- }, 3000ms, 4500ms);
+ }, 3s, 4500ms);
ScheduleTimedEvent(15s, [&]{
Talk(SAY_PHOENIX);
DoCastSelf(SPELL_PHOENIX);
diff --git a/src/server/scripts/EasternKingdoms/MagistersTerrace/boss_priestess_delrissa.cpp b/src/server/scripts/EasternKingdoms/MagistersTerrace/boss_priestess_delrissa.cpp
index d96bdc33bb..72ee8b4615 100644
--- a/src/server/scripts/EasternKingdoms/MagistersTerrace/boss_priestess_delrissa.cpp
+++ b/src/server/scripts/EasternKingdoms/MagistersTerrace/boss_priestess_delrissa.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/scripts/EasternKingdoms/MagistersTerrace/boss_selin_fireheart.cpp b/src/server/scripts/EasternKingdoms/MagistersTerrace/boss_selin_fireheart.cpp
index 66edbda08a..8787edd81f 100644
--- a/src/server/scripts/EasternKingdoms/MagistersTerrace/boss_selin_fireheart.cpp
+++ b/src/server/scripts/EasternKingdoms/MagistersTerrace/boss_selin_fireheart.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
@@ -95,7 +95,7 @@ struct boss_selin_fireheart : public BossAI
BossAI::JustEngagedWith(who);
ScheduleTimedEvent(2500ms, [&]{
DoCastRandomTarget(SPELL_DRAIN_LIFE);
- }, 10000ms);
+ }, 10s);
ScheduleTimedEvent(2s, [&]{
me->RemoveAuraFromStack(SPELL_MANA_RAGE_TRIGGER);
DoCastAOE(SPELL_FEL_EXPLOSION);
diff --git a/src/server/scripts/EasternKingdoms/MagistersTerrace/boss_vexallus.cpp b/src/server/scripts/EasternKingdoms/MagistersTerrace/boss_vexallus.cpp
index 403782eed0..888683b9e7 100644
--- a/src/server/scripts/EasternKingdoms/MagistersTerrace/boss_vexallus.cpp
+++ b/src/server/scripts/EasternKingdoms/MagistersTerrace/boss_vexallus.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
@@ -141,7 +141,7 @@ struct boss_vexallus : public BossAI
void SummonedCreatureDies(Creature* summon, Unit* killer) override
{
summons.Despawn(summon);
- summon->DespawnOrUnsummon(1);
+ summon->DespawnOrUnsummon(1ms);
if (killer)
killer->CastSpell(killer, SPELL_ENERGY_FEEDBACK, true, 0, 0, summon->GetGUID());
}
diff --git a/src/server/scripts/EasternKingdoms/MagistersTerrace/instance_magisters_terrace.cpp b/src/server/scripts/EasternKingdoms/MagistersTerrace/instance_magisters_terrace.cpp
index eacc695482..6b6d656faa 100644
--- a/src/server/scripts/EasternKingdoms/MagistersTerrace/instance_magisters_terrace.cpp
+++ b/src/server/scripts/EasternKingdoms/MagistersTerrace/instance_magisters_terrace.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
@@ -80,7 +80,7 @@ public:
{
if (Creature* kalecgos = instance->SummonCreature(NPC_KALECGOS, KalecgosSpawnPos))
{
- kalecgos->GetMotionMaster()->MovePath(PATH_KALECGOS_FLIGHT, false);
+ kalecgos->GetMotionMaster()->MoveWaypoint(PATH_KALECGOS_FLIGHT, false);
kalecgos->AI()->Talk(SAY_KALECGOS_SPAWN);
}
});
diff --git a/src/server/scripts/EasternKingdoms/MagistersTerrace/magisters_terrace.h b/src/server/scripts/EasternKingdoms/MagistersTerrace/magisters_terrace.h
index 49de3e72d4..24d6bfa401 100644
--- a/src/server/scripts/EasternKingdoms/MagistersTerrace/magisters_terrace.h
+++ b/src/server/scripts/EasternKingdoms/MagistersTerrace/magisters_terrace.h
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/scripts/EasternKingdoms/ScarletEnclave/chapter1.cpp b/src/server/scripts/EasternKingdoms/ScarletEnclave/chapter1.cpp
index 4747e77658..45362c5887 100644
--- a/src/server/scripts/EasternKingdoms/ScarletEnclave/chapter1.cpp
+++ b/src/server/scripts/EasternKingdoms/ScarletEnclave/chapter1.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
@@ -230,7 +230,7 @@ public:
me->RemoveAllAuras();
me->CastSpell(attacker, SPELL_DUEL_VICTORY, true);
me->RestoreFaction();
- me->DespawnOrUnsummon(10000);
+ me->DespawnOrUnsummon(10s);
}
}
}
@@ -396,7 +396,7 @@ public:
AttackStart(attacker);
}
- void SetGUID(ObjectGuid guid, int32) override
+ void SetGUID(ObjectGuid const& guid, int32) override
{
gothikGUID = guid;
events.ScheduleEvent(EVENT_GHOUL_MOVE_TO_PIT, 3s);
@@ -407,7 +407,7 @@ public:
{
if (type == POINT_MOTION_TYPE && point == 1)
{
- me->DespawnOrUnsummon(1500);
+ me->DespawnOrUnsummon(1500ms);
me->CastSpell(me, SPELL_GHOUL_SUBMERGE, true);
}
}
@@ -438,7 +438,7 @@ public:
if (owner->GetVictim())
AttackStart(owner->GetVictim());
- events.RepeatEvent(1000);
+ events.Repeat(1s);
return;
}
@@ -502,49 +502,6 @@ public:
};
};
-class npc_scarlet_cannon : public CreatureScript
-{
-public:
- npc_scarlet_cannon() : CreatureScript("npc_scarlet_cannon") { }
-
- CreatureAI* GetAI(Creature* creature) const override
- {
- return new npc_scarlet_cannonAI(creature);
- }
-
- struct npc_scarlet_cannonAI : public VehicleAI
- {
- npc_scarlet_cannonAI(Creature* creature) : VehicleAI(creature) { summonAttackers = 0; }
-
- uint32 summonAttackers;
- void PassengerBoarded(Unit* /*passenger*/, int8 /*seatId*/, bool apply) override
- {
- summonAttackers = apply ? 8000 : 0;
- }
-
- void UpdateAI(uint32 diff) override
- {
- VehicleAI::UpdateAI(diff);
-
- if (summonAttackers)
- {
- summonAttackers += diff;
- if (summonAttackers >= 15000)
- {
- for (uint8 i = 0; i < 15; ++i)
- if (Creature* summon = me->SummonCreature(28834 /*NPC_SCARLET_FLEET_DEFENDER*/, 2192.56f + irand(-10, 10), -6147.90f + irand(-10, 10), 5.2f, 4.7f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 45000))
- {
- summon->SetHomePosition(me->GetHomePosition());
- summon->AI()->AttackStart(me);
- }
-
- summonAttackers = 1;
- }
- }
- }
- };
-};
-
/*######
##Quest 12848
######*/
@@ -760,22 +717,22 @@ public:
{
case EVENT_ICY_TOUCH:
DoCastVictim(SPELL_ICY_TOUCH);
- events.DelayEvents(1000, GCD_CAST);
+ events.DelayEvents(1s, GCD_CAST);
events.ScheduleEvent(EVENT_ICY_TOUCH, 5s, GCD_CAST);
break;
case EVENT_PLAGUE_STRIKE:
DoCastVictim(SPELL_PLAGUE_STRIKE);
- events.DelayEvents(1000, GCD_CAST);
+ events.DelayEvents(1s, GCD_CAST);
events.ScheduleEvent(EVENT_PLAGUE_STRIKE, 5s, GCD_CAST);
break;
case EVENT_BLOOD_STRIKE:
DoCastVictim(SPELL_BLOOD_STRIKE);
- events.DelayEvents(1000, GCD_CAST);
+ events.DelayEvents(1s, GCD_CAST);
events.ScheduleEvent(EVENT_BLOOD_STRIKE, 5s, GCD_CAST);
break;
case EVENT_DEATH_COIL:
DoCastVictim(SPELL_DEATH_COIL);
- events.DelayEvents(1000, GCD_CAST);
+ events.DelayEvents(1s, GCD_CAST);
events.ScheduleEvent(EVENT_DEATH_COIL, 5s, GCD_CAST);
break;
}
@@ -806,7 +763,7 @@ public:
ObjectGuid prisonerGUID;
- void SetGUID(ObjectGuid guid, int32 /*id*/) override
+ void SetGUID(ObjectGuid const& guid, int32 /*id*/) override
{
if (!prisonerGUID)
prisonerGUID = guid;
@@ -835,252 +792,6 @@ public:
}
};
-/*####
-## npc_scarlet_miner_cart
-####*/
-
-enum Spells_SM
-{
- SPELL_CART_CHECK = 54173,
- SPELL_CART_DRAG = 52465
-};
-
-class npc_scarlet_miner_cart : public CreatureScript
-{
-public:
- npc_scarlet_miner_cart() : CreatureScript("npc_scarlet_miner_cart") { }
-
- CreatureAI* GetAI(Creature* creature) const override
- {
- return new npc_scarlet_miner_cartAI(creature);
- }
-
- struct npc_scarlet_miner_cartAI : public PassiveAI
- {
- npc_scarlet_miner_cartAI(Creature* creature) : PassiveAI(creature)
- {
- me->SetImmuneToAll(true);
- me->SetFaction(FACTION_FRIENDLY);
- me->SetDisplayFromModel(0); // Modelid2 is a horse.
- }
-
- ObjectGuid minerGUID;
-
- void SetGUID(ObjectGuid guid, int32 /*id*/) override
- {
- minerGUID = guid;
- }
-
- void DoAction(int32 /*param*/) override
- {
- if (Creature* miner = ObjectAccessor::GetCreature(*me, minerGUID))
- {
- me->SetWalk(false);
-
- //Not 100% correct, but movement is smooth. Sometimes miner walks faster
- //than normal, this speed is fast enough to keep up at those times.
- me->SetSpeed(MOVE_RUN, 1.25f);
-
- me->GetMotionMaster()->MoveFollow(miner, 1.0f, 0);
- me->ReplaceAllUnitFlags(UNIT_FLAG_NON_ATTACKABLE);
- me->SetImmuneToAll(true);
- me->SetFaction(FACTION_FRIENDLY);
- }
- }
-
- void PassengerBoarded(Unit* who, int8 /*seatId*/, bool apply) override
- {
- who->SetVisible(!apply);
- if (!apply)
- if (Creature* miner = ObjectAccessor::GetCreature(*me, minerGUID))
- miner->DisappearAndDie();
- }
- };
-};
-
-/*####
-## npc_scarlet_miner
-####*/
-
-enum Says_SM
-{
- SAY_SCARLET_MINER_0 = 0,
- SAY_SCARLET_MINER_1 = 1
-};
-
-class npc_scarlet_miner : public CreatureScript
-{
-public:
- npc_scarlet_miner() : CreatureScript("npc_scarlet_miner") { }
-
- CreatureAI* GetAI(Creature* creature) const override
- {
- return new npc_scarlet_minerAI(creature);
- }
-
- struct npc_scarlet_minerAI : public npc_escortAI
- {
- npc_scarlet_minerAI(Creature* creature) : npc_escortAI(creature)
- {
- me->SetReactState(REACT_PASSIVE);
- }
-
- uint32 IntroTimer;
- uint32 IntroPhase;
- ObjectGuid carGUID;
-
- void Reset() override
- {
- carGUID.Clear();
- IntroTimer = 0;
- IntroPhase = 0;
- }
-
- void InitWaypoint()
- {
- AddWaypoint(1, 2389.03f, -5902.74f, 109.014f, 5000);
- AddWaypoint(2, 2341.812012f, -5900.484863f, 102.619743f);
- AddWaypoint(3, 2308.34f, -5904.2f, 91.1099f);
- AddWaypoint(4, 2300.69f, -5912.99f, 86.1572f);
- AddWaypoint(5, 2294.142090f, -5927.274414f, 75.316849f);
- AddWaypoint(6, 2286.984375f, -5944.955566f, 63.714966f);
- AddWaypoint(7, 2280.001709f, -5961.186035f, 54.228283f);
- AddWaypoint(8, 2259.389648f, -5974.197754f, 42.359348f);
- AddWaypoint(9, 2242.882812f, -5984.642578f, 32.827850f);
- AddWaypoint(10, 2239.79f, -5989.31f, 30.4453f);
- AddWaypoint(11, 2236.52f, -5994.28f, 27.4829f);
- AddWaypoint(12, 2232.61f, -6000.23f, 23.1281f);
- AddWaypoint(13, 2228.69f, -6006.46f, 17.6638f);
- AddWaypoint(14, 2225.2f, -6012.39f, 12.9487f);
- AddWaypoint(15, 2217.265625f, -6028.959473f, 7.675705f);
- AddWaypoint(16, 2202.595947f, -6061.325684f, 5.882018f);
- AddWaypoint(17, 2188.974609f, -6080.866699f, 3.370027f);
-
- if (urand(0, 1))
- {
- AddWaypoint(18, 2176.483887f, -6110.407227f, 1.855181f);
- AddWaypoint(19, 2172.516602f, -6146.752441f, 1.074235f);
- AddWaypoint(20, 2138.918457f, -6158.920898f, 1.342926f);
- AddWaypoint(21, 2129.866699f, -6174.107910f, 4.380779f);
- AddWaypoint(22, 2125.250001f, -6181.230001f, 9.91997f);
- AddWaypoint(23, 2117.709473f, -6193.830078f, 13.3542f, 10000);
- }
- else
- {
- AddWaypoint(18, 2184.190186f, -6166.447266f, 0.968877f);
- AddWaypoint(19, 2234.265625f, -6163.741211f, 0.916021f);
- AddWaypoint(20, 2268.071777f, -6158.750977f, 1.822252f);
- AddWaypoint(21, 2270.028320f, -6176.505859f, 6.340538f);
- AddWaypoint(22, 2270.350001f, -6182.410001f, 10.42431f);
- AddWaypoint(23, 2271.739014f, -6195.401855f, 13.3542f, 10000);
- }
- }
-
- void InitCartQuest(Player* who)
- {
- carGUID = who->GetVehicleBase()->GetGUID();
- InitWaypoint();
- Start(false, false, who->GetGUID());
- SetDespawnAtFar(false);
- }
-
- void WaypointReached(uint32 waypointId) override
- {
- switch (waypointId)
- {
- case 1:
- if (Unit* car = ObjectAccessor::GetCreature(*me, carGUID))
- {
- me->SetFacingToObject(car);
- // xinef: add some flags
- car->ReplaceAllUnitFlags(UNIT_FLAG_NON_ATTACKABLE);
- car->SetImmuneToAll(true);
- car->SetFaction(FACTION_FRIENDLY);
- }
- Talk(SAY_SCARLET_MINER_0);
- SetRun(true);
- IntroTimer = 4000;
- IntroPhase = 1;
- break;
- case 23:
- if (Creature* car = ObjectAccessor::GetCreature(*me, carGUID))
- {
- car->SetPosition(car->GetPositionX(), car->GetPositionY(), me->GetPositionZ() + 1, car->GetOrientation());
- car->StopMovingOnCurrentPos();
- me->SetFacingToObject(car);
- car->RemoveAura(SPELL_CART_DRAG);
- }
- Talk(SAY_SCARLET_MINER_1);
- break;
- default:
- break;
- }
- }
-
- void UpdateAI(uint32 diff) override
- {
- if (IntroPhase)
- {
- if (IntroTimer <= diff)
- {
- if (IntroPhase == 1)
- {
- if (Creature* car = ObjectAccessor::GetCreature(*me, carGUID))
- DoCast(car, SPELL_CART_DRAG);
- IntroTimer = 800;
- IntroPhase = 2;
- }
- else
- {
- if (Creature* car = ObjectAccessor::GetCreature(*me, carGUID))
- car->AI()->DoAction(0);
- IntroPhase = 0;
- }
- }
- else IntroTimer -= diff;
- }
- npc_escortAI::UpdateAI(diff);
- }
- };
-};
-
-/*######
-## go_inconspicuous_mine_car
-######*/
-
-enum Spells_Cart
-{
- SPELL_CART_SUMM = 52463
-};
-
-class go_inconspicuous_mine_car : public GameObjectScript
-{
-public:
- go_inconspicuous_mine_car() : GameObjectScript("go_inconspicuous_mine_car") { }
-
- bool OnGossipHello(Player* player, GameObject* /*go*/) override
- {
- if (player->GetQuestStatus(12701) == QUEST_STATUS_INCOMPLETE)
- {
- // Hack Why Trinity Dont Support Custom Summon Location
- if (Creature* miner = player->SummonCreature(28841, 2383.869629f, -5900.312500f, 107.996086f, player->GetOrientation(), TEMPSUMMON_DEAD_DESPAWN, 1))
- {
- player->CastSpell(player, SPELL_CART_SUMM, true);
- if (Creature* car = player->GetVehicleCreatureBase())
- {
- if (car->GetEntry() == 28817)
- {
- car->AI()->SetGUID(miner->GetGUID());
- CAST_AI(npc_scarlet_miner::npc_scarlet_minerAI, miner->AI())->InitCartQuest(player);
- }
- }
- }
- }
-
- return true;
- }
-};
-
class spell_death_knight_initiate_visual : public SpellScript
{
PrepareSpellScript(spell_death_knight_initiate_visual);
@@ -1218,13 +929,9 @@ void AddSC_the_scarlet_enclave_c1()
RegisterSpellScript(spell_q12698_the_gift_that_keeps_on_giving);
new npc_scarlet_ghoul();
new npc_dkc1_gothik();
- new npc_scarlet_cannon();
new npc_unworthy_initiate();
new npc_unworthy_initiate_anchor();
new go_acherus_soul_prison();
- new npc_scarlet_miner();
- new npc_scarlet_miner_cart();
- new go_inconspicuous_mine_car();
RegisterSpellScript(spell_death_knight_initiate_visual);
RegisterSpellScript(spell_lich_king_whisper);
RegisterSpellScript(spell_lich_king_vo_blocker);
diff --git a/src/server/scripts/EasternKingdoms/ScarletEnclave/chapter2.cpp b/src/server/scripts/EasternKingdoms/ScarletEnclave/chapter2.cpp
index 9c71aad73a..3ab236d8c0 100644
--- a/src/server/scripts/EasternKingdoms/ScarletEnclave/chapter2.cpp
+++ b/src/server/scripts/EasternKingdoms/ScarletEnclave/chapter2.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
@@ -64,12 +64,12 @@ enum Koltira
//NPC_DEATH_KNIGHT_MOUNT = 29201,
MODEL_DEATH_KNIGHT_MOUNT = 25278,
- POINT_STAND_UP = 0,
- POINT_BOX = 1,
- POINT_ANTI_MAGIC_ZONE = 2,
+ POINT_STAND_UP = 1,
+ POINT_BOX = 2,
+ POINT_ANTI_MAGIC_ZONE = 3,
- POINT_MOUNT = 0,
- POINT_DESPAWN = 1
+ POINT_MOUNT = 1,
+ POINT_DESPAWN = 2
};
class npc_koltira_deathweaver : public CreatureScript
@@ -106,7 +106,7 @@ public:
Talk(SAY_BREAKOUT0);
me->m_Events.AddEventAtOffset([&] {
- me->GetMotionMaster()->MovePath(me->GetEntry() * 10, false);
+ me->GetMotionMaster()->MoveWaypoint(me->GetEntry() * 10, false);
}, 5s);
}
@@ -167,13 +167,13 @@ public:
}
if (Creature* acolyte = me->SummonCreature(NPC_CRIMSON_ACOLYTE, 1640.6724f, -6032.0527f, 134.82213f, 4.654973506927490234f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 15000))
- acolyte->GetMotionMaster()->MovePath(NPC_CRIMSON_ACOLYTE * 10, false);
+ acolyte->GetMotionMaster()->MoveWaypoint(NPC_CRIMSON_ACOLYTE * 10, false);
if (Creature* acolyte = me->SummonCreature(NPC_CRIMSON_ACOLYTE, 1641.0055f, -6031.893f, 134.82211f, 0.401425719261169433f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 15000))
- acolyte->GetMotionMaster()->MovePath((NPC_CRIMSON_ACOLYTE + 1) * 10, false);
+ acolyte->GetMotionMaster()->MoveWaypoint((NPC_CRIMSON_ACOLYTE + 1) * 10, false);
if (Creature* acolyte = me->SummonCreature(NPC_CRIMSON_ACOLYTE, 1639.7053f, -6031.7373f, 134.82213f, 2.443460941314697265f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 15000))
- acolyte->GetMotionMaster()->MovePath((NPC_CRIMSON_ACOLYTE + 2) * 10, false);
+ acolyte->GetMotionMaster()->MoveWaypoint((NPC_CRIMSON_ACOLYTE + 2) * 10, false);
break;
case 1:
Talk(SAY_BREAKOUT4);
@@ -182,13 +182,13 @@ public:
valroth->AI()->Talk(SAY_VALROTH_WAVE2);
if (Creature* acolyte = me->SummonCreature(NPC_CRIMSON_ACOLYTE, 1640.7958f, -6030.307f, 134.82211f, 4.65355682373046875f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 15000))
- acolyte->GetMotionMaster()->MovePath((NPC_CRIMSON_ACOLYTE + 3) * 10, false);
+ acolyte->GetMotionMaster()->MoveWaypoint((NPC_CRIMSON_ACOLYTE + 3) * 10, false);
if (Creature* acolyte = me->SummonCreature(NPC_CRIMSON_ACOLYTE, 1641.7305f, -6030.751f, 134.82211f, 6.143558979034423828f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 15000))
- acolyte->GetMotionMaster()->MovePath((NPC_CRIMSON_ACOLYTE + 4) * 10, false);
+ acolyte->GetMotionMaster()->MoveWaypoint((NPC_CRIMSON_ACOLYTE + 4) * 10, false);
if (Creature* acolyte = me->SummonCreature(NPC_CRIMSON_ACOLYTE, 1639.4657f, -6030.404f, 134.82211f, 4.502949237823486328f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 15000))
- acolyte->GetMotionMaster()->MovePath((NPC_CRIMSON_ACOLYTE + 5) * 10, false);
+ acolyte->GetMotionMaster()->MoveWaypoint((NPC_CRIMSON_ACOLYTE + 5) * 10, false);
break;
case 2:
Talk(SAY_BREAKOUT5);
@@ -197,16 +197,16 @@ public:
valroth->AI()->Talk(SAY_VALROTH_WAVE3);
if (Creature* acolyte = me->SummonCreature(NPC_CRIMSON_ACOLYTE, 1641.3405f, -6031.436f, 134.82211f, 4.612849712371826171f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 15000))
- acolyte->GetMotionMaster()->MovePath((NPC_CRIMSON_ACOLYTE + 6) * 10, false);
+ acolyte->GetMotionMaster()->MoveWaypoint((NPC_CRIMSON_ACOLYTE + 6) * 10, false);
if (Creature* acolyte = me->SummonCreature(NPC_CRIMSON_ACOLYTE, 1642.0404f, -6030.3843f, 134.82211f, 1.378810048103332519f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 15000))
- acolyte->GetMotionMaster()->MovePath((NPC_CRIMSON_ACOLYTE + 7) * 10, false);
+ acolyte->GetMotionMaster()->MoveWaypoint((NPC_CRIMSON_ACOLYTE + 7) * 10, false);
if (Creature* acolyte = me->SummonCreature(NPC_CRIMSON_ACOLYTE, 1640.1162f, -6029.7817f, 134.82211f, 5.707226753234863281f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 15000))
- acolyte->GetMotionMaster()->MovePath((NPC_CRIMSON_ACOLYTE + 8) * 10, false);
+ acolyte->GetMotionMaster()->MoveWaypoint((NPC_CRIMSON_ACOLYTE + 8) * 10, false);
if (Creature* acolyte = me->SummonCreature(NPC_CRIMSON_ACOLYTE, 1640.9948f, -6029.8027f, 134.82211f, 1.605702877044677734f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 15000))
- acolyte->GetMotionMaster()->MovePath((NPC_CRIMSON_ACOLYTE + 9) * 10, false);
+ acolyte->GetMotionMaster()->MoveWaypoint((NPC_CRIMSON_ACOLYTE + 9) * 10, false);
break;
case 3:
Talk(SAY_BREAKOUT6);
@@ -223,7 +223,7 @@ public:
{
valroth->AI()->Talk(SAY_VALROTH_AGGRO);
valroth->SetReactState(REACT_AGGRESSIVE);
- valroth->GetMotionMaster()->MovePath(NPC_HIGH_INQUISITOR_VALROTH * 10, false);
+ valroth->GetMotionMaster()->MoveWaypoint(NPC_HIGH_INQUISITOR_VALROTH * 10, false);
}
return;
default:
@@ -262,7 +262,7 @@ public:
SetInvincibility(true);
me->SetReactState(REACT_PASSIVE);
me->RemoveUnitFlag(UNIT_FLAG_IMMUNE_TO_NPC);
- me->GetMotionMaster()->MovePath((me->GetEntry() + 1) * 10, false);
+ me->GetMotionMaster()->MoveWaypoint((me->GetEntry() + 1) * 10, false);
});
}
}
@@ -610,10 +610,10 @@ public:
// Start waypoint movement using WaypointMovementGenerator
if (uint32 pathId = me->GetWaypointPath())
{
- me->GetMotionMaster()->MovePath(pathId, true); // true = repeatable
+ me->GetMotionMaster()->MoveWaypoint(pathId, true); // true = repeatable
}
// Schedule the first ritual after 20-30s
- events.ScheduleEvent(EVENT_START_RITUAL, urand(20000, 30000));
+ events.ScheduleEvent(EVENT_START_RITUAL, 20s, 30s);
}
void UpdateAI(uint32 diff) override
@@ -628,7 +628,7 @@ public:
{
if (isOnRitual) // Already performing ritual
{
- events.ScheduleEvent(EVENT_START_RITUAL, urand(5000, 10000));
+ events.ScheduleEvent(EVENT_START_RITUAL, 5s, 10s);
break;
}
@@ -655,7 +655,7 @@ public:
if (!nearestCorpse)
{
// No corpse found nearby: try again later
- events.ScheduleEvent(EVENT_START_RITUAL, urand(5000, 10000));
+ events.ScheduleEvent(EVENT_START_RITUAL, 5s, 10s);
break;
}
// Start ritual
@@ -702,7 +702,7 @@ public:
// Resume paused waypoint movement
me->ResumeMovement();
// Schedule next ritual in 20-30s
- events.ScheduleEvent(EVENT_START_RITUAL, urand(20000, 30000));
+ events.ScheduleEvent(EVENT_START_RITUAL, 20s, 30s);
break;
}
}
@@ -723,9 +723,9 @@ public:
me->SetFacingToObject(geist);
geistGUID = geist->GetGUID();
// Geist found: schedule Ghoulplosion at +3s, then raising at +6s, then resume at +9s
- events.ScheduleEvent(EVENT_GHOULPLOSION, 3000);
- events.ScheduleEvent(EVENT_RAISE_GHOUL, 6000);
- events.ScheduleEvent(EVENT_RESUME_WP, 9000);
+ events.ScheduleEvent(EVENT_GHOULPLOSION, 3s);
+ events.ScheduleEvent(EVENT_RAISE_GHOUL, 6s);
+ events.ScheduleEvent(EVENT_RESUME_WP, 9s);
}
else
{
@@ -737,8 +737,8 @@ public:
me->SetFacingToObject(corpse);
}
- events.ScheduleEvent(EVENT_RAISE_GHOUL, 3000);
- events.ScheduleEvent(EVENT_RESUME_WP, 6000);
+ events.ScheduleEvent(EVENT_RAISE_GHOUL, 3s);
+ events.ScheduleEvent(EVENT_RESUME_WP, 6s);
}
}
}
@@ -797,10 +797,10 @@ public:
// Start waypoint movement using WaypointMovementGenerator
if (uint32 pathId = me->GetWaypointPath())
{
- me->GetMotionMaster()->MovePath(pathId, true); // true = repeatable
+ me->GetMotionMaster()->MoveWaypoint(pathId, true); // true = repeatable
}
// Schedule the first ritual after 50-60s
- events.ScheduleEvent(EVENT_START_RITUAL, urand(50000, 60000));
+ events.ScheduleEvent(EVENT_START_RITUAL, 50s, 60s);
}
void UpdateAI(uint32 diff) override
{
@@ -814,7 +814,7 @@ public:
{
if (isOnRitual) // Already performing ritual
{
- events.ScheduleEvent(EVENT_START_RITUAL, urand(5000, 10000));
+ events.ScheduleEvent(EVENT_START_RITUAL, 5s, 10s);
break;
}
@@ -841,7 +841,7 @@ public:
}
if (!nearestCorpse)
{
- events.ScheduleEvent(EVENT_START_RITUAL, urand(5000, 10000));
+ events.ScheduleEvent(EVENT_START_RITUAL, 5s, 10s);
break;
}
// Start ritual
@@ -894,7 +894,7 @@ public:
// Resume paused waypoint movement
me->ResumeMovement();
// Schedule next ritual in 50-60s
- events.ScheduleEvent(EVENT_START_RITUAL, urand(50000, 60000));
+ events.ScheduleEvent(EVENT_START_RITUAL, 50s, 60s);
break;
}
}
@@ -923,15 +923,15 @@ public:
me->SetFacingToObject(geist);
geistGUID = geist->GetGUID();
// Geist present: Ghoulplosion in 3s (with SAY_GEIST), raise in 6s, resume in 9s
- events.ScheduleEvent(EVENT_GHOULPLOSION, 3000);
- events.ScheduleEvent(EVENT_RAISE_DEAD, 6000);
- events.ScheduleEvent(EVENT_RESUME_WP, 9000);
+ events.ScheduleEvent(EVENT_GHOULPLOSION, 3s);
+ events.ScheduleEvent(EVENT_RAISE_DEAD, 6s);
+ events.ScheduleEvent(EVENT_RESUME_WP, 9s);
}
else
{
// No Geist: raise in 3s, resume in 6s
- events.ScheduleEvent(EVENT_RAISE_DEAD, 3000);
- events.ScheduleEvent(EVENT_RESUME_WP, 6000);
+ events.ScheduleEvent(EVENT_RAISE_DEAD, 3s);
+ events.ScheduleEvent(EVENT_RESUME_WP, 6s);
}
}
}
diff --git a/src/server/scripts/EasternKingdoms/ScarletEnclave/chapter3.cpp b/src/server/scripts/EasternKingdoms/ScarletEnclave/chapter3.cpp
index f659d0ffb2..bae74529ef 100644
--- a/src/server/scripts/EasternKingdoms/ScarletEnclave/chapter3.cpp
+++ b/src/server/scripts/EasternKingdoms/ScarletEnclave/chapter3.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/scripts/EasternKingdoms/ScarletEnclave/chapter5.cpp b/src/server/scripts/EasternKingdoms/ScarletEnclave/chapter5.cpp
index bfd1d01b9c..7b6d04c189 100644
--- a/src/server/scripts/EasternKingdoms/ScarletEnclave/chapter5.cpp
+++ b/src/server/scripts/EasternKingdoms/ScarletEnclave/chapter5.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
@@ -473,7 +473,7 @@ public:
if (battleStarted != ENCOUNTER_STATE_FIGHT)
return;
- me->m_Events.AddEvent(new DelayedSummonEvent(me, creature->GetEntry(), *creature), me->m_Events.CalculateTime(3000));
+ me->m_Events.AddEventAtOffset(new DelayedSummonEvent(me, creature->GetEntry(), *creature), 3s);
if (creature->GetEntry() >= NPC_RAMPAGING_ABOMINATION)
{
--scourgeRemaining;
@@ -504,7 +504,7 @@ public:
tirion->AI()->Talk(SAY_LIGHT_OF_DAWN25, 4s);
tirion->m_Events.AddEventAtOffset([&, tirion] {
- tirion->GetMotionMaster()->MovePath(NPC_HIGHLORD_TIRION_FORDRING * 10, false);
+ tirion->GetMotionMaster()->MoveWaypoint(NPC_HIGHLORD_TIRION_FORDRING * 10, false);
}, 14s);
events.Reset();
@@ -526,11 +526,11 @@ public:
if (battleStarted != ENCOUNTER_STATE_FIGHT)
return;
- events.RescheduleEvent(EVENT_SPELL_ANTI_MAGIC_ZONE, 15000);
- events.RescheduleEvent(EVENT_SPELL_DEATH_STRIKE, 8000);
- events.RescheduleEvent(EVENT_SPELL_DEATH_EMBRACE, 5000);
- events.RescheduleEvent(EVENT_SPELL_UNHOLY_BLIGHT, 10000);
- events.RescheduleEvent(EVENT_SPELL_DARION_MOD_DAMAGE, 500);
+ events.RescheduleEvent(EVENT_SPELL_ANTI_MAGIC_ZONE, 15s);
+ events.RescheduleEvent(EVENT_SPELL_DEATH_STRIKE, 8s);
+ events.RescheduleEvent(EVENT_SPELL_DEATH_EMBRACE, 5s);
+ events.RescheduleEvent(EVENT_SPELL_UNHOLY_BLIGHT, 10s);
+ events.RescheduleEvent(EVENT_SPELL_DARION_MOD_DAMAGE, 500ms);
}
void Reset() override
@@ -660,14 +660,14 @@ public:
{
Position pos = LightOfDawnPos[first];
summon->SetHomePosition(pos);
- summon->GetMotionMaster()->MovePoint(1, pos.GetPositionX(), pos.GetPositionY(), pos.GetPositionZ(), true, false);
+ summon->GetMotionMaster()->MovePoint(1, pos.GetPositionX(), pos.GetPositionY(), pos.GetPositionZ(), FORCED_MOVEMENT_NONE, 0.f, 0.f, true, false);
}
first = first == 0 ? 1 : 0;
}
Position pos = LightOfDawnPos[first];
me->SetHomePosition(pos);
me->SetWalk(false);
- me->GetMotionMaster()->MovePoint(1, pos.GetPositionX(), pos.GetPositionY(), pos.GetPositionZ(), true, true);
+ me->GetMotionMaster()->MovePoint(1, pos.GetPositionX(), pos.GetPositionY(), pos.GetPositionZ(), FORCED_MOVEMENT_NONE, 0.f, 0.f, true, true);
DoCastSelf(SPELL_THE_MIGHT_OF_MOGRAINE, true);
break;
}
@@ -691,8 +691,8 @@ public:
{
orbaz->SetReactState(REACT_PASSIVE);
orbaz->AI()->Talk(EMOTE_LIGHT_OF_DAWN04);
- orbaz->GetMotionMaster()->MovePoint(2, LightOfDawnPos[2], true, true);
- orbaz->DespawnOrUnsummon(7000);
+ orbaz->GetMotionMaster()->MovePoint(2, LightOfDawnPos[2], FORCED_MOVEMENT_NONE, 0.f, true, true);
+ orbaz->DespawnOrUnsummon(7s);
}
for (SummonList::const_iterator itr = summons.begin(); itr != summons.end(); ++itr)
@@ -839,7 +839,7 @@ public:
alex->AI()->Talk(SAY_LIGHT_OF_DAWN41);
if (Creature* darion = GetEntryFromSummons(NPC_DARION_MOGRAINE))
- darion->DespawnOrUnsummon(3000);
+ darion->DespawnOrUnsummon(3s);
break;
case EVENT_OUTRO_SCENE_19:
if (Creature* alex = GetEntryFromSummons(NPC_HIGHLORD_ALEXANDROS_MOGRAINE))
@@ -886,7 +886,7 @@ public:
case EVENT_OUTRO_SCENE_23:
if (Creature* alex = GetEntryFromSummons(NPC_HIGHLORD_ALEXANDROS_MOGRAINE))
{
- alex->DespawnOrUnsummon(5000);
+ alex->DespawnOrUnsummon(5s);
alex->SetVisible(false);
}
break;
@@ -1055,13 +1055,13 @@ public:
if (Creature* lk = GetEntryFromSummons(NPC_THE_LICH_KING))
{
lk->CastSpell(lk, SPELL_EXIT_TELEPORT_VISUAL, true);
- lk->DespawnOrUnsummon(1500);
+ lk->DespawnOrUnsummon(1500ms);
}
if (Creature* tirion = GetEntryFromSummons(NPC_HIGHLORD_TIRION_FORDRING))
{
float o = me->GetAngle(tirion);
- tirion->GetMotionMaster()->MovePoint(4, me->GetPositionX() + 2.0f * cos(o), me->GetPositionY() + 2.0f * std::sin(o), me->GetPositionZ(), false);
+ tirion->GetMotionMaster()->MovePoint(4, me->GetPositionX() + 2.0f * cos(o), me->GetPositionY() + 2.0f * std::sin(o), me->GetPositionZ(), FORCED_MOVEMENT_NONE, 0.f, 0.f, false);
tirion->SetUInt32Value(UNIT_NPC_EMOTESTATE, EMOTE_ONESHOT_NONE);
tirion->SetFaction(FACTION_FRIENDLY);
}
@@ -1145,7 +1145,7 @@ public:
}
case EVENT_OUTRO_SCENE_61:
summons.DespawnAll();
- me->DespawnOrUnsummon(1);
+ me->DespawnOrUnsummon(1ms);
events.Reset();
return;
}
@@ -1269,7 +1269,7 @@ class spell_chapter5_return_to_capital : public SpellScript
if (creature)
{
creature->PauseMovement(5000);
- creature->SetTimedFacingToObject(player, 30000);
+ creature->SetFacingToObject(player, 30s);
if (roll_chance_i(30))
{
diff --git a/src/server/scripts/EasternKingdoms/ScarletEnclave/zone_the_scarlet_enclave.cpp b/src/server/scripts/EasternKingdoms/ScarletEnclave/zone_the_scarlet_enclave.cpp
index 67e24ba1ad..219911e748 100644
--- a/src/server/scripts/EasternKingdoms/ScarletEnclave/zone_the_scarlet_enclave.cpp
+++ b/src/server/scripts/EasternKingdoms/ScarletEnclave/zone_the_scarlet_enclave.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/scripts/EasternKingdoms/ScarletMonastery/instance_scarlet_monastery.cpp b/src/server/scripts/EasternKingdoms/ScarletMonastery/instance_scarlet_monastery.cpp
index 93a5cd45cb..04e2e13370 100644
--- a/src/server/scripts/EasternKingdoms/ScarletMonastery/instance_scarlet_monastery.cpp
+++ b/src/server/scripts/EasternKingdoms/ScarletMonastery/instance_scarlet_monastery.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/scripts/EasternKingdoms/ScarletMonastery/scarletmonastery.h b/src/server/scripts/EasternKingdoms/ScarletMonastery/scarletmonastery.h
index 92db65f7a8..ea5142b734 100644
--- a/src/server/scripts/EasternKingdoms/ScarletMonastery/scarletmonastery.h
+++ b/src/server/scripts/EasternKingdoms/ScarletMonastery/scarletmonastery.h
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/scripts/EasternKingdoms/Scholomance/boss_darkmaster_gandling.cpp b/src/server/scripts/EasternKingdoms/Scholomance/boss_darkmaster_gandling.cpp
index 8b585920c9..415bdcbcd6 100644
--- a/src/server/scripts/EasternKingdoms/Scholomance/boss_darkmaster_gandling.cpp
+++ b/src/server/scripts/EasternKingdoms/Scholomance/boss_darkmaster_gandling.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
@@ -36,16 +36,13 @@ enum BossData
GANDLING_ROOM_TO_USE
};
-enum Timers
-{
- TIMER_ARCANE_MIN = 8000,
- TIMER_ARCANE_MAX = 14000,
- TIMER_CURSE_MIN = 20000,
- TIMER_CURSE_MAX = 30000,
- TIMER_SHIELD_MIN = 30000,
- TIMER_SHIELD_MAX = 40000,
- TIMER_PORTAL = 25000
-};
+constexpr Milliseconds TIMER_ARCANE_MIN = 8s;
+constexpr Milliseconds TIMER_ARCANE_MAX = 14s;
+constexpr Milliseconds TIMER_CURSE_MIN = 20s;
+//constexpr Milliseconds TIMER_CURSE_MAX = 30s;
+constexpr Milliseconds TIMER_SHIELD_MIN = 30s;
+//constexpr Milliseconds TIMER_SHIELD_MAX = 40s;
+constexpr Milliseconds TIMER_PORTAL = 25s;
enum IdPortalSpells
{
@@ -335,18 +332,18 @@ public:
{
case SPELL_ARCANE_MISSILES:
DoCastVictim(SPELL_ARCANE_MISSILES);
- events.ScheduleEvent(SPELL_ARCANE_MISSILES, urand(TIMER_ARCANE_MIN, TIMER_ARCANE_MAX));
+ events.ScheduleEvent(SPELL_ARCANE_MISSILES, TIMER_ARCANE_MIN, TIMER_ARCANE_MAX);
break;
case SPELL_CURSE_DARKMASTER:
if (Unit* target = SelectTarget(SelectTargetMethod::Random, 0, 0.0f, true))
{
DoCast(target, SPELL_CURSE_DARKMASTER);
}
- events.ScheduleEvent(SPELL_ARCANE_MISSILES, urand(TIMER_ARCANE_MIN, TIMER_ARCANE_MAX));
+ events.ScheduleEvent(SPELL_ARCANE_MISSILES, TIMER_ARCANE_MIN, TIMER_ARCANE_MAX);
break;
case SPELL_SHADOW_SHIELD:
DoCastSelf(SPELL_SHADOW_SHIELD);
- events.ScheduleEvent(SPELL_ARCANE_MISSILES, urand(TIMER_ARCANE_MIN, TIMER_ARCANE_MAX));
+ events.ScheduleEvent(SPELL_ARCANE_MISSILES, TIMER_ARCANE_MIN, TIMER_ARCANE_MAX);
break;
case SPELL_SHADOW_PORTAL:
diff --git a/src/server/scripts/EasternKingdoms/Scholomance/boss_kirtonos_the_herald.cpp b/src/server/scripts/EasternKingdoms/Scholomance/boss_kirtonos_the_herald.cpp
index b58ad2de39..19495411cd 100644
--- a/src/server/scripts/EasternKingdoms/Scholomance/boss_kirtonos_the_herald.cpp
+++ b/src/server/scripts/EasternKingdoms/Scholomance/boss_kirtonos_the_herald.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
@@ -56,7 +56,7 @@ enum Events
enum Misc
{
WEAPON_KIRTONOS_STAFF = 11365,
- POINT_KIRTONOS_LAND = 13,
+ POINT_KIRTONOS_LAND = 14,
KIRTONOS_PATH = 105061,
EMOTE_SUMMONED = 0
@@ -103,7 +103,7 @@ public:
void EnterEvadeMode(EvadeReason /*why*/) override
{
instance->SetData(DATA_KIRTONOS_THE_HERALD, FAIL);
- me->DespawnOrUnsummon(1);
+ me->DespawnOrUnsummon(1ms);
}
void MovementInform(uint32 type, uint32 id) override
@@ -139,7 +139,7 @@ public:
switch (events2.ExecuteEvent())
{
case INTRO_1:
- me->GetMotionMaster()->MovePath(KIRTONOS_PATH, false);
+ me->GetMotionMaster()->MoveWaypoint(KIRTONOS_PATH, false);
Talk(EMOTE_SUMMONED);
break;
case INTRO_2:
diff --git a/src/server/scripts/EasternKingdoms/Scholomance/boss_kormok.cpp b/src/server/scripts/EasternKingdoms/Scholomance/boss_kormok.cpp
index 9c83da2941..ac2e0797ef 100644
--- a/src/server/scripts/EasternKingdoms/Scholomance/boss_kormok.cpp
+++ b/src/server/scripts/EasternKingdoms/Scholomance/boss_kormok.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/scripts/EasternKingdoms/Scholomance/instance_scholomance.cpp b/src/server/scripts/EasternKingdoms/Scholomance/instance_scholomance.cpp
index 5363fac88e..9cd1f48304 100644
--- a/src/server/scripts/EasternKingdoms/Scholomance/instance_scholomance.cpp
+++ b/src/server/scripts/EasternKingdoms/Scholomance/instance_scholomance.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
@@ -399,17 +399,17 @@ public:
{
case 1:
me->CastSpell(me, BONE_ARMOR_SPELL, false);
- events.RepeatEvent(60000);
+ events.Repeat(60s);
break;
case 2:
if (Unit* target = SelectUnitCasting())
{
me->CastSpell(target, COUNTER_SPELL, false);
- events.RepeatEvent(urand(10000, 20000));
+ events.Repeat(10s, 20s);
}
else
{
- events.RepeatEvent(400);
+ events.Repeat(400ms);
}
break;
case 3:
@@ -417,11 +417,11 @@ public:
{
me->CastSpell(target, DRAIN_MANA_SPELL, false);
}
- events.RepeatEvent(urand(13000, 20000));
+ events.Repeat(13s, 20s);
break;
case 4:
me->CastSpell(me->GetVictim(), SHADOWBOLT_VOLLEY_SPELL, true);
- events.RepeatEvent(urand(11000, 17000));
+ events.Repeat(11s, 17s);
break;
}
diff --git a/src/server/scripts/EasternKingdoms/Scholomance/scholomance.h b/src/server/scripts/EasternKingdoms/Scholomance/scholomance.h
index 0382d9a8ff..8c8ee37a42 100644
--- a/src/server/scripts/EasternKingdoms/Scholomance/scholomance.h
+++ b/src/server/scripts/EasternKingdoms/Scholomance/scholomance.h
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/scripts/EasternKingdoms/ShadowfangKeep/boss_apothecary_hummel.cpp b/src/server/scripts/EasternKingdoms/ShadowfangKeep/boss_apothecary_hummel.cpp
index e16f0ed2c0..bdd0013218 100644
--- a/src/server/scripts/EasternKingdoms/ShadowfangKeep/boss_apothecary_hummel.cpp
+++ b/src/server/scripts/EasternKingdoms/ShadowfangKeep/boss_apothecary_hummel.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/scripts/EasternKingdoms/ShadowfangKeep/instance_shadowfang_keep.cpp b/src/server/scripts/EasternKingdoms/ShadowfangKeep/instance_shadowfang_keep.cpp
index db795de403..fb999c7e4f 100644
--- a/src/server/scripts/EasternKingdoms/ShadowfangKeep/instance_shadowfang_keep.cpp
+++ b/src/server/scripts/EasternKingdoms/ShadowfangKeep/instance_shadowfang_keep.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/scripts/EasternKingdoms/ShadowfangKeep/shadowfang_keep.h b/src/server/scripts/EasternKingdoms/ShadowfangKeep/shadowfang_keep.h
index 9639c9afc7..a6786c8ee2 100644
--- a/src/server/scripts/EasternKingdoms/ShadowfangKeep/shadowfang_keep.h
+++ b/src/server/scripts/EasternKingdoms/ShadowfangKeep/shadowfang_keep.h
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/scripts/EasternKingdoms/Stratholme/boss_baroness_anastari.cpp b/src/server/scripts/EasternKingdoms/Stratholme/boss_baroness_anastari.cpp
index 1f51567b6b..91c5aae6c8 100644
--- a/src/server/scripts/EasternKingdoms/Stratholme/boss_baroness_anastari.cpp
+++ b/src/server/scripts/EasternKingdoms/Stratholme/boss_baroness_anastari.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/scripts/EasternKingdoms/Stratholme/boss_jarien_and_sothos.cpp b/src/server/scripts/EasternKingdoms/Stratholme/boss_jarien_and_sothos.cpp
index 6db2b0a58a..5a1c75512a 100644
--- a/src/server/scripts/EasternKingdoms/Stratholme/boss_jarien_and_sothos.cpp
+++ b/src/server/scripts/EasternKingdoms/Stratholme/boss_jarien_and_sothos.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/scripts/EasternKingdoms/Stratholme/instance_stratholme.cpp b/src/server/scripts/EasternKingdoms/Stratholme/instance_stratholme.cpp
index 9435fd1943..9ecbdfcb6d 100644
--- a/src/server/scripts/EasternKingdoms/Stratholme/instance_stratholme.cpp
+++ b/src/server/scripts/EasternKingdoms/Stratholme/instance_stratholme.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
@@ -135,14 +135,14 @@ public:
if (_slaughterProgress == 2)
{
for (uint32 i = 0; i < 33; ++i)
- events.ScheduleEvent(EVENT_SPAWN_MINDLESS, 5000 + i * 210);
+ events.ScheduleEvent(EVENT_SPAWN_MINDLESS, Milliseconds(5000 + i * 210));
if (Creature* baron = instance->GetCreature(_baronRivendareGUID))
if (GameObject* gate = baron->FindNearestGameObject(GO_SLAUGHTER_GATE_SIDE, 200.0f))
gate->SetGoState(GO_STATE_ACTIVE);
}
if (_slaughterProgress == 3)
{
- events.ScheduleEvent(EVENT_SPAWN_BLACK_GUARD, 20000);
+ events.ScheduleEvent(EVENT_SPAWN_BLACK_GUARD, 20s);
}
if (_slaughterProgress == 4)
{
@@ -296,7 +296,7 @@ public:
_baronRunProgress = DATA_BARON_RUN_GATE;
_baronRunTime = 45;
DoCastSpellOnPlayers(SPELL_BARON_ULTIMATUM);
- events.ScheduleEvent(EVENT_BARON_TIME, 60000);
+ events.ScheduleEvent(EVENT_BARON_TIME, 60s);
if (Creature* baron = instance->GetCreature(_baronRivendareGUID))
baron->AI()->Talk(SAY_BARON_INIT_YELL);
@@ -379,12 +379,12 @@ public:
data >> _barthilasrunProgress;
if (_baronRunTime)
{
- events.ScheduleEvent(EVENT_BARON_TIME, 60000);
+ events.ScheduleEvent(EVENT_BARON_TIME, 60s);
}
if (_slaughterProgress > 0 && _slaughterProgress < 4)
{
- events.ScheduleEvent(EVENT_FORCE_SLAUGHTER_EVENT, 5000);
+ events.ScheduleEvent(EVENT_FORCE_SLAUGHTER_EVENT, 5s);
}
}
@@ -455,20 +455,20 @@ public:
if (i == 0)
{
// set timer to reset the trap
- events.ScheduleEvent(EVENT_GATE1_TRAP, 30 * MINUTE * IN_MILLISECONDS);
+ events.ScheduleEvent(EVENT_GATE1_TRAP, 1800s);
// set timer to reopen gates
- events.ScheduleEvent(EVENT_GATE1_DELAY, 20 * IN_MILLISECONDS);
+ events.ScheduleEvent(EVENT_GATE1_DELAY, 20s);
// set timer to spawn the plagued critters
- events.ScheduleEvent(EVENT_GATE1_CRITTER_DELAY, 2 * IN_MILLISECONDS);
+ events.ScheduleEvent(EVENT_GATE1_CRITTER_DELAY, 2s);
}
else if (i == 1)
{
// set timer to reset the trap
- events.ScheduleEvent(EVENT_GATE2_TRAP, 30 * MINUTE * IN_MILLISECONDS);
+ events.ScheduleEvent(EVENT_GATE2_TRAP, 1800s);
// set timer to reopen gates
- events.ScheduleEvent(EVENT_GATE2_DELAY, 20 * IN_MILLISECONDS);
+ events.ScheduleEvent(EVENT_GATE2_DELAY, 20s);
// set timer to spawn the plagued critters
- events.ScheduleEvent(EVENT_GATE2_CRITTER_DELAY, 2 * IN_MILLISECONDS);
+ events.ScheduleEvent(EVENT_GATE2_CRITTER_DELAY, 2s);
}
}
}
diff --git a/src/server/scripts/EasternKingdoms/Stratholme/stratholme.h b/src/server/scripts/EasternKingdoms/Stratholme/stratholme.h
index d1200e3268..7813828c33 100644
--- a/src/server/scripts/EasternKingdoms/Stratholme/stratholme.h
+++ b/src/server/scripts/EasternKingdoms/Stratholme/stratholme.h
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/scripts/EasternKingdoms/SunkenTemple/instance_sunken_temple.cpp b/src/server/scripts/EasternKingdoms/SunkenTemple/instance_sunken_temple.cpp
index 46b6f9fe5b..142bdaea12 100644
--- a/src/server/scripts/EasternKingdoms/SunkenTemple/instance_sunken_temple.cpp
+++ b/src/server/scripts/EasternKingdoms/SunkenTemple/instance_sunken_temple.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/scripts/EasternKingdoms/SunkenTemple/sunken_temple.h b/src/server/scripts/EasternKingdoms/SunkenTemple/sunken_temple.h
index a30d474437..c00a5839a3 100644
--- a/src/server/scripts/EasternKingdoms/SunkenTemple/sunken_temple.h
+++ b/src/server/scripts/EasternKingdoms/SunkenTemple/sunken_temple.h
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/scripts/EasternKingdoms/SunwellPlateau/boss_brutallus.cpp b/src/server/scripts/EasternKingdoms/SunwellPlateau/boss_brutallus.cpp
index e7937c6226..0e55c9d1d9 100644
--- a/src/server/scripts/EasternKingdoms/SunwellPlateau/boss_brutallus.cpp
+++ b/src/server/scripts/EasternKingdoms/SunwellPlateau/boss_brutallus.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
@@ -196,10 +196,10 @@ struct npc_madrigosa : public NullCreatureAI
me->RemoveDynamicFlag(UNIT_DYNFLAG_DEAD);
me->SendMovementFlagUpdate();
- events.ScheduleEvent(EVENT_MAD_1, 2000);
+ events.ScheduleEvent(EVENT_MAD_1, 2s);
}
else if (param == ACTION_SPAWN_FELMYST)
- events.ScheduleEvent(EVENT_SPAWN_FELMYST, 60000);
+ events.ScheduleEvent(EVENT_SPAWN_FELMYST, 60s);
}
void UpdateAI(uint32 diff) override
@@ -217,27 +217,27 @@ struct npc_madrigosa : public NullCreatureAI
}
me->GetMotionMaster()->MoveTakeoff(1, 1477.94f, 643.22f, 21.21f);
me->AddUnitState(UNIT_STATE_NO_ENVIRONMENT_UPD);
- events.ScheduleEvent(EVENT_MAD_2, 4000);
+ events.ScheduleEvent(EVENT_MAD_2, 4s);
break;
case EVENT_MAD_2:
Talk(SAY_MAD_1);
me->CastSpell(me, SPELL_MADRIGOSA_FREEZE, false);
- events.ScheduleEvent(EVENT_MAD_2_1, 1000);
+ events.ScheduleEvent(EVENT_MAD_2_1, 1s);
break;
case EVENT_MAD_2_1:
me->HandleEmoteCommand(EMOTE_ONESHOT_LAND);
me->SetDisableGravity(false);
me->CastSpell(me, SPELL_MADRIGOSA_FROST_BREATH, false);
- events.ScheduleEvent(EVENT_MAD_3, 7000);
+ events.ScheduleEvent(EVENT_MAD_3, 7s);
break;
case EVENT_MAD_3:
Talk(SAY_MAD_2);
- events.ScheduleEvent(EVENT_MAD_4, 7000);
+ events.ScheduleEvent(EVENT_MAD_4, 7s);
break;
case EVENT_MAD_4:
if (Creature* brutallus = instance->GetCreature(DATA_BRUTALLUS))
brutallus->AI()->Talk(YELL_INTRO);
- events.ScheduleEvent(EVENT_MAD_5, 5000);
+ events.ScheduleEvent(EVENT_MAD_5, 5s);
break;
case EVENT_MAD_5:
if (Creature* brutallus = instance->GetCreature(DATA_BRUTALLUS))
@@ -245,7 +245,7 @@ struct npc_madrigosa : public NullCreatureAI
brutallus->SetUInt32Value(UNIT_NPC_EMOTESTATE, EMOTE_ONESHOT_ATTACK1H);
me->SetUInt32Value(UNIT_NPC_EMOTESTATE, EMOTE_ONESHOT_ATTACK1H);
}
- events.ScheduleEvent(EVENT_MAD_6, 10000);
+ events.ScheduleEvent(EVENT_MAD_6, 10s);
break;
case EVENT_MAD_6:
if (Creature* brutallus = instance->GetCreature(DATA_BRUTALLUS))
@@ -255,21 +255,21 @@ struct npc_madrigosa : public NullCreatureAI
}
me->HandleEmoteCommand(EMOTE_ONESHOT_LIFTOFF);
me->SetDisableGravity(true);
- events.ScheduleEvent(EVENT_MAD_7, 4000);
+ events.ScheduleEvent(EVENT_MAD_7, 4s);
break;
case EVENT_MAD_7:
Talk(SAY_MAD_3);
me->CastSpell(me, SPELL_MADRIGOSA_FROST_BLAST, false);
- events.ScheduleEvent(EVENT_MAD_8, 3000);
- events.ScheduleEvent(EVENT_MAD_8, 5000);
- events.ScheduleEvent(EVENT_MAD_8_1, 6000);
- events.ScheduleEvent(EVENT_MAD_8, 6500);
- events.ScheduleEvent(EVENT_MAD_8, 7500);
- events.ScheduleEvent(EVENT_MAD_8, 8500);
- events.ScheduleEvent(EVENT_MAD_8, 9500);
- events.ScheduleEvent(EVENT_MAD_9, 11000);
- events.ScheduleEvent(EVENT_MAD_8, 12000);
- events.ScheduleEvent(EVENT_MAD_8, 14000);
+ events.ScheduleEvent(EVENT_MAD_8, 3s);
+ events.ScheduleEvent(EVENT_MAD_8, 5s);
+ events.ScheduleEvent(EVENT_MAD_8_1, 6s);
+ events.ScheduleEvent(EVENT_MAD_8, 6500ms);
+ events.ScheduleEvent(EVENT_MAD_8, 7500ms);
+ events.ScheduleEvent(EVENT_MAD_8, 8500ms);
+ events.ScheduleEvent(EVENT_MAD_8, 9500ms);
+ events.ScheduleEvent(EVENT_MAD_9, 11s);
+ events.ScheduleEvent(EVENT_MAD_8, 12s);
+ events.ScheduleEvent(EVENT_MAD_8, 14s);
break;
case EVENT_MAD_8:
if (Creature* brutallus = instance->GetCreature(DATA_BRUTALLUS))
@@ -286,27 +286,27 @@ struct npc_madrigosa : public NullCreatureAI
brutallus->CastSpell(brutallus, SPELL_BRUTALLUS_FEL_FIREBALL, false);
brutallus->AI()->Talk(YELL_INTRO_BREAK_ICE);
}
- events.ScheduleEvent(EVENT_MAD_11, 6000);
+ events.ScheduleEvent(EVENT_MAD_11, 6s);
break;
//case EVENT_MAD_10:
case EVENT_MAD_11:
me->SetDisableGravity(false);
me->HandleEmoteCommand(EMOTE_ONESHOT_LAND);
- events.ScheduleEvent(EVENT_MAD_13, 2500);
+ events.ScheduleEvent(EVENT_MAD_13, 2500ms);
break;
case EVENT_MAD_13:
Talk(SAY_MAD_4);
me->RemoveAllAuras();
me->CastSpell(me, SPELL_MADRIGOSA_ENCAPSULATE, false);
- events.ScheduleEvent(EVENT_MAD_14, 2000);
+ events.ScheduleEvent(EVENT_MAD_14, 2s);
break;
case EVENT_MAD_14:
if (Creature* brutallus = instance->GetCreature(DATA_BRUTALLUS))
{
brutallus->SetDisableGravity(true);
- brutallus->GetMotionMaster()->MovePoint(0, brutallus->GetPositionX(), brutallus->GetPositionY() - 30.0f, brutallus->GetPositionZ() + 15.0f, false, true);
+ brutallus->GetMotionMaster()->MovePoint(0, brutallus->GetPositionX(), brutallus->GetPositionY() - 30.0f, brutallus->GetPositionZ() + 15.0f, FORCED_MOVEMENT_NONE, 0.f, 0.f, false, true);
}
- events.ScheduleEvent(EVENT_MAD_15, 10000);
+ events.ScheduleEvent(EVENT_MAD_15, 10s);
break;
case EVENT_MAD_15:
if (Creature* brutallus = instance->GetCreature(DATA_BRUTALLUS))
@@ -316,28 +316,28 @@ struct npc_madrigosa : public NullCreatureAI
brutallus->GetMotionMaster()->MoveFall();
brutallus->AI()->Talk(YELL_INTRO_CHARGE);
}
- events.ScheduleEvent(EVENT_MAD_16, 1400);
+ events.ScheduleEvent(EVENT_MAD_16, 1400ms);
break;
case EVENT_MAD_16:
if (Creature* brutallus = instance->GetCreature(DATA_BRUTALLUS))
brutallus->CastSpell(me, SPELL_BRUTALLUS_CHARGE, true);
- events.ScheduleEvent(EVENT_MAD_17, 1200);
+ events.ScheduleEvent(EVENT_MAD_17, 1200ms);
break;
case EVENT_MAD_17:
if (Creature* brutallus = instance->GetCreature(DATA_BRUTALLUS))
brutallus->HandleEmoteCommand(EMOTE_ONESHOT_ATTACK1H);
- events.ScheduleEvent(EVENT_MAD_18, 500);
+ events.ScheduleEvent(EVENT_MAD_18, 500ms);
break;
case EVENT_MAD_18:
Talk(SAY_MAD_5);
me->SetDynamicFlag(UNIT_DYNFLAG_DEAD);
me->SetStandState(UNIT_STAND_STATE_DEAD);
- events.ScheduleEvent(EVENT_MAD_19, 6000);
+ events.ScheduleEvent(EVENT_MAD_19, 6s);
break;
case EVENT_MAD_19:
if (Creature* brutallus = instance->GetCreature(DATA_BRUTALLUS))
brutallus->AI()->Talk(YELL_INTRO_KILL_MADRIGOSA);
- events.ScheduleEvent(EVENT_MAD_20, 7000);
+ events.ScheduleEvent(EVENT_MAD_20, 7s);
break;
case EVENT_MAD_20:
me->SetUnitFlag(UNIT_FLAG_NON_ATTACKABLE);
@@ -347,7 +347,7 @@ struct npc_madrigosa : public NullCreatureAI
brutallus->AI()->Talk(YELL_INTRO_TAUNT);
brutallus->CastSpell(brutallus, SPELL_BRUTALLUS_BREAK_ICE, false);
}
- events.ScheduleEvent(EVENT_MAD_21, 4000);
+ events.ScheduleEvent(EVENT_MAD_21, 4s);
break;
case EVENT_MAD_21:
if (Creature* brutallus = instance->GetCreature(DATA_BRUTALLUS))
@@ -360,7 +360,7 @@ struct npc_madrigosa : public NullCreatureAI
break;
case EVENT_SPAWN_FELMYST:
DoCastAOE(SPELL_SUMMON_FELBLAZE, true);
- me->DespawnOrUnsummon(1);
+ me->DespawnOrUnsummon(1ms);
break;
}
}
@@ -382,7 +382,7 @@ class spell_madrigosa_activate_barrier : public SpellScript
WorldPacket pkt;
go->BuildValuesUpdateBlockForPlayer(&data, player);
data.BuildPacket(pkt);
- player->GetSession()->SendPacket(&pkt);
+ player->SendDirectMessage(&pkt);
});
}
}
@@ -409,7 +409,7 @@ class spell_madrigosa_deactivate_barrier : public SpellScript
WorldPacket pkt;
go->BuildValuesUpdateBlockForPlayer(&data, player);
data.BuildPacket(pkt);
- player->GetSession()->SendPacket(&pkt);
+ player->SendDirectMessage(&pkt);
});
}
}
diff --git a/src/server/scripts/EasternKingdoms/SunwellPlateau/boss_eredar_twins.cpp b/src/server/scripts/EasternKingdoms/SunwellPlateau/boss_eredar_twins.cpp
index c00e884597..59b4c952c1 100644
--- a/src/server/scripts/EasternKingdoms/SunwellPlateau/boss_eredar_twins.cpp
+++ b/src/server/scripts/EasternKingdoms/SunwellPlateau/boss_eredar_twins.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/scripts/EasternKingdoms/SunwellPlateau/boss_felmyst.cpp b/src/server/scripts/EasternKingdoms/SunwellPlateau/boss_felmyst.cpp
index c9b0ad3f12..6aee91f417 100644
--- a/src/server/scripts/EasternKingdoms/SunwellPlateau/boss_felmyst.cpp
+++ b/src/server/scripts/EasternKingdoms/SunwellPlateau/boss_felmyst.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
@@ -157,7 +157,7 @@ struct boss_felmyst : public BossAI
me->SetCanFly(true);
me->SetDisableGravity(true);
me->SendMovementFlagUpdate();
- me->GetMotionMaster()->MovePath(me->GetEntry() * 10, true);
+ me->GetMotionMaster()->MoveWaypoint(me->GetEntry() * 10, true);
}
}
@@ -205,7 +205,7 @@ struct boss_felmyst : public BossAI
// Summon Kalecgos (human form of kalecgos fight)
if (Creature* kalec = me->SummonCreature(NPC_KALECGOS_FELMYST, 1573.1461f, 755.20245f, 99.524956f, 3.595378f))
- kalec->GetMotionMaster()->MovePoint(POINT_KALECGOS, 1474.2347f, 624.0703f, 29.32589f, false, true);
+ kalec->GetMotionMaster()->MovePoint(POINT_KALECGOS, 1474.2347f, 624.0703f, 29.32589f, FORCED_MOVEMENT_NONE, 0.f, 0.f, false, true);
}
void ScheduleGroundAbilities()
@@ -312,25 +312,26 @@ struct boss_felmyst : public BossAI
++_strafeCount;
_currentLane = urand(0, 2);
if (isRightSide)
- me->GetMotionMaster()->MovePoint(POINT_LANE, RightSideLanes[_currentLane], false);
+ me->GetMotionMaster()->MovePoint(POINT_LANE, RightSideLanes[_currentLane], FORCED_MOVEMENT_NONE, 0.f, false);
else
- me->GetMotionMaster()->MovePoint(POINT_LANE, LeftSideLanes[_currentLane], false);
+ me->GetMotionMaster()->MovePoint(POINT_LANE, LeftSideLanes[_currentLane], FORCED_MOVEMENT_NONE, 0.f, false);
}, 5s);
break;
case POINT_LANE:
Talk(EMOTE_BREATH);
- me->m_Events.AddEventAtOffset([&] {
+ me->m_Events.AddEventAtOffset([this]()
+ {
for (uint8 i = 0; i < 16; ++i)
- me->m_Events.AddEvent(new CorruptTriggers(me, _currentLane), me->m_Events.CalculateTime(i*250));
+ me->m_Events.AddEventAtOffset(new CorruptTriggers(me, _currentLane), Milliseconds(i * 250));
}, 5s);
me->m_Events.AddEventAtOffset([&] {
DoCastSelf(SPELL_FELMYST_SPEED_BURST, true);
if (me->FindNearestCreature(NPC_WORLD_TRIGGER_RIGHT, 30.0f))
- me->GetMotionMaster()->MovePoint(POINT_AIR_BREATH_END, LeftSideLanes[_currentLane], false);
+ me->GetMotionMaster()->MovePoint(POINT_AIR_BREATH_END, LeftSideLanes[_currentLane], FORCED_MOVEMENT_NONE, 0.f, false);
else
- me->GetMotionMaster()->MovePoint(POINT_AIR_BREATH_END, RightSideLanes[_currentLane], false);
+ me->GetMotionMaster()->MovePoint(POINT_AIR_BREATH_END, RightSideLanes[_currentLane], FORCED_MOVEMENT_NONE, 0.f, false);
}, 5s);
break;
case POINT_AIR_BREATH_END:
@@ -338,9 +339,9 @@ struct boss_felmyst : public BossAI
me->m_Events.AddEventAtOffset([&] {
if (me->FindNearestCreature(NPC_WORLD_TRIGGER_RIGHT, 30.0f))
- me->GetMotionMaster()->MovePoint(POINT_AIR_UP, RightSide, false);
+ me->GetMotionMaster()->MovePoint(POINT_AIR_UP, RightSide, FORCED_MOVEMENT_NONE, 0.f, false);
else
- me->GetMotionMaster()->MovePoint(POINT_AIR_UP, LeftSide, false);
+ me->GetMotionMaster()->MovePoint(POINT_AIR_UP, LeftSide, FORCED_MOVEMENT_NONE, 0.f, false);
}, 2s);
break;
}
@@ -362,7 +363,7 @@ struct boss_felmyst : public BossAI
me->m_Events.AddEventAtOffset([&] {
me->SetImmuneToPC(false);
- me->GetMotionMaster()->MovePath(me->GetEntry() * 10, true);
+ me->GetMotionMaster()->MoveWaypoint(me->GetEntry() * 10, true);
}, 8500ms);
});
}
@@ -425,7 +426,7 @@ struct npc_demonic_vapor_trail : public NullCreatureAI
void Reset() override
{
me->CastSpell(me, SPELL_DEMONIC_VAPOR_TRAIL_PERIODIC, true);
- me->DespawnOrUnsummon(20000);
+ me->DespawnOrUnsummon(20s);
}
void SpellHitTarget(Unit* /*unit*/, SpellInfo const* spellInfo) override
diff --git a/src/server/scripts/EasternKingdoms/SunwellPlateau/boss_kalecgos.cpp b/src/server/scripts/EasternKingdoms/SunwellPlateau/boss_kalecgos.cpp
index 300a39dea1..8253bf8103 100644
--- a/src/server/scripts/EasternKingdoms/SunwellPlateau/boss_kalecgos.cpp
+++ b/src/server/scripts/EasternKingdoms/SunwellPlateau/boss_kalecgos.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/scripts/EasternKingdoms/SunwellPlateau/boss_kiljaeden.cpp b/src/server/scripts/EasternKingdoms/SunwellPlateau/boss_kiljaeden.cpp
index ddd75f48af..c74788d8fe 100644
--- a/src/server/scripts/EasternKingdoms/SunwellPlateau/boss_kiljaeden.cpp
+++ b/src/server/scripts/EasternKingdoms/SunwellPlateau/boss_kiljaeden.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
@@ -178,7 +178,12 @@ struct npc_kiljaeden_controller : public NullCreatureAI
{
summons.Summon(summon);
if (summon->GetEntry() == NPC_SINISTER_REFLECTION)
- summon->SetInCombatWithZone();
+ {
+ summon->m_Events.AddEventAtOffset([summon] {
+ if (summon && summon->IsAlive() && !summon->IsInCombat())
+ summon->SetInCombatWithZone();
+ }, 5s);
+ }
else if (summon->GetEntry() == NPC_KALECGOS_KJ)
summon->setActive(true);
}
@@ -382,7 +387,7 @@ struct boss_kiljaeden : public BossAI
{
anveena->RemoveAllAuras();
anveena->CastSpell(anveena, SPELL_SACRIFICE_OF_ANVEENA, true);
- anveena->DespawnOrUnsummon(1500);
+ anveena->DespawnOrUnsummon(1500ms);
DoCastSelf(SPELL_CUSTOM_08_STATE, true);
me->SetUnitFlag(UNIT_FLAG_PACIFIED);
scheduler.CancelAll();
@@ -549,8 +554,8 @@ struct boss_kiljaeden : public BossAI
summon->SetDisableGravity(true);
summon->CastSpell(summon, SPELL_ARMAGEDDON_VISUAL, true);
summon->SetPosition(summon->GetPositionX(), summon->GetPositionY(), summon->GetPositionZ() + 20.0f, 0.0f);
- summon->m_Events.AddEvent(new CastArmageddon(summon), summon->m_Events.CalculateTime(6000));
- summon->DespawnOrUnsummon(urand(8000, 10000));
+ summon->m_Events.AddEventAtOffset(new CastArmageddon(summon), 6s);
+ summon->DespawnOrUnsummon(randtime(8s, 10s));
}
}
@@ -714,7 +719,7 @@ struct npc_kalecgos_kj : public NullCreatureAI
me->SetCanFly(false);
me->SetDisableGravity(false);
me->CastSpell(me, SPELL_TELEPORT_AND_TRANSFORM, true);
- events.ScheduleEvent(EVENT_SCENE_01, 35000);
+ events.ScheduleEvent(EVENT_SCENE_01, 35s);
}
}
@@ -724,25 +729,18 @@ struct npc_kalecgos_kj : public NullCreatureAI
if (summon->GetEntry() == NPC_SHATTERED_SUN_RIFTWAKER)
{
summon->CastSpell(summon, SPELL_TELEPORT_VISUAL, true);
- Movement::MoveSplineInit init(summon);
+
if (summons.size() == 1)
- {
- init.MoveTo(1727.08f, 656.82f, 28.37f, false, true);
- init.SetFacing(5.14f);
- }
+ summon->GetMotionMaster()->MovePoint(0, 1727.08f, 656.82f, 28.37f, FORCED_MOVEMENT_NONE, 0.f, 5.14f, false, true);
else
- {
- init.MoveTo(1738.84f, 627.32f, 28.26f, false, true);
- init.SetFacing(2.0f);
- }
- init.Launch();
+ summon->GetMotionMaster()->MovePoint(0, 1738.84f, 627.32f, 28.26f, FORCED_MOVEMENT_NONE, 0.f, 2.0f, false, true);
}
else if (summon->GetEntry() == NPC_SHATTRATH_PORTAL_DUMMY)
{
if (Creature* riftwaker = summon->FindNearestCreature(NPC_SHATTERED_SUN_RIFTWAKER, 10.0f))
riftwaker->CastSpell(summon, SPELL_OPEN_PORTAL_FROM_SHATTRATH, false);
summon->SetWalk(true);
- summon->GetMotionMaster()->MovePoint(0, summon->GetPositionX(), summon->GetPositionY(), summon->GetPositionZ() + 30.0f, false, true);
+ summon->GetMotionMaster()->MovePoint(0, summon->GetPositionX(), summon->GetPositionY(), summon->GetPositionZ() + 30.0f, FORCED_MOVEMENT_NONE, 0.f, 0.f, false, true);
}
else if (summon->GetEntry() == NPC_INERT_PORTAL)
summon->CastSpell(summon, SPELL_BOSS_ARCANE_PORTAL_STATE, true);
@@ -757,7 +755,7 @@ struct npc_kalecgos_kj : public NullCreatureAI
{
summon->CastSpell(summon, SPELL_TELEPORT_VISUAL, true);
summon->SetWalk(true);
- summon->GetMotionMaster()->MovePoint(0, 1710.15f, 639.23f, 27.311f, false, true);
+ summon->GetMotionMaster()->MovePoint(0, 1710.15f, 639.23f, 27.311f, FORCED_MOVEMENT_NONE, 0.f, 0.f, false, true);
}
else if (summon->GetEntry() == NPC_THE_CORE_OF_ENTROPIUS)
summon->GetMotionMaster()->MovePoint(0, summon->GetPositionX(), summon->GetPositionY(), 30.0f);
@@ -770,69 +768,69 @@ struct npc_kalecgos_kj : public NullCreatureAI
{
case EVENT_SCENE_01:
Talk(SAY_KALECGOS_GOODBYE);
- events.ScheduleEvent(eventId + 1, 15000);
+ events.ScheduleEvent(eventId + 1, 15s);
break;
case EVENT_SCENE_02:
me->SummonCreature(NPC_SHATTERED_SUN_RIFTWAKER, 1688.42f, 641.82f, 27.60f, 0.67f);
me->SummonCreature(NPC_SHATTERED_SUN_RIFTWAKER, 1712.58f, 616.29f, 27.78f, 0.76f);
- events.ScheduleEvent(eventId + 1, 6000);
+ events.ScheduleEvent(eventId + 1, 6s);
break;
case EVENT_SCENE_03:
me->SummonCreature(NPC_SHATTRATH_PORTAL_DUMMY, 1727.08f + cos(5.14f), 656.82f + std::sin(5.14f), 28.37f + 2.0f, 0.0f, TEMPSUMMON_TIMED_DESPAWN, 10000);
me->SummonCreature(NPC_SHATTRATH_PORTAL_DUMMY, 1738.84f + cos(2.0f), 627.32f + std::sin(2.0f), 28.26f + 2.0f, 0.0f, TEMPSUMMON_TIMED_DESPAWN, 10000);
- events.ScheduleEvent(eventId + 1, 11000);
+ events.ScheduleEvent(eventId + 1, 11s);
break;
case EVENT_SCENE_04:
me->SummonCreature(NPC_INERT_PORTAL, 1734.96f, 642.43f, 28.06f, 3.49f);
- events.ScheduleEvent(eventId + 1, 4000);
+ events.ScheduleEvent(eventId + 1, 4s);
break;
case EVENT_SCENE_05:
if (Creature* first = me->SummonCreature(NPC_SHATTERED_SUN_SOLDIER, 1729.48f, 640.49f, 28.06f, 3.49f))
{
- first->m_Events.AddEvent(new MoveDelayed(first, 1718.70f, 607.78f, 28.06f, 2.323f), first->m_Events.CalculateTime(5000));
- first->m_Events.AddEvent(new FixOrientation(first), first->m_Events.CalculateTime(12000));
+ first->m_Events.AddEventAtOffset(new MoveDelayed(first, 1718.70f, 607.78f, 28.06f, 2.323f), 5s);
+ first->m_Events.AddEventAtOffset(new FixOrientation(first), 12s);
for (uint8 i = 0; i < 9; ++i)
if (Creature* follower = me->SummonCreature(NPC_SHATTERED_SUN_SOLDIER, 1729.48f + 5 * cos(i * 2.0f * M_PI / 9), 640.49f + 5 * std::sin(i * 2.0f * M_PI / 9), 28.06f, 3.49f))
follower->GetMotionMaster()->MoveFollow(first, 3.0f, follower->GetAngle(first));
}
- events.ScheduleEvent(eventId + 1, 10000);
+ events.ScheduleEvent(eventId + 1, 10s);
break;
case EVENT_SCENE_06:
if (Creature* first = me->SummonCreature(NPC_SHATTERED_SUN_SOLDIER, 1729.48f, 640.49f, 28.06f, 3.49f))
{
- first->m_Events.AddEvent(new MoveDelayed(first, 1678.69f, 649.27f, 28.06f, 5.46f), first->m_Events.CalculateTime(5000));
- first->m_Events.AddEvent(new FixOrientation(first), first->m_Events.CalculateTime(14500));
+ first->m_Events.AddEventAtOffset(new MoveDelayed(first, 1678.69f, 649.27f, 28.06f, 5.46f), 5s);
+ first->m_Events.AddEventAtOffset(new FixOrientation(first), 14500ms);
for (uint8 i = 0; i < 9; ++i)
if (Creature* follower = me->SummonCreature(NPC_SHATTERED_SUN_SOLDIER, 1729.48f + 5 * cos(i * 2.0f * M_PI / 9), 640.49f + 5 * std::sin(i * 2.0f * M_PI / 9), 28.06f, 3.49f))
follower->GetMotionMaster()->MoveFollow(first, 3.0f, follower->GetAngle(first));
}
- events.ScheduleEvent(eventId + 1, 12000);
+ events.ScheduleEvent(eventId + 1, 12s);
break;
case EVENT_SCENE_07:
me->SummonCreature(NPC_LADY_LIADRIN, 1719.87f, 644.265f, 28.06f, 3.83f);
me->SummonCreature(NPC_PROPHET_VELEN, 1717.97f, 646.44f, 28.06f, 3.94f);
- events.ScheduleEvent(eventId + 1, 7000);
+ events.ScheduleEvent(eventId + 1, 7s);
break;
case EVENT_SCENE_08:
if (Creature* velen = summons.GetCreatureWithEntry(NPC_PROPHET_VELEN))
velen->AI()->Talk(SAY_VELEN_01);
- events.ScheduleEvent(eventId + 1, 25000);
+ events.ScheduleEvent(eventId + 1, 25s);
break;
case EVENT_SCENE_09:
if (Creature* velen = summons.GetCreatureWithEntry(NPC_PROPHET_VELEN))
velen->AI()->Talk(SAY_VELEN_02);
- events.ScheduleEvent(eventId + 1, 14500);
+ events.ScheduleEvent(eventId + 1, 14500ms);
break;
case EVENT_SCENE_10:
if (Creature* velen = summons.GetCreatureWithEntry(NPC_PROPHET_VELEN))
velen->AI()->Talk(SAY_VELEN_03);
- events.ScheduleEvent(eventId + 1, 12500);
+ events.ScheduleEvent(eventId + 1, 12500ms);
break;
case EVENT_SCENE_11:
me->SummonCreature(NPC_THE_CORE_OF_ENTROPIUS, 1698.86f, 628.73f, 92.83f, 0.0f);
if (Creature* velen = summons.GetCreatureWithEntry(NPC_PROPHET_VELEN))
velen->CastSpell(velen, SPELL_CALL_ENTROPIUS, false);
- events.ScheduleEvent(eventId + 1, 8000);
+ events.ScheduleEvent(eventId + 1, 8s);
break;
case EVENT_SCENE_12:
if (Creature* velen = summons.GetCreatureWithEntry(NPC_PROPHET_VELEN))
@@ -840,32 +838,32 @@ struct npc_kalecgos_kj : public NullCreatureAI
velen->InterruptNonMeleeSpells(false);
velen->AI()->Talk(SAY_VELEN_04);
}
- events.ScheduleEvent(eventId + 1, 20000);
+ events.ScheduleEvent(eventId + 1, 20s);
break;
case EVENT_SCENE_13:
if (Creature* liadrin = summons.GetCreatureWithEntry(NPC_LADY_LIADRIN))
liadrin->GetMotionMaster()->MovePoint(0, 1711.28f, 637.29f, 27.29f);
- events.ScheduleEvent(eventId + 1, 6000);
+ events.ScheduleEvent(eventId + 1, 6s);
break;
case EVENT_SCENE_14:
if (Creature* liadrin = summons.GetCreatureWithEntry(NPC_LADY_LIADRIN))
liadrin->AI()->Talk(SAY_LIADRIN_01);
- events.ScheduleEvent(eventId + 1, 10000);
+ events.ScheduleEvent(eventId + 1, 10s);
break;
case EVENT_SCENE_15:
if (Creature* velen = summons.GetCreatureWithEntry(NPC_PROPHET_VELEN))
velen->AI()->Talk(SAY_VELEN_05);
- events.ScheduleEvent(eventId + 1, 14000);
+ events.ScheduleEvent(eventId + 1, 14s);
break;
case EVENT_SCENE_16:
if (Creature* liadrin = summons.GetCreatureWithEntry(NPC_LADY_LIADRIN))
liadrin->AI()->Talk(SAY_LIADRIN_02);
- events.ScheduleEvent(eventId + 1, 2000);
+ events.ScheduleEvent(eventId + 1, 2s);
break;
case EVENT_SCENE_17:
if (Creature* velen = summons.GetCreatureWithEntry(NPC_PROPHET_VELEN))
velen->AI()->Talk(SAY_VELEN_06);
- events.ScheduleEvent(eventId + 1, 3000);
+ events.ScheduleEvent(eventId + 1, 3s);
break;
case EVENT_SCENE_18:
if (Creature* core = summons.GetCreatureWithEntry(NPC_THE_CORE_OF_ENTROPIUS))
@@ -873,7 +871,7 @@ struct npc_kalecgos_kj : public NullCreatureAI
core->RemoveAllAuras();
core->CastSpell(core, SPELL_BLAZE_TO_LIGHT, true);
}
- events.ScheduleEvent(eventId + 1, 8000);
+ events.ScheduleEvent(eventId + 1, 8s);
break;
case EVENT_SCENE_19:
if (Creature* core = summons.GetCreatureWithEntry(NPC_THE_CORE_OF_ENTROPIUS))
@@ -881,42 +879,42 @@ struct npc_kalecgos_kj : public NullCreatureAI
core->SetObjectScale(0.75f);
core->GetMotionMaster()->MovePoint(0, core->GetPositionX(), core->GetPositionY(), 28.0f);
}
- events.ScheduleEvent(eventId + 1, 2000);
+ events.ScheduleEvent(eventId + 1, 2s);
break;
case EVENT_SCENE_20:
if (Creature* core = summons.GetCreatureWithEntry(NPC_THE_CORE_OF_ENTROPIUS))
core->CastSpell(core, SPELL_SUNWELL_IGNITION, true);
- events.ScheduleEvent(eventId + 1, 3000);
+ events.ScheduleEvent(eventId + 1, 3s);
break;
case EVENT_SCENE_21:
if (Creature* velen = summons.GetCreatureWithEntry(NPC_PROPHET_VELEN))
velen->AI()->Talk(SAY_VELEN_07);
- events.ScheduleEvent(eventId + 1, 15000);
+ events.ScheduleEvent(eventId + 1, 15s);
break;
case EVENT_SCENE_22:
if (Creature* liadrin = summons.GetCreatureWithEntry(NPC_LADY_LIADRIN))
liadrin->AI()->Talk(SAY_LIADRIN_03);
- events.ScheduleEvent(eventId + 1, 20000);
+ events.ScheduleEvent(eventId + 1, 20s);
break;
case EVENT_SCENE_23:
if (Creature* velen = summons.GetCreatureWithEntry(NPC_PROPHET_VELEN))
velen->AI()->Talk(SAY_VELEN_08);
if (Creature* liadrin = summons.GetCreatureWithEntry(NPC_LADY_LIADRIN))
liadrin->SetStandState(UNIT_STAND_STATE_KNEEL);
- events.ScheduleEvent(eventId + 1, 8000);
+ events.ScheduleEvent(eventId + 1, 8s);
break;
case EVENT_SCENE_24:
if (Creature* velen = summons.GetCreatureWithEntry(NPC_PROPHET_VELEN))
velen->AI()->Talk(SAY_VELEN_09);
- events.ScheduleEvent(eventId + 1, 5000);
+ events.ScheduleEvent(eventId + 1, 5s);
break;
case EVENT_SCENE_25:
if (Creature* velen = summons.GetCreatureWithEntry(NPC_PROPHET_VELEN))
{
velen->GetMotionMaster()->MovePoint(0, 1739.38f, 643.79f, 28.06f);
- velen->DespawnOrUnsummon(5000);
+ velen->DespawnOrUnsummon(5s);
}
- events.ScheduleEvent(eventId + 1, 3000);
+ events.ScheduleEvent(eventId + 1, 3s);
break;
case EVENT_SCENE_26:
for (SummonList::const_iterator itr = summons.begin(); itr != summons.end(); ++itr)
@@ -924,9 +922,9 @@ struct npc_kalecgos_kj : public NullCreatureAI
if (summon->GetEntry() == NPC_SHATTERED_SUN_SOLDIER)
{
summon->GetMotionMaster()->MovePoint(0, 1739.38f, 643.79f, 28.06f);
- summon->DespawnOrUnsummon(summon->GetExactDist2d(1734.96f, 642.43f) * 100);
+ summon->DespawnOrUnsummon(Milliseconds(uint32(summon->GetExactDist2d(1734.96f, 642.43f) * 100)));
}
- events.ScheduleEvent(eventId + 1, 7000);
+ events.ScheduleEvent(eventId + 1, 7s);
break;
case EVENT_SCENE_27:
me->setActive(false);
diff --git a/src/server/scripts/EasternKingdoms/SunwellPlateau/boss_muru.cpp b/src/server/scripts/EasternKingdoms/SunwellPlateau/boss_muru.cpp
index 863954f0ff..d8fc79846b 100644
--- a/src/server/scripts/EasternKingdoms/SunwellPlateau/boss_muru.cpp
+++ b/src/server/scripts/EasternKingdoms/SunwellPlateau/boss_muru.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
@@ -274,7 +274,7 @@ struct npc_singularity : public NullCreatureAI
void Reset() override
{
- me->DespawnOrUnsummon(18000);
+ me->DespawnOrUnsummon(18s);
me->m_Events.AddEventAtOffset([&] {
DoCastSelf(SPELL_BLACK_HOLE_SUMMON_VISUAL, true);
diff --git a/src/server/scripts/EasternKingdoms/SunwellPlateau/instance_sunwell_plateau.cpp b/src/server/scripts/EasternKingdoms/SunwellPlateau/instance_sunwell_plateau.cpp
index f43f8e79a9..5ae5e50590 100644
--- a/src/server/scripts/EasternKingdoms/SunwellPlateau/instance_sunwell_plateau.cpp
+++ b/src/server/scripts/EasternKingdoms/SunwellPlateau/instance_sunwell_plateau.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/scripts/EasternKingdoms/SunwellPlateau/sunwell_plateau.h b/src/server/scripts/EasternKingdoms/SunwellPlateau/sunwell_plateau.h
index 1de8a7cdae..68d596d088 100644
--- a/src/server/scripts/EasternKingdoms/SunwellPlateau/sunwell_plateau.h
+++ b/src/server/scripts/EasternKingdoms/SunwellPlateau/sunwell_plateau.h
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/scripts/EasternKingdoms/TheStockade/instance_the_stockade.cpp b/src/server/scripts/EasternKingdoms/TheStockade/instance_the_stockade.cpp
index d08d9d8d49..c6ab152e89 100644
--- a/src/server/scripts/EasternKingdoms/TheStockade/instance_the_stockade.cpp
+++ b/src/server/scripts/EasternKingdoms/TheStockade/instance_the_stockade.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/scripts/EasternKingdoms/Uldaman/instance_uldaman.cpp b/src/server/scripts/EasternKingdoms/Uldaman/instance_uldaman.cpp
index 1859ee640f..928108e0d0 100644
--- a/src/server/scripts/EasternKingdoms/Uldaman/instance_uldaman.cpp
+++ b/src/server/scripts/EasternKingdoms/Uldaman/instance_uldaman.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/scripts/EasternKingdoms/Uldaman/uldaman.h b/src/server/scripts/EasternKingdoms/Uldaman/uldaman.h
index 13196f6ffa..56fe132831 100644
--- a/src/server/scripts/EasternKingdoms/Uldaman/uldaman.h
+++ b/src/server/scripts/EasternKingdoms/Uldaman/uldaman.h
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/scripts/EasternKingdoms/ZulAman/boss_akilzon.cpp b/src/server/scripts/EasternKingdoms/ZulAman/boss_akilzon.cpp
index 4607837a73..078db1d4a8 100644
--- a/src/server/scripts/EasternKingdoms/ZulAman/boss_akilzon.cpp
+++ b/src/server/scripts/EasternKingdoms/ZulAman/boss_akilzon.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/scripts/EasternKingdoms/ZulAman/boss_halazzi.cpp b/src/server/scripts/EasternKingdoms/ZulAman/boss_halazzi.cpp
index d96450ca77..aa06535570 100644
--- a/src/server/scripts/EasternKingdoms/ZulAman/boss_halazzi.cpp
+++ b/src/server/scripts/EasternKingdoms/ZulAman/boss_halazzi.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/scripts/EasternKingdoms/ZulAman/boss_hexlord.cpp b/src/server/scripts/EasternKingdoms/ZulAman/boss_hexlord.cpp
index 065192bf74..71811383b5 100644
--- a/src/server/scripts/EasternKingdoms/ZulAman/boss_hexlord.cpp
+++ b/src/server/scripts/EasternKingdoms/ZulAman/boss_hexlord.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
@@ -161,72 +161,72 @@ static PlayerAbilityStruct PlayerAbility[13][3] =
// 0 UNK class (should never be set)
{
// Warrior as fallback behavior if for some reason UNK class
- { SPELL_WR_SPELL_REFLECT, ABILITY_TARGET_SELF, 10000ms },
- { SPELL_WR_WHIRLWIND, ABILITY_TARGET_SELF, 10000ms },
- { SPELL_WR_MORTAL_STRIKE, ABILITY_TARGET_VICTIM, 6000ms }
+ { SPELL_WR_SPELL_REFLECT, ABILITY_TARGET_SELF, 10s },
+ { SPELL_WR_WHIRLWIND, ABILITY_TARGET_SELF, 10s },
+ { SPELL_WR_MORTAL_STRIKE, ABILITY_TARGET_VICTIM, 6s }
},
// 1 warrior
- { { SPELL_WR_SPELL_REFLECT, ABILITY_TARGET_SELF, 10000ms },
- { SPELL_WR_WHIRLWIND, ABILITY_TARGET_SELF, 10000ms },
- { SPELL_WR_MORTAL_STRIKE, ABILITY_TARGET_VICTIM, 6000ms }
+ { { SPELL_WR_SPELL_REFLECT, ABILITY_TARGET_SELF, 10s },
+ { SPELL_WR_WHIRLWIND, ABILITY_TARGET_SELF, 10s },
+ { SPELL_WR_MORTAL_STRIKE, ABILITY_TARGET_VICTIM, 6s }
},
// 2 paladin
- { { SPELL_PA_CONSECRATION, ABILITY_TARGET_SELF, 10000ms },
- { SPELL_PA_HOLY_LIGHT, ABILITY_TARGET_HEAL, 10000ms },
- { SPELL_PA_AVENGING_WRATH, ABILITY_TARGET_SELF, 10000ms }
+ { { SPELL_PA_CONSECRATION, ABILITY_TARGET_SELF, 10s },
+ { SPELL_PA_HOLY_LIGHT, ABILITY_TARGET_HEAL, 10s },
+ { SPELL_PA_AVENGING_WRATH, ABILITY_TARGET_SELF, 10s }
},
// 3 hunter
- { { SPELL_HU_EXPLOSIVE_TRAP, ABILITY_TARGET_SELF, 10000ms },
- { SPELL_HU_FREEZING_TRAP, ABILITY_TARGET_SELF, 10000ms },
- { SPELL_HU_SNAKE_TRAP, ABILITY_TARGET_SELF, 10000ms }
+ { { SPELL_HU_EXPLOSIVE_TRAP, ABILITY_TARGET_SELF, 10s },
+ { SPELL_HU_FREEZING_TRAP, ABILITY_TARGET_SELF, 10s },
+ { SPELL_HU_SNAKE_TRAP, ABILITY_TARGET_SELF, 10s }
},
// 4 rogue
- { { SPELL_RO_WOUND_POISON, ABILITY_TARGET_VICTIM, 3000ms },
- { SPELL_RO_SLICE_DICE, ABILITY_TARGET_SELF, 10000ms },
- { SPELL_RO_BLIND, ABILITY_TARGET_ENEMY, 10000ms }
+ { { SPELL_RO_WOUND_POISON, ABILITY_TARGET_VICTIM, 3s },
+ { SPELL_RO_SLICE_DICE, ABILITY_TARGET_SELF, 10s },
+ { SPELL_RO_BLIND, ABILITY_TARGET_ENEMY, 10s }
},
// 5 priest
- { { SPELL_PR_PAIN_SUPP, ABILITY_TARGET_HEAL, 10000ms },
- { SPELL_PR_HEAL, ABILITY_TARGET_HEAL, 10000ms },
- { SPELL_PR_PSYCHIC_SCREAM, ABILITY_TARGET_SELF, 10000ms }
+ { { SPELL_PR_PAIN_SUPP, ABILITY_TARGET_HEAL, 10s },
+ { SPELL_PR_HEAL, ABILITY_TARGET_HEAL, 10s },
+ { SPELL_PR_PSYCHIC_SCREAM, ABILITY_TARGET_SELF, 10s }
},
// 6 death knight
{
- { SPELL_DK_PLAGUE_STRIKE, ABILITY_TARGET_ENEMY, 2000ms },
- { SPELL_DK_DEATH_AND_DECAY, ABILITY_TARGET_SELF, 10000ms },
- { SPELL_DK_BLOOD_WORMS, ABILITY_TARGET_ENEMY, 5000ms }
+ { SPELL_DK_PLAGUE_STRIKE, ABILITY_TARGET_ENEMY, 2s },
+ { SPELL_DK_DEATH_AND_DECAY, ABILITY_TARGET_SELF, 10s },
+ { SPELL_DK_BLOOD_WORMS, ABILITY_TARGET_ENEMY, 5s }
},
// 7 shaman
- { { SPELL_SH_FIRE_NOVA, ABILITY_TARGET_SELF, 10000ms },
- { SPELL_SH_HEALING_WAVE, ABILITY_TARGET_HEAL, 10000ms },
- { SPELL_SH_CHAIN_LIGHT, ABILITY_TARGET_ENEMY, 8000ms }
+ { { SPELL_SH_FIRE_NOVA, ABILITY_TARGET_SELF, 10s },
+ { SPELL_SH_HEALING_WAVE, ABILITY_TARGET_HEAL, 10s },
+ { SPELL_SH_CHAIN_LIGHT, ABILITY_TARGET_ENEMY, 8s }
},
// 8 mage
- { { SPELL_MG_FIREBALL, ABILITY_TARGET_ENEMY, 5000ms },
- { SPELL_MG_FROSTBOLT, ABILITY_TARGET_ENEMY, 5000ms },
- { SPELL_MG_ICE_LANCE, ABILITY_TARGET_SPECIAL, 2000ms }
+ { { SPELL_MG_FIREBALL, ABILITY_TARGET_ENEMY, 5s },
+ { SPELL_MG_FROSTBOLT, ABILITY_TARGET_ENEMY, 5s },
+ { SPELL_MG_ICE_LANCE, ABILITY_TARGET_SPECIAL, 2s }
},
// 9 warlock
- { { SPELL_WL_CURSE_OF_DOOM, ABILITY_TARGET_ENEMY, 10000ms },
- { SPELL_WL_RAIN_OF_FIRE, ABILITY_TARGET_ENEMY, 10000ms },
- { SPELL_WL_UNSTABLE_AFFL, ABILITY_TARGET_ENEMY, 10000ms }
+ { { SPELL_WL_CURSE_OF_DOOM, ABILITY_TARGET_ENEMY, 10s },
+ { SPELL_WL_RAIN_OF_FIRE, ABILITY_TARGET_ENEMY, 10s },
+ { SPELL_WL_UNSTABLE_AFFL, ABILITY_TARGET_ENEMY, 10s }
},
// 10 UNK class (should never be set)
{
// Warrior as fallback behavior if for some reason UNK class
- { SPELL_WR_SPELL_REFLECT, ABILITY_TARGET_SELF, 10000ms },
- { SPELL_WR_WHIRLWIND, ABILITY_TARGET_SELF, 10000ms },
- { SPELL_WR_MORTAL_STRIKE, ABILITY_TARGET_VICTIM, 6000ms }
+ { SPELL_WR_SPELL_REFLECT, ABILITY_TARGET_SELF, 10s },
+ { SPELL_WR_WHIRLWIND, ABILITY_TARGET_SELF, 10s },
+ { SPELL_WR_MORTAL_STRIKE, ABILITY_TARGET_VICTIM, 6s }
},
// 11 druid
- { { SPELL_DR_LIFEBLOOM, ABILITY_TARGET_HEAL, 10000ms },
- { SPELL_DR_THORNS, ABILITY_TARGET_SELF, 10000ms },
- { SPELL_DR_MOONFIRE, ABILITY_TARGET_ENEMY, 8000ms }
+ { { SPELL_DR_LIFEBLOOM, ABILITY_TARGET_HEAL, 10s },
+ { SPELL_DR_THORNS, ABILITY_TARGET_SELF, 10s },
+ { SPELL_DR_MOONFIRE, ABILITY_TARGET_ENEMY, 8s }
},
// MISC shadow priest
- { { SPELL_PR_MIND_CONTROL, ABILITY_TARGET_ENEMY, 15000ms },
- { SPELL_PR_MIND_BLAST, ABILITY_TARGET_ENEMY, 5000ms },
- { SPELL_PR_SW_DEATH, ABILITY_TARGET_ENEMY, 10000ms }
+ { { SPELL_PR_MIND_CONTROL, ABILITY_TARGET_ENEMY, 15s },
+ { SPELL_PR_MIND_BLAST, ABILITY_TARGET_ENEMY, 5s },
+ { SPELL_PR_SW_DEATH, ABILITY_TARGET_ENEMY, 10s }
}
};
@@ -244,7 +244,7 @@ struct boss_hexlord_malacrass : public BossAI
{
BossAI::Reset();
_currentClass = CLASS_NONE;
- _classAbilityTimer = 10000ms;
+ _classAbilityTimer = 10s;
_timeUntilNextDrainPower = 0ms;
SpawnAdds();
ScheduleHealthCheckEvent(80, [&] {
diff --git a/src/server/scripts/EasternKingdoms/ZulAman/boss_janalai.cpp b/src/server/scripts/EasternKingdoms/ZulAman/boss_janalai.cpp
index 5caedf30b0..d8c63ecb40 100644
--- a/src/server/scripts/EasternKingdoms/ZulAman/boss_janalai.cpp
+++ b/src/server/scripts/EasternKingdoms/ZulAman/boss_janalai.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/scripts/EasternKingdoms/ZulAman/boss_nalorakk.cpp b/src/server/scripts/EasternKingdoms/ZulAman/boss_nalorakk.cpp
index 22c405ed62..745bab0d0c 100644
--- a/src/server/scripts/EasternKingdoms/ZulAman/boss_nalorakk.cpp
+++ b/src/server/scripts/EasternKingdoms/ZulAman/boss_nalorakk.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
@@ -127,7 +127,7 @@ struct boss_nalorakk : public BossAI
{
_introScheduler.CancelGroup(GROUP_CHECK_DEAD);
_waveList.clear();
- me->GetMotionMaster()->MovePath(me->GetEntry()*100+1, false);
+ me->GetMotionMaster()->MoveWaypoint(me->GetEntry()*100+1, false);
Talk(SAY_RUN_AWAY);
_introScheduler.Schedule(5s, [this](TaskContext)
{
@@ -153,7 +153,7 @@ struct boss_nalorakk : public BossAI
_introScheduler.CancelGroup(GROUP_CHECK_DEAD);
_waveList.clear();
Talk(SAY_RUN_AWAY);
- me->GetMotionMaster()->MovePath(me->GetEntry()*100+2, false);
+ me->GetMotionMaster()->MoveWaypoint(me->GetEntry()*100+2, false);
_introScheduler.Schedule(6s, [this](TaskContext)
{
me->SetFacingTo(1.54f);
@@ -176,7 +176,7 @@ struct boss_nalorakk : public BossAI
_introScheduler.CancelGroup(GROUP_CHECK_DEAD);
_waveList.clear();
Talk(SAY_RUN_AWAY);
- me->GetMotionMaster()->MovePath(me->GetEntry() * 100 + 3, false);
+ me->GetMotionMaster()->MoveWaypoint(me->GetEntry() * 100 + 3, false);
_introScheduler.Schedule(6s, [this](TaskContext)
{
me->SetFacingTo(1.54f);
diff --git a/src/server/scripts/EasternKingdoms/ZulAman/boss_zuljin.cpp b/src/server/scripts/EasternKingdoms/ZulAman/boss_zuljin.cpp
index b33a057db3..2eb11cd2ba 100644
--- a/src/server/scripts/EasternKingdoms/ZulAman/boss_zuljin.cpp
+++ b/src/server/scripts/EasternKingdoms/ZulAman/boss_zuljin.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
@@ -285,10 +285,7 @@ struct boss_zuljin : public BossAI
instance->SetBossState(DATA_ZULJIN, DONE);
Talk(SAY_DEATH);
summons.DespawnEntry(CREATURE_COLUMN_OF_FIRE);
-
- me->m_Events.AddEventAtOffset( [this] {
- summons.DespawnAll();
- }, 3s);
+ summons.DespawnAll(3s);
}
void SpawnAdds()
diff --git a/src/server/scripts/EasternKingdoms/ZulAman/instance_zulaman.cpp b/src/server/scripts/EasternKingdoms/ZulAman/instance_zulaman.cpp
index 4340241c79..8eae8a7e70 100644
--- a/src/server/scripts/EasternKingdoms/ZulAman/instance_zulaman.cpp
+++ b/src/server/scripts/EasternKingdoms/ZulAman/instance_zulaman.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/scripts/EasternKingdoms/ZulAman/zulaman.cpp b/src/server/scripts/EasternKingdoms/ZulAman/zulaman.cpp
index 6dd4a8c9e2..47e6100d1d 100644
--- a/src/server/scripts/EasternKingdoms/ZulAman/zulaman.cpp
+++ b/src/server/scripts/EasternKingdoms/ZulAman/zulaman.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
@@ -78,7 +78,7 @@ struct npc_forest_frog : public ScriptedAI
void MovementInform(uint32 type, uint32 data) override
{
if (type == POINT_MOTION_TYPE && data == POINT_DESPAWN)
- me->DespawnOrUnsummon(1000);
+ me->DespawnOrUnsummon(1s);
}
void UpdateAI(uint32 diff) override
@@ -103,7 +103,7 @@ struct npc_forest_frog : public ScriptedAI
Talk(SAY_THANKS_FREED, player);
eventTimer = 2;
- events.ScheduleEvent(eventTimer, urand(4000, 5000));
+ events.ScheduleEvent(eventTimer, 4s, 5s);
break;
case 2:
if (me->GetEntry() != NPC_GUNTER && me->GetEntry() != NPC_KYREN) // vendors don't kneel?
@@ -140,7 +140,7 @@ struct npc_forest_frog : public ScriptedAI
break;
}
eventTimer = 3;
- events.ScheduleEvent(eventTimer, urand(6000, 7000));
+ events.ScheduleEvent(eventTimer, 6s, 7s);
break;
case 3:
me->SetStandState(EMOTE_ONESHOT_NONE);
@@ -152,9 +152,9 @@ struct npc_forest_frog : public ScriptedAI
eventTimer = 4;
if (me->GetEntry() == NPC_GUNTER || me->GetEntry() == NPC_KYREN)
- events.ScheduleEvent(eventTimer, 5 * MINUTE * IN_MILLISECONDS); // vendors wait for 5 minutes before running away and despawning
+ events.ScheduleEvent(eventTimer, 300s); // vendors wait for 5 minutes before running away and despawning
else
- events.ScheduleEvent(eventTimer, 6000);
+ events.ScheduleEvent(eventTimer, 6s);
break;
case 4:
me->HandleEmoteCommand(EMOTE_ONESHOT_WAVE);
@@ -165,7 +165,7 @@ struct npc_forest_frog : public ScriptedAI
Talk(SAY_GOODBYE, player);
eventTimer = 5;
- events.ScheduleEvent(eventTimer, 2000);
+ events.ScheduleEvent(eventTimer, 2s);
break;
case 5:
@@ -205,7 +205,7 @@ struct npc_forest_frog : public ScriptedAI
// start generic rp
eventTimer = 1;
- events.ScheduleEvent(eventTimer, 3000);
+ events.ScheduleEvent(eventTimer, 3s);
me->UpdateEntry(cEntry);
@@ -400,7 +400,7 @@ struct npc_harrison_jones : public ScriptedAI
Talk(SAY_HARRISON_0);
scheduler.Schedule(2s, [this](TaskContext /*task*/)
{
- me->GetMotionMaster()->MovePath(HARRISON_MOVE_1, false);
+ me->GetMotionMaster()->MoveWaypoint(HARRISON_MOVE_1, false);
});
}
}
@@ -448,7 +448,7 @@ struct npc_harrison_jones : public ScriptedAI
// Players are Now Saved to instance at SPECIAL (Player should be notified?)
scheduler.Schedule(500ms, [this](TaskContext /*task*/)
{
- me->GetMotionMaster()->MovePath(HARRISON_MOVE_2, false);
+ me->GetMotionMaster()->MoveWaypoint(HARRISON_MOVE_2, false);
});
}
}
@@ -486,7 +486,7 @@ struct npc_harrison_jones : public ScriptedAI
void MovementInform(uint32 type, uint32 id) override
{
// at gong
- if (type == WAYPOINT_MOTION_TYPE && id == 2 && _phase == PHASE_GONG)
+ if (type == WAYPOINT_MOTION_TYPE && id == 3 && _phase == PHASE_GONG)
{
if (GameObject* gong = _instance->GetGameObject(DATA_STRANGE_GONG))
me->SetFacingToObject(gong);
@@ -503,13 +503,13 @@ struct npc_harrison_jones : public ScriptedAI
});
}
// to the massive gate
- else if (type == WAYPOINT_MOTION_TYPE && id == 1 && _phase == PHASE_GATE_CLOSED)
+ else if (type == WAYPOINT_MOTION_TYPE && id == 2 && _phase == PHASE_GATE_CLOSED)
{
me->SetEntry(NPC_HARRISON_JONES_1);
Talk(SAY_HARRISON_2);
}
// at massive gate
- else if (type == WAYPOINT_MOTION_TYPE && id == 2 && _phase == PHASE_GATE_CLOSED)
+ else if (type == WAYPOINT_MOTION_TYPE && id == 3 && _phase == PHASE_GATE_CLOSED)
{
me->SetUInt32Value(UNIT_NPC_EMOTESTATE, EMOTE_STATE_USE_STANDING);
Talk(SAY_HARRISON_3);
@@ -521,7 +521,7 @@ struct npc_harrison_jones : public ScriptedAI
{
DoCastSelf(SPELL_STEALTH);
me->SetUInt32Value(UNIT_NPC_EMOTESTATE, EMOTE_ONESHOT_NONE);
- me->GetMotionMaster()->MovePath(HARRISON_MOVE_3, false);
+ me->GetMotionMaster()->MoveWaypoint(HARRISON_MOVE_3, false);
});
}
}
@@ -592,14 +592,14 @@ struct npc_amanishi_lookout : public NullCreatureAI
Talk(SAY_INVADERS);
me->SetUnitFlag(UNIT_FLAG_IMMUNE_TO_PC);
me->SetUnitFlag(UNIT_FLAG_RENAME);
- me->GetMotionMaster()->MovePath(PATH_LOOKOUT, false);
+ me->GetMotionMaster()->MoveWaypoint(PATH_LOOKOUT, false);
}
}
void MovementInform(uint32 type, uint32 id) override
{
// at boss
- if (type == WAYPOINT_MOTION_TYPE && id == 8) // should despawn with waypoint script
+ if (type == WAYPOINT_MOTION_TYPE && id == 9) // should despawn with waypoint script
me->DespawnOrUnsummon(0s, 0s);
}
private:
diff --git a/src/server/scripts/EasternKingdoms/ZulAman/zulaman.h b/src/server/scripts/EasternKingdoms/ZulAman/zulaman.h
index 097e4cbde2..d131a9905d 100644
--- a/src/server/scripts/EasternKingdoms/ZulAman/zulaman.h
+++ b/src/server/scripts/EasternKingdoms/ZulAman/zulaman.h
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/scripts/EasternKingdoms/ZulGurub/boss_arlokk.cpp b/src/server/scripts/EasternKingdoms/ZulGurub/boss_arlokk.cpp
index 5cabaf62c4..83275a1793 100644
--- a/src/server/scripts/EasternKingdoms/ZulGurub/boss_arlokk.cpp
+++ b/src/server/scripts/EasternKingdoms/ZulGurub/boss_arlokk.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
@@ -78,6 +78,10 @@ Position const PosMoveOnSpawn[1] =
{ -11561.9f, -1627.868f, 41.29941f, 0.0f }
};
+// hack
+float const DamageIncrease = 35.0f;
+float const DamageDecrease = 100.f / (1.f + DamageIncrease / 100.f) - 100.f;
+
class boss_arlokk : public CreatureScript
{
public:
@@ -90,7 +94,7 @@ public:
void Reset() override
{
if (events.IsInPhase(PHASE_TWO))
- me->HandleStatModifier(UNIT_MOD_DAMAGE_MAINHAND, TOTAL_PCT, 35.0f, false); // hack
+ me->ApplyStatPctModifier(UNIT_MOD_DAMAGE_MAINHAND, TOTAL_PCT, DamageDecrease); // hack
_Reset();
_summonCountA = 0;
_summonCountB = 0;
@@ -253,7 +257,7 @@ public:
events.ScheduleEvent(EVENT_RAVAGE, 10s, 14s, 0, PHASE_TWO);
events.ScheduleEvent(EVENT_TRANSFORM_BACK, 30s, 40s, 0, PHASE_TWO);
events.SetPhase(PHASE_TWO);
- me->HandleStatModifier(UNIT_MOD_DAMAGE_MAINHAND, TOTAL_PCT, 35.0f, true); // hack
+ me->ApplyStatPctModifier(UNIT_MOD_DAMAGE_MAINHAND, TOTAL_PCT, DamageIncrease); // hack
break;
case EVENT_RAVAGE:
DoCastVictim(SPELL_RAVAGE, true);
@@ -265,7 +269,7 @@ public:
DoCast(me, SPELL_VANISH_VISUAL);
me->SetUInt32Value(UNIT_VIRTUAL_ITEM_SLOT_ID + 0, uint32(WEAPON_DAGGER));
me->SetUInt32Value(UNIT_VIRTUAL_ITEM_SLOT_ID + 1, uint32(WEAPON_DAGGER));
- me->HandleStatModifier(UNIT_MOD_DAMAGE_MAINHAND, TOTAL_PCT, 35.0f, false); // hack
+ me->ApplyStatPctModifier(UNIT_MOD_DAMAGE_MAINHAND, TOTAL_PCT, DamageDecrease); // hack
events.ScheduleEvent(EVENT_SHADOW_WORD_PAIN, 4s, 7s, 0, PHASE_ONE);
events.ScheduleEvent(EVENT_GOUGE, 12s, 15s, 0, PHASE_ONE);
events.ScheduleEvent(EVENT_TRANSFORM, 30s, 0, PHASE_ONE);
@@ -330,7 +334,7 @@ public:
if (Unit* arlokk = ObjectAccessor::GetUnit(*me, _instance->GetGuidData(NPC_ARLOKK)))
me->GetMotionMaster()->MovePoint(0, arlokk->GetPositionX(), arlokk->GetPositionY(), arlokk->GetPositionZ());
- _events.ScheduleEvent(EVENT_ATTACK, 6000);
+ _events.ScheduleEvent(EVENT_ATTACK, 6s);
}
void JustEngagedWith(Unit* /*who*/) override
@@ -355,7 +359,7 @@ public:
if (arlokk->IsAlive())
arlokk->GetAI()->SetData(_sideData, 0);
}
- me->DespawnOrUnsummon(4000);
+ me->DespawnOrUnsummon(4s);
}
void UpdateAI(uint32 diff) override
diff --git a/src/server/scripts/EasternKingdoms/ZulGurub/boss_gahzranka.cpp b/src/server/scripts/EasternKingdoms/ZulGurub/boss_gahzranka.cpp
index 1b8d13bbf7..44247a38ef 100644
--- a/src/server/scripts/EasternKingdoms/ZulGurub/boss_gahzranka.cpp
+++ b/src/server/scripts/EasternKingdoms/ZulGurub/boss_gahzranka.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
@@ -41,7 +41,7 @@ struct boss_gahzranka : public BossAI
void IsSummonedBy(WorldObject* /*summoner*/) override
{
- me->GetMotionMaster()->MovePath(me->GetEntry() * 10, false);
+ me->GetMotionMaster()->MoveWaypoint(me->GetEntry() * 10, false);
}
void JustEngagedWith(Unit* /*who*/) override
diff --git a/src/server/scripts/EasternKingdoms/ZulGurub/boss_grilek.cpp b/src/server/scripts/EasternKingdoms/ZulGurub/boss_grilek.cpp
index 6316110ec5..a282b0ee5f 100644
--- a/src/server/scripts/EasternKingdoms/ZulGurub/boss_grilek.cpp
+++ b/src/server/scripts/EasternKingdoms/ZulGurub/boss_grilek.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/scripts/EasternKingdoms/ZulGurub/boss_hakkar.cpp b/src/server/scripts/EasternKingdoms/ZulGurub/boss_hakkar.cpp
index 3a0723c823..6bbefa315a 100644
--- a/src/server/scripts/EasternKingdoms/ZulGurub/boss_hakkar.cpp
+++ b/src/server/scripts/EasternKingdoms/ZulGurub/boss_hakkar.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/scripts/EasternKingdoms/ZulGurub/boss_hazzarah.cpp b/src/server/scripts/EasternKingdoms/ZulGurub/boss_hazzarah.cpp
index 2080db95ee..819cfa493b 100644
--- a/src/server/scripts/EasternKingdoms/ZulGurub/boss_hazzarah.cpp
+++ b/src/server/scripts/EasternKingdoms/ZulGurub/boss_hazzarah.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/scripts/EasternKingdoms/ZulGurub/boss_jeklik.cpp b/src/server/scripts/EasternKingdoms/ZulGurub/boss_jeklik.cpp
index c750fd59c6..1c4fc43a1a 100644
--- a/src/server/scripts/EasternKingdoms/ZulGurub/boss_jeklik.cpp
+++ b/src/server/scripts/EasternKingdoms/ZulGurub/boss_jeklik.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
@@ -140,7 +140,7 @@ struct boss_jeklik : public BossAI
me->SetDisableGravity(true);
DoCastSelf(SPELL_BAT_FORM, true);
- me->GetMotionMaster()->MovePath(PATH_JEKLIK_INTRO, false);
+ me->GetMotionMaster()->MoveWaypoint(PATH_JEKLIK_INTRO, false);
}
void PathEndReached(uint32 pathId) override
@@ -295,7 +295,7 @@ struct npc_batrider : public CreatureAI
me->SetSpeed(MOVE_WALK, 5.0f, true);
me->SetCanFly(true);
- me->GetMotionMaster()->MoveSplinePath(PATH_BATRIDER_LOOP);
+ me->GetMotionMaster()->MovePath(PATH_BATRIDER_LOOP);
}
else
{
@@ -375,7 +375,7 @@ struct npc_batrider : public CreatureAI
if (!me->isMoving())
{
me->SetCanFly(true);
- me->GetMotionMaster()->MoveSplinePath(PATH_BATRIDER_LOOP);
+ me->GetMotionMaster()->MovePath(PATH_BATRIDER_LOOP);
}
}
else if (_mode == BATRIDER_MODE_TRASH)
diff --git a/src/server/scripts/EasternKingdoms/ZulGurub/boss_jindo.cpp b/src/server/scripts/EasternKingdoms/ZulGurub/boss_jindo.cpp
index 27d302260b..9db0973a2e 100644
--- a/src/server/scripts/EasternKingdoms/ZulGurub/boss_jindo.cpp
+++ b/src/server/scripts/EasternKingdoms/ZulGurub/boss_jindo.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/scripts/EasternKingdoms/ZulGurub/boss_mandokir.cpp b/src/server/scripts/EasternKingdoms/ZulGurub/boss_mandokir.cpp
index e02c69e0f3..14b4307464 100644
--- a/src/server/scripts/EasternKingdoms/ZulGurub/boss_mandokir.cpp
+++ b/src/server/scripts/EasternKingdoms/ZulGurub/boss_mandokir.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
@@ -80,7 +80,7 @@ enum Misc
MODEL_OHGAN_MOUNT = 15271,
PATH_MANDOKIR = 492861,
- POINT_MANDOKIR_END = 24,
+ POINT_MANDOKIR_END = 25,
CHAINED_SPIRIT_COUNT = 20,
ACTION_CHARGE = 1
};
@@ -156,7 +156,7 @@ public:
killCount = 0;
if (me->GetPositionZ() > 140.0f)
{
- events.ScheduleEvent(EVENT_CHECK_START, 1000);
+ events.ScheduleEvent(EVENT_CHECK_START, 1s);
if (Creature* speaker = ObjectAccessor::GetCreature(*me, instance->GetGuidData(NPC_VILEBRANCH_SPEAKER)))
{
if (!speaker->IsAlive())
@@ -250,7 +250,7 @@ public:
}
}
- void SetGUID(ObjectGuid const guid, int32 type) override
+ void SetGUID(ObjectGuid const& guid, int32 type) override
{
if (type == ACTION_CHARGE)
{
@@ -564,7 +564,7 @@ public:
RevivePlayer(victim, reviveGUID);
}
- void SetGUID(ObjectGuid const guid, int32 /*type = 0 */) override
+ void SetGUID(ObjectGuid const& guid, int32 /*type = 0 */) override
{
reviveGUID = guid;
}
@@ -612,7 +612,7 @@ public:
revivePlayerGUID.Clear();
}
- void SetGUID(ObjectGuid const guid, int32 /*id*/) override
+ void SetGUID(ObjectGuid const& guid, int32 /*id*/) override
{
revivePlayerGUID = guid;
}
@@ -641,7 +641,7 @@ public:
{
DoCast(target, SPELL_REVIVE);
}
- me->DespawnOrUnsummon(1000);
+ me->DespawnOrUnsummon(1s);
}
}
diff --git a/src/server/scripts/EasternKingdoms/ZulGurub/boss_marli.cpp b/src/server/scripts/EasternKingdoms/ZulGurub/boss_marli.cpp
index f9bd23b6ae..b350b680e5 100644
--- a/src/server/scripts/EasternKingdoms/ZulGurub/boss_marli.cpp
+++ b/src/server/scripts/EasternKingdoms/ZulGurub/boss_marli.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
@@ -73,6 +73,10 @@ enum Misc
GO_SPIDER_EGGS = 179985,
};
+// hack
+float const DamageIncrease = 35.0f;
+float const DamageDecrease = 100.f / (1.f + DamageIncrease / 100.f) - 100.f;
+
// High Priestess Mar'li (14510)
struct boss_marli : public BossAI
{
@@ -84,7 +88,7 @@ public:
if (_phase == PHASE_SPIDER)
{
me->RemoveAura(SPELL_SPIDER_FORM);
- me->HandleStatModifier(UNIT_MOD_DAMAGE_MAINHAND, TOTAL_PCT, 35.0f, false);
+ me->ApplyStatPctModifier(UNIT_MOD_DAMAGE_MAINHAND, TOTAL_PCT, DamageDecrease);
_phase = PHASE_TROLL;
}
@@ -143,7 +147,7 @@ private:
me->RemoveAura(SPELL_SPIDER_FORM);
DoCastSelf(SPELL_TRANSFORM_BACK, true);
Talk(SAY_TRANSFORM_BACK);
- me->HandleStatModifier(UNIT_MOD_DAMAGE_MAINHAND, TOTAL_PCT, 35.0f, false);
+ me->ApplyStatPctModifier(UNIT_MOD_DAMAGE_MAINHAND, TOTAL_PCT, DamageDecrease);
scheduler.CancelGroup(PHASE_SPIDER);
}
@@ -186,7 +190,7 @@ private:
Talk(SAY_TRANSFORM);
DoCastSelf(SPELL_SPIDER_FORM, true);
- me->HandleStatModifier(UNIT_MOD_DAMAGE_MAINHAND, TOTAL_PCT, 35.0f, true);
+ me->ApplyStatPctModifier(UNIT_MOD_DAMAGE_MAINHAND, TOTAL_PCT, DamageIncrease);
scheduler.Schedule(5s, PHASE_SPIDER, [this](TaskContext context)
{
diff --git a/src/server/scripts/EasternKingdoms/ZulGurub/boss_renataki.cpp b/src/server/scripts/EasternKingdoms/ZulGurub/boss_renataki.cpp
index 4e18dfe06f..22319d57e5 100644
--- a/src/server/scripts/EasternKingdoms/ZulGurub/boss_renataki.cpp
+++ b/src/server/scripts/EasternKingdoms/ZulGurub/boss_renataki.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/scripts/EasternKingdoms/ZulGurub/boss_thekal.cpp b/src/server/scripts/EasternKingdoms/ZulGurub/boss_thekal.cpp
index 60393e4125..7140a1ae86 100644
--- a/src/server/scripts/EasternKingdoms/ZulGurub/boss_thekal.cpp
+++ b/src/server/scripts/EasternKingdoms/ZulGurub/boss_thekal.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/scripts/EasternKingdoms/ZulGurub/boss_venoxis.cpp b/src/server/scripts/EasternKingdoms/ZulGurub/boss_venoxis.cpp
index eecf141803..e5057638ab 100644
--- a/src/server/scripts/EasternKingdoms/ZulGurub/boss_venoxis.cpp
+++ b/src/server/scripts/EasternKingdoms/ZulGurub/boss_venoxis.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/scripts/EasternKingdoms/ZulGurub/boss_wushoolay.cpp b/src/server/scripts/EasternKingdoms/ZulGurub/boss_wushoolay.cpp
index af24f2bd8f..01c3b02554 100644
--- a/src/server/scripts/EasternKingdoms/ZulGurub/boss_wushoolay.cpp
+++ b/src/server/scripts/EasternKingdoms/ZulGurub/boss_wushoolay.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/scripts/EasternKingdoms/ZulGurub/instance_zulgurub.cpp b/src/server/scripts/EasternKingdoms/ZulGurub/instance_zulgurub.cpp
index bd1436dab2..75b215f726 100644
--- a/src/server/scripts/EasternKingdoms/ZulGurub/instance_zulgurub.cpp
+++ b/src/server/scripts/EasternKingdoms/ZulGurub/instance_zulgurub.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/scripts/EasternKingdoms/ZulGurub/zulgurub.cpp b/src/server/scripts/EasternKingdoms/ZulGurub/zulgurub.cpp
index 4c251af6ae..ea28ff82de 100644
--- a/src/server/scripts/EasternKingdoms/ZulGurub/zulgurub.cpp
+++ b/src/server/scripts/EasternKingdoms/ZulGurub/zulgurub.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/scripts/EasternKingdoms/ZulGurub/zulgurub.h b/src/server/scripts/EasternKingdoms/ZulGurub/zulgurub.h
index f0219e5a64..a9f9a93913 100644
--- a/src/server/scripts/EasternKingdoms/ZulGurub/zulgurub.h
+++ b/src/server/scripts/EasternKingdoms/ZulGurub/zulgurub.h
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/scripts/EasternKingdoms/eastern_kingdoms_script_loader.cpp b/src/server/scripts/EasternKingdoms/eastern_kingdoms_script_loader.cpp
index b92b352151..89ee4783ec 100644
--- a/src/server/scripts/EasternKingdoms/eastern_kingdoms_script_loader.cpp
+++ b/src/server/scripts/EasternKingdoms/eastern_kingdoms_script_loader.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/scripts/EasternKingdoms/zone_arathi_highlands.cpp b/src/server/scripts/EasternKingdoms/zone_arathi_highlands.cpp
index 376e746677..1979f0d7f4 100644
--- a/src/server/scripts/EasternKingdoms/zone_arathi_highlands.cpp
+++ b/src/server/scripts/EasternKingdoms/zone_arathi_highlands.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
@@ -78,7 +78,7 @@ public:
break;
case 11:
Talk(SAY_PROGRESS_6, player);
- SetRun();
+ 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, 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_blasted_lands.cpp b/src/server/scripts/EasternKingdoms/zone_blasted_lands.cpp
index 8a56089017..80a0173653 100644
--- a/src/server/scripts/EasternKingdoms/zone_blasted_lands.cpp
+++ b/src/server/scripts/EasternKingdoms/zone_blasted_lands.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/scripts/EasternKingdoms/zone_burning_steppes.cpp b/src/server/scripts/EasternKingdoms/zone_burning_steppes.cpp
index 8c89c4428e..308ac66080 100644
--- a/src/server/scripts/EasternKingdoms/zone_burning_steppes.cpp
+++ b/src/server/scripts/EasternKingdoms/zone_burning_steppes.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/scripts/EasternKingdoms/zone_duskwood.cpp b/src/server/scripts/EasternKingdoms/zone_duskwood.cpp
index d7d06ac3f4..37e9ab224a 100644
--- a/src/server/scripts/EasternKingdoms/zone_duskwood.cpp
+++ b/src/server/scripts/EasternKingdoms/zone_duskwood.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
@@ -64,7 +64,7 @@ struct boss_twilight_corrupter : public ScriptedAI
{
if (creature->IsAlive() && me->GetGUID() != creature->GetGUID())
{
- me->DespawnOrUnsummon(1);
+ me->DespawnOrUnsummon(1ms);
break;
}
}
diff --git a/src/server/scripts/EasternKingdoms/zone_eastern_plaguelands.cpp b/src/server/scripts/EasternKingdoms/zone_eastern_plaguelands.cpp
index c90d2d78b7..276c8115b0 100644
--- a/src/server/scripts/EasternKingdoms/zone_eastern_plaguelands.cpp
+++ b/src/server/scripts/EasternKingdoms/zone_eastern_plaguelands.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
@@ -93,7 +93,7 @@ public:
_faction = faction;
}
- void SetGUID(ObjectGuid guid, int32) override
+ void SetGUID(ObjectGuid const& guid, int32) override
{
_playerGUID = guid;
me->ReplaceAllNpcFlags(UNIT_NPC_FLAG_NONE);
@@ -207,7 +207,7 @@ public:
EnterEvadeMode();
return;
}
- events.RepeatEvent(2000);
+ events.Repeat(2s);
break;
}
case EVENT_SUMMON_ARCHERS:
@@ -217,7 +217,7 @@ public:
_spoken = false;
SummonPeasants();
_spoken = false;
- events.RepeatEvent(60 * IN_MILLISECONDS);
+ events.Repeat(60s);
break;
}
}
@@ -262,7 +262,7 @@ public:
if (Unit* creature = summon->GetSummonerUnit())
creature->GetAI()->DoAction(1);
- me->DespawnOrUnsummon(1);
+ me->DespawnOrUnsummon(1ms);
}
void JustDied(Unit*) override
diff --git a/src/server/scripts/EasternKingdoms/zone_elwynn_forest.cpp b/src/server/scripts/EasternKingdoms/zone_elwynn_forest.cpp
index 45184f8384..383704d7ff 100644
--- a/src/server/scripts/EasternKingdoms/zone_elwynn_forest.cpp
+++ b/src/server/scripts/EasternKingdoms/zone_elwynn_forest.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
@@ -112,11 +112,11 @@ struct npc_cameron : public ScriptedAI
if (Creature* children = ObjectAccessor::GetCreature(*me, _childrenGUIDs[i]))
{
children->SetWalk(true);
- children->GetMotionMaster()->MovePoint(0, MovePosPositions[i], true, MovePosPositions[i].GetOrientation());
+ children->GetMotionMaster()->MovePoint(0, MovePosPositions[i]);
}
}
me->SetWalk(true);
- me->GetMotionMaster()->MovePoint(0, MovePosPositions.back(), true, MovePosPositions.back().GetOrientation());
+ me->GetMotionMaster()->MovePoint(0, MovePosPositions.back());
}
void PathEndReached(uint32 pathId) override
@@ -182,13 +182,13 @@ struct npc_cameron : public ScriptedAI
switch (eventId)
{
case EVENT_WP_START_GOLDSHIRE:
- me->GetMotionMaster()->MovePath(GOLDSHIRE_PATH, false);
+ me->GetMotionMaster()->MoveWaypoint(GOLDSHIRE_PATH, false);
break;
case EVENT_WP_START_WOODS:
- me->GetMotionMaster()->MovePath(WOODS_PATH, false);
+ me->GetMotionMaster()->MoveWaypoint(WOODS_PATH, false);
break;
case EVENT_WP_START_HOUSE:
- me->GetMotionMaster()->MovePath(HOUSE_PATH, false);
+ me->GetMotionMaster()->MoveWaypoint(HOUSE_PATH, false);
break;
case EVENT_WP_START_LISA:
for (uint32 i = 0; i < _childrenGUIDs.size(); ++i)
@@ -197,7 +197,7 @@ struct npc_cameron : public ScriptedAI
{
if (lisa->GetEntry() == NPC_LISA)
{
- lisa->GetMotionMaster()->MovePath(LISA_PATH, false);
+ lisa->GetMotionMaster()->MoveWaypoint(LISA_PATH, false);
break;
}
}
@@ -233,7 +233,7 @@ struct npc_cameron : public ScriptedAI
child->SearchFormation();
// Start movement
- me->GetMotionMaster()->MovePath(STORMWIND_PATH, false);
+ me->GetMotionMaster()->MoveWaypoint(STORMWIND_PATH, false);
break;
}
@@ -386,7 +386,7 @@ struct npc_eastvale_peasent : public ScriptedAI
me->SetUInt32Value(UNIT_NPC_EMOTESTATE, EMOTE_ONESHOT_NONE);
me->CastSpell(me, SPELL_TRANSFORM_PEASENT_WITH_WOOD);
me->SetSpeed(MOVE_WALK, 1.0f);
- me->GetMotionMaster()->MovePath(_path, false);
+ me->GetMotionMaster()->MoveWaypoint(_path, false);
}
}
@@ -418,7 +418,7 @@ struct npc_eastvale_peasent : public ScriptedAI
switch (eventId)
{
case EVENT_MOVETORAELEN:
- me->GetMotionMaster()->MovePath(_path + 1, false);
+ me->GetMotionMaster()->MoveWaypoint(_path + 1, false);
break;
case EVENT_TALKTORAELEN1:
if (Creature* realen = me->FindNearestCreature(NPC_SUPERVISOR_RAELEN, 2.0f, true))
@@ -492,7 +492,7 @@ struct npc_eastvale_peasent : public ScriptedAI
case EVENT_PATHBACK:
if (Creature* realen = ObjectAccessor::GetCreature(*me, _realenGUID))
realen->AI()->SetData(1, 1);
- me->GetMotionMaster()->MovePath(_path + 2, false);
+ me->GetMotionMaster()->MoveWaypoint(_path + 2, false);
break;
}
}
diff --git a/src/server/scripts/EasternKingdoms/zone_eversong_woods.cpp b/src/server/scripts/EasternKingdoms/zone_eversong_woods.cpp
index cd3612d4eb..0002c17123 100644
--- a/src/server/scripts/EasternKingdoms/zone_eversong_woods.cpp
+++ b/src/server/scripts/EasternKingdoms/zone_eversong_woods.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
@@ -60,7 +60,7 @@ struct npc_partygoer_pather : public ScriptedAI
switch (eventId)
{
case EVENT_PATH:
- me->GetMotionMaster()->MovePath(_path, false);
+ me->GetMotionMaster()->MoveWaypoint(_path, false);
break;
case EVENT_RANDOM_ACTION_PATHER:
{
@@ -139,7 +139,7 @@ struct npc_partygoer : public ScriptedAI
void Reset() override
{
- _events.ScheduleEvent(EVENT_RANDOM_ACTION, urand(1000, 20000));
+ _events.ScheduleEvent(EVENT_RANDOM_ACTION, 1s, 20s);
}
void UpdateAI(uint32 diff) override
diff --git a/src/server/scripts/EasternKingdoms/zone_ghostlands.cpp b/src/server/scripts/EasternKingdoms/zone_ghostlands.cpp
index da2cb493e4..13d92bc96c 100644
--- a/src/server/scripts/EasternKingdoms/zone_ghostlands.cpp
+++ b/src/server/scripts/EasternKingdoms/zone_ghostlands.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
@@ -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, false, player->GetGUID());
+ me->SetWalk(true);
+ Start(true, player->GetGUID());
}
}
};
@@ -148,13 +149,13 @@ struct npc_sentinel_leader : public ScriptedAI
{
switch (id)
{
- case 1:
- case 4:
- case 7:
+ case 2:
+ case 5:
case 8:
- case 13:
+ case 9:
case 14:
- case 17:
+ case 15:
+ case 18:
Creature* SentinelSpy = me->FindNearestCreature(NPC_SENTINEL_SPY, 2.0f, true);
if (SentinelSpy)
{
@@ -281,10 +282,10 @@ struct npc_sentinel_infiltrator : public ScriptedAI
case PATH_ONE:
switch (id)
{
- case 5:
- case 8:
- case 14:
- case 18:
+ case 6:
+ case 9:
+ case 15:
+ case 19:
Creature* SentinelInfiltrator = me->FindNearestCreature(NPC_SENTINEL_INFILTRATOR, 3.5f, true);
if (SentinelInfiltrator)
{
@@ -298,10 +299,10 @@ struct npc_sentinel_infiltrator : public ScriptedAI
case PATH_TWO:
switch (id)
{
- case 5:
- case 7:
- case 14:
- case 17:
+ case 6:
+ case 8:
+ case 15:
+ case 18:
Creature* SentinelInfiltrator = me->FindNearestCreature(NPC_SENTINEL_INFILTRATOR, 3.5f, true);
if (SentinelInfiltrator)
{
diff --git a/src/server/scripts/EasternKingdoms/zone_hinterlands.cpp b/src/server/scripts/EasternKingdoms/zone_hinterlands.cpp
index 4659c2b79a..8d08ca387e 100644
--- a/src/server/scripts/EasternKingdoms/zone_hinterlands.cpp
+++ b/src/server/scripts/EasternKingdoms/zone_hinterlands.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
@@ -132,7 +132,8 @@ public:
if (GameObject* go = me->FindNearestGameObject(GO_RINJI_CAGE, INTERACTION_DISTANCE))
go->UseDoorOrButton();
- npc_escortAI::Start(false, 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();
+ me->SetWalk(false);
postEventCount = 1;
break;
}
diff --git a/src/server/scripts/EasternKingdoms/zone_isle_of_queldanas.cpp b/src/server/scripts/EasternKingdoms/zone_isle_of_queldanas.cpp
index be0caf53d1..283916d371 100644
--- a/src/server/scripts/EasternKingdoms/zone_isle_of_queldanas.cpp
+++ b/src/server/scripts/EasternKingdoms/zone_isle_of_queldanas.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
@@ -136,25 +136,25 @@ public:
if (Creature* c = me->FindNearestCreature(NPC_THALORIEN_REMAINS, 100.0f, true))
c->SetNpcFlag(UNIT_NPC_FLAG_GOSSIP);
events.Reset();
- events.ScheduleEvent(EVENT_CHECK_PLAYER, 5000);
- events.ScheduleEvent(EVENT_SUMMON_SOLDIERS, 0);
- events.ScheduleEvent(EVENT_TALK_INTRO_0, 3000);
- events.ScheduleEvent(EVENT_TALK_INTRO_1, 8000);
- events.ScheduleEvent(EVENT_TALK_INTRO_2, 15000);
- events.ScheduleEvent(EVENT_TALK_INTRO_3, 22000);
- events.ScheduleEvent(EVENT_SALUTE, 24000);
- events.ScheduleEvent(EVENT_SOLDIERS_RUN_AWAY, 30000);
- events.ScheduleEvent(EVENT_GO_FIGHTPOINT, 31000);
- events.ScheduleEvent(EVENT_TALK_SPAWN_0, 38000);
- events.ScheduleEvent(EVENT_SUMMON_MORLEN, 44000);
- events.ScheduleEvent(EVENT_TALK_SPAWN_1, 47000);
- events.ScheduleEvent(EVENT_TALK_MORLEN_0, 52000);
- events.ScheduleEvent(EVENT_TALK_MORLEN_1, 58000);
- events.ScheduleEvent(EVENT_SPAWN_WAVE_1, 61000);
-
- events.ScheduleEvent(EVENT_SPELL_BLADESTORM, urand(6000, 15000));
- events.ScheduleEvent(EVENT_SPELL_MORTAL_STRIKE, urand(3000, 7000));
- events.ScheduleEvent(EVENT_SPELL_HEROIC_STRIKE, urand(4000, 10000));
+ events.ScheduleEvent(EVENT_CHECK_PLAYER, 5s);
+ events.ScheduleEvent(EVENT_SUMMON_SOLDIERS, 0ms);
+ events.ScheduleEvent(EVENT_TALK_INTRO_0, 3s);
+ events.ScheduleEvent(EVENT_TALK_INTRO_1, 8s);
+ events.ScheduleEvent(EVENT_TALK_INTRO_2, 15s);
+ events.ScheduleEvent(EVENT_TALK_INTRO_3, 22s);
+ events.ScheduleEvent(EVENT_SALUTE, 24s);
+ events.ScheduleEvent(EVENT_SOLDIERS_RUN_AWAY, 30s);
+ events.ScheduleEvent(EVENT_GO_FIGHTPOINT, 31s);
+ events.ScheduleEvent(EVENT_TALK_SPAWN_0, 38s);
+ events.ScheduleEvent(EVENT_SUMMON_MORLEN, 44s);
+ events.ScheduleEvent(EVENT_TALK_SPAWN_1, 47s);
+ events.ScheduleEvent(EVENT_TALK_MORLEN_0, 52s);
+ events.ScheduleEvent(EVENT_TALK_MORLEN_1, 58s);
+ events.ScheduleEvent(EVENT_SPAWN_WAVE_1, 61s);
+
+ events.ScheduleEvent(EVENT_SPELL_BLADESTORM, 6s, 15s);
+ events.ScheduleEvent(EVENT_SPELL_MORTAL_STRIKE, 3s, 7s);
+ events.ScheduleEvent(EVENT_SPELL_HEROIC_STRIKE, 4s, 10s);
}
void JustSummoned(Creature* summon) override
@@ -172,10 +172,10 @@ public:
me->RemoveAurasDueToSpell(67541);
me->SetUInt32Value(UNIT_NPC_EMOTESTATE, EMOTE_ONESHOT_NONE);
me->GetMotionMaster()->MoveCharge(11779.30f, -7065.43f, 24.92f, me->GetSpeed(MOVE_RUN), EVENT_CHARGE);
- events.ScheduleEvent(EVENT_OUTRO_0, 0);
- events.ScheduleEvent(EVENT_OUTRO_1, 5000);
- events.ScheduleEvent(EVENT_OUTRO_2, 12000);
- events.ScheduleEvent(EVENT_OUTRO_3, 19000);
+ events.ScheduleEvent(EVENT_OUTRO_0, 0ms);
+ events.ScheduleEvent(EVENT_OUTRO_1, 5s);
+ events.ScheduleEvent(EVENT_OUTRO_2, 12s);
+ events.ScheduleEvent(EVENT_OUTRO_3, 19s);
}
else if (summons.size() == 1)
{
@@ -184,13 +184,13 @@ public:
switch (summon->GetEntry())
{
case NPC_SCOURGE_ZOMBIE:
- events.ScheduleEvent(EVENT_SPAWN_WAVE_2, 3000);
+ events.ScheduleEvent(EVENT_SPAWN_WAVE_2, 3s);
break;
case NPC_GHOUL_INVADER:
- events.ScheduleEvent(EVENT_SPAWN_WAVE_3, 3000);
+ events.ScheduleEvent(EVENT_SPAWN_WAVE_3, 3s);
break;
case NPC_CRYPT_RAIDER:
- events.ScheduleEvent(EVENT_SUMMONS_ATTACK, 3000);
+ events.ScheduleEvent(EVENT_SUMMONS_ATTACK, 3s);
break;
}
}
@@ -227,7 +227,7 @@ public:
if (Player* p = ObjectAccessor::GetPlayer(*me, playerGUID))
if (p->GetExactDist(me) <= 50.0f)
{
- events.RepeatEvent(5000);
+ events.Repeat(5s);
break;
}
me->setActive(false);
@@ -266,7 +266,7 @@ public:
{
if (!summons.empty())
{
- events.RepeatEvent(5000);
+ events.Repeat(5s);
return;
}
else
@@ -350,7 +350,7 @@ public:
break;
}
}
- events.ScheduleEvent(EVENT_SUMMONS_ATTACK, 3000);
+ events.ScheduleEvent(EVENT_SUMMONS_ATTACK, 3s);
break;
case EVENT_SUMMONS_ATTACK:
for (SummonList::const_iterator itr = summons.begin(); itr != summons.end(); ++itr)
@@ -370,13 +370,13 @@ public:
case EVENT_OUTRO_3:
Talk(SAY_OUTRO_0 + (evId - EVENT_OUTRO_0));
if (evId == EVENT_OUTRO_3)
- events.ScheduleEvent(EVENT_OUTRO_KNEEL, 6000);
+ events.ScheduleEvent(EVENT_OUTRO_KNEEL, 6s);
break;
case EVENT_OUTRO_KNEEL:
if (Player* p = ObjectAccessor::GetPlayer(*me, playerGUID))
p->KilledMonsterCredit(NPC_THALORIEN_KILL_CREDIT);
me->SetStandState(UNIT_STAND_STATE_KNEEL);
- events.ScheduleEvent(EVENT_DISAPPEAR, 6000);
+ events.ScheduleEvent(EVENT_DISAPPEAR, 6s);
break;
case EVENT_DISAPPEAR:
me->SetVisible(false);
@@ -390,17 +390,17 @@ public:
case EVENT_SPELL_BLADESTORM:
if (me->GetVictim() && me->IsWithinMeleeRange(me->GetVictim()))
me->CastSpell(me->GetVictim(), 67541, false);
- events.RepeatEvent(urand(25000, 35000));
+ events.Repeat(25s, 35s);
break;
case EVENT_SPELL_MORTAL_STRIKE:
if (me->GetVictim() && me->IsWithinMeleeRange(me->GetVictim()))
me->CastSpell(me->GetVictim(), 67542, false);
- events.RepeatEvent(urand(7000, 12000));
+ events.Repeat(7s, 12s);
break;
case EVENT_SPELL_HEROIC_STRIKE:
if (me->GetVictim() && me->IsWithinMeleeRange(me->GetVictim()))
me->CastSpell(me->GetVictim(), 57846, false);
- events.RepeatEvent(urand(5000, 10000));
+ events.Repeat(5s, 10s);
break;
}
@@ -410,7 +410,7 @@ public:
void MovementInform(uint32 type, uint32 id) override
{
if (type == POINT_MOTION_TYPE && id == EVENT_CHARGE)
- events.ScheduleEvent(EVENT_SET_FACING, 0);
+ events.ScheduleEvent(EVENT_SET_FACING, 0ms);
}
void EnterEvadeMode(EvadeReason why) override
@@ -504,19 +504,19 @@ public:
me->SummonCreature(NPC_SUNWELL_VISUAL_BUNNY, 1688.24f, 621.769f, 29.1745f, 0.523177f, TEMPSUMMON_MANUAL_DESPAWN);
me->setActive(true);
events.Reset();
- events.ScheduleEvent(1, 1000); // guard talk
- events.ScheduleEvent(2, 4000); // theron talk
- events.ScheduleEvent(3, 10000); // npcs walk
- events.ScheduleEvent(4, 17000); // rommath talk
- events.ScheduleEvent(5, 20000); // theron talk
- events.ScheduleEvent(6, 28000); // theron talk
- events.ScheduleEvent(7, 37000); // rommath talk
- events.ScheduleEvent(8, 44000); // rommath talk
- events.ScheduleEvent(9, 52000); // rommath talk
- events.ScheduleEvent(10, 60000); // auric talk
- events.ScheduleEvent(11, 66000); // auric talk
- events.ScheduleEvent(12, 76000); // rommath talk
- events.ScheduleEvent(13, 80000); // move home
+ events.ScheduleEvent(1, 1s); // guard talk
+ events.ScheduleEvent(2, 4s); // theron talk
+ events.ScheduleEvent(3, 10s); // npcs walk
+ events.ScheduleEvent(4, 17s); // rommath talk
+ events.ScheduleEvent(5, 20s); // theron talk
+ events.ScheduleEvent(6, 28s); // theron talk
+ events.ScheduleEvent(7, 37s); // rommath talk
+ events.ScheduleEvent(8, 44s); // rommath talk
+ events.ScheduleEvent(9, 52s); // rommath talk
+ events.ScheduleEvent(10, 60s); // auric talk
+ events.ScheduleEvent(11, 66s); // auric talk
+ events.ScheduleEvent(12, 76s); // rommath talk
+ events.ScheduleEvent(13, 80s); // move home
}
}
@@ -539,16 +539,16 @@ public:
break;
case 3:
me->SetWalk(true);
- me->GetMotionMaster()->MovePath(me->GetEntry() * 100, false);
+ me->GetMotionMaster()->MoveWaypoint(me->GetEntry() * 100, false);
if (Creature* c = me->FindNearestCreature(NPC_THERON, 60.0f, true))
{
c->SetWalk(true);
- c->GetMotionMaster()->MovePath(c->GetEntry() * 100, false);
+ c->GetMotionMaster()->MoveWaypoint(c->GetEntry() * 100, false);
}
if (Creature* c = me->FindNearestCreature(NPC_AURIC, 60.0f, true))
{
c->SetWalk(true);
- c->GetMotionMaster()->MovePath(c->GetEntry() * 100, false);
+ c->GetMotionMaster()->MoveWaypoint(c->GetEntry() * 100, false);
}
break;
case 4:
@@ -586,7 +586,7 @@ public:
case 13:
me->setActive(false);
if (Creature* c = me->FindNearestCreature(NPC_SUNWELL_VISUAL_BUNNY, 60.0f, true))
- c->DespawnOrUnsummon(1);
+ c->DespawnOrUnsummon(1ms);
if (GameObject* go = me->FindNearestGameObject(GO_QUEL_DELAR, 60.0f))
go->RemoveGameObjectFlag(GO_FLAG_NOT_SELECTABLE);
me->SetWalk(true);
@@ -610,61 +610,6 @@ public:
};
};
-/*###### THEIR: ######*/
-
-/*######
-## npc_greengill_slave
-######*/
-
-#define ENRAGE 45111
-#define ORB 45109
-#define QUESTG 11541
-#define DM 25060
-
-class npc_greengill_slave : public CreatureScript
-{
-public:
- npc_greengill_slave() : CreatureScript("npc_greengill_slave") { }
-
- CreatureAI* GetAI(Creature* creature) const override
- {
- return new npc_greengill_slaveAI(creature);
- }
-
- struct npc_greengill_slaveAI : public ScriptedAI
- {
- npc_greengill_slaveAI(Creature* creature) : ScriptedAI(creature) { }
-
- void JustEngagedWith(Unit* /*who*/) override { }
-
- void SpellHit(Unit* caster, SpellInfo const* spellInfo) override
- {
- Player* player = caster->ToPlayer();
- if (!player)
- return;
-
- if (spellInfo->Id == ORB && !me->HasAura(ENRAGE))
- {
- if (player->GetQuestStatus(QUESTG) == QUEST_STATUS_INCOMPLETE)
- DoCast(player, 45110, true);
-
- DoCast(me, ENRAGE);
-
- if (Creature* Myrmidon = me->FindNearestCreature(DM, 70))
- {
- me->AddThreat(Myrmidon, 100000.0f);
- AttackStart(Myrmidon);
- }
- }
- }
-
- void UpdateAI(uint32 /*diff*/) override
- {
- DoMeleeAttackIfReady();
- }
- };
-};
-
// 45396, 45398 - Weapon Coating Enchant
class spell_gen_weapon_coating_enchant : public AuraScript
{
@@ -690,6 +635,5 @@ void AddSC_isle_of_queldanas()
new npc_bh_thalorien_dawnseeker();
RegisterSpellScript(spell_bh_cleanse_quel_delar);
new npc_grand_magister_rommath();
- new npc_greengill_slave();
RegisterSpellScript(spell_gen_weapon_coating_enchant);
}
diff --git a/src/server/scripts/EasternKingdoms/zone_redridge_mountains.cpp b/src/server/scripts/EasternKingdoms/zone_redridge_mountains.cpp
index bbf1037521..e6c8fbeaed 100644
--- a/src/server/scripts/EasternKingdoms/zone_redridge_mountains.cpp
+++ b/src/server/scripts/EasternKingdoms/zone_redridge_mountains.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
@@ -61,7 +61,8 @@ public:
if (quest->GetQuestId() == QUEST_MISSING_IN_ACTION)
{
Talk(SAY_CORPORAL_1, player);
- npc_escortAI::Start(true, false, 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 5709c14b87..dcf642d0e7 100644
--- a/src/server/scripts/EasternKingdoms/zone_silverpine_forest.cpp
+++ b/src/server/scripts/EasternKingdoms/zone_silverpine_forest.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
@@ -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()))
- pEscortAI->Start(true, false, player->GetGUID());
+ {
+ creature->SetWalk(true);
+ pEscortAI->Start(true, player->GetGUID());
+ }
}
return true;
@@ -328,7 +331,7 @@ public:
{
HasEnded = false;
TalkRNG = urand(0,1);
- events.ScheduleEvent(EVENT_APPA_INTRO, 2000);
+ events.ScheduleEvent(EVENT_APPA_INTRO, 2s);
summons.DespawnAll();
}
@@ -387,31 +390,31 @@ public:
case EVENT_APPA_INTRO:
Talk(SAY_APPA_INTRO);
SummonCrowd();
- events.ScheduleEvent(EVENT_APPA_SAY_1, 3000);
+ events.ScheduleEvent(EVENT_APPA_SAY_1, 3s);
break;
case EVENT_APPA_SAY_1:
Talk(TalkRNG ? SAY_APPA_OPTION_1_1 : SAY_APPA_OPTION_2_1);
- events.ScheduleEvent(EVENT_APPA_SAY_2, 5000);
+ events.ScheduleEvent(EVENT_APPA_SAY_2, 5s);
break;
case EVENT_APPA_SAY_2:
Talk(TalkRNG ? SAY_APPA_OPTION_1_2 : SAY_APPA_OPTION_2_2);
- events.ScheduleEvent(EVENT_APPA_SAY_3, 5000);
+ events.ScheduleEvent(EVENT_APPA_SAY_3, 5s);
break;
case EVENT_APPA_SAY_3:
Talk(TalkRNG ? SAY_APPA_OPTION_1_3 : SAY_APPA_OPTION_2_3);
- events.ScheduleEvent(EVENT_APPA_SAY_4, 5000);
+ events.ScheduleEvent(EVENT_APPA_SAY_4, 5s);
break;
case EVENT_APPA_SAY_4:
Talk(TalkRNG ? SAY_APPA_OPTION_1_4 : SAY_APPA_OPTION_2_4);
- events.ScheduleEvent(EVENT_APPA_OUTRO, 5000);
+ events.ScheduleEvent(EVENT_APPA_OUTRO, 5s);
break;
case EVENT_APPA_OUTRO:
Talk(SAY_APPA_OUTRO);
- events.ScheduleEvent(EVENT_APPA_OUTRO_CROWD, 3000);
+ events.ScheduleEvent(EVENT_APPA_OUTRO_CROWD, 3s);
break;
case EVENT_APPA_OUTRO_CROWD:
EmoteCrowd();
- events.ScheduleEvent(EVENT_APPA_OUTRO_END, 5000);
+ events.ScheduleEvent(EVENT_APPA_OUTRO_END, 5s);
break;
case EVENT_APPA_OUTRO_END: // Despawn for Apparition is handled via Areatrigger SAI (5m)
summons.DespawnAll();
diff --git a/src/server/scripts/EasternKingdoms/zone_stormwind_city.cpp b/src/server/scripts/EasternKingdoms/zone_stormwind_city.cpp
index cbf88ba9a5..364016c4c4 100644
--- a/src/server/scripts/EasternKingdoms/zone_stormwind_city.cpp
+++ b/src/server/scripts/EasternKingdoms/zone_stormwind_city.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
@@ -406,7 +406,8 @@ public:
{
if (Player* player = GetPlayerForEscort())
{
- CAST_AI(npc_lord_gregor_lescovar::npc_lord_gregor_lescovarAI, pLescovar->AI())->Start(false, false, player->GetGUID());
+ 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,7 +449,8 @@ public:
{
if (Creature* pSpybot = creature->FindNearestCreature(NPC_TYRION_SPYBOT, 5.0f, true))
{
- CAST_AI(npc_tyrion_spybot::npc_tyrion_spybotAI, pSpybot->AI())->Start(false, false, player->GetGUID());
+ 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);
}
return true;
diff --git a/src/server/scripts/EasternKingdoms/zone_undercity.cpp b/src/server/scripts/EasternKingdoms/zone_undercity.cpp
index dcfd61342c..9d39e235aa 100644
--- a/src/server/scripts/EasternKingdoms/zone_undercity.cpp
+++ b/src/server/scripts/EasternKingdoms/zone_undercity.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
@@ -118,7 +118,7 @@ public:
_events.ScheduleEvent(EVENT_MULTI_SHOT, 10s);
}
- void SetGUID(ObjectGuid guid, int32 type) override
+ void SetGUID(ObjectGuid const& guid, int32 type) override
{
if (type == GUID_EVENT_INVOKER)
{
@@ -142,7 +142,7 @@ public:
{
summoned->SetDisableGravity(true);
float speed = summoned->GetDistance(summoned->GetPositionX(), summoned->GetPositionY(), me->GetPositionZ() + 15.0f) / (1000.0f * 0.001f);
- summoned->MonsterMoveWithSpeed(summoned->GetPositionX(), summoned->GetPositionY(), me->GetPositionZ() + 15.0f, speed);
+ summoned->GetMotionMaster()->MovePoint(0, summoned->GetPositionX(), summoned->GetPositionY(), me->GetPositionZ() + 15.0f, FORCED_MOVEMENT_NONE, speed);
summoned->CastSpell(summoned, SPELL_RIBBON_OF_SOULS, false);
}
}
@@ -270,8 +270,7 @@ public:
if (EventMoveTimer <= diff)
{
me->SetDisableGravity(true);
- me->MonsterMoveWithSpeed(me->GetPositionX(), me->GetPositionY(), HIGHBORNE_LOC_Y_NEW, me->GetDistance(me->GetPositionX(), me->GetPositionY(), HIGHBORNE_LOC_Y_NEW) / (5000 * 0.001f));
- me->SetPosition(me->GetPositionX(), me->GetPositionY(), HIGHBORNE_LOC_Y_NEW, me->GetOrientation());
+ me->GetMotionMaster()->MovePoint(0, me->GetPositionX(), me->GetPositionY(), HIGHBORNE_LOC_Y_NEW, FORCED_MOVEMENT_NONE, me->GetDistance(me->GetPositionX(), me->GetPositionY(), HIGHBORNE_LOC_Y_NEW) / (5000 * 0.001f));
EventMove = false;
}
else EventMoveTimer -= diff;
@@ -917,7 +916,7 @@ public:
if (auto ai = CAST_AI(npc_varian_wrynn::npc_varian_wrynnAI, creature->AI()))
{
- ai->Start(true, true, player->GetGUID());
+ ai->Start(true, player->GetGUID());
if (Creature* jaina = GetClosestCreatureWithEntry(creature, NPC_JAINA, 50.0f))
ai->jainaGUID = jaina->GetGUID();
else
@@ -1218,27 +1217,27 @@ public:
{
case 0:
if (Unit* temp = me->SummonCreature(NPC_DOCTOR, AllianceSpawn[4].x - rand32() % 5, AllianceSpawn[4].y - rand32() % 5, AllianceSpawn[4].z, TEMPSUMMON_DEAD_DESPAWN))
- temp->GetMotionMaster()->MovePoint(0, me->GetPositionX(), me->GetPositionY(), me->GetPositionZ(), false);
+ temp->GetMotionMaster()->MovePoint(0, me->GetPositionX(), me->GetPositionY(), me->GetPositionZ(), FORCED_MOVEMENT_NONE, 0.f, 0.f, false);
break;
case 1:
if (Unit* temp = me->SummonCreature(NPC_CHEMIST, AllianceSpawn[4].x - rand32() % 5, AllianceSpawn[4].y - rand32() % 5, AllianceSpawn[4].z, TEMPSUMMON_DEAD_DESPAWN))
- temp->GetMotionMaster()->MovePoint(0, me->GetPositionX(), me->GetPositionY(), me->GetPositionZ(), false);
+ temp->GetMotionMaster()->MovePoint(0, me->GetPositionX(), me->GetPositionY(), me->GetPositionZ(), FORCED_MOVEMENT_NONE, 0.f, 0.f, false);
break;
case 2:
if (Unit* temp = me->SummonCreature(NPC_BETRAYER, AllianceSpawn[4].x - rand32() % 5, AllianceSpawn[4].y - rand32() % 5, AllianceSpawn[4].z, TEMPSUMMON_DEAD_DESPAWN))
- temp->GetMotionMaster()->MovePoint(0, me->GetPositionX(), me->GetPositionY(), me->GetPositionZ(), false);
+ temp->GetMotionMaster()->MovePoint(0, me->GetPositionX(), me->GetPositionY(), me->GetPositionZ(), FORCED_MOVEMENT_NONE, 0.f, 0.f, false);
break;
case 3:
if (Unit* temp = me->SummonCreature(NPC_DOCTOR, AllianceSpawn[5].x - rand32() % 5, AllianceSpawn[5].y - rand32() % 5, AllianceSpawn[5].z, TEMPSUMMON_DEAD_DESPAWN))
- temp->GetMotionMaster()->MovePoint(0, me->GetPositionX(), me->GetPositionY(), me->GetPositionZ(), false);
+ temp->GetMotionMaster()->MovePoint(0, me->GetPositionX(), me->GetPositionY(), me->GetPositionZ(), FORCED_MOVEMENT_NONE, 0.f, 0.f, false);
break;
case 4:
if (Unit* temp = me->SummonCreature(NPC_CHEMIST, AllianceSpawn[5].x - rand32() % 5, AllianceSpawn[5].y - rand32() % 5, AllianceSpawn[5].z, TEMPSUMMON_DEAD_DESPAWN))
- temp->GetMotionMaster()->MovePoint(0, me->GetPositionX(), me->GetPositionY(), me->GetPositionZ(), false);
+ temp->GetMotionMaster()->MovePoint(0, me->GetPositionX(), me->GetPositionY(), me->GetPositionZ(), FORCED_MOVEMENT_NONE, 0.f, 0.f, false);
break;
case 5:
if (Unit* temp = me->SummonCreature(NPC_BETRAYER, AllianceSpawn[5].x - rand32() % 5, AllianceSpawn[5].y - rand32() % 5, AllianceSpawn[5].z, TEMPSUMMON_DEAD_DESPAWN))
- temp->GetMotionMaster()->MovePoint(0, me->GetPositionX(), me->GetPositionY(), me->GetPositionZ(), false);
+ temp->GetMotionMaster()->MovePoint(0, me->GetPositionX(), me->GetPositionY(), me->GetPositionZ(), FORCED_MOVEMENT_NONE, 0.f, 0.f, false);
break;
}
}
@@ -1246,7 +1245,7 @@ public:
case 5:
for (uint8 i = 0; i < WAVE_MAXCOUNT; ++i)
if (Unit* temp = me->SummonCreature(NPC_GUARDIAN, AllianceSpawn[6].x - rand32() % 5, AllianceSpawn[6].y - rand32() % 5, AllianceSpawn[6].z, TEMPSUMMON_DEAD_DESPAWN))
- temp->GetMotionMaster()->MovePoint(0, me->GetPositionX(), me->GetPositionY(), me->GetPositionZ(), false);
+ temp->GetMotionMaster()->MovePoint(0, me->GetPositionX(), me->GetPositionY(), me->GetPositionZ(), FORCED_MOVEMENT_NONE, 0.f, 0.f, false);
break;
case 6:
if (Unit* temp = me->SummonCreature(NPC_BLIGHTWORM, AllianceSpawn[7].x, AllianceSpawn[7].y, AllianceSpawn[7].z, TEMPSUMMON_MANUAL_DESPAWN))
@@ -1322,22 +1321,22 @@ public:
if (Unit* temp = me->SummonCreature(NPC_SW_SOLDIER, AllianceSpawn[8].x, AllianceSpawn[8].y, AllianceSpawn[8].z, 0, TEMPSUMMON_TIMED_DESPAWN, 90000))
{
allianceGuardsGUID.push_back(temp->GetGUID());
- temp->GetMotionMaster()->MovePath(NPC_SW_SOLDIER * 10, false);
+ temp->GetMotionMaster()->MoveWaypoint(NPC_SW_SOLDIER * 10, false);
}
if (Unit* temp = me->SummonCreature(NPC_SW_SOLDIER, AllianceSpawn[8].x, AllianceSpawn[8].y, AllianceSpawn[8].z, 0, TEMPSUMMON_TIMED_DESPAWN, 90000))
{
allianceGuardsGUID.push_back(temp->GetGUID());
- temp->GetMotionMaster()->MovePath((NPC_SW_SOLDIER * 10) + 1, false);
+ temp->GetMotionMaster()->MoveWaypoint((NPC_SW_SOLDIER * 10) + 1, false);
}
if (Unit* temp = me->SummonCreature(NPC_SW_SOLDIER, AllianceSpawn[8].x, AllianceSpawn[8].y, AllianceSpawn[8].z, 0, TEMPSUMMON_TIMED_DESPAWN, 90000))
{
allianceGuardsGUID.push_back(temp->GetGUID());
- temp->GetMotionMaster()->MovePath((NPC_SW_SOLDIER * 10) + 2, false);
+ temp->GetMotionMaster()->MoveWaypoint((NPC_SW_SOLDIER * 10) + 2, false);
}
if (Unit* temp = me->SummonCreature(NPC_SW_SOLDIER, AllianceSpawn[8].x, AllianceSpawn[8].y, AllianceSpawn[8].z, 0, TEMPSUMMON_TIMED_DESPAWN, 90000))
{
allianceGuardsGUID.push_back(temp->GetGUID());
- temp->GetMotionMaster()->MovePath((NPC_SW_SOLDIER * 10) + 3, false);
+ temp->GetMotionMaster()->MoveWaypoint((NPC_SW_SOLDIER * 10) + 3, false);
}
break;
case 8:
@@ -1349,7 +1348,7 @@ public:
case 10:
if (Unit* temp = me->SummonCreature(NPC_DREADLORD, AllianceSpawn[11].x, AllianceSpawn[11].y, AllianceSpawn[11].z, TEMPSUMMON_DEAD_DESPAWN))
{
- temp->GetMotionMaster()->MovePath(NPC_DREADLORD * 10, false);
+ temp->GetMotionMaster()->MoveWaypoint(NPC_DREADLORD * 10, false);
temp->ApplySpellImmune(0, IMMUNITY_EFFECT, SPELL_EFFECT_KNOCK_BACK, true);
temp->ApplySpellImmune(0, IMMUNITY_EFFECT, SPELL_EFFECT_KNOCK_BACK_DEST, true);
}
@@ -1537,7 +1536,7 @@ public:
case 8:
if (Creature* jaina = ObjectAccessor::GetCreature(*me, jainaGUID))
{
- jaina->GetMotionMaster()->MovePath(NPC_JAINA * 10, false);
+ jaina->GetMotionMaster()->MoveWaypoint(NPC_JAINA * 10, false);
jaina->setActive(true);
}
bStepping = false;
@@ -1614,7 +1613,7 @@ public:
break;
case 22:
Talk(WRYNN_SAY_SEWERS_4);
- SetRun(false);
+ me->SetWalk(true);
if (Creature* jaina = ObjectAccessor::GetCreature(*me, jainaGUID))
{
jaina->GetMotionMaster()->Clear();
@@ -1665,7 +1664,7 @@ public:
JumpToNextStep(3 * IN_MILLISECONDS);
break;
case 31:
- SetRun(true);
+ me->SetWalk(false);
if (Creature* jaina = ObjectAccessor::GetCreature(*me, jainaGUID))
jaina->GetMotionMaster()->MoveFollow(me, 1, 0);
SetEscortPaused(false);
@@ -1727,7 +1726,7 @@ public:
if (Creature* jaina = ObjectAccessor::GetCreature(*me, jainaGUID))
{
jaina->GetMotionMaster()->Clear();
- jaina->GetMotionMaster()->MovePoint(0, AllianceWP[7].x, AllianceWP[7].y, AllianceWP[7].z, false);
+ jaina->GetMotionMaster()->MovePoint(0, AllianceWP[7].x, AllianceWP[7].y, AllianceWP[7].z, FORCED_MOVEMENT_NONE, 0.f, 0.f, false);
}
JumpToNextStep(5 * IN_MILLISECONDS);
break;
@@ -1789,7 +1788,7 @@ public:
break;
case 54:
Talk(WRYNN_SAY_APO_7);
- SetRun(false);
+ me->SetWalk(true);
JumpToNextStep(4 * IN_MILLISECONDS);
break;
case 55:
@@ -1845,7 +1844,7 @@ public:
JumpToNextStep(1.5 * IN_MILLISECONDS);
break;
case 65:
- SetRun(true);
+ me->SetWalk(false);
SetEscortPaused(false);
JumpToNextStep(0.25 * IN_MILLISECONDS);
break;
@@ -2236,7 +2235,8 @@ public:
if (Creature* sylvannas = GetClosestCreatureWithEntry(creature, NPC_SYLVANAS, 50.0f))
{
thrall_ai->sylvanasfollowGUID = sylvannas->GetGUID();
- thrall_ai->Start(true, true, player->GetGUID());
+ creature->SetWalk(false);
+ thrall_ai->Start(true, player->GetGUID());
thrall_ai->SetDespawnAtEnd(false);
thrall_ai->SetDespawnAtFar(false);
}
@@ -2477,7 +2477,7 @@ public:
for (std::list<Creature*>::iterator itr = ThroneList.begin(); itr != ThroneList.end(); itr++)
(*itr)->DespawnOrUnsummon();
SetEscortPaused(false);
- SetRun(false);
+ me->SetWalk(true);
break;
}
default:
@@ -2537,9 +2537,9 @@ public:
{
case 0: // Vortex
if (Creature* whirlwind1 = me->SummonCreature(NPC_VORTEX, ThrallSpawn[0].x, ThrallSpawn[0].y, ThrallSpawn[0].z, ThrallSpawn[0].o, TEMPSUMMON_TIMED_OR_DEAD_DESPAWN, 30 * IN_MILLISECONDS))
- whirlwind1->GetMotionMaster()->MovePath(NPC_WHIRLWIND * 10, false);
+ whirlwind1->GetMotionMaster()->MoveWaypoint(NPC_WHIRLWIND * 10, false);
if (Creature* whirlwind2 = me->SummonCreature(NPC_VORTEX, ThrallSpawn[0].x, ThrallSpawn[0].y, ThrallSpawn[0].z, ThrallSpawn[0].o, TEMPSUMMON_TIMED_OR_DEAD_DESPAWN, 30 * IN_MILLISECONDS))
- whirlwind2->GetMotionMaster()->MovePath(NPC_WHIRLWIND * 100, false);
+ whirlwind2->GetMotionMaster()->MoveWaypoint(NPC_WHIRLWIND * 100, false);
break;
case 1:
// BATTLING_COURTYARD Initial Spawn
@@ -2762,7 +2762,7 @@ public:
{
hordeGuardsGUID.push_back(temp->GetGUID());
temp->AI()->Talk(SAY_FOR_THE_HORDE);
- temp->GetMotionMaster()->MovePath(NPC_WARSONG_BATTLEGUARD * 100, false);
+ temp->GetMotionMaster()->MoveWaypoint(NPC_WARSONG_BATTLEGUARD * 100, false);
}
break;
// Valimathras Room Preparation
@@ -2972,10 +2972,10 @@ public:
SetEscortPaused(false);
bStepping = false;
JumpToNextStep(0);
- SetRun(true);
+ me->SetWalk(false);
if (Creature* sylvanas = ObjectAccessor::GetCreature(*me, sylvanasfollowGUID))
{
- sylvanas->GetMotionMaster()->MovePath(NPC_SYLVANAS * 100, false);
+ sylvanas->GetMotionMaster()->MoveWaypoint(NPC_SYLVANAS * 100, false);
sylvanas->setActive(true);
}
break;
@@ -3005,9 +3005,9 @@ public:
for (std::list<Creature*>::iterator itr = PlagueList.begin(); itr != PlagueList.end(); itr++)
(*itr)->DespawnOrUnsummon();
SetEscortPaused(false);
- SetRun(false);
+ me->SetWalk(true);
if (Creature* sylvanas = ObjectAccessor::GetCreature(*me, sylvanasfollowGUID))
- sylvanas->GetMotionMaster()->MovePath(NPC_SYLVANAS * 1000, false);
+ sylvanas->GetMotionMaster()->MoveWaypoint(NPC_SYLVANAS * 1000, false);
JumpToNextStep(3 * IN_MILLISECONDS);
break;
}
@@ -3054,10 +3054,10 @@ public:
if (Creature* valimathras = ObjectAccessor::GetCreature(*me, ValimathrasGUID))
{
valimathras->GetMotionMaster()->MovePoint(0, 1804.559f, 235.504f, 62.753f);
- valimathras->DespawnOrUnsummon(3 * IN_MILLISECONDS);
+ valimathras->DespawnOrUnsummon(3s);
}
if (Creature* valimathrasportal = ObjectAccessor::GetCreature(*me, ValimathrasPortalGUID))
- valimathrasportal->DespawnOrUnsummon(6 * IN_MILLISECONDS);
+ valimathrasportal->DespawnOrUnsummon(6s);
JumpToNextStep(1 * IN_MILLISECONDS);
break;
case 26:
@@ -3077,7 +3077,7 @@ public:
FollowThrall();
SetEscortPaused(false);
bStepping = false;
- SetRun(true);
+ me->SetWalk(false);
Talk(THRALL_SAY_COURTYARD_4);
UpdateWorldState(me->GetMap(), WORLD_STATE_BATTLE_FOR_UNDERCITY_START_H, 0);
UpdateWorldState(me->GetMap(), WORLD_STATE_BATTLE_FOR_UNDERCITY_COURTYARD_FIGHT_H, 1);
@@ -3182,7 +3182,7 @@ public:
SpawnWave(6);
SetEscortPaused(false);
bStepping = false;
- SetRun(false);
+ me->SetWalk(true);
JumpToNextStep(0 * IN_MILLISECONDS);
break;
}
@@ -3226,7 +3226,7 @@ public:
FollowThrall();
SetEscortPaused(false);
bStepping = false;
- SetRun(false);
+ me->SetWalk(true);
JumpToNextStep(0 * IN_MILLISECONDS);
break;
// Top of Undercity Discussion
@@ -3266,7 +3266,7 @@ public:
FollowThrall();
SetEscortPaused(false);
bStepping = false;
- SetRun(false);
+ me->SetWalk(true);
JumpToNextStep(0 * IN_MILLISECONDS);
break;
case 63:
@@ -3284,7 +3284,7 @@ public:
FollowThrall();
SetEscortPaused(false);
bStepping = false;
- SetRun(false);
+ me->SetWalk(true);
JumpToNextStep(0 * IN_MILLISECONDS);
break;
case 67:
@@ -3299,7 +3299,7 @@ public:
FollowThrall();
SetEscortPaused(false);
bStepping = false;
- SetRun(false);
+ me->SetWalk(true);
JumpToNextStep(0 * IN_MILLISECONDS);
break;
// KHANOK - Valimathtas Intro
@@ -3332,10 +3332,10 @@ public:
if (Creature* valimathras = ObjectAccessor::GetCreature(*me, ValimathrasGUID))
{
valimathras->GetMotionMaster()->MovePoint(0, 1596.642f, 429.811f, -46.3429f);
- valimathras->DespawnOrUnsummon(3 * IN_MILLISECONDS);
+ valimathras->DespawnOrUnsummon(3s);
}
if (Creature* valimathrasportal = ObjectAccessor::GetCreature(*me, ValimathrasPortalGUID))
- valimathrasportal->DespawnOrUnsummon(3 * IN_MILLISECONDS);
+ valimathrasportal->DespawnOrUnsummon(3s);
JumpToNextStep(2 * IN_MILLISECONDS);
break;
// KHANOK - Trashspawn
@@ -3475,7 +3475,7 @@ public:
FollowThrall();
SetEscortPaused(false);
bStepping = false;
- SetRun(false);
+ me->SetWalk(true);
JumpToNextStep(0 * IN_MILLISECONDS);
break;
case 109:
@@ -3491,7 +3491,7 @@ public:
FollowThrall();
SetEscortPaused(false);
bStepping = false;
- SetRun(true);
+ me->SetWalk(false);
JumpToNextStep(0 * IN_MILLISECONDS);
break;
case 112:
@@ -3662,7 +3662,7 @@ public:
case 143:
if (Creature* sylvanas = ObjectAccessor::GetCreature(*me, sylvanasfollowGUID))
{
- sylvanas->GetMotionMaster()->MovePoint(0, 1289.48f, 314.33f, -57.32f, true);
+ sylvanas->GetMotionMaster()->MovePoint(0, 1289.48f, 314.33f, -57.32f);
sylvanas->CastSpell(sylvanas, SPELL_LEAP_TO_PLATFORM);
}
JumpToNextStep(10 * IN_MILLISECONDS);
@@ -3706,7 +3706,7 @@ public:
wrynn->SetImmuneToAll(true);
wrynn->SetUInt32Value(UNIT_NPC_EMOTESTATE, EMOTE_STATE_READY2H);
wrynn->SetReactState(REACT_PASSIVE);
- wrynn->GetMotionMaster()->MovePoint(0, 1302.543f, 359.472f, -67.295f, true);
+ wrynn->GetMotionMaster()->MovePoint(0, 1302.543f, 359.472f, -67.295f);
}
if (Creature* jaina = me->SummonCreature(NPC_JAINA, 1308.862f, 381.809f, -66.044243f, TEMPSUMMON_MANUAL_DESPAWN))
{
@@ -3807,7 +3807,7 @@ public:
{
SaurfangGUID = saurfang->GetGUID();
saurfang->SetWalk(true);
- saurfang->GetMotionMaster()->MovePoint(0, 1300.862f, 353.670f, -66.187f, true);
+ saurfang->GetMotionMaster()->MovePoint(0, 1300.862f, 353.670f, -66.187f);
}
JumpToNextStep(7 * IN_MILLISECONDS);
break;
@@ -3865,8 +3865,8 @@ public:
me->GetCreatureListWithEntryInGrid(HelperList, NPC_OVERLORD_SAURFANG, 100.0f);
if (!HelperList.empty())
for (std::list<Creature*>::iterator itr = HelperList.begin(); itr != HelperList.end(); itr++)
- (*itr)->DespawnOrUnsummon(120 * IN_MILLISECONDS);
- me->DespawnOrUnsummon(120 * IN_MILLISECONDS);
+ (*itr)->DespawnOrUnsummon(120s);
+ me->DespawnOrUnsummon(120s);
bStepping = false;
JumpToNextStep(0 * IN_MILLISECONDS);
break;
diff --git a/src/server/scripts/EasternKingdoms/zone_western_plaguelands.cpp b/src/server/scripts/EasternKingdoms/zone_western_plaguelands.cpp
index e5aef5cf6a..9ae61d0fc8 100644
--- a/src/server/scripts/EasternKingdoms/zone_western_plaguelands.cpp
+++ b/src/server/scripts/EasternKingdoms/zone_western_plaguelands.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/scripts/EasternKingdoms/zone_westfall.cpp b/src/server/scripts/EasternKingdoms/zone_westfall.cpp
index 6d54a0cc26..7e2bbb70f1 100644
--- a/src/server/scripts/EasternKingdoms/zone_westfall.cpp
+++ b/src/server/scripts/EasternKingdoms/zone_westfall.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
@@ -56,9 +56,8 @@ public:
if (quest->GetQuestId() == QUEST_TOME_VALOR)
{
creature->AI()->Talk(SAY_DS_START);
-
if (npc_escortAI* pEscortAI = CAST_AI(npc_daphne_stilwell::npc_daphne_stilwellAI, creature->AI()))
- pEscortAI->Start(true, true, player->GetGUID());
+ pEscortAI->Start(true, player->GetGUID());
}
return true;
@@ -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 9118411816..62bbb72f7a 100644
--- a/src/server/scripts/EasternKingdoms/zone_wetlands.cpp
+++ b/src/server/scripts/EasternKingdoms/zone_wetlands.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
@@ -62,7 +62,7 @@ public:
case 2:
if (me->HasStealthAura())
me->RemoveAurasByType(SPELL_AURA_MOD_STEALTH);
- SetRun();
+ me->SetWalk(false);
me->SetFaction(FACTION_ENEMY);
break;
}
@@ -109,7 +109,7 @@ public:
me->GetThreatMgr().ClearAllThreat();
me->CombatStop(true);
- SetRun(false);
+ me->SetWalk(true);
}
}
}
@@ -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()))
- pEscortAI->Start(false, false, player->GetGUID(), quest);
+ {
+ pSlim->SetWalk(true);
+ pEscortAI->Start(false, player->GetGUID(), quest);
+ }
}
return false;
}
diff --git a/src/server/scripts/Events/brewfest.cpp b/src/server/scripts/Events/brewfest.cpp
index e0b01c49f9..c86e8d1fff 100644
--- a/src/server/scripts/Events/brewfest.cpp
+++ b/src/server/scripts/Events/brewfest.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
@@ -367,10 +367,10 @@ struct npc_dark_iron_attack_generator : public ScriptedAI
if (AllowStart())
{
PrepareEvent();
- events.RepeatEvent(300000);
+ events.Repeat(300s);
return;
}
- events.RepeatEvent(2000);
+ events.Repeat(2s);
break;
}
case EVENT_SPAWN_MOLE_MACHINE:
@@ -393,7 +393,7 @@ struct npc_dark_iron_attack_generator : public ScriptedAI
if (Creature* cr = me->SummonCreature(NPC_MOLE_MACHINE_TRIGGER, x, y, 398.11f, 0.0f))
cr->CastSpell(cr, SPELL_SPAWN_MOLE_MACHINE, true);
}
- events.RepeatEvent(3000);
+ events.Repeat(3s);
break;
}
case EVENT_PRE_FINISH_ATTACK:
@@ -410,7 +410,7 @@ struct npc_dark_iron_attack_generator : public ScriptedAI
}
case EVENT_BARTENDER_SAY:
{
- events.RepeatEvent(12000);
+ events.Repeat(12s);
Creature* sayer = GetRandomBartender();
if (!sayer)
return;
@@ -603,7 +603,7 @@ struct npc_dark_iron_attack_mole_machine : public ScriptedAI
{
me->SummonCreature(NPC_DARK_IRON_GUZZLER, me->GetPositionX(), me->GetPositionY(), me->GetPositionZ(), 0.0f, TEMPSUMMON_CORPSE_TIMED_DESPAWN, 6000);
summonTimer = 0;
- me->DespawnOrUnsummon(3000);
+ me->DespawnOrUnsummon(3s);
}
}
}
@@ -1714,12 +1714,12 @@ struct npc_coren_direbrew : public ScriptedAI
case EVENT_SUMMON_MOLE_MACHINE:
{
me->CastCustomSpell(SPELL_MOLE_MACHINE_TARGET_PICKER, SPELLVALUE_MAX_TARGETS, 1, nullptr, true);
- _events.RepeatEvent(15 * IN_MILLISECONDS);
+ _events.Repeat(15s);
break;
}
case EVENT_DIREBREW_DISARM:
DoCastSelf(SPELL_DIREBREW_DISARM_PRE_CAST, true);
- _events.RepeatEvent(20 * IN_MILLISECONDS);
+ _events.Repeat(20s);
break;
default:
break;
@@ -1743,7 +1743,7 @@ struct npc_coren_direbrew_sisters : public ScriptedAI
{
npc_coren_direbrew_sisters(Creature* creature) : ScriptedAI(creature) { }
- void SetGUID(ObjectGuid guid, int32 id) override
+ void SetGUID(ObjectGuid const& guid, int32 id) override
{
if (id == DATA_TARGET_GUID)
{
diff --git a/src/server/scripts/Events/childrens_week.cpp b/src/server/scripts/Events/childrens_week.cpp
index 572e7caa59..1a923c7b89 100644
--- a/src/server/scripts/Events/childrens_week.cpp
+++ b/src/server/scripts/Events/childrens_week.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/scripts/Events/events_script_loader.cpp b/src/server/scripts/Events/events_script_loader.cpp
index e6ade3a6c4..6171d68473 100644
--- a/src/server/scripts/Events/events_script_loader.cpp
+++ b/src/server/scripts/Events/events_script_loader.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/scripts/Events/firework_show/firework_show.cpp b/src/server/scripts/Events/firework_show/firework_show.cpp
index 0d743269e7..43ba748045 100644
--- a/src/server/scripts/Events/firework_show/firework_show.cpp
+++ b/src/server/scripts/Events/firework_show/firework_show.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/scripts/Events/firework_show/firework_show.h b/src/server/scripts/Events/firework_show/firework_show.h
index 90b139eeac..275ef16631 100644
--- a/src/server/scripts/Events/firework_show/firework_show.h
+++ b/src/server/scripts/Events/firework_show/firework_show.h
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/scripts/Events/firework_show/firework_show_BootyBay.h b/src/server/scripts/Events/firework_show/firework_show_BootyBay.h
index 471faae112..e263b09f06 100644
--- a/src/server/scripts/Events/firework_show/firework_show_BootyBay.h
+++ b/src/server/scripts/Events/firework_show/firework_show_BootyBay.h
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/scripts/Events/firework_show/firework_show_Exodar.h b/src/server/scripts/Events/firework_show/firework_show_Exodar.h
index b30c1663e2..629870cb75 100644
--- a/src/server/scripts/Events/firework_show/firework_show_Exodar.h
+++ b/src/server/scripts/Events/firework_show/firework_show_Exodar.h
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/scripts/Events/firework_show/firework_show_Ironforge.h b/src/server/scripts/Events/firework_show/firework_show_Ironforge.h
index 9a026e89ab..0d84538c85 100644
--- a/src/server/scripts/Events/firework_show/firework_show_Ironforge.h
+++ b/src/server/scripts/Events/firework_show/firework_show_Ironforge.h
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/scripts/Events/firework_show/firework_show_Orgrimmar.h b/src/server/scripts/Events/firework_show/firework_show_Orgrimmar.h
index 70407360eb..d382c22c6b 100644
--- a/src/server/scripts/Events/firework_show/firework_show_Orgrimmar.h
+++ b/src/server/scripts/Events/firework_show/firework_show_Orgrimmar.h
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/scripts/Events/firework_show/firework_show_Shattrath.h b/src/server/scripts/Events/firework_show/firework_show_Shattrath.h
index 1c8bc1a645..f313d35623 100644
--- a/src/server/scripts/Events/firework_show/firework_show_Shattrath.h
+++ b/src/server/scripts/Events/firework_show/firework_show_Shattrath.h
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/scripts/Events/firework_show/firework_show_Silvermoon.h b/src/server/scripts/Events/firework_show/firework_show_Silvermoon.h
index eef11acd87..90459c9232 100644
--- a/src/server/scripts/Events/firework_show/firework_show_Silvermoon.h
+++ b/src/server/scripts/Events/firework_show/firework_show_Silvermoon.h
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/scripts/Events/firework_show/firework_show_Stormwind.h b/src/server/scripts/Events/firework_show/firework_show_Stormwind.h
index e2c6ac2e56..f9af6194d1 100644
--- a/src/server/scripts/Events/firework_show/firework_show_Stormwind.h
+++ b/src/server/scripts/Events/firework_show/firework_show_Stormwind.h
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/scripts/Events/firework_show/firework_show_Teldrassil.h b/src/server/scripts/Events/firework_show/firework_show_Teldrassil.h
index 8875543d44..ca961dae7f 100644
--- a/src/server/scripts/Events/firework_show/firework_show_Teldrassil.h
+++ b/src/server/scripts/Events/firework_show/firework_show_Teldrassil.h
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/scripts/Events/firework_show/firework_show_ThunderBluff.h b/src/server/scripts/Events/firework_show/firework_show_ThunderBluff.h
index 445cce45c5..ba4a0a0aaa 100644
--- a/src/server/scripts/Events/firework_show/firework_show_ThunderBluff.h
+++ b/src/server/scripts/Events/firework_show/firework_show_ThunderBluff.h
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/scripts/Events/firework_show/firework_show_Undercity.h b/src/server/scripts/Events/firework_show/firework_show_Undercity.h
index ba17f6bc3c..a0bc2ae8c2 100644
--- a/src/server/scripts/Events/firework_show/firework_show_Undercity.h
+++ b/src/server/scripts/Events/firework_show/firework_show_Undercity.h
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/scripts/Events/hallows_end.cpp b/src/server/scripts/Events/hallows_end.cpp
index 06d649291a..02282feb50 100644
--- a/src/server/scripts/Events/hallows_end.cpp
+++ b/src/server/scripts/Events/hallows_end.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
@@ -428,7 +428,7 @@ struct npc_costumed_orphan_matron : public ScriptedAI
GetInitXYZ(x, y, z, o, path);
if (Creature* cr = me->SummonCreature(NPC_SHADE_OF_HORSEMAN, x, y, z, o, TEMPSUMMON_CORPSE_TIMED_DESPAWN, 10000))
{
- cr->GetMotionMaster()->MovePath(path, true);
+ cr->GetMotionMaster()->MoveWaypoint(path, true);
cr->AI()->DoAction(path);
horseGUID = cr->GetGUID();
}
@@ -697,7 +697,7 @@ struct npc_hallows_end_soh : public ScriptedAI
void EnterEvadeMode(EvadeReason /* why */) override
{
- me->DespawnOrUnsummon(1);
+ me->DespawnOrUnsummon(1ms);
}
uint32 GetData(uint32 /*type*/) const override
@@ -763,7 +763,7 @@ struct npc_hallows_end_soh : public ScriptedAI
}
CastFires(false);
- events.RepeatEvent(15000);
+ events.Repeat(15s);
break;
}
case 4:
@@ -848,7 +848,7 @@ struct npc_hallows_end_soh : public ScriptedAI
if (Unit* c = ObjectAccessor::GetUnit(*me, guid))
c->RemoveAllAuras();
- me->DespawnOrUnsummon(1);
+ me->DespawnOrUnsummon(1ms);
}
else
{
@@ -868,7 +868,7 @@ struct npc_hallows_end_soh : public ScriptedAI
me->RemoveAllAuras();
me->SetCanFly(false);
me->SetDisableGravity(false);
- events.ScheduleEvent(4, 2000);
+ events.ScheduleEvent(4, 2s);
}
}
@@ -1029,7 +1029,7 @@ struct boss_headless_horseman : public ScriptedAI
std::list<Creature*> unitList;
me->GetCreaturesWithEntryInRange(unitList, 100.0f, NPC_PUMPKIN_FIEND);
for (std::list<Creature*>::iterator itr = unitList.begin(); itr != unitList.end(); ++itr)
- (*itr)->ToCreature()->DespawnOrUnsummon(500);
+ (*itr)->ToCreature()->DespawnOrUnsummon(500ms);
Map::PlayerList const& players = me->GetMap()->GetPlayers();
if (!players.IsEmpty() && players.begin()->GetSource() && players.begin()->GetSource()->GetGroup())
@@ -1085,9 +1085,9 @@ struct boss_headless_horseman : public ScriptedAI
{
if (type == WAYPOINT_MOTION_TYPE)
{
- if (point == 0)
+ if (point == 1)
me->CastSpell(me, SPELL_HEAD_VISUAL, true);
- else if (point == 11)
+ else if (point == 12)
{
me->ReplaceAllUnitFlags(UNIT_FLAG_NONE);
me->StopMoving();
@@ -1191,7 +1191,7 @@ struct boss_headless_horseman : public ScriptedAI
break;
case 3:
me->SetDisableGravity(true);
- me->GetMotionMaster()->MovePath(236820, false);
+ me->GetMotionMaster()->MoveWaypoint(236820, false);
me->CastSpell(me, SPELL_SHAKE_CAMERA_SMALL, true);
player->Say(TALK_PLAYER_FELT_DEATH);
Talk(TALK_ENTRANCE);
@@ -1202,7 +1202,7 @@ struct boss_headless_horseman : public ScriptedAI
talkCount = 0;
return; // pop and return, skip repeat
}
- events.RepeatEvent(2000);
+ events.Repeat(2s);
break;
}
case EVENT_HORSEMAN_FOLLOW:
@@ -1218,7 +1218,7 @@ struct boss_headless_horseman : public ScriptedAI
case EVENT_HORSEMAN_CLEAVE:
{
me->CastSpell(me->GetVictim(), SPELL_HORSEMAN_CLEAVE, false);
- events.RepeatEvent(8000);
+ events.Repeat(8s);
break;
}
case EVENT_HORSEMAN_WHIRLWIND:
@@ -1226,11 +1226,11 @@ struct boss_headless_horseman : public ScriptedAI
if (me->HasAuraEffect(SPELL_HORSEMAN_WHIRLWIND, EFFECT_0))
{
me->RemoveAura(SPELL_HORSEMAN_WHIRLWIND);
- events.RepeatEvent(15000);
+ events.Repeat(15s);
break;
}
me->CastSpell(me, SPELL_HORSEMAN_WHIRLWIND, true);
- events.RepeatEvent(6000);
+ events.Repeat(6s);
break;
}
case EVENT_HORSEMAN_CHECK_HEALTH:
@@ -1241,7 +1241,7 @@ struct boss_headless_horseman : public ScriptedAI
return;
}
- events.RepeatEvent(1000);
+ events.Repeat(1s);
break;
}
case EVENT_HORSEMAN_CONFLAGRATION:
@@ -1253,21 +1253,21 @@ struct boss_headless_horseman : public ScriptedAI
Talk(TALK_CONFLAGRATION);
}
- events.RepeatEvent(12500);
+ events.Repeat(12500ms);
break;
}
case EVENT_SUMMON_PUMPKIN:
{
if (talkCount < 4)
{
- events.RepeatEvent(1);
+ events.Repeat(1ms);
talkCount++;
me->CastSpell(me, SPELL_SUMMON_PUMPKIN, false);
}
else
{
Talk(TALK_SPROUTING_PUMPKINS);
- events.RepeatEvent(15000);
+ events.Repeat(15s);
talkCount = 0;
}
diff --git a/src/server/scripts/Events/love_in_air.cpp b/src/server/scripts/Events/love_in_air.cpp
index 6c5a2aedb0..561a6b315e 100644
--- a/src/server/scripts/Events/love_in_air.cpp
+++ b/src/server/scripts/Events/love_in_air.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
@@ -247,7 +247,7 @@ struct npc_love_in_air_snivel_real : public ScriptedAI
if (Unit* owner = me->ToTempSummon()->GetSummonerUnit())
me->CastSpell(owner, SPELL_SNIVEL_GUN, true);
- me->DespawnOrUnsummon(1000);
+ me->DespawnOrUnsummon(1s);
}
}
}
diff --git a/src/server/scripts/Events/midsummer.cpp b/src/server/scripts/Events/midsummer.cpp
index 8032fc29e6..5e5b96321b 100644
--- a/src/server/scripts/Events/midsummer.cpp
+++ b/src/server/scripts/Events/midsummer.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/scripts/Events/noblegarden.cpp b/src/server/scripts/Events/noblegarden.cpp
index 4187087f10..6333f728fb 100644
--- a/src/server/scripts/Events/noblegarden.cpp
+++ b/src/server/scripts/Events/noblegarden.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/scripts/Events/pilgrims_bounty.cpp b/src/server/scripts/Events/pilgrims_bounty.cpp
index cdcc853017..0ad30f8d88 100644
--- a/src/server/scripts/Events/pilgrims_bounty.cpp
+++ b/src/server/scripts/Events/pilgrims_bounty.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/scripts/Events/winter_veil.cpp b/src/server/scripts/Events/winter_veil.cpp
index 6a66ed29e6..32c848550e 100644
--- a/src/server/scripts/Events/winter_veil.cpp
+++ b/src/server/scripts/Events/winter_veil.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
@@ -192,7 +192,7 @@ class spell_winter_veil_racer_slam_hit : public SpellScript
return;
target->CastSpell(target->GetPositionX() + irand(-10, 10), target->GetPositionY() + irand(-10, 10), target->GetPositionZ(), SPELL_RACER_DEATH_VISUAL, true);
- target->DespawnOrUnsummon(3000);
+ target->DespawnOrUnsummon(3s);
target->CastSpell(target, SPELL_RACER_FLAMES, true);
caster->CastSpell(caster, SPELL_RACER_KILL_COUNTER, true);
diff --git a/src/server/scripts/Kalimdor/BlackfathomDeeps/blackfathom_deeps.h b/src/server/scripts/Kalimdor/BlackfathomDeeps/blackfathom_deeps.h
index 5fef90f4be..861987085d 100644
--- a/src/server/scripts/Kalimdor/BlackfathomDeeps/blackfathom_deeps.h
+++ b/src/server/scripts/Kalimdor/BlackfathomDeeps/blackfathom_deeps.h
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/scripts/Kalimdor/BlackfathomDeeps/instance_blackfathom_deeps.cpp b/src/server/scripts/Kalimdor/BlackfathomDeeps/instance_blackfathom_deeps.cpp
index 26741ddaef..cfcb22076b 100644
--- a/src/server/scripts/Kalimdor/BlackfathomDeeps/instance_blackfathom_deeps.cpp
+++ b/src/server/scripts/Kalimdor/BlackfathomDeeps/instance_blackfathom_deeps.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/boss_anetheron.cpp b/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/boss_anetheron.cpp
index 69eaa77eab..8695236f0e 100644
--- a/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/boss_anetheron.cpp
+++ b/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/boss_anetheron.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
@@ -97,7 +97,7 @@ public:
Talk(SAY_ONSPAWN, 1200ms);
if (action == DATA_ANETHERON)
- me->GetMotionMaster()->MovePath(urand(ALLIANCE_BASE_CHARGE_1, ALLIANCE_BASE_CHARGE_3), false);
+ me->GetMotionMaster()->MoveWaypoint(urand(ALLIANCE_BASE_CHARGE_1, ALLIANCE_BASE_CHARGE_3), false);
}
void PathEndReached(uint32 pathId) override
@@ -109,7 +109,7 @@ public:
case ALLIANCE_BASE_CHARGE_3:
me->m_Events.AddEventAtOffset([this]()
{
- me->GetMotionMaster()->MovePath(urand(ALLIANCE_BASE_PATROL_1, ALLIANCE_BASE_PATROL_3), true);
+ me->GetMotionMaster()->MoveWaypoint(urand(ALLIANCE_BASE_PATROL_1, ALLIANCE_BASE_PATROL_3), true);
}, 1s);
break;
}
diff --git a/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/boss_archimonde.cpp b/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/boss_archimonde.cpp
index 3d15d6cf7c..792f5f5cab 100644
--- a/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/boss_archimonde.cpp
+++ b/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/boss_archimonde.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
@@ -297,7 +297,7 @@ struct boss_archimonde : public BossAI
}
}
}, 5s);
- ScheduleTimedEvent(5000ms, [&]
+ ScheduleTimedEvent(5s, [&]
{
bool noPlayersInRange = true;
if (Map* map = me->GetMap())
@@ -335,7 +335,7 @@ struct boss_archimonde : public BossAI
Talk(SAY_SLAY);
}
- void SetGUID(ObjectGuid guid, int32 type) override
+ void SetGUID(ObjectGuid const& guid, int32 type) override
{
if (type == GUID_GAIN_SOUL_CHARGE_PLAYER)
{
diff --git a/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/boss_azgalor.cpp b/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/boss_azgalor.cpp
index 82f86f1b58..673765564c 100644
--- a/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/boss_azgalor.cpp
+++ b/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/boss_azgalor.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
@@ -86,7 +86,7 @@ public:
Talk(SAY_ONSPAWN, 1200ms);
if (action == DATA_AZGALOR)
- me->GetMotionMaster()->MovePath(HORDE_BOSS_PATH, false);
+ me->GetMotionMaster()->MoveWaypoint(HORDE_BOSS_PATH, false);
}
void KilledUnit(Unit * victim) override
@@ -110,7 +110,7 @@ public:
if (Creature* archi = instance->GetCreature(DATA_ARCHIMONDE))
{
archi->AI()->DoAction(ACTION_BECOME_ACTIVE_AND_CHANNEL);
- archi->AI()->Talk(SAY_ARCHIMONDE_INTRO, 25000ms);
+ archi->AI()->Talk(SAY_ARCHIMONDE_INTRO, 25s);
}
BossAI::JustDied(killer);
}
diff --git a/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/boss_kazrogal.cpp b/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/boss_kazrogal.cpp
index 42ad0d907d..925616c151 100644
--- a/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/boss_kazrogal.cpp
+++ b/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/boss_kazrogal.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
@@ -94,9 +94,9 @@ public:
Milliseconds GetMarkRepeatTimer()
{
++_markCounter;
- Milliseconds timer = 45000ms - (5000ms * _markCounter);
- if (timer <= 10000ms)
- return 10000ms;
+ Milliseconds timer = 45s - (5s * _markCounter);
+ if (timer <= 10s)
+ return 10s;
else
return timer;
}
@@ -106,7 +106,7 @@ public:
Talk(SAY_ONSPAWN, 1200ms);
if (action == DATA_KAZROGAL)
- me->GetMotionMaster()->MovePath(HORDE_BOSS_PATH, false);
+ me->GetMotionMaster()->MoveWaypoint(HORDE_BOSS_PATH, false);
}
void KilledUnit(Unit * victim) override
diff --git a/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/boss_rage_winterchill.cpp b/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/boss_rage_winterchill.cpp
index 39bce4e6ee..f7900d5c51 100644
--- a/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/boss_rage_winterchill.cpp
+++ b/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/boss_rage_winterchill.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
@@ -101,7 +101,7 @@ public:
Talk(SAY_ONSPAWN, 1200ms);
if (action == DATA_WINTERCHILL)
- me->GetMotionMaster()->MovePath(urand(ALLIANCE_BASE_CHARGE_1, ALLIANCE_BASE_CHARGE_3), false);
+ me->GetMotionMaster()->MoveWaypoint(urand(ALLIANCE_BASE_CHARGE_1, ALLIANCE_BASE_CHARGE_3), false);
}
void PathEndReached(uint32 pathId) override
@@ -113,7 +113,7 @@ public:
case ALLIANCE_BASE_CHARGE_3:
me->m_Events.AddEventAtOffset([this]()
{
- me->GetMotionMaster()->MovePath(urand(ALLIANCE_BASE_PATROL_1, ALLIANCE_BASE_PATROL_3), true);
+ me->GetMotionMaster()->MoveWaypoint(urand(ALLIANCE_BASE_PATROL_1, ALLIANCE_BASE_PATROL_3), true);
}, 1s);
break;
}
diff --git a/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/hyjal.cpp b/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/hyjal.cpp
index 01b12a9ef8..8bad062214 100644
--- a/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/hyjal.cpp
+++ b/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/hyjal.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
@@ -188,7 +188,7 @@ public:
else
{
creature->AI()->Talk(SAY_SUCCESS);
- creature->GetMotionMaster()->MovePath(JAINA_RETREAT_PATH, false);
+ creature->GetMotionMaster()->MoveWaypoint(JAINA_RETREAT_PATH, false);
}
}
return true;
@@ -493,15 +493,15 @@ struct npc_hyjal_ground_trash : public ScriptedAI
case DATA_WINTERCHILL:
case DATA_ANETHERON:
case DATA_ALLIANCE_RETREAT:
- me->GetMotionMaster()->MovePath(urand(ALLIANCE_BASE_CHARGE_1, ALLIANCE_BASE_CHARGE_3), false);
+ me->GetMotionMaster()->MoveWaypoint(urand(ALLIANCE_BASE_CHARGE_1, ALLIANCE_BASE_CHARGE_3), false);
break;
case DATA_KAZROGAL:
case DATA_AZGALOR:
case DATA_HORDE_RETREAT:
- me->GetMotionMaster()->MovePath(urand(HORDE_BASE_CHARGE_1, HORDE_BASE_CHARGE_3), false);
+ me->GetMotionMaster()->MoveWaypoint(urand(HORDE_BASE_CHARGE_1, HORDE_BASE_CHARGE_3), false);
break;
case DATA_ARCHIMONDE:
- me->GetMotionMaster()->MovePath(urand(NIGHT_ELF_BASE_CHARGE_1, NIGHT_ELF_BASE_CHARGE_3), false);
+ me->GetMotionMaster()->MoveWaypoint(urand(NIGHT_ELF_BASE_CHARGE_1, NIGHT_ELF_BASE_CHARGE_3), false);
break;
}
}
@@ -517,7 +517,7 @@ struct npc_hyjal_ground_trash : public ScriptedAI
case ALLIANCE_BASE_CHARGE_3:
me->m_Events.AddEventAtOffset([this]()
{
- me->GetMotionMaster()->MovePath(urand(ALLIANCE_BASE_PATROL_1, ALLIANCE_BASE_PATROL_3), true);
+ me->GetMotionMaster()->MoveWaypoint(urand(ALLIANCE_BASE_PATROL_1, ALLIANCE_BASE_PATROL_3), true);
}, 1s);
break;
case HORDE_BASE_CHARGE_1:
@@ -525,7 +525,7 @@ struct npc_hyjal_ground_trash : public ScriptedAI
case HORDE_BASE_CHARGE_3:
me->m_Events.AddEventAtOffset([this]()
{
- me->GetMotionMaster()->MovePath(urand(HORDE_BASE_PATROL_1, HORDE_BASE_PATROL_3), true);
+ me->GetMotionMaster()->MoveWaypoint(urand(HORDE_BASE_PATROL_1, HORDE_BASE_PATROL_3), true);
}, 1s);
break;
case NIGHT_ELF_BASE_CHARGE_1:
@@ -616,9 +616,9 @@ struct npc_hyjal_gargoyle : public ScriptedAI
case DATA_AZGALOR:
case DATA_HORDE_RETREAT:
if (me->GetPositionX() < 5500.f)
- me->GetMotionMaster()->MovePath(urand(GARGOYLE_PATH_FORTRESS_1, GARGOYLE_PATH_FORTRESS_3), false);
+ me->GetMotionMaster()->MoveWaypoint(urand(GARGOYLE_PATH_FORTRESS_1, GARGOYLE_PATH_FORTRESS_3), false);
else
- me->GetMotionMaster()->MovePath(urand(GARGOYLE_PATH_TROLL_CAMP_1, GARGOYLE_PATH_TROLL_CAMP_3), false);
+ me->GetMotionMaster()->MoveWaypoint(urand(GARGOYLE_PATH_TROLL_CAMP_1, GARGOYLE_PATH_TROLL_CAMP_3), false);
break;
default:
break;
@@ -687,9 +687,9 @@ struct npc_hyjal_frost_wyrm : public ScriptedAI
case DATA_AZGALOR:
case DATA_HORDE_RETREAT:
if (me->GetPositionX() < 5500.f)
- me->GetMotionMaster()->MovePath(FROST_WYRM_FORTRESS, false);
+ me->GetMotionMaster()->MoveWaypoint(FROST_WYRM_FORTRESS, false);
else
- me->GetMotionMaster()->MovePath(FROST_WYRM_TROLL_CAMP, false);
+ me->GetMotionMaster()->MoveWaypoint(FROST_WYRM_TROLL_CAMP, false);
break;
default:
break;
@@ -702,7 +702,7 @@ struct npc_hyjal_frost_wyrm : public ScriptedAI
{
me->m_Events.AddEventAtOffset([this]()
{
- me->GetMotionMaster()->MovePath(FROST_WYRM_FORTRESS_PATROL, true);
+ me->GetMotionMaster()->MoveWaypoint(FROST_WYRM_FORTRESS_PATROL, true);
}, 1s);
}
}
diff --git a/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/hyjal.h b/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/hyjal.h
index 021d59b757..668a6b56d6 100644
--- a/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/hyjal.h
+++ b/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/hyjal.h
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/instance_hyjal.cpp b/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/instance_hyjal.cpp
index 1803000b92..498ab15f6b 100644
--- a/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/instance_hyjal.cpp
+++ b/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/instance_hyjal.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
@@ -53,16 +53,16 @@ ObjectData const creatureData[] =
Milliseconds hyjalWaveTimers[4][MAX_WAVES_STANDARD]
{
- { 130000ms, 130000ms, 130000ms, 130000ms, 130000ms, 130000ms, 130000ms, 190000ms, 0ms }, // Winterchill
- { 130000ms, 130000ms, 130000ms, 130000ms, 130000ms, 130000ms, 130000ms, 190000ms, 0ms }, // Anetheron
- { 130000ms, 155000ms, 130000ms, 155000ms, 130000ms, 130000ms, 155000ms, 225000ms, 0ms }, // Kaz'rogal
- { 130000ms, 190000ms, 190000ms, 190000ms, 130000ms, 155000ms, 190000ms, 225000ms, 0ms } // Azgalor
+ { 130s, 130s, 130s, 130s, 130s, 130s, 130s, 190s, 0ms }, // Winterchill
+ { 130s, 130s, 130s, 130s, 130s, 130s, 130s, 190s, 0ms }, // Anetheron
+ { 130s, 155s, 130s, 155s, 130s, 130s, 155s, 225s, 0ms }, // Kaz'rogal
+ { 130s, 190s, 190s, 190s, 130s, 155s, 190s, 225s, 0ms } // Azgalor
};
Milliseconds hyjalRetreatTimers[2][MAX_WAVES_RETREAT]
{
- { 10000ms, 6000ms , 0ms }, // Alliance
- { 10000ms, 40000ms, 0ms } // Horde
+ { 10s, 6s , 0ms }, // Alliance
+ { 10s, 40s, 0ms } // Horde
};
Milliseconds hyjalNightElfWaveTimers[1][MAX_WAVES_NIGHT_ELF]
@@ -295,7 +295,7 @@ public:
}
// Despawn all alliance NPCs
- scheduler.Schedule(21000ms, [this](TaskContext)
+ scheduler.Schedule(21s, [this](TaskContext)
{
for (ObjectGuid const& guid : _baseAlliance)
if (Creature* creature = instance->GetCreature(guid))
@@ -343,7 +343,7 @@ public:
}
}
- scheduler.Schedule(21000ms, [this](TaskContext)
+ scheduler.Schedule(21s, [this](TaskContext)
{
for (ObjectGuid const& guid : _baseHorde)
if (Creature* creature = instance->GetCreature(guid))
diff --git a/src/server/scripts/Kalimdor/CavernsOfTime/CullingOfStratholme/boss_epoch.cpp b/src/server/scripts/Kalimdor/CavernsOfTime/CullingOfStratholme/boss_epoch.cpp
index f429e5a474..afdeaaa64b 100644
--- a/src/server/scripts/Kalimdor/CavernsOfTime/CullingOfStratholme/boss_epoch.cpp
+++ b/src/server/scripts/Kalimdor/CavernsOfTime/CullingOfStratholme/boss_epoch.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
@@ -18,17 +18,16 @@
#include "CreatureScript.h"
#include "ScriptedCreature.h"
#include "SpellInfo.h"
+#include "SpellMgr.h"
#include "culling_of_stratholme.h"
enum Spells
{
SPELL_CURSE_OF_EXERTION = 52772,
- SPELL_WOUNDING_STRIKE_N = 52771,
- SPELL_WOUNDING_STRIKE_H = 58830,
+ SPELL_WOUNDING_STRIKE = 52771,
SPELL_TIME_STOP = 58848,
SPELL_TIME_WARP = 52766,
- SPELL_TIME_STEP_N = 52737,
- SPELL_TIME_STEP_H = 58829,
+ SPELL_TIME_STEP = 52737,
};
enum Events
@@ -77,17 +76,17 @@ public:
{
Talk(SAY_AGGRO);
- events.ScheduleEvent(EVENT_SPELL_CURSE_OF_EXERTION, 9000);
- events.ScheduleEvent(EVENT_SPELL_WOUNDING_STRIKE, 3000);
- events.ScheduleEvent(EVENT_SPELL_TIME_WARP, 25000);
+ events.ScheduleEvent(EVENT_SPELL_CURSE_OF_EXERTION, 9s);
+ events.ScheduleEvent(EVENT_SPELL_WOUNDING_STRIKE, 3s);
+ events.ScheduleEvent(EVENT_SPELL_TIME_WARP, 25s);
if (IsHeroic())
- events.ScheduleEvent(EVENT_SPELL_TIME_STOP, 20000);
+ events.ScheduleEvent(EVENT_SPELL_TIME_STOP, 20s);
}
void SpellHitTarget(Unit* target, SpellInfo const* spellInfo) override
{
- if (spellInfo->Id == SPELL_TIME_STEP_H || spellInfo->Id == SPELL_TIME_STEP_N)
+ if (spellInfo->Id == sSpellMgr->GetSpellIdForDifficulty(SPELL_TIME_STEP, me))
{
if (target == me)
return;
@@ -98,7 +97,7 @@ public:
return;
}
warps++;
- me->CastSpell(target, DUNGEON_MODE(SPELL_TIME_STEP_N, SPELL_TIME_STEP_H), true);
+ me->CastSpell(target, SPELL_TIME_STEP, true);
}
}
@@ -116,23 +115,23 @@ public:
case EVENT_SPELL_CURSE_OF_EXERTION:
if (Unit* target = SelectTarget(SelectTargetMethod::Random, 0, 50.0f, true))
me->CastSpell(target, SPELL_CURSE_OF_EXERTION, false);
- events.RepeatEvent(9000);
+ events.Repeat(9s);
break;
case EVENT_SPELL_WOUNDING_STRIKE:
- me->CastSpell(me->GetVictim(), DUNGEON_MODE(SPELL_WOUNDING_STRIKE_N, SPELL_WOUNDING_STRIKE_H), false);
- events.RepeatEvent(6000);
+ me->CastSpell(me->GetVictim(), SPELL_WOUNDING_STRIKE, false);
+ events.Repeat(6s);
break;
case EVENT_SPELL_TIME_STOP:
me->CastSpell(me, SPELL_TIME_STOP, false);
- events.RepeatEvent(20000);
+ events.Repeat(20s);
break;
case EVENT_SPELL_TIME_WARP:
Talk(SAY_TIME_WARP);
me->CastSpell(me, SPELL_TIME_WARP, false);
if (Unit* target = SelectTarget(SelectTargetMethod::Random, 0, 50.0f, true))
- me->CastSpell(target, DUNGEON_MODE(SPELL_TIME_STEP_N, SPELL_TIME_STEP_H), true);
+ me->CastSpell(target, SPELL_TIME_STEP, true);
- events.RepeatEvent(25000);
+ events.Repeat(25s);
break;
}
diff --git a/src/server/scripts/Kalimdor/CavernsOfTime/CullingOfStratholme/boss_infinite.cpp b/src/server/scripts/Kalimdor/CavernsOfTime/CullingOfStratholme/boss_infinite.cpp
index 7ec0d095c3..36b27d4730 100644
--- a/src/server/scripts/Kalimdor/CavernsOfTime/CullingOfStratholme/boss_infinite.cpp
+++ b/src/server/scripts/Kalimdor/CavernsOfTime/CullingOfStratholme/boss_infinite.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
@@ -67,7 +67,7 @@ public:
summons.DespawnAll();
if (InstanceScript* pInstance = me->GetInstanceScript())
if (pInstance->GetData(DATA_GUARDIANTIME_EVENT) == 0)
- me->DespawnOrUnsummon(500);
+ me->DespawnOrUnsummon(500ms);
me->SummonCreature(NPC_TIME_RIFT, 2337.6f, 1270.0f, 132.95f, 2.79f);
me->SummonCreature(NPC_GUARDIAN_OF_TIME, 2319.3f, 1267.7f, 132.8f, 1.0f);
@@ -79,8 +79,8 @@ public:
void JustEngagedWith(Unit* /*who*/) override
{
me->InterruptNonMeleeSpells(false);
- events.ScheduleEvent(EVENT_SPELL_VOID_STRIKE, 8000);
- events.ScheduleEvent(EVENT_SPELL_CORRUPTING_BLIGHT, 12000);
+ events.ScheduleEvent(EVENT_SPELL_VOID_STRIKE, 8s);
+ events.ScheduleEvent(EVENT_SPELL_CORRUPTING_BLIGHT, 12s);
Talk(SAY_AGGRO);
}
@@ -93,11 +93,11 @@ public:
{
if (cr->GetEntry() == NPC_TIME_RIFT)
{
- cr->DespawnOrUnsummon(1000);
+ cr->DespawnOrUnsummon(1s);
}
else
{
- cr->DespawnOrUnsummon(5000);
+ cr->DespawnOrUnsummon(5s);
cr->RemoveAllAuras();
cr->AI()->Talk(SAY_THANKS);
}
@@ -120,7 +120,7 @@ public:
{
Talk(SAY_FAIL);
summons.DespawnAll();
- me->DespawnOrUnsummon(500);
+ me->DespawnOrUnsummon(500ms);
}
}
@@ -147,12 +147,12 @@ public:
{
case EVENT_SPELL_VOID_STRIKE:
me->CastSpell(me->GetVictim(), SPELL_VOID_STRIKE, false);
- events.RepeatEvent(8000);
+ events.Repeat(8s);
break;
case EVENT_SPELL_CORRUPTING_BLIGHT:
if (Unit* target = SelectTarget(SelectTargetMethod::Random, 0, 50.0f, true))
me->CastSpell(target, SPELL_CORRUPTING_BLIGHT, false);
- events.RepeatEvent(12000);
+ events.Repeat(12s);
break;
}
diff --git a/src/server/scripts/Kalimdor/CavernsOfTime/CullingOfStratholme/boss_mal_ganis.cpp b/src/server/scripts/Kalimdor/CavernsOfTime/CullingOfStratholme/boss_mal_ganis.cpp
index 065224bdc3..12c1f60455 100644
--- a/src/server/scripts/Kalimdor/CavernsOfTime/CullingOfStratholme/boss_mal_ganis.cpp
+++ b/src/server/scripts/Kalimdor/CavernsOfTime/CullingOfStratholme/boss_mal_ganis.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
@@ -22,12 +22,9 @@
enum Spells
{
- SPELL_CARRION_SWARM_N = 52720,
- SPELL_CARRION_SWARM_H = 58852,
- SPELL_MIND_BLAST_N = 52722,
- SPELL_MIND_BLAST_H = 58850,
- SPELL_SLEEP_N = 52721,
- SPELL_SLEEP_H = 58849,
+ SPELL_CARRION_SWARM = 52720,
+ SPELL_MIND_BLAST = 52722,
+ SPELL_SLEEP = 52721,
SPELL_VAMPIRIC_TOUCH = 52723,
};
@@ -80,17 +77,17 @@ public:
if (finished)
{
Talk(SAY_OUTRO);
- me->DespawnOrUnsummon(20000);
+ me->DespawnOrUnsummon(20s);
}
}
void JustEngagedWith(Unit* /*who*/) override
{
Talk(SAY_AGGRO);
- events.ScheduleEvent(EVENT_SPELL_CARRION_SWARM, 6000);
- events.ScheduleEvent(EVENT_SPELL_MIND_BLAST, 11000);
- events.ScheduleEvent(EVENT_SPELL_SLEEP, 20000);
- events.ScheduleEvent(EVENT_SPELL_VAMPIRIC_TOUCH, 15000);
+ events.ScheduleEvent(EVENT_SPELL_CARRION_SWARM, 6s);
+ events.ScheduleEvent(EVENT_SPELL_MIND_BLAST, 11s);
+ events.ScheduleEvent(EVENT_SPELL_SLEEP, 20s);
+ events.ScheduleEvent(EVENT_SPELL_VAMPIRIC_TOUCH, 15s);
}
void JustDied(Unit* /*killer*/) override
@@ -145,23 +142,23 @@ public:
switch (events.ExecuteEvent())
{
case EVENT_SPELL_CARRION_SWARM:
- me->CastSpell(me->GetVictim(), DUNGEON_MODE(SPELL_CARRION_SWARM_N, SPELL_CARRION_SWARM_H), false);
- events.RepeatEvent(7000);
+ me->CastSpell(me->GetVictim(), SPELL_CARRION_SWARM, false);
+ events.Repeat(7s);
break;
case EVENT_SPELL_MIND_BLAST:
if (Unit* target = SelectTarget(SelectTargetMethod::Random, 0, 50.0f, true))
- me->CastSpell(target, DUNGEON_MODE(SPELL_MIND_BLAST_N, SPELL_MIND_BLAST_H), false);
- events.RepeatEvent(6000);
+ me->CastSpell(target, SPELL_MIND_BLAST, false);
+ events.Repeat(6s);
break;
case EVENT_SPELL_SLEEP:
Talk(SAY_SLEEP);
if (Unit* target = SelectTarget(SelectTargetMethod::Random, 0, 50.0f, true))
- me->CastSpell(target, DUNGEON_MODE(SPELL_SLEEP_N, SPELL_SLEEP_H), false);
- events.RepeatEvent(17000);
+ me->CastSpell(target, SPELL_SLEEP, false);
+ events.Repeat(17s);
break;
case EVENT_SPELL_VAMPIRIC_TOUCH:
me->CastSpell(me, SPELL_VAMPIRIC_TOUCH, true);
- events.RepeatEvent(30000);
+ events.Repeat(30s);
break;
}
diff --git a/src/server/scripts/Kalimdor/CavernsOfTime/CullingOfStratholme/boss_meathook.cpp b/src/server/scripts/Kalimdor/CavernsOfTime/CullingOfStratholme/boss_meathook.cpp
index 8a87485c1e..17812c576d 100644
--- a/src/server/scripts/Kalimdor/CavernsOfTime/CullingOfStratholme/boss_meathook.cpp
+++ b/src/server/scripts/Kalimdor/CavernsOfTime/CullingOfStratholme/boss_meathook.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
@@ -21,10 +21,8 @@
enum Spells
{
- SPELL_CONSTRICTING_CHAINS_N = 52696,
- SPELL_CONSTRICTING_CHAINS_H = 58823,
- SPELL_DISEASE_EXPULSION_N = 52666,
- SPELL_DISEASE_EXPULSION_H = 58824,
+ SPELL_CONSTRICTING_CHAINS = 52696,
+ SPELL_DISEASE_EXPULSION = 52666,
SPELL_FRENZY = 58841,
};
@@ -66,9 +64,9 @@ public:
void JustEngagedWith(Unit* /*who*/) override
{
Talk(SAY_AGGRO);
- events.RescheduleEvent(EVENT_SPELL_CONSTRICTING_CHAINS, 15000);
- events.RescheduleEvent(EVENT_SPELL_DISEASE_EXPULSION, 4000);
- events.RescheduleEvent(EVENT_SPELL_FRENZY, 20000);
+ events.RescheduleEvent(EVENT_SPELL_CONSTRICTING_CHAINS, 15s);
+ events.RescheduleEvent(EVENT_SPELL_DISEASE_EXPULSION, 4s);
+ events.RescheduleEvent(EVENT_SPELL_FRENZY, 20s);
}
void JustDied(Unit* /*killer*/) override
@@ -97,17 +95,17 @@ public:
switch (events.ExecuteEvent())
{
case EVENT_SPELL_DISEASE_EXPULSION:
- me->CastSpell(me, DUNGEON_MODE(SPELL_DISEASE_EXPULSION_N, SPELL_DISEASE_EXPULSION_H), false);
- events.RepeatEvent(6000);
+ me->CastSpell(me, SPELL_DISEASE_EXPULSION, false);
+ events.Repeat(6s);
break;
case EVENT_SPELL_FRENZY:
me->CastSpell(me, SPELL_FRENZY, false);
- events.RepeatEvent(20000);
+ events.Repeat(20s);
break;
case EVENT_SPELL_CONSTRICTING_CHAINS:
if (Unit* pTarget = SelectTarget(SelectTargetMethod::MinThreat, 0, 50.0f, true))
- me->CastSpell(pTarget, DUNGEON_MODE(SPELL_CONSTRICTING_CHAINS_N, SPELL_CONSTRICTING_CHAINS_H), false);
- events.RepeatEvent(14000);
+ me->CastSpell(pTarget, SPELL_CONSTRICTING_CHAINS, false);
+ events.Repeat(14s);
break;
}
diff --git a/src/server/scripts/Kalimdor/CavernsOfTime/CullingOfStratholme/boss_salramm.cpp b/src/server/scripts/Kalimdor/CavernsOfTime/CullingOfStratholme/boss_salramm.cpp
index f0228eec2a..915857d123 100644
--- a/src/server/scripts/Kalimdor/CavernsOfTime/CullingOfStratholme/boss_salramm.cpp
+++ b/src/server/scripts/Kalimdor/CavernsOfTime/CullingOfStratholme/boss_salramm.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
@@ -23,14 +23,12 @@
enum Spells
{
- SPELL_SHADOW_BOLT_N = 57725,
- SPELL_SHADOW_BOLT_H = 58827,
+ SPELL_SHADOW_BOLT = 57725,
SPELL_STEAL_FLESH_CHANNEL = 52708,
SPELL_STEAL_FLESH_TARGET = 52711,
SPELL_STEAL_FLESH_CASTER = 52712,
SPELL_SUMMON_GHOULS = 52451,
- SPELL_EXPLODE_GHOUL_N = 52480,
- SPELL_EXPLODE_GHOUL_H = 58825,
+ SPELL_EXPLODE_GHOUL = 52480,
SPELL_CURSE_OF_TWISTED_FAITH = 58845,
};
@@ -84,12 +82,12 @@ public:
void JustEngagedWith(Unit* /*who*/) override
{
Talk(SAY_AGGRO);
- events.ScheduleEvent(EVENT_SPELL_SHADOW_BOLT, 7000);
- events.ScheduleEvent(EVENT_SPELL_STEAL_FLESH, 11000);
- events.ScheduleEvent(EVENT_SPELL_SUMMON_GHOULS, 16000);
- events.ScheduleEvent(EVENT_EXPLODE_GHOUL, 22000);
+ events.ScheduleEvent(EVENT_SPELL_SHADOW_BOLT, 7s);
+ events.ScheduleEvent(EVENT_SPELL_STEAL_FLESH, 11s);
+ events.ScheduleEvent(EVENT_SPELL_SUMMON_GHOULS, 16s);
+ events.ScheduleEvent(EVENT_EXPLODE_GHOUL, 22s);
if (IsHeroic())
- events.ScheduleEvent(EVENT_SPELL_CURSE, 25000);
+ events.ScheduleEvent(EVENT_SPELL_CURSE, 25s);
}
void JustDied(Unit* /*killer*/) override
@@ -112,7 +110,7 @@ public:
if (Creature* cr = ObjectAccessor::GetCreature(*me, (*itr)))
if (cr->IsAlive())
{
- me->CastSpell(cr, DUNGEON_MODE(SPELL_EXPLODE_GHOUL_N, SPELL_EXPLODE_GHOUL_H), false);
+ me->CastSpell(cr, SPELL_EXPLODE_GHOUL, false);
return;
}
}
@@ -129,30 +127,30 @@ public:
switch (events.ExecuteEvent())
{
case EVENT_SPELL_SHADOW_BOLT:
- me->CastSpell(me->GetVictim(), DUNGEON_MODE(SPELL_SHADOW_BOLT_N, SPELL_SHADOW_BOLT_H), false);
- events.RepeatEvent(10000);
+ me->CastSpell(me->GetVictim(), SPELL_SHADOW_BOLT, false);
+ events.Repeat(10s);
break;
case EVENT_SPELL_STEAL_FLESH:
if (!urand(0, 2))
Talk(SAY_STEAL_FLESH);
me->CastSpell(me->GetVictim(), SPELL_STEAL_FLESH_CHANNEL, false);
- events.RepeatEvent(12000);
+ events.Repeat(12s);
break;
case EVENT_SPELL_SUMMON_GHOULS:
if (!urand(0, 2))
Talk(SAY_SUMMON_GHOULS);
me->CastSpell(me, SPELL_SUMMON_GHOULS, false);
- events.RepeatEvent(10000);
+ events.Repeat(10s);
break;
case EVENT_EXPLODE_GHOUL:
if (!urand(0, 2))
Talk(SAY_EXPLODE_GHOUL);
ExplodeGhoul();
- events.RepeatEvent(15000);
+ events.Repeat(15s);
break;
case EVENT_SPELL_CURSE:
me->CastSpell(me->GetVictim(), SPELL_CURSE_OF_TWISTED_FAITH, false);
- events.RepeatEvent(30000);
+ events.Repeat(30s);
break;
}
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 32ec43e808..5db46cd4c2 100644
--- a/src/server/scripts/Kalimdor/CavernsOfTime/CullingOfStratholme/culling_of_stratholme.cpp
+++ b/src/server/scripts/Kalimdor/CavernsOfTime/CullingOfStratholme/culling_of_stratholme.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
@@ -141,8 +141,7 @@ enum Spells
{
// Combat spells
SPELL_ARTHAS_AURA = 52442,
- SPELL_ARTHAS_EXORCISM_N = 52445,
- SPELL_ARTHAS_EXORCISM_H = 58822,
+ SPELL_ARTHAS_EXORCISM = 52445,
SPELL_ARTHAS_HOLY_LIGHT = 52444,
// Visuals
@@ -385,7 +384,7 @@ public:
uint8 timeRiftId;
Creature* GetEventNpc(uint32 entry);
- void ScheduleNextEvent(uint32 currentEvent, uint32 time);
+ void ScheduleNextEvent(uint32 currentEvent, Milliseconds time);
void SummonNextWave();
void ReorderInstance(uint32 data);
void JustEngagedWith(Unit* /*who*/) override ;
@@ -418,13 +417,13 @@ public:
{
// Event
eventInRun = true;
- actionEvents.ScheduleEvent(EVENT_ACTION_PHASE1, 0);
+ actionEvents.ScheduleEvent(EVENT_ACTION_PHASE1, 0ms);
}
else if (param == ACTION_START_CITY)
{
Talk(SAY_PHASE201);
- actionEvents.ScheduleEvent(EVENT_ACTION_PHASE2, 12000);
- SetRun(false);
+ actionEvents.ScheduleEvent(EVENT_ACTION_PHASE2, 12s);
+ me->SetWalk(true);
eventInRun = true;
me->SummonCreature(NPC_CITY_MAN, EventPos[EVENT_SRC_TOWN_CITYMAN1]);
@@ -434,14 +433,14 @@ public:
{
waveGroupId = 10;
eventInRun = true;
- SetRun(true);
- actionEvents.ScheduleEvent(EVENT_ACTION_PHASE2 + 9, 10000);
+ 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 +459,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,13 +479,13 @@ public:
}
Talk(SAY_PHASE501);
SetEscortPaused(false);
- SetRun(true);
+ me->SetWalk(false);
}
else if (param == ACTION_KILLED_MALGANIS)
{
EnterEvadeMode();
eventInRun = true;
- actionEvents.ScheduleEvent(EVENT_ACTION_PHASE5 + 1, 22000);
+ actionEvents.ScheduleEvent(EVENT_ACTION_PHASE5 + 1, 22s);
me->SetFacingTo(1.84f);
if (!me->GetMap()->GetPlayers().IsEmpty())
@@ -533,7 +532,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;
@@ -547,7 +546,7 @@ public:
if (Creature* stalker = me->SummonCreature(NPC_INVIS_TARGET, 2026.469f, 1287.088f, 143.596f, 1.37f, TEMPSUMMON_TIMED_DESPAWN, 14000))
{
me->SetFacingToObject(stalker);
- stalker->DespawnOrUnsummon(500);
+ stalker->DespawnOrUnsummon(500ms);
}
break;
// Reached first cityman
@@ -574,12 +573,12 @@ 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
case 22:
- actionEvents.ScheduleEvent(EVENT_ACTION_PHASE3, 0);
+ actionEvents.ScheduleEvent(EVENT_ACTION_PHASE3, 0ms);
eventInRun = true;
SetEscortPaused(true);
break;
@@ -600,7 +599,7 @@ public:
break;
// Town Hall, upper floor third fight
case 31:
- SetRun(false);
+ me->SetWalk(true);
SpawnTimeRift();
SpawnTimeRift();
Talk(SAY_PHASE312);
@@ -616,14 +615,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 +630,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:
@@ -652,7 +651,7 @@ public:
// Infront of malganis
case 55:
Talk(SAY_PHASE502);
- actionEvents.ScheduleEvent(EVENT_ACTION_PHASE5, 7000);
+ actionEvents.ScheduleEvent(EVENT_ACTION_PHASE5, 7s);
SetEscortPaused(true);
eventInRun = true;
break;
@@ -674,44 +673,45 @@ 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))
{
- uther->GetMotionMaster()->MovePoint(0, EventPos[EVENT_DST_UTHER], false);
+ uther->GetMotionMaster()->MovePoint(0, EventPos[EVENT_DST_UTHER], FORCED_MOVEMENT_NONE, 0.f, false);
uther->SetTarget(me->GetGUID());
me->SetTarget(uther->GetGUID());
}
for (int i = 0; i < 3; ++i)
if (Creature* horse = me->SummonCreature(NPC_HORSE_ESCORT, EventPos[EVENT_SRC_HORSE1 + i], TEMPSUMMON_DEAD_DESPAWN, 180000))
- horse->GetMotionMaster()->MovePoint(0, EventPos[EVENT_DST_HORSE1 + i], false);
+ horse->GetMotionMaster()->MovePoint(0, EventPos[EVENT_DST_HORSE1 + i], FORCED_MOVEMENT_NONE, 0.f, false);
- ScheduleNextEvent(currentEvent, 4000);
+ ScheduleNextEvent(currentEvent, 4s);
break;
case EVENT_ACTION_PHASE1+1:
// Start Event
- Start(true, false);
+ me->SetWalk(true);
+ Start(true);
SetDespawnAtEnd(false);
SetDespawnAtFar(false);
- ScheduleNextEvent(currentEvent, 9000);
+ ScheduleNextEvent(currentEvent, 9s);
break;
// After waypoint 0
case EVENT_ACTION_PHASE1+2:
Talk(SAY_PHASE101);
- ScheduleNextEvent(currentEvent, 2000);
+ ScheduleNextEvent(currentEvent, 2s);
break;
case EVENT_ACTION_PHASE1+3:
if (Creature* uther = GetEventNpc(NPC_UTHER))
uther->AI()->Talk(SAY_PHASE102);
- ScheduleNextEvent(currentEvent, 8000);
+ ScheduleNextEvent(currentEvent, 8s);
break;
case EVENT_ACTION_PHASE1+4:
SetEscortPaused(false);
eventInRun = false;
Talk(SAY_PHASE103);
- ScheduleNextEvent(currentEvent, 2000);
+ ScheduleNextEvent(currentEvent, 2s);
break;
// After waypoint 1
case EVENT_ACTION_PHASE1+5:
@@ -719,92 +719,92 @@ public:
jaina->SetTarget(me->GetGUID());
Talk(SAY_PHASE104);
- ScheduleNextEvent(currentEvent, 10000);
+ ScheduleNextEvent(currentEvent, 10s);
break;
case EVENT_ACTION_PHASE1+6:
if (Creature* uther = GetEventNpc(NPC_UTHER))
uther->AI()->Talk(SAY_PHASE105);
- ScheduleNextEvent(currentEvent, 1000);
+ ScheduleNextEvent(currentEvent, 1s);
break;
case EVENT_ACTION_PHASE1+7:
Talk(SAY_PHASE106);
- ScheduleNextEvent(currentEvent, 4000);
+ ScheduleNextEvent(currentEvent, 4s);
break;
case EVENT_ACTION_PHASE1+8:
if (Creature* uther = GetEventNpc(NPC_UTHER))
uther->AI()->Talk(SAY_PHASE107);
- ScheduleNextEvent(currentEvent, 6000);
+ ScheduleNextEvent(currentEvent, 6s);
break;
case EVENT_ACTION_PHASE1+9:
Talk(SAY_PHASE108);
- ScheduleNextEvent(currentEvent, 4000);
+ ScheduleNextEvent(currentEvent, 4s);
break;
case EVENT_ACTION_PHASE1+10:
if (Creature* uther = GetEventNpc(NPC_UTHER))
uther->AI()->Talk(SAY_PHASE109);
- ScheduleNextEvent(currentEvent, 8000);
+ ScheduleNextEvent(currentEvent, 8s);
break;
case EVENT_ACTION_PHASE1+11:
Talk(SAY_PHASE110);
- ScheduleNextEvent(currentEvent, 4000);
+ ScheduleNextEvent(currentEvent, 4s);
break;
case EVENT_ACTION_PHASE1+12:
if (Creature* uther = GetEventNpc(NPC_UTHER))
uther->AI()->Talk(SAY_PHASE111);
- ScheduleNextEvent(currentEvent, 4000);
+ ScheduleNextEvent(currentEvent, 4s);
break;
case EVENT_ACTION_PHASE1+13:
Talk(SAY_PHASE112);
- ScheduleNextEvent(currentEvent, 11000);
+ ScheduleNextEvent(currentEvent, 11s);
break;
case EVENT_ACTION_PHASE1+14:
if (Creature* jaina = GetEventNpc(NPC_JAINA))
jaina->AI()->Talk(SAY_PHASE113);
- ScheduleNextEvent(currentEvent, 2500);
+ ScheduleNextEvent(currentEvent, 2500ms);
break;
case EVENT_ACTION_PHASE1+15:
Talk(SAY_PHASE114);
- ScheduleNextEvent(currentEvent, 9000);
+ ScheduleNextEvent(currentEvent, 9s);
break;
case EVENT_ACTION_PHASE1+16:
if (Creature* uther = GetEventNpc(NPC_UTHER))
uther->AI()->Talk(SAY_PHASE115);
- ScheduleNextEvent(currentEvent, 4000);
+ ScheduleNextEvent(currentEvent, 4s);
break;
case EVENT_ACTION_PHASE1+17:
for (SummonList::const_iterator i = summons.begin(); i != summons.end(); ++i)
{
Creature* summon = ObjectAccessor::GetCreature(*me, *i);
if (summon && summon->GetEntry() == NPC_HORSE_ESCORT)
- summon->GetMotionMaster()->MovePoint(0, EventPos[EVENT_POS_RETREAT], false);
+ summon->GetMotionMaster()->MovePoint(0, EventPos[EVENT_POS_RETREAT], FORCED_MOVEMENT_NONE, 0.f, false);
}
- ScheduleNextEvent(currentEvent, 1000);
+ ScheduleNextEvent(currentEvent, 1s);
break;
case EVENT_ACTION_PHASE1+18:
if (Creature* uther = GetEventNpc(NPC_UTHER))
{
uther->SetTarget();
uther->AddUnitMovementFlag(MOVEMENTFLAG_WALKING);
- uther->GetMotionMaster()->MovePoint(0, EventPos[EVENT_POS_RETREAT], false);
+ uther->GetMotionMaster()->MovePoint(0, EventPos[EVENT_POS_RETREAT], FORCED_MOVEMENT_NONE, 0.f, false);
}
- ScheduleNextEvent(currentEvent, 1000);
+ ScheduleNextEvent(currentEvent, 1s);
break;
case EVENT_ACTION_PHASE1+19:
if (Creature* jaina = GetEventNpc(NPC_JAINA))
{
jaina->SetTarget();
jaina->AddUnitMovementFlag(MOVEMENTFLAG_WALKING);
- jaina->GetMotionMaster()->MovePoint(0, EventPos[EVENT_POS_RETREAT], false);
+ jaina->GetMotionMaster()->MovePoint(0, EventPos[EVENT_POS_RETREAT], FORCED_MOVEMENT_NONE, 0.f, false);
}
Talk(SAY_PHASE116);
- ScheduleNextEvent(currentEvent, 2000);
+ ScheduleNextEvent(currentEvent, 2s);
break;
case EVENT_ACTION_PHASE1+20:
if (Creature* jaina = GetEventNpc(NPC_JAINA))
@@ -813,16 +813,16 @@ public:
jaina->AI()->Talk(SAY_PHASE117);
}
- ScheduleNextEvent(currentEvent, 2000);
+ ScheduleNextEvent(currentEvent, 2s);
break;
case EVENT_ACTION_PHASE1+21:
if (Creature* jaina = GetEventNpc(NPC_JAINA))
{
jaina->AddUnitMovementFlag(MOVEMENTFLAG_WALKING);
- jaina->GetMotionMaster()->MovePoint(0, EventPos[EVENT_POS_RETREAT], false);
+ jaina->GetMotionMaster()->MovePoint(0, EventPos[EVENT_POS_RETREAT], FORCED_MOVEMENT_NONE, 0.f, false);
}
summons.DespawnEntry(NPC_HORSE_ESCORT);
- ScheduleNextEvent(currentEvent, 4000);
+ ScheduleNextEvent(currentEvent, 4s);
break;
case EVENT_ACTION_PHASE1+22:
SetEscortPaused(false);
@@ -836,7 +836,7 @@ public:
me->SetTarget();
SetEscortPaused(false);
eventInRun = false;
- ScheduleNextEvent(currentEvent, 1000);
+ ScheduleNextEvent(currentEvent, 1s);
break;
// After waypoint 9
case EVENT_ACTION_PHASE2+1:
@@ -848,23 +848,23 @@ public:
cityman->GetMotionMaster()->MovePoint(0, EventPos[EVENT_DST_CITYMAN]);
}
- ScheduleNextEvent(currentEvent, 9000);
+ ScheduleNextEvent(currentEvent, 9s);
break;
case EVENT_ACTION_PHASE2+2:
Talk(SAY_PHASE203);
SetEscortPaused(false);
eventInRun = false;
- ScheduleNextEvent(currentEvent, 1500);
+ ScheduleNextEvent(currentEvent, 1500ms);
break;
// After waypoint 11
case EVENT_ACTION_PHASE2+3:
if (Creature* stalker = me->SummonCreature(NPC_INVIS_TARGET, 2081.447f, 1287.770f, 141.3241f, 1.37f, TEMPSUMMON_TIMED_DESPAWN, 10000))
{
me->SetFacingToObject(stalker);
- stalker->DespawnOrUnsummon(500);
+ stalker->DespawnOrUnsummon(500ms);
}
Talk(SAY_PHASE205);
- ScheduleNextEvent(currentEvent, 4000);
+ ScheduleNextEvent(currentEvent, 4s);
break;
case EVENT_ACTION_PHASE2+4:
if (Creature* malganis = me->SummonCreature(NPC_MAL_GANIS, EventPos[EVENT_SRC_MALGANIS], TEMPSUMMON_TIMED_DESPAWN, 60000))
@@ -889,13 +889,13 @@ public:
unitList.clear();
}
- ScheduleNextEvent(currentEvent, 12000);
+ ScheduleNextEvent(currentEvent, 12s);
break;
case EVENT_ACTION_PHASE2+5:
if (Creature* malganis = GetEventNpc(NPC_MAL_GANIS))
malganis->AI()->Talk(SAY_PHASE207);
- ScheduleNextEvent(currentEvent, 15000);
+ ScheduleNextEvent(currentEvent, 15s);
break;
case EVENT_ACTION_PHASE2+6:
if (Creature* malganis = GetEventNpc(NPC_MAL_GANIS))
@@ -906,7 +906,7 @@ public:
}
Talk(SAY_PHASE208);
- ScheduleNextEvent(currentEvent, 11000);
+ ScheduleNextEvent(currentEvent, 11s);
break;
case EVENT_ACTION_PHASE2+7:
summons.DespawnEntry(NPC_MAL_GANIS);
@@ -914,7 +914,7 @@ public:
summons.DespawnEntry(NPC_CITY_MAN2);
Talk(SAY_PHASE209);
me->SetReactState(REACT_DEFENSIVE);
- ScheduleNextEvent(currentEvent, 20000);
+ ScheduleNextEvent(currentEvent, 20s);
if (pInstance)
pInstance->SetData(DATA_ARTHAS_EVENT, COS_PROGRESS_FINISHED_CITY_INTRO);
break;
@@ -941,36 +941,36 @@ public:
cr->SetTarget(me->GetGUID());
if (Creature* cr = GetEventNpc(NPC_CITY_MAN))
cr->SetTarget(me->GetGUID());
- ScheduleNextEvent(currentEvent, 1000);
+ ScheduleNextEvent(currentEvent, 1s);
break;
case EVENT_ACTION_PHASE3+1:
me->SetReactState(REACT_AGGRESSIVE);
if (Creature* cr = GetEventNpc(NPC_CITY_MAN3))
cr->AI()->Talk(SAY_PHASE302);
- ScheduleNextEvent(currentEvent, 7000);
+ ScheduleNextEvent(currentEvent, 7s);
break;
case EVENT_ACTION_PHASE3+2:
Talk(SAY_PHASE303);
SetEscortPaused(false);
eventInRun = false;
- ScheduleNextEvent(currentEvent, 0);
+ ScheduleNextEvent(currentEvent, 0ms);
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, 2000);
+ ScheduleNextEvent(currentEvent, 2s);
break;
case EVENT_ACTION_PHASE3+4:
Talk(SAY_PHASE304);
- ScheduleNextEvent(currentEvent, 2000);
+ ScheduleNextEvent(currentEvent, 2s);
break;
case EVENT_ACTION_PHASE3+5:
if (Creature* cr = GetEventNpc(NPC_CITY_MAN3))
cr->AI()->Talk(SAY_PHASE305);
- ScheduleNextEvent(currentEvent, 1000);
+ ScheduleNextEvent(currentEvent, 1s);
break;
// Trio citizen transformation right as we enter Town Hall
case EVENT_ACTION_PHASE3+6:
@@ -981,7 +981,7 @@ public:
cr->SetImmuneToAll(true);
cr->SetReactState(REACT_PASSIVE);
}
- ScheduleNextEvent(currentEvent, 2000);
+ ScheduleNextEvent(currentEvent, 2s);
break;
case EVENT_ACTION_PHASE3+7:
if (Creature* cr = GetEventNpc(NPC_CITY_MAN4))
@@ -991,7 +991,7 @@ public:
cr->SetImmuneToAll(true);
cr->SetReactState(REACT_PASSIVE);
}
- ScheduleNextEvent(currentEvent, 2000);
+ ScheduleNextEvent(currentEvent, 2s);
break;
case EVENT_ACTION_PHASE3+8:
if (Creature* cr = GetEventNpc(NPC_CITY_MAN3))
@@ -1016,35 +1016,35 @@ public:
cr->SetInCombatWithZone();
cr->AddThreat(me, 0.0f);
}
- ScheduleNextEvent(currentEvent, 2000);
+ ScheduleNextEvent(currentEvent, 2s);
break;
case EVENT_ACTION_PHASE3+9:
// Arthas is fighting infinites in town hall
if (me->IsInCombat())
{
- actionEvents.RepeatEvent(1000);
+ actionEvents.Repeat(1s);
return;
}
summons.DespawnAll();
Talk(SAY_PHASE305_1);
me->SetFacingTo(0.0f);
- ScheduleNextEvent(currentEvent, 5000);
+ ScheduleNextEvent(currentEvent, 5s);
break;
case EVENT_ACTION_PHASE3+10:
Talk(SAY_PHASE306);
- ScheduleNextEvent(currentEvent, 5000);
+ ScheduleNextEvent(currentEvent, 5s);
break;
case EVENT_ACTION_PHASE3+11:
SetEscortPaused(false);
eventInRun = false;
- ScheduleNextEvent(currentEvent, 1000);
+ ScheduleNextEvent(currentEvent, 1s);
break;
case EVENT_ACTION_PHASE3+12:
// Arthas is fighting first chronos
if (me->IsInCombat())
{
- actionEvents.RepeatEvent(1000);
+ actionEvents.Repeat(1s);
return;
}
@@ -1052,13 +1052,13 @@ public:
SetEscortPaused(false);
Talk(SAY_PHASE308);
me->SetFacingTo(M_PI);
- ScheduleNextEvent(currentEvent, 0);
+ ScheduleNextEvent(currentEvent, 0ms);
break;
case EVENT_ACTION_PHASE3+13:
// Arthas is fighting second chronos
if (me->IsInCombat())
{
- actionEvents.RepeatEvent(1000);
+ actionEvents.Repeat(1s);
return;
}
@@ -1066,18 +1066,18 @@ public:
SetEscortPaused(false);
Talk(SAY_PHASE311);
me->SetFacingTo(M_PI * 3 / 2);
- ScheduleNextEvent(currentEvent, 0);
+ ScheduleNextEvent(currentEvent, 0ms);
break;
case EVENT_ACTION_PHASE3+14:
// Arthas is fighting third chronos
if (me->IsInCombat())
{
- actionEvents.RepeatEvent(1000);
+ actionEvents.Repeat(1s);
return;
}
me->SetFacingTo(M_PI / 2);
- ScheduleNextEvent(currentEvent, 8000);
+ ScheduleNextEvent(currentEvent, 8s);
break;
case EVENT_ACTION_PHASE3+15:
Talk(SAY_PHASE313);
@@ -1090,17 +1090,17 @@ public:
cr->GetMotionMaster()->MovePoint(0, EventPos[EVENT_DST_EPOCH]);
}
- ScheduleNextEvent(currentEvent, 3000);
+ ScheduleNextEvent(currentEvent, 3s);
break;
case EVENT_ACTION_PHASE3+16:
if (Creature* cr = GetEventNpc(NPC_EPOCH))
cr->AI()->Talk(SAY_PHASE314);
- ScheduleNextEvent(currentEvent, 14000);
+ ScheduleNextEvent(currentEvent, 14s);
break;
case EVENT_ACTION_PHASE3+17:
Talk(SAY_PHASE315);
- ScheduleNextEvent(currentEvent, 7000);
+ ScheduleNextEvent(currentEvent, 7s);
break;
case EVENT_ACTION_PHASE3+18:
if (Creature* cr = GetEventNpc(NPC_EPOCH))
@@ -1111,13 +1111,13 @@ public:
cr->AddThreat(me, 0.0f);
cr->SetInCombatWithZone();
}
- ScheduleNextEvent(currentEvent, 1000);
+ ScheduleNextEvent(currentEvent, 1s);
break;
case EVENT_ACTION_PHASE3+19:
// Arthas is fighting epoch chronos
if (me->IsInCombat())
{
- actionEvents.RepeatEvent(1000);
+ actionEvents.Repeat(1s);
return;
}
@@ -1143,7 +1143,7 @@ public:
Talk(SAY_PHASE503);
SetEscortPaused(false);
eventInRun = false;
- ScheduleNextEvent(currentEvent, 5000);
+ ScheduleNextEvent(currentEvent, 5s);
break;
case EVENT_ACTION_PHASE5+2:
me->SetFacingTo(5.28f);
@@ -1154,18 +1154,9 @@ public:
if (GameObject* go = pInstance->instance->GetGameObject(pInstance->GetGuidData(DATA_EXIT_GATE)))
go->SetGoState(GO_STATE_ACTIVE);
- if (!me->GetMap()->GetPlayers().IsEmpty())
- {
- if (Player* player = me->GetMap()->GetPlayers().getFirst()->GetSource())
- {
- if (GameObject* chest = player->SummonGameObject(DUNGEON_MODE(GO_MALGANIS_CHEST_N, GO_MALGANIS_CHEST_H), 2288.35f, 1498.73f, 128.414f, -0.994837f, 0, 0, 0, 0, 0))
- {
- chest->SetLootRecipient(me->GetMap());
- }
- }
- }
+ pInstance->instance->SummonGameObject(DUNGEON_MODE(GO_MALGANIS_CHEST_N, GO_MALGANIS_CHEST_H), 2288.35f, 1498.73f, 128.414f, -0.994837f, 0, 0, 0, 0, 7 * DAY * IN_MILLISECONDS);
}
- ScheduleNextEvent(currentEvent, 10000);
+ ScheduleNextEvent(currentEvent, 10s);
break;
case EVENT_ACTION_PHASE5+3:
eventInRun = false;
@@ -1186,15 +1177,15 @@ public:
{
case EVENT_COMBAT_EXORCISM:
if (Unit* target = SelectTarget(SelectTargetMethod::Random, 0))
- me->CastSpell(target, DUNGEON_MODE(SPELL_ARTHAS_EXORCISM_N, SPELL_ARTHAS_EXORCISM_H), false);
+ me->CastSpell(target, SPELL_ARTHAS_EXORCISM, false);
- combatEvents.RepeatEvent(7300);
+ combatEvents.Repeat(7300ms);
break;
case EVENT_COMBAT_HEALTH_CHECK:
if (HealthBelowPct(40))
me->CastSpell(me, SPELL_ARTHAS_HOLY_LIGHT, false);
- combatEvents.RepeatEvent(1000);
+ combatEvents.Repeat(1s);
break;
}
@@ -1219,7 +1210,7 @@ Creature* npc_arthas::npc_arthasAI::GetEventNpc(uint32 entry)
return nullptr;
}
-void npc_arthas::npc_arthasAI::ScheduleNextEvent(uint32 currentEvent, uint32 time)
+void npc_arthas::npc_arthasAI::ScheduleNextEvent(uint32 currentEvent, Milliseconds time)
{
actionEvents.ScheduleEvent(currentEvent + 1, time);
}
@@ -1245,13 +1236,14 @@ void npc_arthas::npc_arthasAI::JustEngagedWith(Unit* /*who*/)
DoCast(me, SPELL_ARTHAS_AURA);
// Fight
- combatEvents.ScheduleEvent(EVENT_COMBAT_EXORCISM, 2000);
- combatEvents.ScheduleEvent(EVENT_COMBAT_HEALTH_CHECK, 2000);
+ combatEvents.ScheduleEvent(EVENT_COMBAT_EXORCISM, 2s);
+ combatEvents.ScheduleEvent(EVENT_COMBAT_HEALTH_CHECK, 2s);
}
void npc_arthas::npc_arthasAI::ReorderInstance(uint32 data)
{
- Start(true, true);
+ me->SetWalk(false);
+ Start(true);
SetEscortPaused(true);
SetDespawnAtEnd(false);
@@ -1270,7 +1262,7 @@ void npc_arthas::npc_arthasAI::ReorderInstance(uint32 data)
if (data == COS_PROGRESS_FINISHED_CITY_INTRO)
{
eventInRun = true;
- actionEvents.RescheduleEvent(EVENT_ACTION_PHASE2 + 8, 10000);
+ actionEvents.RescheduleEvent(EVENT_ACTION_PHASE2 + 8, 10s);
}
else if (data == COS_PROGRESS_KILLED_MEATHOOK)
{
@@ -1352,7 +1344,7 @@ void npc_arthas::npc_arthasAI::SpawnTimeRift()
if (Creature* cr = me->SummonCreature(/*entry*/(uint32)RiftAndSpawnsLocations[timeRiftId][i][0], RiftAndSpawnsLocations[timeRiftId][0][1], RiftAndSpawnsLocations[timeRiftId][0][2], RiftAndSpawnsLocations[timeRiftId][0][3], RiftAndSpawnsLocations[timeRiftId][0][4]))
{
if (cr->GetEntry() == NPC_TIME_RIFT)
- cr->DespawnOrUnsummon(10000);
+ cr->DespawnOrUnsummon(10s);
else // x, y, z (0 is entry)
{
// first infinite
@@ -1547,7 +1539,7 @@ public:
if (me->GetDistance(2400, 1200, 135) > 20.0f && data >= COS_PROGRESS_FINISHED_CITY_INTRO)
{
if (data >= COS_PROGRESS_KILLED_SALRAMM)
- me->DespawnOrUnsummon(500);
+ me->DespawnOrUnsummon(500ms);
else
InfectMe(3000);
}
diff --git a/src/server/scripts/Kalimdor/CavernsOfTime/CullingOfStratholme/culling_of_stratholme.h b/src/server/scripts/Kalimdor/CavernsOfTime/CullingOfStratholme/culling_of_stratholme.h
index cbf8b8b132..f2ce17a6dd 100644
--- a/src/server/scripts/Kalimdor/CavernsOfTime/CullingOfStratholme/culling_of_stratholme.h
+++ b/src/server/scripts/Kalimdor/CavernsOfTime/CullingOfStratholme/culling_of_stratholme.h
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/scripts/Kalimdor/CavernsOfTime/CullingOfStratholme/instance_culling_of_stratholme.cpp b/src/server/scripts/Kalimdor/CavernsOfTime/CullingOfStratholme/instance_culling_of_stratholme.cpp
index 961ec2c7b9..5870ed23f6 100644
--- a/src/server/scripts/Kalimdor/CavernsOfTime/CullingOfStratholme/instance_culling_of_stratholme.cpp
+++ b/src/server/scripts/Kalimdor/CavernsOfTime/CullingOfStratholme/instance_culling_of_stratholme.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
@@ -307,7 +307,7 @@ public:
if (Creature* cr = instance->SummonCreature(NPC_CHROMIE_MIDDLE, pos))
{
cr->SetVisible(false);
- cr->DespawnOrUnsummon(1000);
+ cr->DespawnOrUnsummon(1s);
sCreatureTextMgr->SendChat(cr, textId, player, CHAT_MSG_ADDON, LANG_ADDON, TEXT_RANGE_MAP);
}
}
diff --git a/src/server/scripts/Kalimdor/CavernsOfTime/EscapeFromDurnholdeKeep/boss_captain_skarloc.cpp b/src/server/scripts/Kalimdor/CavernsOfTime/EscapeFromDurnholdeKeep/boss_captain_skarloc.cpp
index 5eb5eeb084..c75f00b1ff 100644
--- a/src/server/scripts/Kalimdor/CavernsOfTime/EscapeFromDurnholdeKeep/boss_captain_skarloc.cpp
+++ b/src/server/scripts/Kalimdor/CavernsOfTime/EscapeFromDurnholdeKeep/boss_captain_skarloc.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/scripts/Kalimdor/CavernsOfTime/EscapeFromDurnholdeKeep/boss_epoch_hunter.cpp b/src/server/scripts/Kalimdor/CavernsOfTime/EscapeFromDurnholdeKeep/boss_epoch_hunter.cpp
index a47a8b90f3..a51871d447 100644
--- a/src/server/scripts/Kalimdor/CavernsOfTime/EscapeFromDurnholdeKeep/boss_epoch_hunter.cpp
+++ b/src/server/scripts/Kalimdor/CavernsOfTime/EscapeFromDurnholdeKeep/boss_epoch_hunter.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/scripts/Kalimdor/CavernsOfTime/EscapeFromDurnholdeKeep/boss_lieutenant_drake.cpp b/src/server/scripts/Kalimdor/CavernsOfTime/EscapeFromDurnholdeKeep/boss_lieutenant_drake.cpp
index 16ad3de36f..036d06a707 100644
--- a/src/server/scripts/Kalimdor/CavernsOfTime/EscapeFromDurnholdeKeep/boss_lieutenant_drake.cpp
+++ b/src/server/scripts/Kalimdor/CavernsOfTime/EscapeFromDurnholdeKeep/boss_lieutenant_drake.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
@@ -48,7 +48,7 @@ struct boss_lieutenant_drake : public BossAI
{
runSecondPath = false;
pathId = me->GetEntry() * 10;
- me->GetMotionMaster()->MovePath(pathId, false);
+ me->GetMotionMaster()->MoveWaypoint(pathId, false);
}
void JustEngagedWith(Unit* /*who*/) override
@@ -114,10 +114,10 @@ struct boss_lieutenant_drake : public BossAI
{
switch (point)
{
- case 7:
+ case 8:
Talk(SAY_ENTER);
break;
- case 10:
+ case 11:
pathId = (me->GetEntry() * 10) + 1;
runSecondPath = true;
break;
@@ -132,7 +132,7 @@ struct boss_lieutenant_drake : public BossAI
if (runSecondPath)
{
runSecondPath = false;
- me->GetMotionMaster()->MovePath(pathId, true);
+ me->GetMotionMaster()->MoveWaypoint(pathId, true);
}
if (!UpdateVictim())
diff --git a/src/server/scripts/Kalimdor/CavernsOfTime/EscapeFromDurnholdeKeep/instance_old_hillsbrad.cpp b/src/server/scripts/Kalimdor/CavernsOfTime/EscapeFromDurnholdeKeep/instance_old_hillsbrad.cpp
index 6cb2b46da7..4283715a5a 100644
--- a/src/server/scripts/Kalimdor/CavernsOfTime/EscapeFromDurnholdeKeep/instance_old_hillsbrad.cpp
+++ b/src/server/scripts/Kalimdor/CavernsOfTime/EscapeFromDurnholdeKeep/instance_old_hillsbrad.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
@@ -79,11 +79,11 @@ public:
if (_encounterProgress == ENCOUNTER_PROGRESS_NONE)
return;
- _events.ScheduleEvent(EVENT_INITIAL_BARRELS_FLAME, 0);
- _events.ScheduleEvent(EVENT_FINAL_BARRELS_FLAME, 0);
+ _events.ScheduleEvent(EVENT_INITIAL_BARRELS_FLAME, 0ms);
+ _events.ScheduleEvent(EVENT_FINAL_BARRELS_FLAME, 0ms);
if (_encounterProgress == ENCOUNTER_PROGRESS_BARRELS)
- _events.ScheduleEvent(EVENT_SUMMON_LIEUTENANT, 0);
+ _events.ScheduleEvent(EVENT_SUMMON_LIEUTENANT, 0ms);
else
SetData(DATA_THRALL_REPOSITION, 2);
}
@@ -138,7 +138,7 @@ public:
{
case DATA_THRALL_REPOSITION:
if (data > 1)
- _events.ScheduleEvent(EVENT_THRALL_REPOSITION, data == 2 ? 0 : 10000);
+ _events.ScheduleEvent(EVENT_THRALL_REPOSITION, data == 2 ? 0ms : 10s);
else if (Creature* thrall = instance->GetCreature(_thrallGUID))
Reposition(thrall);
return;
@@ -157,9 +157,9 @@ public:
DoUpdateWorldState(WORLD_STATE_OLD_HILLSBRAD_BARRELS_PLANTED, ++_barrelCount);
if (_barrelCount == 5)
{
- _events.ScheduleEvent(EVENT_INITIAL_BARRELS_FLAME, 4000);
- _events.ScheduleEvent(EVENT_FINAL_BARRELS_FLAME, 12000);
- _events.ScheduleEvent(EVENT_SUMMON_LIEUTENANT, 18000);
+ _events.ScheduleEvent(EVENT_INITIAL_BARRELS_FLAME, 4s);
+ _events.ScheduleEvent(EVENT_FINAL_BARRELS_FLAME, 12s);
+ _events.ScheduleEvent(EVENT_SUMMON_LIEUTENANT, 18s);
}
break;
}
diff --git a/src/server/scripts/Kalimdor/CavernsOfTime/EscapeFromDurnholdeKeep/old_hillsbrad.cpp b/src/server/scripts/Kalimdor/CavernsOfTime/EscapeFromDurnholdeKeep/old_hillsbrad.cpp
index 8745dc128c..fc54b62158 100644
--- a/src/server/scripts/Kalimdor/CavernsOfTime/EscapeFromDurnholdeKeep/old_hillsbrad.cpp
+++ b/src/server/scripts/Kalimdor/CavernsOfTime/EscapeFromDurnholdeKeep/old_hillsbrad.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
@@ -258,8 +258,8 @@ public:
switch (param)
{
case ENCOUNTER_PROGRESS_BARRELS:
- events.ScheduleEvent(EVENT_OPEN_DOORS, 0);
- events.ScheduleEvent(EVENT_START_WP, 3000);
+ events.ScheduleEvent(EVENT_OPEN_DOORS, 0ms);
+ events.ScheduleEvent(EVENT_START_WP, 3s);
break;
case ENCOUNTER_PROGRESS_THRALL_ARMORED:
case ENCOUNTER_PROGRESS_AMBUSHES_1:
@@ -268,27 +268,27 @@ public:
SetEscortPaused(false);
break;
case ENCOUNTER_PROGRESS_TARETHA_MEET:
- events.ScheduleEvent(EVENT_SUMMON_CHRONO, 0);
- events.ScheduleEvent(EVENT_THRALL_TALK_2, 6000);
- events.ScheduleEvent(EVENT_TARETHA_FALL, 11000);
- events.ScheduleEvent(EVENT_THRALL_TALK_3, 15000);
- events.ScheduleEvent(EVENT_THRALL_MOVE_DOWN, 17000);
+ events.ScheduleEvent(EVENT_SUMMON_CHRONO, 0ms);
+ events.ScheduleEvent(EVENT_THRALL_TALK_2, 6s);
+ events.ScheduleEvent(EVENT_TARETHA_FALL, 11s);
+ events.ScheduleEvent(EVENT_THRALL_TALK_3, 15s);
+ events.ScheduleEvent(EVENT_THRALL_MOVE_DOWN, 17s);
break;
case NPC_TARETHA:
- events.ScheduleEvent(EVENT_THRALL_FACE_TARETHA, 0);
- events.ScheduleEvent(EVENT_THRALL_TALK_4, 4000);
- events.ScheduleEvent(EVENT_TARETHA_TALK_1, 13000);
- events.ScheduleEvent(EVENT_THRALL_TALK_5, 17000);
- events.ScheduleEvent(EVENT_SUMMON_EROZION, 17500);
- events.ScheduleEvent(EVENT_EROZION_TALK_1, 18000);
- events.ScheduleEvent(EVENT_EROZION_ACTION_1, 24000);
- events.ScheduleEvent(EVENT_EROZION_TALK_2, 29000);
- events.ScheduleEvent(EVENT_EROZION_TALK_3, 40000);
- events.ScheduleEvent(EVENT_EROZION_ACTION_2, 46000);
- events.ScheduleEvent(EVENT_THRALL_TALK_6, 48000);
- events.ScheduleEvent(EVENT_THRALL_RUN_AWAY, 51000);
- events.ScheduleEvent(EVENT_TARETHA_TALK_2, 53000);
- events.ScheduleEvent(EVENT_EROZION_FLAGS, 56000);
+ events.ScheduleEvent(EVENT_THRALL_FACE_TARETHA, 0ms);
+ events.ScheduleEvent(EVENT_THRALL_TALK_4, 4s);
+ events.ScheduleEvent(EVENT_TARETHA_TALK_1, 13s);
+ events.ScheduleEvent(EVENT_THRALL_TALK_5, 17s);
+ events.ScheduleEvent(EVENT_SUMMON_EROZION, 17500ms);
+ events.ScheduleEvent(EVENT_EROZION_TALK_1, 18s);
+ events.ScheduleEvent(EVENT_EROZION_ACTION_1, 24s);
+ events.ScheduleEvent(EVENT_EROZION_TALK_2, 29s);
+ events.ScheduleEvent(EVENT_EROZION_TALK_3, 40s);
+ events.ScheduleEvent(EVENT_EROZION_ACTION_2, 46s);
+ events.ScheduleEvent(EVENT_THRALL_TALK_6, 48s);
+ events.ScheduleEvent(EVENT_THRALL_RUN_AWAY, 51s);
+ events.ScheduleEvent(EVENT_TARETHA_TALK_2, 53s);
+ events.ScheduleEvent(EVENT_EROZION_FLAGS, 56s);
break;
}
}
@@ -311,23 +311,23 @@ public:
Talk(SAY_START_EVENT_PART1);
break;
case 8:
- events.ScheduleEvent(EVENT_SET_FACING, 500);
- events.ScheduleEvent(EVENT_ARMORER_SAY, 700);
- events.ScheduleEvent(EVENT_THRALL_EMOTE, 1300);
+ events.ScheduleEvent(EVENT_SET_FACING, 500ms);
+ events.ScheduleEvent(EVENT_ARMORER_SAY, 700ms);
+ events.ScheduleEvent(EVENT_THRALL_EMOTE, 1300ms);
break;
case 9:
- SetRun(false);
- events.ScheduleEvent(EVENT_KILL_ARMORER, 500);
- events.ScheduleEvent(EVENT_TALK_KILL_ARMORER, 3000);
+ me->SetWalk(true);
+ events.ScheduleEvent(EVENT_KILL_ARMORER, 500ms);
+ events.ScheduleEvent(EVENT_TALK_KILL_ARMORER, 3s);
break;
case 10:
- SetRun(true);
- events.ScheduleEvent(EVENT_DRESSING_KNEEL, 500);
- events.ScheduleEvent(EVENT_DRESSING_ARMOR, 3000);
- events.ScheduleEvent(EVENT_DRESSING_STAND, 4000);
- events.ScheduleEvent(EVENT_DRESSING_AXE, 7000);
- events.ScheduleEvent(EVENT_DRESSING_SHIELD, 9000);
- events.ScheduleEvent(EVENT_DRESSING_TALK, 12000);
+ me->SetWalk(false);
+ events.ScheduleEvent(EVENT_DRESSING_KNEEL, 500ms);
+ events.ScheduleEvent(EVENT_DRESSING_ARMOR, 3s);
+ events.ScheduleEvent(EVENT_DRESSING_STAND, 4s);
+ events.ScheduleEvent(EVENT_DRESSING_AXE, 7s);
+ events.ScheduleEvent(EVENT_DRESSING_SHIELD, 9s);
+ events.ScheduleEvent(EVENT_DRESSING_TALK, 12s);
break;
case 18:
if (Creature* warden = me->SummonCreature(NPC_DURNHOLDE_WARDEN, 2149.4634f, 104.97559f, 73.632385f, 1.9065f, TEMPSUMMON_CORPSE_TIMED_DESPAWN, 30 * IN_MILLISECONDS))
@@ -362,8 +362,8 @@ public:
Talk(SAY_SKARLOC_MEET);
break;
case 30:
- events.ScheduleEvent(EVENT_ENTER_MOUNT, 3000);
- events.ScheduleEvent(EVENT_TALK_START_RIDE, 7000);
+ events.ScheduleEvent(EVENT_ENTER_MOUNT, 3s);
+ events.ScheduleEvent(EVENT_TALK_START_RIDE, 7s);
break;
case 59:
instance->SetData(DATA_ESCORT_PROGRESS, ENCOUNTER_PROGRESS_TARREN_MILL);
@@ -374,7 +374,7 @@ public:
}
UnMountSelf();
_mounted = false;
- SetRun(false);
+ me->SetWalk(true);
me->SetFacingTo(6.0388f);
break;
case 60:
@@ -382,32 +382,32 @@ public:
if (Creature* horse = me->FindNearestCreature(NPC_SKARLOC_MOUNT, 10.0f))
{
horse->GetMotionMaster()->MovePoint(0, 2501.15f, 572.14f, 54.13f);
- horse->DespawnOrUnsummon(30 * IN_MILLISECONDS);
+ horse->DespawnOrUnsummon(30s);
}
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, 1200);
- events.ScheduleEvent(EVENT_MOVE_AROUND, 3500);
- events.ScheduleEvent(EVENT_LOOK_2, 5000);
- events.ScheduleEvent(EVENT_SUMMON_GUARDS, 5100);
- events.ScheduleEvent(EVENT_LOOK_3, 7000);
- events.ScheduleEvent(EVENT_SUMMON_TALK1, 12000);
- events.ScheduleEvent(EVENT_LOOK_4, 17000);
- events.ScheduleEvent(EVENT_SUMMON_TALK2, 19000);
- events.ScheduleEvent(EVENT_GUARDS_MOVING, 21000);
+ events.ScheduleEvent(EVENT_LOOK_1, 1200ms);
+ events.ScheduleEvent(EVENT_MOVE_AROUND, 3500ms);
+ events.ScheduleEvent(EVENT_LOOK_2, 5s);
+ events.ScheduleEvent(EVENT_SUMMON_GUARDS, 5100ms);
+ events.ScheduleEvent(EVENT_LOOK_3, 7s);
+ events.ScheduleEvent(EVENT_SUMMON_TALK1, 12s);
+ events.ScheduleEvent(EVENT_LOOK_4, 17s);
+ events.ScheduleEvent(EVENT_SUMMON_TALK2, 19s);
+ events.ScheduleEvent(EVENT_GUARDS_MOVING, 21s);
break;
case 82:
- events.ScheduleEvent(EVENT_LOOK_5, 500);
- events.ScheduleEvent(EVENT_SUMMON_GUARDS_2, 1000);
- events.ScheduleEvent(EVENT_SUMMON_TALK3, 1500);
+ events.ScheduleEvent(EVENT_LOOK_5, 500ms);
+ events.ScheduleEvent(EVENT_SUMMON_GUARDS_2, 1s);
+ events.ScheduleEvent(EVENT_SUMMON_TALK3, 1500ms);
break;
case 91:
me->SummonCreature(NPC_TM_PROTECTOR, 2652.71f, 660.31f, 61.93f, 1.67f, TEMPSUMMON_MANUAL_DESPAWN);
@@ -418,26 +418,26 @@ 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)))
{
Taretha->HandleEmoteCommand(EMOTE_ONESHOT_CHEER);
Taretha->AI()->Talk(SAY_TARETHA_ESCAPED);
}
- events.ScheduleEvent(EVENT_THRALL_TALK, 4000);
+ events.ScheduleEvent(EVENT_THRALL_TALK, 4s);
break;
case 101:
SetEscortPaused(true);
- events.ScheduleEvent(EVENT_EPOCH_INTRO, 500);
- events.ScheduleEvent(EVENT_SUMMON_INFINITES, 1500);
- events.ScheduleEvent(EVENT_TRANSFORM, 8000);
- events.ScheduleEvent(EVENT_START_WAVE_1, 25000);
+ events.ScheduleEvent(EVENT_EPOCH_INTRO, 500ms);
+ events.ScheduleEvent(EVENT_SUMMON_INFINITES, 1500ms);
+ events.ScheduleEvent(EVENT_TRANSFORM, 8s);
+ events.ScheduleEvent(EVENT_START_WAVE_1, 25s);
break;
case 103:
instance->SetData(DATA_ESCORT_PROGRESS, ENCOUNTER_PROGRESS_FINISHED);
@@ -473,9 +473,9 @@ public:
void JustEngagedWith(Unit*) override
{
combatEvents.Reset();
- combatEvents.ScheduleEvent(EVENT_CHECK_HEALTH, 500);
- combatEvents.ScheduleEvent(EVENT_SPELL_SHIELD_BLOCK, 8000);
- combatEvents.ScheduleEvent(EVENT_SPELL_STRIKE, 2000);
+ combatEvents.ScheduleEvent(EVENT_CHECK_HEALTH, 500ms);
+ combatEvents.ScheduleEvent(EVENT_SPELL_SHIELD_BLOCK, 8s);
+ combatEvents.ScheduleEvent(EVENT_SPELL_STRIKE, 2s);
if (roll_chance_i(50))
Talk(SAY_RANDOM_AGGRO);
@@ -566,7 +566,8 @@ public:
me->SummonCreature(NPC_DURNHOLDE_MAGE, 2108.4856f, 189.93457f, 66.30494f, 2.6878f, TEMPSUMMON_CORPSE_TIMED_DESPAWN, 30 * IN_MILLISECONDS);
break;
case EVENT_START_WP:
- Start(true, true);
+ me->SetWalk(false);
+ Start(true);
SetDespawnAtEnd(false);
break;
case EVENT_SET_FACING:
@@ -663,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))
@@ -766,7 +767,7 @@ public:
summons.DoAction(ACTION_SET_IMMUNE_FLAG);
break;
case EVENT_START_WAVE_1:
- events.ScheduleEvent(EVENT_CHECK_WAVE_1, 500);
+ events.ScheduleEvent(EVENT_CHECK_WAVE_1, 500ms);
summons.DoAction(ACTION_REMOVE_IMMUNE_FLAG);
summons.DoAction(ACTION_START_COMBAT);
break;
@@ -777,10 +778,10 @@ public:
me->SummonCreature(NPC_INFINITE_SLAYER, 2599.57f, 677.0f, 55.975f, 0.05f, TEMPSUMMON_MANUAL_DESPAWN);
me->SummonCreature(NPC_INFINITE_DEFILER, 2592.57f, 680.0f, 55.975f, 0.05f, TEMPSUMMON_MANUAL_DESPAWN);
summons.DoAction(ACTION_START_COMBAT);
- events.ScheduleEvent(EVENT_CHECK_WAVE_2, 500);
+ events.ScheduleEvent(EVENT_CHECK_WAVE_2, 500ms);
break;
}
- events.ScheduleEvent(EVENT_CHECK_WAVE_1, 500);
+ events.ScheduleEvent(EVENT_CHECK_WAVE_1, 500ms);
break;
case EVENT_CHECK_WAVE_2:
if (summons.size() == 1)
@@ -790,26 +791,26 @@ public:
me->SummonCreature(NPC_INFINITE_SABOTEUR, 2638.62f, 705.43f, 55.965f, 4.46f, TEMPSUMMON_MANUAL_DESPAWN);
me->SummonCreature(NPC_INFINITE_DEFILER, 2642.62f, 705.43f, 55.965f, 4.46f, TEMPSUMMON_MANUAL_DESPAWN);
summons.DoAction(ACTION_START_COMBAT);
- events.ScheduleEvent(EVENT_CHECK_WAVE_3, 500);
+ events.ScheduleEvent(EVENT_CHECK_WAVE_3, 500ms);
break;
}
- events.ScheduleEvent(EVENT_CHECK_WAVE_2, 500);
+ events.ScheduleEvent(EVENT_CHECK_WAVE_2, 500ms);
break;
case EVENT_CHECK_WAVE_3:
if (summons.size() == 1)
{
me->SetHomePosition(2634.79f, 672.964f, 54.8577f, 1.33f);
me->GetMotionMaster()->MoveTargetedHome();
- events.ScheduleEvent(EVENT_CALL_EPOCH, 8000);
+ events.ScheduleEvent(EVENT_CALL_EPOCH, 8s);
break;
}
- events.ScheduleEvent(EVENT_CHECK_WAVE_3, 500);
+ events.ScheduleEvent(EVENT_CHECK_WAVE_3, 500ms);
break;
case EVENT_CALL_EPOCH:
if (Creature* epoch = summons.GetCreatureWithEntry(NPC_EPOCH_HUNTER))
{
epoch->SetImmuneToAll(false);
- epoch->GetMotionMaster()->MovePoint(0, *me, false, true);
+ epoch->GetMotionMaster()->MovePoint(0, *me, FORCED_MOVEMENT_NONE, 0.f, false, true);
}
break;
case EVENT_THRALL_FACE_TARETHA:
@@ -905,15 +906,15 @@ public:
Talk(SAY_RANDOM_LOW_HP);
break;
}
- events.ScheduleEvent(EVENT_CHECK_HEALTH, 500);
+ events.ScheduleEvent(EVENT_CHECK_HEALTH, 500ms);
break;
case EVENT_SPELL_STRIKE:
me->CastSpell(me->GetVictim(), SPELL_STRIKE, false);
- events.ScheduleEvent(EVENT_SPELL_STRIKE, 6000);
+ events.ScheduleEvent(EVENT_SPELL_STRIKE, 6s);
break;
case EVENT_SPELL_SHIELD_BLOCK:
me->CastSpell(me, SPELL_SHIELD_BLOCK, false);
- events.ScheduleEvent(EVENT_SPELL_SHIELD_BLOCK, 6000);
+ events.ScheduleEvent(EVENT_SPELL_SHIELD_BLOCK, 6s);
break;
}
@@ -922,7 +923,8 @@ public:
void ReorderInstance(uint32 data)
{
- Start(true, true);
+ me->SetWalk(false);
+ Start(true);
SetEscortPaused(true);
SetDespawnAtEnd(false);
@@ -1008,14 +1010,15 @@ public:
{
me->SetStandState(UNIT_STAND_STATE_STAND);
me->RemoveAllAuras();
- Start(false, true);
+ me->SetWalk(false);
+ Start(false);
}
void WaypointReached(uint32 waypointId) override
{
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/CavernsOfTime/EscapeFromDurnholdeKeep/old_hillsbrad.h b/src/server/scripts/Kalimdor/CavernsOfTime/EscapeFromDurnholdeKeep/old_hillsbrad.h
index ce3de8590e..dad8721a5d 100644
--- a/src/server/scripts/Kalimdor/CavernsOfTime/EscapeFromDurnholdeKeep/old_hillsbrad.h
+++ b/src/server/scripts/Kalimdor/CavernsOfTime/EscapeFromDurnholdeKeep/old_hillsbrad.h
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/scripts/Kalimdor/CavernsOfTime/TheBlackMorass/boss_aeonus.cpp b/src/server/scripts/Kalimdor/CavernsOfTime/TheBlackMorass/boss_aeonus.cpp
index 5081432e50..aaaa579602 100644
--- a/src/server/scripts/Kalimdor/CavernsOfTime/TheBlackMorass/boss_aeonus.cpp
+++ b/src/server/scripts/Kalimdor/CavernsOfTime/TheBlackMorass/boss_aeonus.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/scripts/Kalimdor/CavernsOfTime/TheBlackMorass/boss_chrono_lord_deja.cpp b/src/server/scripts/Kalimdor/CavernsOfTime/TheBlackMorass/boss_chrono_lord_deja.cpp
index c835be08ef..b9a94dc3cc 100644
--- a/src/server/scripts/Kalimdor/CavernsOfTime/TheBlackMorass/boss_chrono_lord_deja.cpp
+++ b/src/server/scripts/Kalimdor/CavernsOfTime/TheBlackMorass/boss_chrono_lord_deja.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/scripts/Kalimdor/CavernsOfTime/TheBlackMorass/boss_temporus.cpp b/src/server/scripts/Kalimdor/CavernsOfTime/TheBlackMorass/boss_temporus.cpp
index 35b7f2654d..c94e8bf560 100644
--- a/src/server/scripts/Kalimdor/CavernsOfTime/TheBlackMorass/boss_temporus.cpp
+++ b/src/server/scripts/Kalimdor/CavernsOfTime/TheBlackMorass/boss_temporus.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/scripts/Kalimdor/CavernsOfTime/TheBlackMorass/instance_the_black_morass.cpp b/src/server/scripts/Kalimdor/CavernsOfTime/TheBlackMorass/instance_the_black_morass.cpp
index 21f51ca788..d413e444ff 100644
--- a/src/server/scripts/Kalimdor/CavernsOfTime/TheBlackMorass/instance_the_black_morass.cpp
+++ b/src/server/scripts/Kalimdor/CavernsOfTime/TheBlackMorass/instance_the_black_morass.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
@@ -143,7 +143,7 @@ public:
case NPC_INFINITE_EXECUTIONER_2:
case NPC_INFINITE_VANQUISHER:
case NPC_INFINITE_VANQUISHER_2:
- creature->DespawnOrUnsummon(1);
+ creature->DespawnOrUnsummon(1ms);
break;
default:
break;
diff --git a/src/server/scripts/Kalimdor/CavernsOfTime/TheBlackMorass/the_black_morass.cpp b/src/server/scripts/Kalimdor/CavernsOfTime/TheBlackMorass/the_black_morass.cpp
index f80ed1b288..e07e190b04 100644
--- a/src/server/scripts/Kalimdor/CavernsOfTime/TheBlackMorass/the_black_morass.cpp
+++ b/src/server/scripts/Kalimdor/CavernsOfTime/TheBlackMorass/the_black_morass.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
@@ -109,7 +109,7 @@ struct npc_medivh_bm : public ScriptedAI
{
if (summon->GetEntry() == NPC_DP_CRYSTAL_STALKER)
{
- summon->DespawnOrUnsummon(25000);
+ summon->DespawnOrUnsummon(25s);
summon->CastSpell(summon, RAND(SPELL_BANISH_PURPLE, SPELL_BANISH_GREEN), true);
summon->GetMotionMaster()->MoveSplinePath(&_airArray);
}
@@ -118,7 +118,7 @@ struct npc_medivh_bm : public ScriptedAI
summon->CastSpell(summon, SPELL_BLACK_CRYSTAL, true);
Movement::MoveSplineInit init(summon);
init.MovebyPath(_groundArray);
- init.SetCyclic();
+ init.SetCyclic(); // TODO: Add support for cyclic paths in motion master
init.Launch();
}
}
@@ -137,13 +137,13 @@ struct npc_medivh_bm : public ScriptedAI
me->CastSpell(me, SPELL_MEDIVH_CHANNEL, false);
- events.ScheduleEvent(EVENT_CHECK_HEALTH_75, 500);
- events.ScheduleEvent(EVENT_CHECK_HEALTH_50, 500);
- events.ScheduleEvent(EVENT_CHECK_HEALTH_25, 500);
- events.ScheduleEvent(EVENT_SUMMON_CRYSTAL, 2000);
- events.ScheduleEvent(EVENT_SUMMON_CRYSTAL, 4000);
- events.ScheduleEvent(EVENT_SUMMON_CRYSTAL, 6000);
- events.ScheduleEvent(EVENT_SUMMON_FLYING_CRYSTAL, 8000);
+ events.ScheduleEvent(EVENT_CHECK_HEALTH_75, 500ms);
+ events.ScheduleEvent(EVENT_CHECK_HEALTH_50, 500ms);
+ events.ScheduleEvent(EVENT_CHECK_HEALTH_25, 500ms);
+ events.ScheduleEvent(EVENT_SUMMON_CRYSTAL, 2s);
+ events.ScheduleEvent(EVENT_SUMMON_CRYSTAL, 4s);
+ events.ScheduleEvent(EVENT_SUMMON_CRYSTAL, 6s);
+ events.ScheduleEvent(EVENT_SUMMON_FLYING_CRYSTAL, 8s);
}
}
@@ -154,7 +154,7 @@ struct npc_medivh_bm : public ScriptedAI
if (param == ACTION_OUTRO)
{
events.Reset();
- events.ScheduleEvent(EVENT_OUTRO_1, 4000);
+ events.ScheduleEvent(EVENT_OUTRO_1, 4s);
me->InterruptNonMeleeSpells(true);
me->SummonGameObject(GO_DARK_PORTAL, -2086.0f, 7125.6215f, 30.5f, 6.148f, 0.0f, 0.0f, 0.0f, 0.0f, 0);
@@ -180,43 +180,43 @@ struct npc_medivh_bm : public ScriptedAI
Talk(eventId + 1);
break;
}
- events.ScheduleEvent(eventId, 500);
+ events.ScheduleEvent(eventId, 500ms);
break;
case EVENT_SUMMON_CRYSTAL:
me->SummonCreature(NPC_DP_EMITTER_STALKER, me->GetPositionX() + 8.0f, me->GetPositionY(), me->GetPositionZ());
break;
case EVENT_SUMMON_FLYING_CRYSTAL:
me->CastSpell(me, SPELL_PORTAL_CRYSTALS, true);
- events.ScheduleEvent(EVENT_SUMMON_FLYING_CRYSTAL, 1000);
+ events.ScheduleEvent(EVENT_SUMMON_FLYING_CRYSTAL, 1s);
break;
case EVENT_OUTRO_1:
me->SetFacingTo(6.21f);
Talk(SAY_MEDIVH_WIN);
- events.ScheduleEvent(EVENT_OUTRO_2, 17000);
+ events.ScheduleEvent(EVENT_OUTRO_2, 17s);
break;
case EVENT_OUTRO_2:
me->SetFacingTo(3.07f);
- events.ScheduleEvent(EVENT_OUTRO_3, 2000);
+ events.ScheduleEvent(EVENT_OUTRO_3, 2s);
break;
case EVENT_OUTRO_3:
- SummonOrcs(-2046.158f, -3.0f, 37000, 30000, true);
- events.ScheduleEvent(EVENT_OUTRO_4, 2000);
+ SummonOrcs(-2046.158f, -3.0f, 37s, 30s, true);
+ events.ScheduleEvent(EVENT_OUTRO_4, 2s);
break;
case EVENT_OUTRO_4:
- SummonOrcs(-2055.97f, -2.0f, 33000, 28000, false);
- events.ScheduleEvent(EVENT_OUTRO_5, 2000);
+ SummonOrcs(-2055.97f, -2.0f, 33s, 28s, false);
+ events.ScheduleEvent(EVENT_OUTRO_5, 2s);
break;
case EVENT_OUTRO_5:
- SummonOrcs(-2064.0f, -1.5f, 29000, 26000, false);
- events.ScheduleEvent(EVENT_OUTRO_6, 2000);
+ SummonOrcs(-2064.0f, -1.5f, 29s, 26s, false);
+ events.ScheduleEvent(EVENT_OUTRO_6, 2s);
break;
case EVENT_OUTRO_6:
- SummonOrcs(-2074.35f, -0.1f, 26000, 24000, false);
- events.ScheduleEvent(EVENT_OUTRO_7, 7000);
+ SummonOrcs(-2074.35f, -0.1f, 26s, 24s, false);
+ events.ScheduleEvent(EVENT_OUTRO_7, 7s);
break;
case EVENT_OUTRO_7:
Talk(SAY_MEDIVH_ORCS_ENTER);
- events.ScheduleEvent(EVENT_OUTRO_8, 7000);
+ events.ScheduleEvent(EVENT_OUTRO_8, 7s);
break;
case EVENT_OUTRO_8:
if (Creature* cr = me->FindNearestCreature(NPC_SHADOW_COUNCIL_ENFORCER, 20.0f))
@@ -228,15 +228,15 @@ struct npc_medivh_bm : public ScriptedAI
}
}
- void SummonOrcs(float x, float y, uint32 duration, uint32 homeTime, bool first)
+ void SummonOrcs(float x, float y, Milliseconds duration, Milliseconds homeTime, bool first)
{
for (uint8 i = 0; i < 6; ++i)
{
if (Creature* cr = me->SummonCreature(NPC_SHADOW_COUNCIL_ENFORCER, -2091.731f, 7133.083f - 3.0f * i, 34.589f, 0.0f))
{
cr->GetMotionMaster()->MovePoint(0, (first && i == 3) ? x + 2.0f : x, cr->GetPositionY() + y, cr->GetMapHeight(x, cr->GetPositionY() + y, cr->GetPositionZ(), true));
- cr->m_Events.AddEvent(new NpcRunToHome(*cr), cr->m_Events.CalculateTime(homeTime + urand(0, 2000)));
- cr->DespawnOrUnsummon(duration + urand(0, 2000));
+ cr->m_Events.AddEventAtOffset(new NpcRunToHome(*cr), homeTime + randtime(0ms, 2s));
+ cr->DespawnOrUnsummon(duration + randtime(0ms, 2s));
}
}
}
@@ -355,7 +355,7 @@ struct npc_time_rift : public NullCreatureAI
{
if (creature->GetGUID() == _riftKeeperGUID)
{
- me->DespawnOrUnsummon(0);
+ me->DespawnOrUnsummon(0ms);
}
}
@@ -368,7 +368,7 @@ struct npc_time_rift : public NullCreatureAI
if (!_instance->GetCreature(DATA_AEONUS))
{
DoSelectSummon();
- events.ScheduleEvent(EVENT_SUMMON_AT_RIFT, 15000);
+ events.ScheduleEvent(EVENT_SUMMON_AT_RIFT, 15s);
}
break;
case EVENT_SUMMON_BOSS:
diff --git a/src/server/scripts/Kalimdor/CavernsOfTime/TheBlackMorass/the_black_morass.h b/src/server/scripts/Kalimdor/CavernsOfTime/TheBlackMorass/the_black_morass.h
index e162b7f77e..e8f5ee2095 100644
--- a/src/server/scripts/Kalimdor/CavernsOfTime/TheBlackMorass/the_black_morass.h
+++ b/src/server/scripts/Kalimdor/CavernsOfTime/TheBlackMorass/the_black_morass.h
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/scripts/Kalimdor/DireMaul/boss_isalien.cpp b/src/server/scripts/Kalimdor/DireMaul/boss_isalien.cpp
index 94107fa06a..0471694416 100644
--- a/src/server/scripts/Kalimdor/DireMaul/boss_isalien.cpp
+++ b/src/server/scripts/Kalimdor/DireMaul/boss_isalien.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/scripts/Kalimdor/DireMaul/dire_maul.h b/src/server/scripts/Kalimdor/DireMaul/dire_maul.h
index ef958c22b4..bb020028f3 100644
--- a/src/server/scripts/Kalimdor/DireMaul/dire_maul.h
+++ b/src/server/scripts/Kalimdor/DireMaul/dire_maul.h
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/scripts/Kalimdor/DireMaul/instance_dire_maul.cpp b/src/server/scripts/Kalimdor/DireMaul/instance_dire_maul.cpp
index 398bc8764d..bc4b9cc916 100644
--- a/src/server/scripts/Kalimdor/DireMaul/instance_dire_maul.cpp
+++ b/src/server/scripts/Kalimdor/DireMaul/instance_dire_maul.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
@@ -58,7 +58,7 @@ public:
case NPC_HIGHBORNE_SUMMONER:
if (_pylonsState == ALL_PYLONS_OFF)
{
- creature->DespawnOrUnsummon(5000);
+ creature->DespawnOrUnsummon(5s);
}
else
{
diff --git a/src/server/scripts/Kalimdor/Maraudon/instance_maraudon.cpp b/src/server/scripts/Kalimdor/Maraudon/instance_maraudon.cpp
index 07df88c2ad..9d816f5314 100644
--- a/src/server/scripts/Kalimdor/Maraudon/instance_maraudon.cpp
+++ b/src/server/scripts/Kalimdor/Maraudon/instance_maraudon.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/scripts/Kalimdor/Maraudon/maraudon.h b/src/server/scripts/Kalimdor/Maraudon/maraudon.h
index c9fb5c4acb..3deebecc4b 100644
--- a/src/server/scripts/Kalimdor/Maraudon/maraudon.h
+++ b/src/server/scripts/Kalimdor/Maraudon/maraudon.h
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/scripts/Kalimdor/OnyxiasLair/boss_onyxia.cpp b/src/server/scripts/Kalimdor/OnyxiasLair/boss_onyxia.cpp
index 3564bc8804..334b74adbe 100644
--- a/src/server/scripts/Kalimdor/OnyxiasLair/boss_onyxia.cpp
+++ b/src/server/scripts/Kalimdor/OnyxiasLair/boss_onyxia.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
@@ -138,16 +138,16 @@ public:
switch (ph)
{
case PHASE_GROUNDED:
- events.ScheduleEvent(EVENT_SPELL_WINGBUFFET, urand(10000, 20000));
- events.ScheduleEvent(EVENT_SPELL_FLAMEBREATH, urand(10000, 20000));
- events.ScheduleEvent(EVENT_SPELL_TAILSWEEP, urand(15000, 20000));
- events.ScheduleEvent(EVENT_SPELL_CLEAVE, urand(2000, 5000));
+ events.ScheduleEvent(EVENT_SPELL_WINGBUFFET, 10s, 20s);
+ events.ScheduleEvent(EVENT_SPELL_FLAMEBREATH, 10s, 20s);
+ events.ScheduleEvent(EVENT_SPELL_TAILSWEEP, 15s, 20s);
+ events.ScheduleEvent(EVENT_SPELL_CLEAVE, 2s, 5s);
break;
case PHASE_AIRPHASE:
- events.ScheduleEvent(EVENT_START_PHASE_2, 0);
+ events.ScheduleEvent(EVENT_START_PHASE_2, 0ms);
break;
case PHASE_LANDED:
- events.ScheduleEvent(EVENT_START_PHASE_3, 5000);
+ events.ScheduleEvent(EVENT_START_PHASE_3, 5s);
break;
}
}
@@ -237,7 +237,7 @@ public:
me->SetFacingTo(OnyxiaMoveData[id].o);
me->SetSpeed(MOVE_RUN, 1.6f, false);
CurrentWP = id;
- events.ScheduleEvent(EVENT_SPELL_FIREBALL_FIRST, 1000);
+ events.ScheduleEvent(EVENT_SPELL_FIREBALL_FIRST, 1s);
}
}
else
@@ -246,21 +246,21 @@ public:
{
case 10:
me->SetFacingTo(OnyxiaMoveData[0].o);
- events.ScheduleEvent(EVENT_LIFTOFF, 0);
+ events.ScheduleEvent(EVENT_LIFTOFF, 0ms);
break;
case 11:
me->SetFacingTo(OnyxiaMoveData[1].o);
- events.ScheduleEvent(EVENT_FLY_S_TO_N, 0);
+ events.ScheduleEvent(EVENT_FLY_S_TO_N, 0ms);
break;
case 12:
me->SetFacingTo(OnyxiaMoveData[1].o);
- events.ScheduleEvent(EVENT_LAND, 0);
+ events.ScheduleEvent(EVENT_LAND, 0ms);
break;
case 13:
me->SetCanFly(false);
me->SetDisableGravity(false);
me->SetSpeed(MOVE_RUN, me->GetCreatureTemplate()->speed_run, false);
- events.ScheduleEvent(EVENT_PHASE_3_ATTACK, 0);
+ events.ScheduleEvent(EVENT_PHASE_3_ATTACK, 0ms);
break;
}
}
@@ -326,25 +326,25 @@ public:
case EVENT_SPELL_WINGBUFFET:
{
DoCastAOE(SPELL_WINGBUFFET);
- events.RepeatEvent(urand(15000, 30000));
+ events.Repeat(15s, 30s);
break;
}
case EVENT_SPELL_FLAMEBREATH:
{
DoCastAOE(SPELL_FLAMEBREATH);
- events.RepeatEvent(urand(10000, 20000));
+ events.Repeat(10s, 20s);
break;
}
case EVENT_SPELL_TAILSWEEP:
{
DoCastAOE(SPELL_TAILSWEEP);
- events.RepeatEvent(urand(15000, 20000));
+ events.Repeat(15s, 20s);
break;
}
case EVENT_SPELL_CLEAVE:
{
DoCastVictim(SPELL_CLEAVE);
- events.RepeatEvent(urand(2000, 5000));
+ events.Repeat(2s, 5s);
break;
}
case EVENT_START_PHASE_2:
@@ -369,7 +369,7 @@ public:
me->GetMotionMaster()->MoveTakeoff(11, OnyxiaMoveData[1].x + 1.0f, OnyxiaMoveData[1].y, OnyxiaMoveData[1].z, 12.0f);
bManyWhelpsAvailable = true;
- events.RescheduleEvent(EVENT_END_MANY_WHELPS_TIME, 10000);
+ events.RescheduleEvent(EVENT_END_MANY_WHELPS_TIME, 10s);
break;
}
case EVENT_END_MANY_WHELPS_TIME:
@@ -381,20 +381,20 @@ public:
me->GetMotionMaster()->MovePoint(5, OnyxiaMoveData[5].x, OnyxiaMoveData[5].y, OnyxiaMoveData[5].z);
whelpSpam = true;
- events.ScheduleEvent(EVENT_WHELP_SPAM, 90000);
- events.ScheduleEvent(EVENT_SUMMON_LAIR_GUARD, 30000);
+ events.ScheduleEvent(EVENT_WHELP_SPAM, 90s);
+ events.ScheduleEvent(EVENT_SUMMON_LAIR_GUARD, 30s);
break;
}
case EVENT_SUMMON_LAIR_GUARD:
{
me->CastSpell(-101.654f, -214.491f, -80.70f, SPELL_SUMMON_LAIR_GUARD, true);
- events.RepeatEvent(30000);
+ events.Repeat(30s);
break;
}
case EVENT_WHELP_SPAM:
{
whelpSpam = true;
- events.RepeatEvent(90000);
+ events.Repeat(90s);
break;
}
case EVENT_LAND:
@@ -413,7 +413,7 @@ public:
DoCast(v, SPELL_FIREBALL);
}
- events.ScheduleEvent(EVENT_SPELL_FIREBALL_SECOND, 4000);
+ events.ScheduleEvent(EVENT_SPELL_FIREBALL_SECOND, 4s);
break;
}
case EVENT_SPELL_FIREBALL_SECOND:
@@ -427,15 +427,15 @@ public:
uint8 rand = urand(0, 99);
if (rand < 33)
{
- events.ScheduleEvent(EVENT_PHASE_2_STEP_CW, 4000);
+ events.ScheduleEvent(EVENT_PHASE_2_STEP_CW, 4s);
}
else if (rand < 66)
{
- events.ScheduleEvent(EVENT_PHASE_2_STEP_ACW, 4000);
+ events.ScheduleEvent(EVENT_PHASE_2_STEP_ACW, 4s);
}
else
{
- events.ScheduleEvent(EVENT_PHASE_2_STEP_ACROSS, 4000);
+ events.ScheduleEvent(EVENT_PHASE_2_STEP_ACROSS, 4s);
}
break;
}
@@ -464,7 +464,7 @@ public:
Talk(EMOTE_BREATH);
me->SetFacingTo(OnyxiaMoveData[CurrentWP].o);
DoCastAOE(OnyxiaMoveData[CurrentWP].spellId);
- events.ScheduleEvent(EVENT_SPELL_BREATH, 8250);
+ events.ScheduleEvent(EVENT_SPELL_BREATH, 8250ms);
break;
}
case EVENT_SPELL_BREATH:
@@ -491,20 +491,20 @@ public:
DoCastAOE(SPELL_BELLOWINGROAR);
- events.ScheduleEvent(EVENT_ERUPTION, 0);
- events.ScheduleEvent(EVENT_SPELL_WINGBUFFET, urand(10000, 20000));
- events.ScheduleEvent(EVENT_SPELL_FLAMEBREATH, urand(10000, 20000));
- events.ScheduleEvent(EVENT_SPELL_TAILSWEEP, urand(15000, 20000));
- events.ScheduleEvent(EVENT_SPELL_CLEAVE, urand(2000, 5000));
- events.ScheduleEvent(EVENT_SPELL_BELLOWINGROAR, 15000);
- events.ScheduleEvent(EVENT_SUMMON_WHELP, 10000);
+ events.ScheduleEvent(EVENT_ERUPTION, 0ms);
+ events.ScheduleEvent(EVENT_SPELL_WINGBUFFET, 10s, 20s);
+ events.ScheduleEvent(EVENT_SPELL_FLAMEBREATH, 10s, 20s);
+ events.ScheduleEvent(EVENT_SPELL_TAILSWEEP, 15s, 20s);
+ events.ScheduleEvent(EVENT_SPELL_CLEAVE, 2s, 5s);
+ events.ScheduleEvent(EVENT_SPELL_BELLOWINGROAR, 15s);
+ events.ScheduleEvent(EVENT_SUMMON_WHELP, 10s);
break;
}
case EVENT_SPELL_BELLOWINGROAR:
{
DoCastAOE(SPELL_BELLOWINGROAR);
- events.RepeatEvent(22000);
- events.ScheduleEvent(EVENT_ERUPTION, 0);
+ events.Repeat(22s);
+ events.ScheduleEvent(EVENT_ERUPTION, 0ms);
break;
}
case EVENT_ERUPTION:
@@ -521,7 +521,7 @@ public:
float dist = rand_norm() * 4.0f;
me->CastSpell(-33.18f + cos(angle) * dist, -258.80f + std::sin(angle) * dist, -89.0f, 17646, true);
me->CastSpell(-32.535f + cos(angle) * dist, -170.190f + std::sin(angle) * dist, -89.0f, 17646, true);
- events.RepeatEvent(30000);
+ events.Repeat(30s);
break;
}
}
@@ -555,8 +555,8 @@ public:
void JustEngagedWith(Unit* /*who*/) override
{
events.Reset();
- events.ScheduleEvent(EVENT_OLG_SPELL_BLASTNOVA, 15000);
- events.ScheduleEvent(EVENT_OLG_SPELL_IGNITEWEAPON, 10000);
+ events.ScheduleEvent(EVENT_OLG_SPELL_BLASTNOVA, 15s);
+ events.ScheduleEvent(EVENT_OLG_SPELL_IGNITEWEAPON, 10s);
}
void UpdateAI(uint32 diff) override
@@ -577,17 +577,17 @@ public:
{
case EVENT_OLG_SPELL_BLASTNOVA:
DoCastAOE(SPELL_OLG_BLASTNOVA);
- events.RepeatEvent(15000);
+ events.Repeat(15s);
break;
case EVENT_OLG_SPELL_IGNITEWEAPON:
if (me->HasUnitFlag(UNIT_FLAG_DISARMED))
{
- events.RepeatEvent(5000);
+ events.Repeat(5s);
}
else
{
DoCastSelf(SPELL_OLG_IGNITEWEAPON);
- events.RepeatEvent(urand(18000, 21000));
+ events.Repeat(18s, 21s);
}
break;
}
diff --git a/src/server/scripts/Kalimdor/OnyxiasLair/instance_onyxias_lair.cpp b/src/server/scripts/Kalimdor/OnyxiasLair/instance_onyxias_lair.cpp
index a6992ec045..a9c1ed61c5 100644
--- a/src/server/scripts/Kalimdor/OnyxiasLair/instance_onyxias_lair.cpp
+++ b/src/server/scripts/Kalimdor/OnyxiasLair/instance_onyxias_lair.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/scripts/Kalimdor/OnyxiasLair/onyxias_lair.h b/src/server/scripts/Kalimdor/OnyxiasLair/onyxias_lair.h
index 1b987076de..7e4bc7c45e 100644
--- a/src/server/scripts/Kalimdor/OnyxiasLair/onyxias_lair.h
+++ b/src/server/scripts/Kalimdor/OnyxiasLair/onyxias_lair.h
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/scripts/Kalimdor/RagefireChasm/instance_ragefire_chasm.cpp b/src/server/scripts/Kalimdor/RagefireChasm/instance_ragefire_chasm.cpp
index 1d984fb6f1..cba39a8c20 100644
--- a/src/server/scripts/Kalimdor/RagefireChasm/instance_ragefire_chasm.cpp
+++ b/src/server/scripts/Kalimdor/RagefireChasm/instance_ragefire_chasm.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/scripts/Kalimdor/RazorfenDowns/instance_razorfen_downs.cpp b/src/server/scripts/Kalimdor/RazorfenDowns/instance_razorfen_downs.cpp
index 000a856b50..fa4ecca34f 100644
--- a/src/server/scripts/Kalimdor/RazorfenDowns/instance_razorfen_downs.cpp
+++ b/src/server/scripts/Kalimdor/RazorfenDowns/instance_razorfen_downs.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/scripts/Kalimdor/RazorfenDowns/razorfen_downs.cpp b/src/server/scripts/Kalimdor/RazorfenDowns/razorfen_downs.cpp
index 2dfebf46b5..944d10052f 100644
--- a/src/server/scripts/Kalimdor/RazorfenDowns/razorfen_downs.cpp
+++ b/src/server/scripts/Kalimdor/RazorfenDowns/razorfen_downs.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
@@ -51,7 +51,7 @@ enum Belnistrasz
EVENT_FROST_NOVA = 6,
PATH_ESCORT = 871710,
- POINT_REACH_IDOL = 17,
+ POINT_REACH_IDOL = 18,
QUEST_EXTINGUISHING_THE_IDOL = 3525,
@@ -115,7 +115,7 @@ public:
void JustDied(Unit* /*killer*/) override
{
- me->DespawnOrUnsummon(5000);
+ me->DespawnOrUnsummon(5s);
}
void sQuestAccept(Player* /*player*/, Quest const* quest) override
@@ -126,7 +126,7 @@ public:
Talk(SAY_QUEST_ACCEPTED);
me->RemoveNpcFlag(UNIT_NPC_FLAG_QUESTGIVER);
me->SetFaction(FACTION_ESCORTEE_N_NEUTRAL_ACTIVE);
- me->GetMotionMaster()->MovePath(PATH_ESCORT, false);
+ me->GetMotionMaster()->MoveWaypoint(PATH_ESCORT, false);
}
}
diff --git a/src/server/scripts/Kalimdor/RazorfenDowns/razorfen_downs.h b/src/server/scripts/Kalimdor/RazorfenDowns/razorfen_downs.h
index 77c963a5b4..d997b030a6 100644
--- a/src/server/scripts/Kalimdor/RazorfenDowns/razorfen_downs.h
+++ b/src/server/scripts/Kalimdor/RazorfenDowns/razorfen_downs.h
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/scripts/Kalimdor/RazorfenKraul/instance_razorfen_kraul.cpp b/src/server/scripts/Kalimdor/RazorfenKraul/instance_razorfen_kraul.cpp
index d85eb839c1..8b721c53f0 100644
--- a/src/server/scripts/Kalimdor/RazorfenKraul/instance_razorfen_kraul.cpp
+++ b/src/server/scripts/Kalimdor/RazorfenKraul/instance_razorfen_kraul.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/scripts/Kalimdor/RuinsOfAhnQiraj/boss_ayamiss.cpp b/src/server/scripts/Kalimdor/RuinsOfAhnQiraj/boss_ayamiss.cpp
index d36cf4718b..cda955ac11 100644
--- a/src/server/scripts/Kalimdor/RuinsOfAhnQiraj/boss_ayamiss.cpp
+++ b/src/server/scripts/Kalimdor/RuinsOfAhnQiraj/boss_ayamiss.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
@@ -70,7 +70,7 @@ enum Emotes
enum Points
{
POINT_AIR = 0,
- POINT_GROUND = 2,
+ POINT_GROUND = 3,
POINT_PARALYZE = 2
};
@@ -92,7 +92,7 @@ struct boss_ayamiss : public BossAI
me->SetReactState(REACT_PASSIVE);
me->SetCanFly(false);
me->SetDisableGravity(false);
- me->GetMotionMaster()->MovePath(me->GetEntry() * 10, false);
+ me->GetMotionMaster()->MoveWaypoint(me->GetEntry() * 10, false);
DoResetThreatList();
scheduler.CancelGroup(GROUP_AIR);
});
@@ -291,7 +291,7 @@ class spell_ayamiss_swarmer_teleport_trigger : public SpellScript
uint32 pathId = data.pathId;
caster->m_Events.AddEventAtOffset([caster, pathId]()
{
- caster->GetMotionMaster()->MovePath(pathId, false);
+ caster->GetMotionMaster()->MoveWaypoint(pathId, false);
}, 1s);
}
@@ -361,7 +361,7 @@ public:
void HandleScript(SpellEffIndex /*effIndex*/)
{
GetCaster()->ToCreature()->GetMotionMaster()->Clear();
- GetCaster()->ToCreature()->GetMotionMaster()->MovePath(_pathId, false);
+ GetCaster()->ToCreature()->GetMotionMaster()->MoveWaypoint(_pathId, false);
}
void Register() override
diff --git a/src/server/scripts/Kalimdor/RuinsOfAhnQiraj/boss_buru.cpp b/src/server/scripts/Kalimdor/RuinsOfAhnQiraj/boss_buru.cpp
index fa7c560488..733e3d3bb3 100644
--- a/src/server/scripts/Kalimdor/RuinsOfAhnQiraj/boss_buru.cpp
+++ b/src/server/scripts/Kalimdor/RuinsOfAhnQiraj/boss_buru.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
@@ -231,7 +231,7 @@ struct npc_buru_egg : public ScriptedAI
}
}
- me->DespawnOrUnsummon(5000);
+ me->DespawnOrUnsummon(5s);
}
void UpdateAI(uint32 /*diff*/) override { }
diff --git a/src/server/scripts/Kalimdor/RuinsOfAhnQiraj/boss_kurinnaxx.cpp b/src/server/scripts/Kalimdor/RuinsOfAhnQiraj/boss_kurinnaxx.cpp
index 5965f580de..9d00834652 100644
--- a/src/server/scripts/Kalimdor/RuinsOfAhnQiraj/boss_kurinnaxx.cpp
+++ b/src/server/scripts/Kalimdor/RuinsOfAhnQiraj/boss_kurinnaxx.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/scripts/Kalimdor/RuinsOfAhnQiraj/boss_moam.cpp b/src/server/scripts/Kalimdor/RuinsOfAhnQiraj/boss_moam.cpp
index 4abfcac1d8..3ebebeb59a 100644
--- a/src/server/scripts/Kalimdor/RuinsOfAhnQiraj/boss_moam.cpp
+++ b/src/server/scripts/Kalimdor/RuinsOfAhnQiraj/boss_moam.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/scripts/Kalimdor/RuinsOfAhnQiraj/boss_ossirian.cpp b/src/server/scripts/Kalimdor/RuinsOfAhnQiraj/boss_ossirian.cpp
index 7b56c464d1..7e8c56aa7b 100644
--- a/src/server/scripts/Kalimdor/RuinsOfAhnQiraj/boss_ossirian.cpp
+++ b/src/server/scripts/Kalimdor/RuinsOfAhnQiraj/boss_ossirian.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
@@ -154,7 +154,7 @@ struct boss_ossirian : public BossAI
}
}
- void SetGUID(ObjectGuid guid, int32 action) override
+ void SetGUID(ObjectGuid const& guid, int32 action) override
{
if (action == ACTION_TRIGGER_WEAKNESS && guid != _firstCrystalGUID)
{
@@ -188,7 +188,7 @@ struct boss_ossirian : public BossAI
{
if (Creature* vortex = me->SummonCreature(NPC_SAND_VORTEX, pos))
{
- vortex->GetMotionMaster()->MovePath(pathIds.front(), true);
+ vortex->GetMotionMaster()->MoveWaypoint(pathIds.front(), true);
pathIds.reverse();
}
}
@@ -317,7 +317,7 @@ public:
{
go_ossirian_crystalAI(GameObject* go) : GameObjectAI(go), _instance(go->GetInstanceScript()) { }
- void SetGUID(ObjectGuid guid, int32 type) override
+ void SetGUID(ObjectGuid const& guid, int32 type) override
{
if (type == GUID_TRIGGER_PAIR)
{
diff --git a/src/server/scripts/Kalimdor/RuinsOfAhnQiraj/boss_rajaxx.cpp b/src/server/scripts/Kalimdor/RuinsOfAhnQiraj/boss_rajaxx.cpp
index 319bb5e2ac..bcae88f331 100644
--- a/src/server/scripts/Kalimdor/RuinsOfAhnQiraj/boss_rajaxx.cpp
+++ b/src/server/scripts/Kalimdor/RuinsOfAhnQiraj/boss_rajaxx.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
@@ -209,7 +209,7 @@ struct npc_general_andorov : public npc_escortAI
_initialAttackTimer = 5 * IN_MILLISECONDS;
_paused = false;
- Start(false, true);
+ Start(false);
me->SetImmuneToNPC(true);
me->SetUnitFlag(UNIT_FLAG_NON_ATTACKABLE);
diff --git a/src/server/scripts/Kalimdor/RuinsOfAhnQiraj/instance_ruins_of_ahnqiraj.cpp b/src/server/scripts/Kalimdor/RuinsOfAhnQiraj/instance_ruins_of_ahnqiraj.cpp
index d8cbc42612..281eb67915 100644
--- a/src/server/scripts/Kalimdor/RuinsOfAhnQiraj/instance_ruins_of_ahnqiraj.cpp
+++ b/src/server/scripts/Kalimdor/RuinsOfAhnQiraj/instance_ruins_of_ahnqiraj.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/scripts/Kalimdor/RuinsOfAhnQiraj/ruins_of_ahnqiraj.cpp b/src/server/scripts/Kalimdor/RuinsOfAhnQiraj/ruins_of_ahnqiraj.cpp
index 8ff445addc..10d726e995 100644
--- a/src/server/scripts/Kalimdor/RuinsOfAhnQiraj/ruins_of_ahnqiraj.cpp
+++ b/src/server/scripts/Kalimdor/RuinsOfAhnQiraj/ruins_of_ahnqiraj.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/scripts/Kalimdor/RuinsOfAhnQiraj/ruins_of_ahnqiraj.h b/src/server/scripts/Kalimdor/RuinsOfAhnQiraj/ruins_of_ahnqiraj.h
index 3261b5f6a6..3daceb826e 100644
--- a/src/server/scripts/Kalimdor/RuinsOfAhnQiraj/ruins_of_ahnqiraj.h
+++ b/src/server/scripts/Kalimdor/RuinsOfAhnQiraj/ruins_of_ahnqiraj.h
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/scripts/Kalimdor/TempleOfAhnQiraj/boss_bug_trio.cpp b/src/server/scripts/Kalimdor/TempleOfAhnQiraj/boss_bug_trio.cpp
index f7ec9c8380..1971b5b9ab 100644
--- a/src/server/scripts/Kalimdor/TempleOfAhnQiraj/boss_bug_trio.cpp
+++ b/src/server/scripts/Kalimdor/TempleOfAhnQiraj/boss_bug_trio.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
@@ -204,7 +204,7 @@ public:
if (me->GetEntry() == NPC_VEM)
{
- me->GetMotionMaster()->MovePath(VEM_WAYPOINT_PATH, true);
+ me->GetMotionMaster()->MoveWaypoint(VEM_WAYPOINT_PATH, true);
}
}
@@ -310,7 +310,7 @@ public:
me->RemoveDynamicFlag(UNIT_DYNFLAG_LOOTABLE);
DoFinalSpell();
Talk(EMOTE_DEVOURED);
- me->DespawnOrUnsummon(3000);
+ me->DespawnOrUnsummon(3s);
return;
}
diff --git a/src/server/scripts/Kalimdor/TempleOfAhnQiraj/boss_cthun.cpp b/src/server/scripts/Kalimdor/TempleOfAhnQiraj/boss_cthun.cpp
index ec8a985f2c..782147459a 100644
--- a/src/server/scripts/Kalimdor/TempleOfAhnQiraj/boss_cthun.cpp
+++ b/src/server/scripts/Kalimdor/TempleOfAhnQiraj/boss_cthun.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/scripts/Kalimdor/TempleOfAhnQiraj/boss_fankriss.cpp b/src/server/scripts/Kalimdor/TempleOfAhnQiraj/boss_fankriss.cpp
index 23d3d321db..adebdae71c 100644
--- a/src/server/scripts/Kalimdor/TempleOfAhnQiraj/boss_fankriss.cpp
+++ b/src/server/scripts/Kalimdor/TempleOfAhnQiraj/boss_fankriss.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/scripts/Kalimdor/TempleOfAhnQiraj/boss_huhuran.cpp b/src/server/scripts/Kalimdor/TempleOfAhnQiraj/boss_huhuran.cpp
index 9412d504ec..0d171c8a4b 100644
--- a/src/server/scripts/Kalimdor/TempleOfAhnQiraj/boss_huhuran.cpp
+++ b/src/server/scripts/Kalimdor/TempleOfAhnQiraj/boss_huhuran.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/scripts/Kalimdor/TempleOfAhnQiraj/boss_ouro.cpp b/src/server/scripts/Kalimdor/TempleOfAhnQiraj/boss_ouro.cpp
index 43d7411743..92d833181b 100644
--- a/src/server/scripts/Kalimdor/TempleOfAhnQiraj/boss_ouro.cpp
+++ b/src/server/scripts/Kalimdor/TempleOfAhnQiraj/boss_ouro.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
@@ -170,7 +170,7 @@ struct boss_ouro : public BossAI
}
}
- me->DespawnOrUnsummon(1000);
+ me->DespawnOrUnsummon(1s);
}
void CastGroundRupture()
@@ -273,7 +273,7 @@ struct boss_ouro : public BossAI
if (me->GetThreatMgr().GetThreatList().empty())
{
DoCastSelf(SPELL_OURO_SUBMERGE_VISUAL);
- me->DespawnOrUnsummon(1000);
+ me->DespawnOrUnsummon(1s);
instance->SetBossState(DATA_OURO, FAIL);
if (GameObject* base = me->FindNearestGameObject(GO_SANDWORM_BASE, 200.f))
base->DespawnOrUnsummon();
@@ -334,7 +334,7 @@ struct npc_dirt_mound : ScriptedAI
scheduler.Schedule(30s, [this](TaskContext /*context*/)
{
DoCastSelf(SPELL_SUMMON_SCARABS, true);
- me->DespawnOrUnsummon(1000);
+ me->DespawnOrUnsummon(1s);
})
.Schedule(100ms, [this](TaskContext context)
{
diff --git a/src/server/scripts/Kalimdor/TempleOfAhnQiraj/boss_sartura.cpp b/src/server/scripts/Kalimdor/TempleOfAhnQiraj/boss_sartura.cpp
index 42bb906da1..313d88ce6d 100644
--- a/src/server/scripts/Kalimdor/TempleOfAhnQiraj/boss_sartura.cpp
+++ b/src/server/scripts/Kalimdor/TempleOfAhnQiraj/boss_sartura.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/scripts/Kalimdor/TempleOfAhnQiraj/boss_skeram.cpp b/src/server/scripts/Kalimdor/TempleOfAhnQiraj/boss_skeram.cpp
index 19b8315a10..fc9fe8949f 100644
--- a/src/server/scripts/Kalimdor/TempleOfAhnQiraj/boss_skeram.cpp
+++ b/src/server/scripts/Kalimdor/TempleOfAhnQiraj/boss_skeram.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/scripts/Kalimdor/TempleOfAhnQiraj/boss_twinemperors.cpp b/src/server/scripts/Kalimdor/TempleOfAhnQiraj/boss_twinemperors.cpp
index eab24db58e..6b6fe638b0 100644
--- a/src/server/scripts/Kalimdor/TempleOfAhnQiraj/boss_twinemperors.cpp
+++ b/src/server/scripts/Kalimdor/TempleOfAhnQiraj/boss_twinemperors.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
@@ -418,7 +418,7 @@ public:
if (Creature* mastersEye = instance->GetCreature(DATA_MASTERS_EYE))
{
mastersEye->AI()->Talk(EMOTE_MASTERS_EYE_AT, player);
- mastersEye->DespawnOrUnsummon(11000);
+ mastersEye->DespawnOrUnsummon(11s);
mastersEye->m_Events.AddEventAtOffset([mastersEye, player]()
{
mastersEye->SetFacingToObject(player);
diff --git a/src/server/scripts/Kalimdor/TempleOfAhnQiraj/boss_viscidus.cpp b/src/server/scripts/Kalimdor/TempleOfAhnQiraj/boss_viscidus.cpp
index a254356892..e3d2ddd6be 100644
--- a/src/server/scripts/Kalimdor/TempleOfAhnQiraj/boss_viscidus.cpp
+++ b/src/server/scripts/Kalimdor/TempleOfAhnQiraj/boss_viscidus.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
@@ -175,7 +175,7 @@ struct boss_viscidus : public BossAI
{
DoCastSelf(SPELL_EXPLODE_TRIGGER, true);
})
- .Schedule(3000ms, [this](TaskContext /*context*/)
+ .Schedule(3s, [this](TaskContext /*context*/)
{
DoCastSelf(SPELL_INVIS_SELF, true);
me->SetAuraStack(SPELL_VISCIDUS_SHRINKS, me, 20);
diff --git a/src/server/scripts/Kalimdor/TempleOfAhnQiraj/instance_temple_of_ahnqiraj.cpp b/src/server/scripts/Kalimdor/TempleOfAhnQiraj/instance_temple_of_ahnqiraj.cpp
index e4069c4e21..b443eba434 100644
--- a/src/server/scripts/Kalimdor/TempleOfAhnQiraj/instance_temple_of_ahnqiraj.cpp
+++ b/src/server/scripts/Kalimdor/TempleOfAhnQiraj/instance_temple_of_ahnqiraj.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/scripts/Kalimdor/TempleOfAhnQiraj/mob_anubisath_sentinel.cpp b/src/server/scripts/Kalimdor/TempleOfAhnQiraj/mob_anubisath_sentinel.cpp
index 0151fe6940..67a6f4c6bf 100644
--- a/src/server/scripts/Kalimdor/TempleOfAhnQiraj/mob_anubisath_sentinel.cpp
+++ b/src/server/scripts/Kalimdor/TempleOfAhnQiraj/mob_anubisath_sentinel.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/scripts/Kalimdor/TempleOfAhnQiraj/temple_of_ahnqiraj.cpp b/src/server/scripts/Kalimdor/TempleOfAhnQiraj/temple_of_ahnqiraj.cpp
index 2cc53521d4..697c700933 100644
--- a/src/server/scripts/Kalimdor/TempleOfAhnQiraj/temple_of_ahnqiraj.cpp
+++ b/src/server/scripts/Kalimdor/TempleOfAhnQiraj/temple_of_ahnqiraj.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
@@ -393,10 +393,10 @@ struct npc_obsidian_nullifier : public ScriptedAI
context.Repeat(6s);
})
- .Schedule(6000ms, 8400ms, [this](TaskContext context)
+ .Schedule(6s, 8400ms, [this](TaskContext context)
{
DoCastVictim(SPELL_CLEAVE, true);
- context.Repeat(6000ms, 8400ms);
+ context.Repeat(6s, 8400ms);
});
}
@@ -447,7 +447,7 @@ struct npc_ahnqiraji_critter : public ScriptedAI
}
}
- context.Repeat(3500ms, 4000ms);
+ context.Repeat(3500ms, 4s);
});
}
@@ -474,7 +474,7 @@ struct npc_ahnqiraji_critter : public ScriptedAI
{
if (me->GetEntry() == NPC_QIRAJI_SCORPION)
{
- me->DespawnOrUnsummon(5 * IN_MILLISECONDS);
+ me->DespawnOrUnsummon(5s);
}
}
diff --git a/src/server/scripts/Kalimdor/TempleOfAhnQiraj/temple_of_ahnqiraj.h b/src/server/scripts/Kalimdor/TempleOfAhnQiraj/temple_of_ahnqiraj.h
index 415929f4cf..10fc7a7fcd 100644
--- a/src/server/scripts/Kalimdor/TempleOfAhnQiraj/temple_of_ahnqiraj.h
+++ b/src/server/scripts/Kalimdor/TempleOfAhnQiraj/temple_of_ahnqiraj.h
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/scripts/Kalimdor/WailingCaverns/instance_wailing_caverns.cpp b/src/server/scripts/Kalimdor/WailingCaverns/instance_wailing_caverns.cpp
index 7cfa7177aa..5511b654b2 100644
--- a/src/server/scripts/Kalimdor/WailingCaverns/instance_wailing_caverns.cpp
+++ b/src/server/scripts/Kalimdor/WailingCaverns/instance_wailing_caverns.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/scripts/Kalimdor/WailingCaverns/wailing_caverns.h b/src/server/scripts/Kalimdor/WailingCaverns/wailing_caverns.h
index e8887df720..5985ea1eaf 100644
--- a/src/server/scripts/Kalimdor/WailingCaverns/wailing_caverns.h
+++ b/src/server/scripts/Kalimdor/WailingCaverns/wailing_caverns.h
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/scripts/Kalimdor/ZulFarrak/instance_zulfarrak.cpp b/src/server/scripts/Kalimdor/ZulFarrak/instance_zulfarrak.cpp
index 397e7b611e..dd5ebf44c1 100644
--- a/src/server/scripts/Kalimdor/ZulFarrak/instance_zulfarrak.cpp
+++ b/src/server/scripts/Kalimdor/ZulFarrak/instance_zulfarrak.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
@@ -437,7 +437,7 @@ public:
{
if (Creature* add = instance->GetCreature(*addsAtBase.begin()))
{
- add->GetMotionMaster()->MovePath(PATH_ADDS, false);
+ add->GetMotionMaster()->MoveWaypoint(PATH_ADDS, false);
movedadds.push_back(add->GetGUID());
}
diff --git a/src/server/scripts/Kalimdor/ZulFarrak/zulfarrak.cpp b/src/server/scripts/Kalimdor/ZulFarrak/zulfarrak.cpp
index bd6543ffbe..f1c1d88ea2 100644
--- a/src/server/scripts/Kalimdor/ZulFarrak/zulfarrak.cpp
+++ b/src/server/scripts/Kalimdor/ZulFarrak/zulfarrak.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
@@ -176,25 +176,25 @@ public:
if (Creature* weegli = ObjectAccessor::GetCreature(*me, instance->GetGuidData(NPC_WEEGLI)))
{
weegli->CastSpell(weegli, SPELL_BLYS_BAND_ESCAPE);
- weegli->DespawnOrUnsummon(10000);
+ weegli->DespawnOrUnsummon(10s);
}
if (Creature* raven = ObjectAccessor::GetCreature(*me, instance->GetGuidData(NPC_RAVEN)))
{
raven->CastSpell(raven, SPELL_BLYS_BAND_ESCAPE);
- raven->DespawnOrUnsummon(10000);
+ raven->DespawnOrUnsummon(10s);
}
if (Creature* oro = ObjectAccessor::GetCreature(*me, instance->GetGuidData(NPC_ORO)))
{
oro->CastSpell(oro, SPELL_BLYS_BAND_ESCAPE);
- oro->DespawnOrUnsummon(10000);
+ oro->DespawnOrUnsummon(10s);
}
if (Creature* murta = ObjectAccessor::GetCreature(*me, instance->GetGuidData(NPC_MURTA)))
{
murta->CastSpell(murta, SPELL_BLYS_BAND_ESCAPE);
- murta->DespawnOrUnsummon(10000);
+ murta->DespawnOrUnsummon(10s);
}
DoCastSelf(SPELL_BLYS_BAND_ESCAPE);
- me->DespawnOrUnsummon(10000);
+ me->DespawnOrUnsummon(10s);
Porthome_Timer = 156000; //set timer back so that the event doesn't keep triggering
}
else
@@ -436,7 +436,7 @@ public:
case 1:
me->GetMotionMaster()->MovePoint(2, 1871.18f, 1100.f, 8.88f);
Talk(SAY_WEEGLI_OUT_OF_HERE);
- me->DespawnOrUnsummon(8000);
+ me->DespawnOrUnsummon(8s);
instance->SetData(DATA_PYRAMID, PYRAMID_GATES_DESTROYED);
destroyingDoor = false;
break;
diff --git a/src/server/scripts/Kalimdor/ZulFarrak/zulfarrak.h b/src/server/scripts/Kalimdor/ZulFarrak/zulfarrak.h
index ad2965baae..1cacc20419 100644
--- a/src/server/scripts/Kalimdor/ZulFarrak/zulfarrak.h
+++ b/src/server/scripts/Kalimdor/ZulFarrak/zulfarrak.h
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/scripts/Kalimdor/boss_azuregos.cpp b/src/server/scripts/Kalimdor/boss_azuregos.cpp
index bb73f72194..e6b3207895 100644
--- a/src/server/scripts/Kalimdor/boss_azuregos.cpp
+++ b/src/server/scripts/Kalimdor/boss_azuregos.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/scripts/Kalimdor/kalimdor_script_loader.cpp b/src/server/scripts/Kalimdor/kalimdor_script_loader.cpp
index 1e80e0982f..3d4d6f2793 100644
--- a/src/server/scripts/Kalimdor/kalimdor_script_loader.cpp
+++ b/src/server/scripts/Kalimdor/kalimdor_script_loader.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
@@ -74,7 +74,6 @@ void AddSC_instance_wailing_caverns(); //Wailing caverns
void AddSC_zulfarrak();
void AddSC_instance_zulfarrak(); //Zul'Farrak instance script
void AddSC_ashenvale();
-void AddSC_azshara();
void AddSC_azuremyst_isle();
void AddSC_bloodmyst_isle();
void AddSC_boss_azuregos();
@@ -157,7 +156,6 @@ void AddKalimdorScripts()
AddSC_zulfarrak();
AddSC_instance_zulfarrak(); //Zul'Farrak instance script
AddSC_ashenvale();
- AddSC_azshara();
AddSC_azuremyst_isle();
AddSC_bloodmyst_isle();
AddSC_boss_azuregos();
diff --git a/src/server/scripts/Kalimdor/zone_ashenvale.cpp b/src/server/scripts/Kalimdor/zone_ashenvale.cpp
index e7131c5fd8..5fee325ece 100644
--- a/src/server/scripts/Kalimdor/zone_ashenvale.cpp
+++ b/src/server/scripts/Kalimdor/zone_ashenvale.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
@@ -121,7 +121,8 @@ public:
{
Talk(SAY_MUG_START1);
me->SetFaction(FACTION_ESCORTEE_N_NEUTRAL_PASSIVE);
- npc_escortAI::Start(true, false, player->GetGUID());
+ me->SetWalk(true);
+ Start(true, player->GetGUID());
}
}
diff --git a/src/server/scripts/Kalimdor/zone_azshara.cpp b/src/server/scripts/Kalimdor/zone_azshara.cpp
deleted file mode 100644
index 1a10cec1db..0000000000
--- a/src/server/scripts/Kalimdor/zone_azshara.cpp
+++ /dev/null
@@ -1,361 +0,0 @@
-/*
- * This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
- *
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
- *
- * This program is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
- * more details.
- *
- * You should have received a copy of the GNU General Public License along
- * with this program. If not, see <http://www.gnu.org/licenses/>.
- */
-
-#include "CreatureScript.h"
-#include "Player.h"
-#include "ScriptedCreature.h"
-#include "ScriptedGossip.h"
-
-/*####
-# npc_rizzle_sprysprocket
-####*/
-
-enum RizzleSprysprocketData
-{
- QUEST_CHASING_THE_MOONSTONE = 10994,
-
- NPC_DEPTH_CHARGE = 23025,
-
- SPELL_RIZZLE_BLACKJACK = 39865,
- SPELL_RIZZLE_ESCAPE = 39871,
- SPELL_RIZZLE_FROST_GRENADE = 40525,
- SPELL_DEPTH_CHARGE_TRAP = 38576,
- SPELL_PERIODIC_DEPTH_CHARGE = 39912,
- SPELL_GIVE_SOUTHFURY_MOONSTONE = 39886,
-
- SAY_RIZZLE_START = 0,
- SAY_RIZZLE_GRENADE = 1,
- SAY_RIZZLE_FINAL = 2,
- MSG_ESCAPE_NOTICE = 3,
- GOSSIP_GET_MOONSTONE = 21893
-
-};
-
-Position const WPs[58] =
-{
- {3691.97f, -3962.41f, 35.9118f, 3.67f},
- {3675.02f, -3960.49f, 35.9118f, 3.67f},
- {3653.19f, -3958.33f, 33.9118f, 3.59f},
- {3621.12f, -3958.51f, 29.9118f, 3.48f},
- {3604.86f, -3963, 29.9118f, 3.48f},
- {3569.94f, -3970.25f, 29.9118f, 3.44f},
- {3541.03f, -3975.64f, 29.9118f, 3.41f},
- {3510.84f, -3978.71f, 29.9118f, 3.41f},
- {3472.7f, -3997.07f, 29.9118f, 3.35f},
- {3439.15f, -4014.55f, 29.9118f, 3.29f},
- {3412.8f, -4025.87f, 29.9118f, 3.25f},
- {3384.95f, -4038.04f, 29.9118f, 3.24f},
- {3346.77f, -4052.93f, 29.9118f, 3.22f},
- {3299.56f, -4071.59f, 29.9118f, 3.20f},
- {3261.22f, -4080.38f, 30.9118f, 3.19f},
- {3220.68f, -4083.09f, 31.9118f, 3.18f},
- {3187.11f, -4070.45f, 33.9118f, 3.16f},
- {3162.78f, -4062.75f, 33.9118f, 3.15f},
- {3136.09f, -4050.32f, 33.9118f, 3.07f},
- {3119.47f, -4044.51f, 36.0363f, 3.07f},
- {3098.95f, -4019.8f, 33.9118f, 3.07f},
- {3073.07f, -4011.42f, 33.9118f, 3.07f},
- {3051.71f, -3993.37f, 33.9118f, 3.02f},
- {3027.52f, -3978.6f, 33.9118f, 3.00f},
- {3003.78f, -3960.14f, 33.9118f, 2.98f},
- {2977.99f, -3941.98f, 31.9118f, 2.96f},
- {2964.57f, -3932.07f, 30.9118f, 2.96f},
- {2947.9f, -3921.31f, 29.9118f, 2.96f},
- {2924.91f, -3910.8f, 29.9118f, 2.94f},
- {2903.04f, -3896.42f, 29.9118f, 2.93f},
- {2884.75f, -3874.03f, 29.9118f, 2.90f},
- {2868.19f, -3851.48f, 29.9118f, 2.82f},
- {2854.62f, -3819.72f, 29.9118f, 2.80f},
- {2825.53f, -3790.4f, 29.9118f, 2.744f},
- {2804.31f, -3773.05f, 29.9118f, 2.71f},
- {2769.78f, -3763.57f, 29.9118f, 2.70f},
- {2727.23f, -3745.92f, 30.9118f, 2.69f},
- {2680.12f, -3737.49f, 30.9118f, 2.67f},
- {2647.62f, -3739.94f, 30.9118f, 2.66f},
- {2616.6f, -3745.75f, 30.9118f, 2.64f},
- {2589.38f, -3731.97f, 30.9118f, 2.61f},
- {2562.94f, -3722.35f, 31.9118f, 2.56f},
- {2521.05f, -3716.6f, 31.9118f, 2.55f},
- {2485.26f, -3706.67f, 31.9118f, 2.51f},
- {2458.93f, -3696.67f, 31.9118f, 2.51f},
- {2432, -3692.03f, 31.9118f, 2.46f},
- {2399.59f, -3681.97f, 31.9118f, 2.45f},
- {2357.75f, -3666.6f, 31.9118f, 2.44f},
- {2311.99f, -3656.88f, 31.9118f, 2.94f},
- {2263.41f, -3649.55f, 31.9118f, 3.02f},
- {2209.05f, -3641.76f, 31.9118f, 2.99f},
- {2164.83f, -3637.64f, 31.9118f, 3.15f},
- {2122.42f, -3639, 31.9118f, 3.21f},
- {2075.73f, -3643.59f, 31.9118f, 3.22f},
- {2033.59f, -3649.52f, 31.9118f, 3.42f},
- {1985.22f, -3662.99f, 31.9118f, 3.42f},
- {1927.09f, -3679.56f, 33.9118f, 3.42f},
- {1873.57f, -3695.32f, 33.9118f, 3.44f}
-};
-
-class npc_rizzle_sprysprocket : public CreatureScript
-{
-public:
- npc_rizzle_sprysprocket() : CreatureScript("npc_rizzle_sprysprocket") { }
-
- struct npc_rizzle_sprysprocketAI : public ScriptedAI
- {
- npc_rizzle_sprysprocketAI(Creature* creature) : ScriptedAI(creature) { }
-
- void Reset() override
- {
- SpellEscapeTimer = 1300;
- TeleportTimer = 3500;
- CheckTimer = 10000;
- GrenadeTimer = 30000;
- MustDieTimer = 3000;
- CurrWP = 0;
-
- PlayerGUID.Clear();
-
- MustDie = false;
- Escape = false;
- ContinueWP = false;
- Reached = false;
- }
-
- void JustEngagedWith(Unit* /*who*/) override { }
-
- void AttackStart(Unit* who) override
- {
- if (!who || PlayerGUID)
- return;
-
- Player* player = who->ToPlayer();
-
- if (player && player->GetQuestStatus(QUEST_CHASING_THE_MOONSTONE) == QUEST_STATUS_INCOMPLETE)
- {
- PlayerGUID = who->GetGUID();
- Talk(SAY_RIZZLE_START);
- DoCast(who, SPELL_RIZZLE_BLACKJACK, false);
- return;
- }
- }
-
- void sGossipSelect(Player* player, uint32 /*sender*/, uint32 /*action*/) override
- {
- CloseGossipMenuFor(player);
- me->CastSpell(player, SPELL_GIVE_SOUTHFURY_MOONSTONE, true);
- MustDieTimer = 3000;
- MustDie = true;
- }
-
- void MovementInform(uint32 type, uint32 id) override
- {
- if (type != POINT_MOTION_TYPE)
- return;
-
- if (id == 57)
- {
- me->DespawnOrUnsummon();
- return;
- }
-
- ++CurrWP;
- ContinueWP = true;
- }
-
- void UpdateAI(uint32 diff) override
- {
- if (MustDie)
- {
- if (MustDieTimer <= diff)
- {
- me->DespawnOrUnsummon();
- return;
- }
- else MustDieTimer -= diff;
- }
-
- if (!Escape)
- {
- if (!PlayerGUID)
- return;
-
- if (SpellEscapeTimer <= diff)
- {
- DoCast(me, SPELL_RIZZLE_ESCAPE, false);
- SpellEscapeTimer = 10000;
- }
- else SpellEscapeTimer -= diff;
-
- if (TeleportTimer <= diff)
- {
- // temp solution - unit can't be teleported by core using spelleffect 5, only players
- me->NearTeleportTo(3706.39f, -3969.15f, 35.9118f, me->GetOrientation());
-
- //begin swimming and summon depth charges
- Player* player = ObjectAccessor::GetPlayer(*me, PlayerGUID);
- if (!player)
- return;
-
- Talk(MSG_ESCAPE_NOTICE, player);
- DoCast(me, SPELL_PERIODIC_DEPTH_CHARGE);
- me->SetHover(true);
- me->SetSwim(true);
- me->SetSpeed(MOVE_RUN, 0.85f, true);
- me->GetMotionMaster()->MovementExpired();
- me->GetMotionMaster()->MovePoint(CurrWP, WPs[CurrWP]);
- Escape = true;
- }
- else TeleportTimer -= diff;
-
- return;
- }
-
- if (ContinueWP)
- {
- me->GetMotionMaster()->MovePoint(CurrWP, WPs[CurrWP]);
- ContinueWP = false;
- }
-
- if (GrenadeTimer <= diff)
- {
- if (Player* player = ObjectAccessor::GetPlayer(*me, PlayerGUID))
- {
- Talk(SAY_RIZZLE_GRENADE, player);
- DoCast(player, SPELL_RIZZLE_FROST_GRENADE, true);
- }
- GrenadeTimer = 30000;
- }
- else GrenadeTimer -= diff;
-
- if (CheckTimer <= diff)
- {
- Player* player = ObjectAccessor::GetPlayer(*me, PlayerGUID);
- if (!player)
- {
- me->DespawnOrUnsummon();
- return;
- }
-
- if (me->IsWithinDist(player, 10) && me->GetPositionX() > player->GetPositionX() && !Reached)
- {
- Talk(SAY_RIZZLE_FINAL);
- me->ReplaceAllNpcFlags(NPCFlags(1));
- me->SetFaction(FACTION_FRIENDLY);
- me->GetMotionMaster()->MoveIdle();
- me->RemoveAurasDueToSpell(SPELL_PERIODIC_DEPTH_CHARGE);
- Reached = true;
- }
-
- CheckTimer = 1000;
- }
- else CheckTimer -= diff;
- }
-
- private:
- ObjectGuid PlayerGUID;
- uint32 SpellEscapeTimer;
- uint32 TeleportTimer;
- uint32 CheckTimer;
- uint32 GrenadeTimer;
- uint32 MustDieTimer;
- uint32 CurrWP;
- bool MustDie;
- bool Escape;
- bool ContinueWP;
- bool Reached;
- };
-
- bool OnGossipHello(Player* player, Creature* creature) override
- {
- if (player->GetQuestStatus(QUEST_CHASING_THE_MOONSTONE) != QUEST_STATUS_INCOMPLETE)
- return true;
-
- AddGossipItemFor(player, GOSSIP_GET_MOONSTONE, 0, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 1);
- SendGossipMenuFor(player, 10811, creature->GetGUID());
-
- return true;
- }
-
- CreatureAI* GetAI(Creature* creature) const override
- {
- return new npc_rizzle_sprysprocketAI(creature);
- }
-};
-
-/*####
-# npc_depth_charge
-####*/
-class npc_depth_charge : public CreatureScript
-{
-public:
- npc_depth_charge() : CreatureScript("npc_depth_charge") { }
-
- struct npc_depth_chargeAI : public ScriptedAI
- {
- npc_depth_chargeAI(Creature* creature) : ScriptedAI(creature) { }
-
- bool WeMustDie;
- uint32 WeMustDieTimer;
-
- void Reset() override
- {
- me->SetHover(true);
- me->SetSwim(true);
- me->SetUnitFlag(UNIT_FLAG_NOT_SELECTABLE);
- WeMustDie = false;
- WeMustDieTimer = 1000;
- }
-
- void JustEngagedWith(Unit* /*who*/) override { }
-
- void AttackStart(Unit* /*who*/) override { }
-
- void MoveInLineOfSight(Unit* who) override
- {
- if (!who)
- return;
-
- if (who->IsPlayer() && me->IsWithinDistInMap(who, 5))
- {
- DoCast(who, SPELL_DEPTH_CHARGE_TRAP);
- WeMustDie = true;
- return;
- }
- }
-
- void UpdateAI(uint32 diff) override
- {
- if (WeMustDie)
- {
- if (WeMustDieTimer <= diff)
- me->DespawnOrUnsummon();
- else
- WeMustDieTimer -= diff;
- }
- return;
- }
- };
-
- CreatureAI* GetAI(Creature* creature) const override
- {
- return new npc_depth_chargeAI(creature);
- }
-};
-
-void AddSC_azshara()
-{
- new npc_rizzle_sprysprocket();
- new npc_depth_charge();
-}
diff --git a/src/server/scripts/Kalimdor/zone_azuremyst_isle.cpp b/src/server/scripts/Kalimdor/zone_azuremyst_isle.cpp
index 7069cd3815..bbcbbd0550 100644
--- a/src/server/scripts/Kalimdor/zone_azuremyst_isle.cpp
+++ b/src/server/scripts/Kalimdor/zone_azuremyst_isle.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
@@ -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, false, player->GetGUID());
+ me->SetWalk(true);
+ Start(true, player->GetGUID());
}
_events.ScheduleEvent(EVENT_STAND, 2s);
break;
diff --git a/src/server/scripts/Kalimdor/zone_bloodmyst_isle.cpp b/src/server/scripts/Kalimdor/zone_bloodmyst_isle.cpp
index 359a18c575..192e2a5bf6 100644
--- a/src/server/scripts/Kalimdor/zone_bloodmyst_isle.cpp
+++ b/src/server/scripts/Kalimdor/zone_bloodmyst_isle.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
@@ -24,7 +24,7 @@
######*/
//possible creatures to be spawned
-uint32 const possibleSpawns[32] = {17322, 17661, 17496, 17522, 17340, 17352, 17333, 17524, 17654, 17348, 17339, 17345, 17359, 17353, 17336, 17550, 17330, 17701, 17321, 17325, 17320, 17683, 17342, 17715, 17334, 17341, 17338, 17337, 17346, 17344, 17327};
+uint32 const possibleSpawns[32] = {17322, 17661, 17496, 17522, 17340, 17352, 17333, 17524, 17654, 17348, 17339, 17345, 17353, 17336, 17550, 17330, 17701, 17321, 17325, 17320, 17683, 17342, 17715, 17334, 17341, 17338, 17337, 17346, 17344, 17327};
enum WebbedCreature
{
diff --git a/src/server/scripts/Kalimdor/zone_darkshore.cpp b/src/server/scripts/Kalimdor/zone_darkshore.cpp
index c3a76fc638..c2a452f184 100644
--- a/src/server/scripts/Kalimdor/zone_darkshore.cpp
+++ b/src/server/scripts/Kalimdor/zone_darkshore.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
@@ -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()))
- pEscortAI->Start(false, false, player->GetGUID());
+ {
+ creature->SetWalk(true);
+ pEscortAI->Start(false, player->GetGUID());
+ }
creature->SetFaction(FACTION_ESCORTEE_A_NEUTRAL_PASSIVE);
}
@@ -463,7 +466,7 @@ public:
_events.Reset();
_events.ScheduleEvent(EVENT_CHECK_FOLLOWING, 1s);
player->KilledMonsterCredit(NPC_CAPTURED_RABID_THISTLE_BEAR);
- me->DespawnOrUnsummon(240000);
+ me->DespawnOrUnsummon(240s);
}
}
}
@@ -552,7 +555,7 @@ public:
}
}
- void SetGUID(ObjectGuid /*guid*/, int32 type) override
+ void SetGUID(ObjectGuid const& /*guid*/, int32 type) override
{
if (type == GUID_SCRIPT_INVOKER && _scriptRunning == false)
{
diff --git a/src/server/scripts/Kalimdor/zone_desolace.cpp b/src/server/scripts/Kalimdor/zone_desolace.cpp
index 396ee22955..51b37790e2 100644
--- a/src/server/scripts/Kalimdor/zone_desolace.cpp
+++ b/src/server/scripts/Kalimdor/zone_desolace.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
@@ -42,9 +42,6 @@ enum Caravan
MAX_CARAVAN_SUMMONS = 3,
- TIME_SHOP_STOP = 10 * MINUTE * IN_MILLISECONDS,
- TIME_HIRE_STOP = 4 * MINUTE * IN_MILLISECONDS,
-
// Ambush
NPC_KOLKAR_WAYLAYER = 12976,
NPC_KOLKAR_AMBUSHER = 12977,
@@ -53,6 +50,9 @@ enum Caravan
NPC_NETHER = 4684,
};
+constexpr Milliseconds TIME_SHOP_STOP = 600s;
+constexpr Milliseconds TIME_HIRE_STOP = 240s;
+
class npc_cork_gizelton : public CreatureScript
{
public:
@@ -129,7 +129,7 @@ public:
ImmuneFlagSet(false, _faction);
}
- void SetGUID(ObjectGuid playerGUID, int32 faction) override
+ void SetGUID(ObjectGuid const& playerGUID, int32 faction) override
{
_playerGUID = playerGUID;
_faction = faction;
@@ -264,14 +264,14 @@ public:
{
// Finished north path
case 52:
- me->SummonCreature(NPC_VENDOR_TRON, -694.61f, 1460.7f, 90.794f, 2.4f, TEMPSUMMON_TIMED_DESPAWN, TIME_SHOP_STOP + 15 * IN_MILLISECONDS);
+ me->SummonCreature(NPC_VENDOR_TRON, -694.61f, 1460.7f, 90.794f, 2.4f, TEMPSUMMON_TIMED_DESPAWN, 600000 + 15 * IN_MILLISECONDS);
SetEscortPaused(true);
events.ScheduleEvent(EVENT_RESUME_PATH, TIME_SHOP_STOP);
CheckCaravan();
break;
// Finished south path
case 193:
- me->SummonCreature(NPC_SUPER_SELLER, -1905.5f, 2463.3f, 61.52f, 5.87f, TEMPSUMMON_TIMED_DESPAWN, TIME_SHOP_STOP + 15 * IN_MILLISECONDS);
+ me->SummonCreature(NPC_SUPER_SELLER, -1905.5f, 2463.3f, 61.52f, 5.87f, TEMPSUMMON_TIMED_DESPAWN, 600000 + 15 * IN_MILLISECONDS);
SetEscortPaused(true);
events.ScheduleEvent(EVENT_RESUME_PATH, TIME_SHOP_STOP);
CheckCaravan();
@@ -396,7 +396,7 @@ public:
case EVENT_RESTART_ESCORT:
CheckCaravan();
SetDespawnAtEnd(false);
- Start(true, true, ObjectGuid::Empty, 0, false, false, true);
+ Start(true, ObjectGuid::Empty, 0, false, false, true);
break;
}
@@ -474,7 +474,7 @@ public:
else if (spell->Id == SPELL_KODO_KOMBO_GOSSIP)
{
me->SetNpcFlag(UNIT_NPC_FLAG_GOSSIP);
- me->DespawnOrUnsummon(60000);
+ me->DespawnOrUnsummon(60s);
}
}
};
diff --git a/src/server/scripts/Kalimdor/zone_durotar.cpp b/src/server/scripts/Kalimdor/zone_durotar.cpp
index 14076a4d5e..81be037f3f 100644
--- a/src/server/scripts/Kalimdor/zone_durotar.cpp
+++ b/src/server/scripts/Kalimdor/zone_durotar.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/scripts/Kalimdor/zone_dustwallow_marsh.cpp b/src/server/scripts/Kalimdor/zone_dustwallow_marsh.cpp
index 802739571d..18d4361ba9 100644
--- a/src/server/scripts/Kalimdor/zone_dustwallow_marsh.cpp
+++ b/src/server/scripts/Kalimdor/zone_dustwallow_marsh.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/scripts/Kalimdor/zone_felwood.cpp b/src/server/scripts/Kalimdor/zone_felwood.cpp
index 9304a7a717..93f33e72dd 100644
--- a/src/server/scripts/Kalimdor/zone_felwood.cpp
+++ b/src/server/scripts/Kalimdor/zone_felwood.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/scripts/Kalimdor/zone_feralas.cpp b/src/server/scripts/Kalimdor/zone_feralas.cpp
index 6a3502bbd5..2c358dd8b0 100644
--- a/src/server/scripts/Kalimdor/zone_feralas.cpp
+++ b/src/server/scripts/Kalimdor/zone_feralas.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/scripts/Kalimdor/zone_moonglade.cpp b/src/server/scripts/Kalimdor/zone_moonglade.cpp
index 2bf7903188..d521c6693a 100644
--- a/src/server/scripts/Kalimdor/zone_moonglade.cpp
+++ b/src/server/scripts/Kalimdor/zone_moonglade.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
@@ -384,7 +384,8 @@ 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();
- Start(true, false, PlayerGUID);
+ me->SetWalk(true);
+ Start(true, PlayerGUID);
}
return;
}
diff --git a/src/server/scripts/Kalimdor/zone_orgrimmar.cpp b/src/server/scripts/Kalimdor/zone_orgrimmar.cpp
index b9747811d4..19d19c47c8 100644
--- a/src/server/scripts/Kalimdor/zone_orgrimmar.cpp
+++ b/src/server/scripts/Kalimdor/zone_orgrimmar.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/scripts/Kalimdor/zone_silithus.cpp b/src/server/scripts/Kalimdor/zone_silithus.cpp
index 9a06054bbc..d174ce43a9 100644
--- a/src/server/scripts/Kalimdor/zone_silithus.cpp
+++ b/src/server/scripts/Kalimdor/zone_silithus.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
@@ -1145,7 +1145,7 @@ public:
}
}
- me->DespawnOrUnsummon(5000ms, respawnTimer); // Despawn in 5 Seconds for respawnTimer value
+ me->DespawnOrUnsummon(5s, respawnTimer); // Despawn in 5 Seconds for respawnTimer value
me->SetGameObjectFlag(GO_FLAG_NOT_SELECTABLE);
CloseGossipMenuFor(player);
return false;
@@ -1174,7 +1174,7 @@ public:
summons->SetLootRecipient(player);
summons->CastSpell(summons, SPELL_SPAWN_IN, false);
summons->AI()->Talk(SAY_ON_SPAWN_IN, player);
- summons->m_Events.AddEvent(new DelayedWindstoneSummonEvent(summons, player->GetGUID()), summons->m_Events.CalculateTime(5200));
+ summons->m_Events.AddEventAtOffset(new DelayedWindstoneSummonEvent(summons, player->GetGUID()), 5200ms);
_creatureGuid = summons->GetGUID();
}
}
diff --git a/src/server/scripts/Kalimdor/zone_stonetalon_mountains.cpp b/src/server/scripts/Kalimdor/zone_stonetalon_mountains.cpp
index 6f8323126f..3392248da7 100644
--- a/src/server/scripts/Kalimdor/zone_stonetalon_mountains.cpp
+++ b/src/server/scripts/Kalimdor/zone_stonetalon_mountains.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
@@ -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()))
- pEscortAI->Start(true, false, player->GetGUID());
+ {
+ 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 88c7eb7e4d..602d1ea432 100644
--- a/src/server/scripts/Kalimdor/zone_tanaris.cpp
+++ b/src/server/scripts/Kalimdor/zone_tanaris.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
@@ -260,7 +260,8 @@ public:
float Radius = 10.0f;
if (me->IsWithinDistInMap(who, Radius))
{
- Start(false, false, who->GetGUID());
+ 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 2624709fc6..fa4eabc52c 100644
--- a/src/server/scripts/Kalimdor/zone_the_barrens.cpp
+++ b/src/server/scripts/Kalimdor/zone_the_barrens.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
@@ -55,7 +55,10 @@ public:
creature->AI()->Talk(SAY_GIL_START, player);
if (npc_giltharesAI* pEscortAI = CAST_AI(npc_gilthares::npc_giltharesAI, creature->AI()))
- pEscortAI->Start(false, false, player->GetGUID(), quest);
+ {
+ creature->SetWalk(true);
+ pEscortAI->Start(false, player->GetGUID(), quest);
+ }
}
return true;
}
@@ -300,11 +303,11 @@ public:
for (uint8 i = 0; i < 6; ++i) // unsummon challengers
if (AffrayChallenger[i])
if (Creature* creature = ObjectAccessor::GetCreature((*me), AffrayChallenger[i]))
- creature->DespawnOrUnsummon(1);
+ creature->DespawnOrUnsummon(1ms);
if (BigWill) // unsummon bigWill
if (Creature* creature = ObjectAccessor::GetCreature((*me), BigWill))
- creature->DespawnOrUnsummon(1);
+ creature->DespawnOrUnsummon(1ms);
}
void MoveInLineOfSight(Unit* who) override
@@ -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();
+ 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()))
- pEscortAI->Start(true, false, player->GetGUID());
+ {
+ 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 2a80cd90ee..ac747b38bf 100644
--- a/src/server/scripts/Kalimdor/zone_thousand_needles.cpp
+++ b/src/server/scripts/Kalimdor/zone_thousand_needles.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
@@ -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()))
- pEscortAI->Start(false, false, player->GetGUID(), quest);
+ {
+ 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()))
- pEscortAI->Start(false, false, player->GetGUID(), quest);
+ {
+ creature->SetWalk(true);
+ pEscortAI->Start(false, player->GetGUID(), quest);
+ }
}
return true;
}
diff --git a/src/server/scripts/Kalimdor/zone_thunder_bluff.cpp b/src/server/scripts/Kalimdor/zone_thunder_bluff.cpp
index 7f2d54bccb..7545b14227 100644
--- a/src/server/scripts/Kalimdor/zone_thunder_bluff.cpp
+++ b/src/server/scripts/Kalimdor/zone_thunder_bluff.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/scripts/Kalimdor/zone_ungoro_crater.cpp b/src/server/scripts/Kalimdor/zone_ungoro_crater.cpp
index 131baf8686..885ddac1fa 100644
--- a/src/server/scripts/Kalimdor/zone_ungoro_crater.cpp
+++ b/src/server/scripts/Kalimdor/zone_ungoro_crater.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
@@ -48,7 +48,8 @@ public:
{
if (quest->GetQuestId() == QUEST_CHASING_AME)
{
- CAST_AI(npc_escortAI, (creature->AI()))->Start(false, false, player->GetGUID());
+ 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);
// Change faction so mobs attack
diff --git a/src/server/scripts/Kalimdor/zone_winterspring.cpp b/src/server/scripts/Kalimdor/zone_winterspring.cpp
index d1e516fe08..2130ce14e2 100644
--- a/src/server/scripts/Kalimdor/zone_winterspring.cpp
+++ b/src/server/scripts/Kalimdor/zone_winterspring.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
@@ -286,7 +286,10 @@ public:
creature->SetFaction(FACTION_ESCORT_A_NEUTRAL_PASSIVE);
if (npc_ranshallaAI* escortAI = dynamic_cast<npc_ranshallaAI*>(creature->AI()))
- escortAI->Start(false, false, player->GetGUID(), quest);
+ {
+ creature->SetWalk(true);
+ escortAI->Start(false, player->GetGUID(), quest);
+ }
return true;
}
@@ -486,7 +489,7 @@ public:
if (Creature* guard = me->GetMap()->GetCreature(_guardEluneGUID))
{
guard->GetMotionMaster()->MovePoint(0, wingThicketLocations[2].m_positionX, wingThicketLocations[2].m_positionY, wingThicketLocations[2].m_positionZ);
- guard->DespawnOrUnsummon(4000);
+ guard->DespawnOrUnsummon(4s);
}
break;
case SAY_PRIESTESS_ALTAR_20:
@@ -494,7 +497,7 @@ public:
if (Creature* priestess = me->GetMap()->GetCreature(_firstPriestessGUID))
{
priestess->GetMotionMaster()->MovePoint(0, wingThicketLocations[0].m_positionX, wingThicketLocations[0].m_positionY, wingThicketLocations[0].m_positionZ);
- priestess->DespawnOrUnsummon(4000);
+ priestess->DespawnOrUnsummon(4s);
}
break;
case SAY_PRIESTESS_ALTAR_21:
@@ -502,7 +505,7 @@ public:
if (Creature* priestess = me->GetMap()->GetCreature(_secondPriestessGUID))
{
priestess->GetMotionMaster()->MovePoint(0, wingThicketLocations[1].m_positionX, wingThicketLocations[1].m_positionY, wingThicketLocations[1].m_positionZ);
- priestess->DespawnOrUnsummon(4000);
+ priestess->DespawnOrUnsummon(4s);
}
break;
case DATA_EVENT_END:
@@ -526,7 +529,7 @@ public:
player->GroupEventHappens(QUEST_GUARDIANS_ALTAR, me);
Talk(SAY_RANSHALLA_END_2, player);
}
- me->DespawnOrUnsummon(4000);
+ me->DespawnOrUnsummon(4s);
break;
}
}
diff --git a/src/server/scripts/Northrend/AzjolNerub/AzjolNerub/azjol_nerub.h b/src/server/scripts/Northrend/AzjolNerub/AzjolNerub/azjol_nerub.h
index 39f15f6ab6..75f74ccc35 100644
--- a/src/server/scripts/Northrend/AzjolNerub/AzjolNerub/azjol_nerub.h
+++ b/src/server/scripts/Northrend/AzjolNerub/AzjolNerub/azjol_nerub.h
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
@@ -28,8 +28,12 @@ enum ANData
{
DATA_KRIKTHIR = 0,
DATA_HADRONOX = 1,
- DATA_ANUBARAK_EVENT = 2,
- MAX_ENCOUNTERS = 3
+ DATA_ANUBARAK = 2,
+ MAX_ENCOUNTERS = 3,
+
+ DATA_GASHRA = 4,
+ DATA_NARJIL = 5,
+ DATA_SILTHIK = 6
};
enum ANIds
@@ -41,6 +45,8 @@ enum ANIds
NPC_SKITTERING_INFECTIOR = 28736,
NPC_KRIKTHIR_THE_GATEWATCHER = 28684,
NPC_HADRONOX = 28921,
+ NPC_ANUBARAK = 29120,
+
NPC_ANUB_AR_CHAMPION = 29062,
NPC_ANUB_AR_NECROMANCER = 29063,
NPC_ANUB_AR_CRYPTFIEND = 29064,
@@ -59,4 +65,6 @@ inline AI* GetAzjolNerubAI(T* obj)
return GetInstanceAI<AI>(obj, AzjolNerubScriptName);
}
+#define RegisterAzjolNerubCreatureAI(ai_name) RegisterCreatureAIWithFactory(ai_name, GetAzjolNerubAI)
+
#endif
diff --git a/src/server/scripts/Northrend/AzjolNerub/AzjolNerub/boss_anubarak.cpp b/src/server/scripts/Northrend/AzjolNerub/AzjolNerub/boss_anubarak.cpp
index 3cdb5967fd..0170859795 100644
--- a/src/server/scripts/Northrend/AzjolNerub/AzjolNerub/boss_anubarak.cpp
+++ b/src/server/scripts/Northrend/AzjolNerub/AzjolNerub/boss_anubarak.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
@@ -55,223 +55,343 @@ enum Yells
enum Misc
{
ACHIEV_TIMED_START_EVENT = 20381,
+};
- EVENT_CARRION_BEETELS = 1,
+enum Events
+{
+ EVENT_CARRION_BEETLES = 1,
EVENT_LEECHING_SWARM = 2,
EVENT_IMPALE = 3,
EVENT_POUND = 4,
- EVENT_CLOSE_DOORS = 5,
- EVENT_EMERGE = 6,
- EVENT_SUMMON_VENOMANCER = 7,
- EVENT_SUMMON_DARTER = 8,
- EVENT_SUMMON_GUARDIAN = 9,
- EVENT_SUMMON_ASSASSINS = 10,
- EVENT_ENABLE_ROTATE = 11,
+ EVENT_ENABLE_ROTATE = 5,
+ EVENT_CLOSE_DOORS = 6,
+ EVENT_EMERGE = 7,
+ EVENT_SUMMON_GUARDIAN = 8,
+ EVENT_SUMMON_VENOMANCER = 9,
+ EVENT_SUMMON_DARTER = 10,
+ EVENT_SUMMON_ASSASSINS = 11,
EVENT_KILL_TALK = 12
};
-enum ANAnubarakNpcs
+enum CreatureIds
{
+ NPC_WORLD_TRIGGER = 22515,
NPC_ANUBAR_GUARDIAN = 29216,
- NPC_ANUBAR_VENOMANCER = 29217
+ NPC_ANUBAR_VENOMANCER = 29217,
+};
+
+enum Groups : uint8
+{
+ GROUP_EMERGED = 1,
+ GROUP_SUBMERGED
+};
+
+enum SubPhase : uint8
+{
+ SUBMERGE_NONE = 0,
+ SUBMERGE_75 = 1,
+ SUBMERGE_50 = 2,
+ SUBMERGE_25 = 3,
};
-class boss_anub_arak : public CreatureScript
+enum SummonGroups
{
- public:
- boss_anub_arak() : CreatureScript("boss_anub_arak") { }
+ SUMMON_GROUP_WORLD_TRIGGER_GUARDIAN = 1,
+ SUMMON_GROUP_WORLD_TRIGGER_BALCONY = 2
+};
- struct boss_anub_arakAI : public BossAI
+struct boss_anub_arak : public BossAI
+{
+ explicit boss_anub_arak(Creature* creature) : BossAI(creature, DATA_ANUBARAK), _intro(false),
+ _submergePhase(SUBMERGE_NONE), _remainingLargeSummonsBeforeEmerge(0), _balconySummons(me)
+ {
+ me->m_SightDistance = 120.0f;
+ }
+
+ void Reset() override
+ {
+ BossAI::Reset();
+ me->RemoveUnitFlag(UNIT_FLAG_NON_ATTACKABLE | UNIT_FLAG_NOT_SELECTABLE);
+ instance->DoStopTimedAchievement(ACHIEVEMENT_TIMED_TYPE_EVENT, ACHIEV_TIMED_START_EVENT);
+ _remainingLargeSummonsBeforeEmerge = 0;
+ _submergePhase = SUBMERGE_NONE;
+
+ ScheduleHealthCheckEvent({ 75, 50, 25 }, [&]{
+ events.CancelEventGroup(GROUP_EMERGED);
+ Talk(SAY_SUBMERGE);
+ DoCastSelf(SPELL_CLEAR_ALL_DEBUFFS, true);
+ DoCastSelf(SPELL_SUBMERGE, false);
+ }, false);
+ }
+
+ void SpellHitTarget(Unit* /*caster*/, SpellInfo const* spellInfo) override
+ {
+ if (spellInfo->Id == SPELL_SUBMERGE)
{
- boss_anub_arakAI(Creature* creature) : BossAI(creature, DATA_ANUBARAK_EVENT)
- {
- me->m_SightDistance = 120.0f;
- _intro = false;
- _summonedMinions = false;
- }
+ me->SetUnitFlag(UNIT_FLAG_NON_ATTACKABLE | UNIT_FLAG_NOT_SELECTABLE);
+ me->RemoveAurasDueToSpell(SPELL_LEECHING_SWARM);
+ DoCastSelf(SPELL_IMPALE_PERIODIC, true);
- void EnterEvadeMode(EvadeReason why) override
- {
- me->DisableRotate(false);
- BossAI::EnterEvadeMode(why);
- }
+ ++_submergePhase;
+ ScheduleSubmerged();
+ }
+ }
- void MoveInLineOfSight(Unit* who) override
- {
- if (!_intro && who->IsPlayer())
- {
- _intro = true;
- Talk(SAY_INTRO);
- }
- BossAI::MoveInLineOfSight(who);
- }
+ void ScheduleEmerged()
+ {
+ events.CancelEventGroup(GROUP_SUBMERGED);
+ events.ScheduleEvent(EVENT_CARRION_BEETLES, 6500ms, GROUP_EMERGED);
+ events.ScheduleEvent(EVENT_LEECHING_SWARM, 20s, GROUP_EMERGED);
+ events.ScheduleEvent(EVENT_POUND, 15s, GROUP_EMERGED);
+ };
- void JustDied(Unit* killer) override
- {
- Talk(SAY_DEATH);
- BossAI::JustDied(killer);
- }
+ void ScheduleSubmerged()
+ {
+ events.CancelEventGroup(GROUP_EMERGED);
+ events.ScheduleEvent(EVENT_EMERGE, 60s, GROUP_SUBMERGED);
- void KilledUnit(Unit* /*victim*/) override
- {
- if (events.GetNextEventTime(EVENT_KILL_TALK) == 0)
- {
- Talk(SAY_SLAY);
- events.ScheduleEvent(EVENT_KILL_TALK, 6s);
- }
- }
+ switch (_submergePhase)
+ {
+ case SUBMERGE_75:
+ events.ScheduleEvent(EVENT_SUMMON_GUARDIAN, 4s, GROUP_SUBMERGED);
+ if (IsHeroic())
+ events.ScheduleEvent(EVENT_SUMMON_GUARDIAN, 7s, GROUP_SUBMERGED);
+
+ _remainingLargeSummonsBeforeEmerge = IsHeroic() ? 2 : 1;
+
+ events.ScheduleEvent(EVENT_SUMMON_ASSASSINS, 4s, GROUP_SUBMERGED);
+ events.ScheduleEvent(EVENT_SUMMON_ASSASSINS, 24s, GROUP_SUBMERGED);
+ events.ScheduleEvent(EVENT_SUMMON_ASSASSINS, 44s, GROUP_SUBMERGED);
+ break;
+ case SUBMERGE_50:
+ events.ScheduleEvent(EVENT_SUMMON_GUARDIAN, 4s, GROUP_SUBMERGED);
+ if (IsHeroic())
+ events.ScheduleEvent(EVENT_SUMMON_GUARDIAN, 7s, GROUP_SUBMERGED);
+
+ events.ScheduleEvent(EVENT_SUMMON_VENOMANCER, 24s, GROUP_SUBMERGED);
+ if (IsHeroic())
+ events.ScheduleEvent(EVENT_SUMMON_VENOMANCER, 29s, GROUP_SUBMERGED);
+
+ _remainingLargeSummonsBeforeEmerge = IsHeroic() ? 4 : 2;
+
+ events.ScheduleEvent(EVENT_SUMMON_ASSASSINS, 4s, GROUP_SUBMERGED);
+ events.ScheduleEvent(EVENT_SUMMON_ASSASSINS, 24s, GROUP_SUBMERGED);
+ events.ScheduleEvent(EVENT_SUMMON_ASSASSINS, 44s, GROUP_SUBMERGED);
+ break;
+ case SUBMERGE_25:
+ events.ScheduleEvent(EVENT_SUMMON_GUARDIAN, 4s, GROUP_SUBMERGED);
+ if (IsHeroic())
+ events.ScheduleEvent(EVENT_SUMMON_GUARDIAN, 7s, GROUP_SUBMERGED);
+
+ events.ScheduleEvent(EVENT_SUMMON_VENOMANCER, 24s, GROUP_SUBMERGED);
+ if (IsHeroic())
+ events.ScheduleEvent(EVENT_SUMMON_VENOMANCER, 29s, GROUP_SUBMERGED);
+
+ _remainingLargeSummonsBeforeEmerge = IsHeroic() ? 4 : 2;
+
+ events.ScheduleEvent(EVENT_SUMMON_ASSASSINS, 4s, GROUP_SUBMERGED);
+ events.ScheduleEvent(EVENT_SUMMON_DARTER, 4s, GROUP_SUBMERGED);
+
+ events.ScheduleEvent(EVENT_SUMMON_DARTER, 12s, GROUP_SUBMERGED);
+
+ events.ScheduleEvent(EVENT_SUMMON_ASSASSINS, 24s, GROUP_SUBMERGED);
+ events.ScheduleEvent(EVENT_SUMMON_DARTER, 26s, GROUP_SUBMERGED);
+
+ events.ScheduleEvent(EVENT_SUMMON_DARTER, 32s, GROUP_SUBMERGED);
+
+ events.ScheduleEvent(EVENT_SUMMON_ASSASSINS, 44s, GROUP_SUBMERGED);
+ events.ScheduleEvent(EVENT_SUMMON_DARTER, 45s, GROUP_SUBMERGED);
+ break;
+ default:
+ break;
+ }
+ }
- void JustSummoned(Creature* summon) override
- {
- summons.Summon(summon);
- if (!summon->IsTrigger())
- summon->SetInCombatWithZone();
- }
+ void JustEngagedWith(Unit* /*who*/) override
+ {
+ Talk(SAY_AGGRO);
+ instance->DoStartTimedAchievement(ACHIEVEMENT_TIMED_TYPE_EVENT, ACHIEV_TIMED_START_EVENT);
- void Reset() override
- {
- BossAI::Reset();
- _summonedMinions = false;
- me->RemoveUnitFlag(UNIT_FLAG_NON_ATTACKABLE|UNIT_FLAG_NOT_SELECTABLE);
- instance->DoStopTimedAchievement(ACHIEVEMENT_TIMED_TYPE_EVENT, ACHIEV_TIMED_START_EVENT);
-
- ScheduleHealthCheckEvent({ 75, 50, 25 }, [&]{
- Talk(SAY_SUBMERGE);
- _summonedMinions = false;
- DoCastSelf(SPELL_CLEAR_ALL_DEBUFFS, true);
- DoCastSelf(SPELL_SUBMERGE, false);
-
- me->m_Events.AddEventAtOffset([this] {
- me->SetUnitFlag(UNIT_FLAG_NON_ATTACKABLE | UNIT_FLAG_NOT_SELECTABLE);
- DoCastSelf(SPELL_IMPALE_PERIODIC, true);
- }, 2s);
-
- events.Reset();
- events.ScheduleEvent(EVENT_EMERGE, 60s);
- events.ScheduleEvent(EVENT_SUMMON_ASSASSINS, 2s);
- events.ScheduleEvent(EVENT_SUMMON_GUARDIAN, 4s);
- events.ScheduleEvent(EVENT_SUMMON_ASSASSINS, 15s);
- events.ScheduleEvent(EVENT_SUMMON_VENOMANCER, 20s);
- events.ScheduleEvent(EVENT_SUMMON_DARTER, 30s);
- events.ScheduleEvent(EVENT_SUMMON_ASSASSINS, 35s);
- }, false);
- }
+ ScheduleEmerged();
+ events.ScheduleEvent(EVENT_CLOSE_DOORS, 5s);
- void SummonedCreatureDies(Creature* /*summon*/, Unit* /*killer*/) override
- {
- if (!me->HasUnitFlag(UNIT_FLAG_NOT_SELECTABLE))
- return;
+ // set up world triggers
+ std::list<TempSummon*> summoned;
+ me->SummonCreatureGroup(SUMMON_GROUP_WORLD_TRIGGER_GUARDIAN, &summoned);
+ if (summoned.empty())
+ {
+ EnterEvadeMode(EVADE_REASON_OTHER);
+ return;
+ }
+ TempSummon* guardianTrigger = summoned.front();
+ _guardianTriggerGUID = guardianTrigger->GetGUID();
- if (_summonedMinions && !summons.IsAnyCreatureWithEntryAlive(NPC_ANUBAR_GUARDIAN) && !summons.IsAnyCreatureWithEntryAlive(NPC_ANUBAR_VENOMANCER))
- {
- events.Reset();
- events.ScheduleEvent(EVENT_EMERGE, 5s);
- }
- }
+ summoned.clear();
+ _balconySummons.clear();
+ me->SummonCreatureGroup(SUMMON_GROUP_WORLD_TRIGGER_BALCONY, &summoned);
+ if (summoned.empty())
+ {
+ EnterEvadeMode(EVADE_REASON_OTHER);
+ return;
+ }
+ for (auto const& summon : summoned)
+ _balconySummons.Summon(summon);
+ }
- void JustEngagedWith(Unit* ) override
- {
- Talk(SAY_AGGRO);
- instance->DoStartTimedAchievement(ACHIEVEMENT_TIMED_TYPE_EVENT, ACHIEV_TIMED_START_EVENT);
+ void EnterEvadeMode(EvadeReason why) override
+ {
+ me->DisableRotate(false);
+ BossAI::EnterEvadeMode(why);
+ summons.DespawnAll();
+ }
- events.ScheduleEvent(EVENT_CARRION_BEETELS, 6500ms);
- events.ScheduleEvent(EVENT_LEECHING_SWARM, 20s);
- events.ScheduleEvent(EVENT_POUND, 15s);
- events.ScheduleEvent(EVENT_CLOSE_DOORS, 5s);
- }
+ void MoveInLineOfSight(Unit* who) override
+ {
+ if (!_intro && who->IsPlayer())
+ {
+ _intro = true;
+ Talk(SAY_INTRO);
+ }
+ BossAI::MoveInLineOfSight(who);
+ }
+
+ void JustDied(Unit* killer) override
+ {
+ Talk(SAY_DEATH);
+ BossAI::JustDied(killer);
+ }
+
+ void KilledUnit(Unit* /*victim*/) override
+ {
+ if (!events.HasTimeUntilEvent(EVENT_KILL_TALK))
+ {
+ Talk(SAY_SLAY);
+ events.ScheduleEvent(EVENT_KILL_TALK, 6s);
+ }
+ }
- void SummonHelpers(float x, float y, float z, uint32 spellId)
+ void SummonedCreatureDies(Creature* summon, Unit* /*killer*/) override
+ {
+ if (!me->HasUnitFlag(UNIT_FLAG_NOT_SELECTABLE))
+ return;
+
+ switch (summon->GetEntry())
+ {
+ case NPC_ANUBAR_GUARDIAN:
+ case NPC_ANUBAR_VENOMANCER:
{
- SpellInfo const* spellInfo = sSpellMgr->GetSpellInfo(spellId);
- me->SummonCreature(spellInfo->Effects[EFFECT_0].MiscValue, x, y, z, 0.0f, TEMPSUMMON_CORPSE_TIMED_DESPAWN, 5000);
+ --_remainingLargeSummonsBeforeEmerge;
+ if (_remainingLargeSummonsBeforeEmerge == 0)
+ {
+ me->RemoveAurasDueToSpell(SPELL_IMPALE_PERIODIC);
+ events.RescheduleEvent(EVENT_EMERGE, 5s, GROUP_SUBMERGED);
+ }
+ break;
}
+ default:
+ break;
+ }
+ }
- void UpdateAI(uint32 diff) override
- {
- if (!UpdateVictim())
- return;
+ void SummonedCreatureEvade(Creature* /*summon*/) override
+ {
+ EnterEvadeMode(EVADE_REASON_OTHER);
+ }
+
+ void UpdateAI(uint32 diff) override
+ {
+ if (!UpdateVictim())
+ return;
- events.Update(diff);
- scheduler.Update(diff);
+ events.Update(diff);
+ scheduler.Update(diff);
- if (me->HasUnitState(UNIT_STATE_CASTING))
- return;
+ if (me->HasUnitState(UNIT_STATE_CASTING))
+ return;
- switch (events.ExecuteEvent())
+ switch (events.ExecuteEvent())
+ {
+ case EVENT_CLOSE_DOORS:
+ BossAI::_JustEngagedWith();
+ break;
+ case EVENT_CARRION_BEETLES:
+ DoCastSelf(SPELL_CARRION_BEETLES);
+ events.ScheduleEvent(EVENT_CARRION_BEETLES, 25s, GROUP_EMERGED);
+ break;
+ case EVENT_LEECHING_SWARM:
+ Talk(SAY_LOCUST);
+ DoCastSelf(SPELL_LEECHING_SWARM);
+ events.ScheduleEvent(EVENT_LEECHING_SWARM, 20s, GROUP_EMERGED);
+ break;
+ case EVENT_POUND:
+ if (Unit* target = SelectTarget(SelectTargetMethod::Random, 0, 10.0f))
{
- case EVENT_CLOSE_DOORS:
- _JustEngagedWith();
- break;
- case EVENT_CARRION_BEETELS:
- me->CastSpell(me, SPELL_CARRION_BEETLES, false);
- events.ScheduleEvent(EVENT_CARRION_BEETELS, 25s);
- break;
- case EVENT_LEECHING_SWARM:
- Talk(SAY_LOCUST);
- me->CastSpell(me, SPELL_LEECHING_SWARM, false);
- events.ScheduleEvent(EVENT_LEECHING_SWARM, 20s);
- break;
- case EVENT_POUND:
- if (Unit* target = SelectTarget(SelectTargetMethod::Random, 0, 10.0f))
- {
- me->CastSpell(me, SPELL_SELF_ROOT, true);
- me->DisableRotate(true);
- me->SendMovementFlagUpdate();
- events.ScheduleEvent(EVENT_ENABLE_ROTATE, 3300ms);
- me->CastSpell(target, SPELL_POUND, false);
- }
- events.ScheduleEvent(EVENT_POUND, 18s);
- break;
- case EVENT_ENABLE_ROTATE:
- me->RemoveAurasDueToSpell(SPELL_SELF_ROOT);
- me->DisableRotate(false);
- break;
- case EVENT_EMERGE:
- me->CastSpell(me, SPELL_EMERGE, true);
- me->RemoveAura(SPELL_SUBMERGE);
- me->RemoveAura(SPELL_IMPALE_PERIODIC);
- me->RemoveUnitFlag(UNIT_FLAG_NON_ATTACKABLE|UNIT_FLAG_NOT_SELECTABLE);
- events.ScheduleEvent(EVENT_CARRION_BEETELS, 6500ms);
- events.ScheduleEvent(EVENT_LEECHING_SWARM, 20s);
- events.ScheduleEvent(EVENT_POUND, 15s);
- break;
- case EVENT_SUMMON_ASSASSINS:
- SummonHelpers(509.32f, 247.42f, 239.48f, SPELL_SUMMON_ASSASSIN);
- SummonHelpers(589.51f, 240.19f, 236.0f, SPELL_SUMMON_ASSASSIN);
- break;
- case EVENT_SUMMON_DARTER:
- SummonHelpers(509.32f, 247.42f, 239.48f, SPELL_SUMMON_DARTER);
- SummonHelpers(589.51f, 240.19f, 236.0f, SPELL_SUMMON_DARTER);
- break;
- case EVENT_SUMMON_GUARDIAN:
- SummonHelpers(550.34f, 316.00f, 234.30f, SPELL_SUMMON_GUARDIAN);
- break;
- case EVENT_SUMMON_VENOMANCER:
- _summonedMinions = true;
- SummonHelpers(550.34f, 316.00f, 234.30f, SPELL_SUMMON_VENOMANCER);
- break;
+ DoCastSelf(SPELL_SELF_ROOT, true);
+ me->DisableRotate(true);
+ me->SendMovementFlagUpdate();
+ events.ScheduleEvent(EVENT_ENABLE_ROTATE, 3300ms, GROUP_EMERGED);
+ DoCast(target, SPELL_POUND);
}
+ events.ScheduleEvent(EVENT_POUND, 18s, GROUP_EMERGED);
+ break;
+ case EVENT_ENABLE_ROTATE:
+ me->RemoveAurasDueToSpell(SPELL_SELF_ROOT);
+ me->DisableRotate(false);
+ break;
+ case EVENT_EMERGE:
+ me->RemoveAurasDueToSpell(SPELL_SUBMERGE);
+ me->RemoveAurasDueToSpell(SPELL_IMPALE_PERIODIC);
+ me->RemoveUnitFlag(UNIT_FLAG_NON_ATTACKABLE | UNIT_FLAG_NOT_SELECTABLE);
+ DoCastSelf(SPELL_EMERGE);
+ ScheduleEmerged();
+ break;
+ case EVENT_SUMMON_GUARDIAN:
+ if (Creature* trigger = ObjectAccessor::GetCreature(*me, _guardianTriggerGUID))
+ trigger->CastSpell(trigger, SPELL_SUMMON_GUARDIAN, true, nullptr, nullptr, me->GetGUID());
+ break;
+ case EVENT_SUMMON_VENOMANCER:
+ if (Creature* trigger = ObjectAccessor::GetCreature(*me, _guardianTriggerGUID))
+ trigger->CastSpell(trigger, SPELL_SUMMON_VENOMANCER, true, nullptr, nullptr, me->GetGUID());
+ break;
+ case EVENT_SUMMON_DARTER:
+ if (Creature* trigger = ObjectAccessor::GetCreature(*me, Acore::Containers::SelectRandomContainerElement(_balconySummons)))
+ trigger->CastSpell(trigger, SPELL_SUMMON_DARTER, true, nullptr, nullptr, me->GetGUID());
+ break;
+ case EVENT_SUMMON_ASSASSINS:
+ if (Creature* trigger = ObjectAccessor::GetCreature(*me, Acore::Containers::SelectRandomContainerElement(_balconySummons)))
+ trigger->CastSpell(trigger, SPELL_SUMMON_ASSASSIN, true, nullptr, nullptr, me->GetGUID());
+ if (Creature* trigger = ObjectAccessor::GetCreature(*me, Acore::Containers::SelectRandomContainerElement(_balconySummons)))
+ trigger->CastSpell(trigger, SPELL_SUMMON_ASSASSIN, true, nullptr, nullptr, me->GetGUID());
+ break;
+ default:
+ break;
+ }
- if (!me->HasUnitFlag(UNIT_FLAG_NOT_SELECTABLE))
- DoMeleeAttackIfReady();
- }
+ if (!me->HasUnitFlag(UNIT_FLAG_NOT_SELECTABLE))
+ DoMeleeAttackIfReady();
+ }
- private:
- bool _intro;
- bool _summonedMinions;
- };
+ void DamageTaken(Unit* attacker, uint32& damage, DamageEffectType damagetype, SpellSchoolMask damageSchoolMask) override
+ {
+ BossAI::DamageTaken(attacker, damage, damagetype, damageSchoolMask);
- CreatureAI* GetAI(Creature* creature) const override
- {
- return GetAzjolNerubAI<boss_anub_arakAI>(creature);
- }
+ if (me->HasAura(SPELL_SUBMERGE) && damage >= me->GetHealth())
+ damage = me->GetHealth() - 1;
+ }
+
+ private:
+ bool _intro;
+ uint8 _submergePhase;
+ uint8 _remainingLargeSummonsBeforeEmerge;
+ ObjectGuid _guardianTriggerGUID;
+ SummonList _balconySummons;
};
-class spell_azjol_nerub_carrion_beetels : public AuraScript
+class spell_azjol_nerub_carrion_beetles : public AuraScript
{
- PrepareAuraScript(spell_azjol_nerub_carrion_beetels)
+ PrepareAuraScript(spell_azjol_nerub_carrion_beetles)
- void HandleEffectPeriodic(AuraEffect const* /*aurEff*/)
+ void HandleEffectPeriodic(AuraEffect const* /*aurEff*/)
{
// Xinef: 2 each second
GetUnitOwner()->CastSpell(GetUnitOwner(), SPELL_SUMMON_CARRION_BEETLES, true);
@@ -280,7 +400,7 @@ class spell_azjol_nerub_carrion_beetels : public AuraScript
void Register() override
{
- OnEffectPeriodic += AuraEffectPeriodicFn(spell_azjol_nerub_carrion_beetels::HandleEffectPeriodic, EFFECT_0, SPELL_AURA_PERIODIC_DUMMY);
+ OnEffectPeriodic += AuraEffectPeriodicFn(spell_azjol_nerub_carrion_beetles::HandleEffectPeriodic, EFFECT_0, SPELL_AURA_PERIODIC_DUMMY);
}
};
@@ -288,7 +408,7 @@ class spell_azjol_nerub_pound : public SpellScript
{
PrepareSpellScript(spell_azjol_nerub_pound);
- void HandleApplyAura(SpellEffIndex /*effIndex*/)
+ void HandleApplyAura(SpellEffIndex /*effIndex*/)
{
if (Unit* unitTarget = GetHitUnit())
GetCaster()->CastSpell(unitTarget, SPELL_POUND_DAMAGE, true);
@@ -320,8 +440,8 @@ class spell_azjol_nerub_impale_summon : public SpellScript
void AddSC_boss_anub_arak()
{
- new boss_anub_arak();
- RegisterSpellScript(spell_azjol_nerub_carrion_beetels);
+ RegisterAzjolNerubCreatureAI(boss_anub_arak);
+ RegisterSpellScript(spell_azjol_nerub_carrion_beetles);
RegisterSpellScript(spell_azjol_nerub_pound);
RegisterSpellScript(spell_azjol_nerub_impale_summon);
}
diff --git a/src/server/scripts/Northrend/AzjolNerub/AzjolNerub/boss_hadronox.cpp b/src/server/scripts/Northrend/AzjolNerub/AzjolNerub/boss_hadronox.cpp
index f3f9396ba0..c4bc94518b 100644
--- a/src/server/scripts/Northrend/AzjolNerub/AzjolNerub/boss_hadronox.cpp
+++ b/src/server/scripts/Northrend/AzjolNerub/AzjolNerub/boss_hadronox.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
@@ -111,7 +111,7 @@ public:
uint32 GetData(uint32 data) const override
{
if (data == me->GetEntry())
- return !me->isActiveObject() || events.GetNextEventTime(EVENT_HADRONOX_MOVE4) != 0;
+ return !me->isActiveObject() || events.HasTimeUntilEvent(EVENT_HADRONOX_MOVE4) ? 1 : 0;
return 0;
}
@@ -121,11 +121,11 @@ public:
// Xinef: cannot use pathfinding...
if (summon->GetDistance(477.0f, 618.0f, 771.0f) < 5.0f)
- summon->GetMotionMaster()->MovePath(3000012, false);
+ summon->GetMotionMaster()->MoveWaypoint(3000012, false);
else if (summon->GetDistance(583.0f, 617.0f, 771.0f) < 5.0f)
- summon->GetMotionMaster()->MovePath(3000013, false);
+ summon->GetMotionMaster()->MoveWaypoint(3000013, false);
else if (summon->GetDistance(581.0f, 608.5f, 739.0f) < 5.0f)
- summon->GetMotionMaster()->MovePath(3000014, false);
+ summon->GetMotionMaster()->MoveWaypoint(3000014, false);
}
void KilledUnit(Unit* victim) override
@@ -258,7 +258,7 @@ public:
{
if (summon->GetEntry() != me->GetEntry())
{
- summon->GetMotionMaster()->MovePoint(0, *me, false);
+ summon->GetMotionMaster()->MovePoint(0, *me, FORCED_MOVEMENT_NONE, 0.f, false);
summon->GetMotionMaster()->MoveFollow(me, 0.1f, 0.0f + M_PI * 0.3f * summons.size());
}
summons.Summon(summon);
diff --git a/src/server/scripts/Northrend/AzjolNerub/AzjolNerub/boss_krikthir_the_gatewatcher.cpp b/src/server/scripts/Northrend/AzjolNerub/AzjolNerub/boss_krikthir_the_gatewatcher.cpp
index 36fd31ff13..3f4ec54805 100644
--- a/src/server/scripts/Northrend/AzjolNerub/AzjolNerub/boss_krikthir_the_gatewatcher.cpp
+++ b/src/server/scripts/Northrend/AzjolNerub/AzjolNerub/boss_krikthir_the_gatewatcher.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
@@ -16,6 +16,7 @@
*/
#include "AchievementCriteriaScript.h"
+#include "CreatureGroups.h"
#include "CreatureScript.h"
#include "ScriptedCreature.h"
#include "azjol_nerub.h"
@@ -75,16 +76,6 @@ public:
{
BossAI::Reset();
- me->SummonCreature(NPC_WATCHER_NARJIL, 511.8f, 666.493f, 776.278f, 0.977f, TEMPSUMMON_CORPSE_TIMED_DESPAWN, 30000);
- me->SummonCreature(NPC_SHADOWCASTER, 511.63f, 672.44f, 775.71f, 0.90f, TEMPSUMMON_CORPSE_TIMED_DESPAWN, 30000);
- me->SummonCreature(NPC_WARRIOR, 506.75f, 670.7f, 776.24f, 0.92f, TEMPSUMMON_CORPSE_TIMED_DESPAWN, 30000);
- me->SummonCreature(NPC_WATCHER_GASHRA, 526.66f, 663.605f, 775.805f, 1.23f, TEMPSUMMON_CORPSE_TIMED_DESPAWN, 30000);
- me->SummonCreature(NPC_SKIRMISHER, 522.91f, 660.18f, 776.19f, 1.28f, TEMPSUMMON_CORPSE_TIMED_DESPAWN, 30000);
- me->SummonCreature(NPC_WARRIOR, 528.14f, 659.72f, 776.14f, 1.37f, TEMPSUMMON_CORPSE_TIMED_DESPAWN, 30000);
- me->SummonCreature(NPC_WATCHER_SILTHIK, 543.826f, 665.123f, 776.245f, 1.55f, TEMPSUMMON_CORPSE_TIMED_DESPAWN, 30000);
- me->SummonCreature(NPC_SKIRMISHER, 547.5f, 669.96f, 776.1f, 2.3f, TEMPSUMMON_CORPSE_TIMED_DESPAWN, 30000);
- me->SummonCreature(NPC_SHADOWCASTER, 548.64f, 664.27f, 776.74f, 1.77f, TEMPSUMMON_CORPSE_TIMED_DESPAWN, 30000);
-
ScheduleHealthCheckEvent(25, [&] {
DoCastSelf(SPELL_FRENZY, true);
@@ -100,6 +91,16 @@ public:
_canTalk = true;
_minionInCombat = false;
+
+ Creature* narjil = instance->GetCreature(DATA_NARJIL);
+ Creature* gashra = instance->GetCreature(DATA_GASHRA);
+ Creature* silthik = instance->GetCreature(DATA_SILTHIK);
+
+ for (Creature* watcher : { narjil, gashra, silthik })
+ {
+ if (watcher && watcher->GetFormation())
+ watcher->GetFormation()->RespawnFormation(true);
+ }
}
void MoveInLineOfSight(Unit* who) override
@@ -120,24 +121,39 @@ public:
{
_minionInCombat = true;
- for (Seconds const& timer : { 10s, 40s, 70s })
+ Talk(SAY_SEND_GROUP, 10s);
+
+ for (Seconds const& timer : { 60s, 120s })
{
me->m_Events.AddEventAtOffset([this] {
- me->CastCustomSpell(SPELL_SUBBOSS_AGGRO_TRIGGER, SPELLVALUE_MAX_TARGETS, 1, me, true);
Talk(SAY_SEND_GROUP);
+
+ me->m_Events.AddEventAtOffset([this] {
+ me->CastCustomSpell(SPELL_SUBBOSS_AGGRO_TRIGGER, SPELLVALUE_MAX_TARGETS, 1, me, true);
+ }, 5s);
}, timer);
}
me->m_Events.AddEventAtOffset([this] {
me->SetInCombatWithZone();
- }, 100s);
+ }, IsHeroic() ? 200s : 180s);
}
}
uint32 GetData(uint32 data) const override
{
if (data == me->GetEntry())
- return summons.HasEntry(NPC_WATCHER_NARJIL) && summons.HasEntry(NPC_WATCHER_GASHRA) && summons.HasEntry(NPC_WATCHER_SILTHIK);
+ {
+ Creature* narjil = instance->GetCreature(DATA_NARJIL);
+ Creature* gashra = instance->GetCreature(DATA_GASHRA);
+ Creature* silthik = instance->GetCreature(DATA_SILTHIK);
+
+ if (!narjil || !gashra || !silthik)
+ return false;
+
+ return narjil->IsAlive() && gashra->IsAlive() && silthik->IsAlive();
+ }
+
return 0;
}
@@ -187,12 +203,6 @@ public:
}
}
- void JustSummoned(Creature* summon) override
- {
- summon->SetNoCallAssistance(true);
- summons.Summon(summon);
- }
-
void SummonedCreatureDies(Creature* summon, Unit*) override
{
summons.Despawn(summon);
diff --git a/src/server/scripts/Northrend/AzjolNerub/AzjolNerub/instance_azjol_nerub.cpp b/src/server/scripts/Northrend/AzjolNerub/AzjolNerub/instance_azjol_nerub.cpp
index 9d6616db97..e660b2c850 100644
--- a/src/server/scripts/Northrend/AzjolNerub/AzjolNerub/instance_azjol_nerub.cpp
+++ b/src/server/scripts/Northrend/AzjolNerub/AzjolNerub/instance_azjol_nerub.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
@@ -25,17 +25,21 @@
DoorData const doorData[] =
{
- { GO_KRIKTHIR_DOORS, DATA_KRIKTHIR, DOOR_TYPE_PASSAGE },
- { GO_ANUBARAK_DOORS1, DATA_ANUBARAK_EVENT, DOOR_TYPE_ROOM },
- { GO_ANUBARAK_DOORS2, DATA_ANUBARAK_EVENT, DOOR_TYPE_ROOM },
- { GO_ANUBARAK_DOORS3, DATA_ANUBARAK_EVENT, DOOR_TYPE_ROOM },
- { 0, 0, DOOR_TYPE_ROOM }
+ { GO_KRIKTHIR_DOORS, DATA_KRIKTHIR, DOOR_TYPE_PASSAGE },
+ { GO_ANUBARAK_DOORS1, DATA_ANUBARAK, DOOR_TYPE_ROOM },
+ { GO_ANUBARAK_DOORS2, DATA_ANUBARAK, DOOR_TYPE_ROOM },
+ { GO_ANUBARAK_DOORS3, DATA_ANUBARAK, DOOR_TYPE_ROOM },
+ { 0, 0, DOOR_TYPE_ROOM }
};
ObjectData const creatureData[] =
{
{ NPC_KRIKTHIR_THE_GATEWATCHER, DATA_KRIKTHIR },
{ NPC_HADRONOX, DATA_HADRONOX },
+ { NPC_ANUBARAK, DATA_ANUBARAK },
+ { NPC_WATCHER_GASHRA, DATA_GASHRA },
+ { NPC_WATCHER_NARJIL, DATA_NARJIL },
+ { NPC_WATCHER_SILTHIK, DATA_SILTHIK },
{ 0, 0 }
};
@@ -53,7 +57,7 @@ BossBoundaryData const boundaries =
{
{ DATA_KRIKTHIR, new RectangleBoundary(400.0f, 580.0f, 623.5f, 810.0f) },
{ DATA_HADRONOX, new ZRangeBoundary(666.0f, 776.0f) },
- { DATA_ANUBARAK_EVENT, new CircleBoundary(Position(550.6178f, 253.5917f), 26.0f) }
+ { DATA_ANUBARAK, new CircleBoundary(Position(550.6178f, 253.5917f), 32.0f) }
};
class instance_azjol_nerub : public InstanceMapScript
diff --git a/src/server/scripts/Northrend/AzjolNerub/ahnkahet/ahnkahet.h b/src/server/scripts/Northrend/AzjolNerub/ahnkahet/ahnkahet.h
index b6b691be62..c2ddd3b7e2 100644
--- a/src/server/scripts/Northrend/AzjolNerub/ahnkahet/ahnkahet.h
+++ b/src/server/scripts/Northrend/AzjolNerub/ahnkahet/ahnkahet.h
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
@@ -44,6 +44,7 @@ enum AhnKahetCreatures
NPC_AMANITAR = 30258,
// Teldaram and Jedoga encounter related
NPC_JEDOGA_CONTROLLER = 30181,
+ NPC_TWILIGHT_WORSHIPPER = 30111
};
enum AhnkahetSpells
diff --git a/src/server/scripts/Northrend/AzjolNerub/ahnkahet/boss_amanitar.cpp b/src/server/scripts/Northrend/AzjolNerub/ahnkahet/boss_amanitar.cpp
index fcebd8c014..6e78807334 100644
--- a/src/server/scripts/Northrend/AzjolNerub/ahnkahet/boss_amanitar.cpp
+++ b/src/server/scripts/Northrend/AzjolNerub/ahnkahet/boss_amanitar.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/scripts/Northrend/AzjolNerub/ahnkahet/boss_elder_nadox.cpp b/src/server/scripts/Northrend/AzjolNerub/ahnkahet/boss_elder_nadox.cpp
index 1eaad721fa..c67b65fceb 100644
--- a/src/server/scripts/Northrend/AzjolNerub/ahnkahet/boss_elder_nadox.cpp
+++ b/src/server/scripts/Northrend/AzjolNerub/ahnkahet/boss_elder_nadox.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/scripts/Northrend/AzjolNerub/ahnkahet/boss_herald_volazj.cpp b/src/server/scripts/Northrend/AzjolNerub/ahnkahet/boss_herald_volazj.cpp
index fa1a998b0d..2591a3e4bb 100644
--- a/src/server/scripts/Northrend/AzjolNerub/ahnkahet/boss_herald_volazj.cpp
+++ b/src/server/scripts/Northrend/AzjolNerub/ahnkahet/boss_herald_volazj.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
@@ -77,51 +77,52 @@ enum Misc
DATA_SET_INSANITY_PHASE = 1,
};
-enum Events
-{
- EVENT_HERALD_MIND_FLAY = 1,
- EVENT_HERALD_SHADOW,
- EVENT_HERALD_SHIVER,
-};
-
const std::array<uint32, MAX_INSANITY_TARGETS> InsanitySpells = { SPELL_INSANITY_PHASING_1, SPELL_INSANITY_PHASING_2, SPELL_INSANITY_PHASING_3, SPELL_INSANITY_PHASING_4, SPELL_INSANITY_PHASING_5 };
struct boss_volazj : public BossAI
{
boss_volazj(Creature* pCreature) : BossAI(pCreature, DATA_HERALD_VOLAZJ),
- insanityTimes(0),
insanityPhase(false)
{ }
- void InitializeAI() override
- {
- BossAI::InitializeAI();
- // Visible for all players in insanity
- me->SetPhaseMask((1 | 16 | 32 | 64 | 128 | 256), true);
- }
-
void Reset() override
{
_Reset();
- insanityTimes = 0;
insanityPhase = false;
me->RemoveUnitFlag(UNIT_FLAG_NOT_SELECTABLE);
me->SetControlled(false, UNIT_STATE_STUNNED);
ResetPlayersPhaseMask();
instance->DoStopTimedAchievement(ACHIEVEMENT_TIMED_TYPE_EVENT, ACHIEV_QUICK_DEMISE_START_EVENT);
+ me->SetPhaseMask((1 | 16 | 32 | 64 | 128 | 256), true);
+
+ ScheduleHealthCheckEvent({ 66, 33 }, [&]{
+ scheduler.CancelAll();
+ DoCastSelf(SPELL_INSANITY);
+ }, false);
+ }
+
+ void ScheduleTasks() override
+ {
+ ScheduleTimedEvent(8s, [&] {
+ DoCastVictim(SPELL_MIND_FLAY);
+ }, 20s);
+
+ ScheduleTimedEvent(5s, [&] {
+ DoCastVictim(SPELL_SHADOW_BOLT_VOLLEY);
+ }, 5s);
+
+ ScheduleTimedEvent(15s, [&] {
+ DoCastRandomTarget(SPELL_SHIVER);
+ }, 15s);
}
void JustEngagedWith(Unit* /*who*/) override
{
_JustEngagedWith();
- events.ScheduleEvent(EVENT_HERALD_MIND_FLAY, 8s);
- events.ScheduleEvent(EVENT_HERALD_SHADOW, 5s);
- events.ScheduleEvent(EVENT_HERALD_SHIVER, 15s);
Talk(SAY_AGGRO);
DoCastSelf(SPELL_WHISPER_AGGRO);
instance->DoStartTimedAchievement(ACHIEVEMENT_TIMED_TYPE_EVENT, ACHIEV_QUICK_DEMISE_START_EVENT);
- me->SetInCombatWithZone();
}
void JustDied(Unit* /*killer*/) override
@@ -184,36 +185,13 @@ struct boss_volazj : public BossAI
}
}
- void DamageTaken(Unit* /*attacker*/, uint32& damage, DamageEffectType /*damagetype*/, SpellSchoolMask /*damageSchoolMask*/) override
- {
- // Do not perform insanity recast if boss is casting Insanity already
- if (me->FindCurrentSpellBySpellId(SPELL_INSANITY))
- {
- return;
- }
-
- // First insanity
- if (insanityTimes == 0 && me->HealthBelowPctDamaged(66, damage))
- {
- DoCastSelf(SPELL_INSANITY, false);
- ++insanityTimes;
- }
- // Second insanity
- else if (insanityTimes == 1 && me->HealthBelowPctDamaged(33, damage))
- {
- me->InterruptNonMeleeSpells(false);
- DoCastSelf(SPELL_INSANITY, false);
- ++insanityTimes;
- }
- }
-
void UpdateAI(uint32 diff) override
{
//Return since we have no target
if (!UpdateVictim())
- {
return;
- }
+
+ scheduler.Update(diff);
if (insanityPhase)
{
@@ -226,53 +204,13 @@ struct boss_volazj : public BossAI
me->RemoveUnitFlag(UNIT_FLAG_NOT_SELECTABLE);
me->SetControlled(false, UNIT_STATE_STUNNED);
me->RemoveAurasDueToSpell(INSANITY_VISUAL);
- }
-
- events.Update(diff);
- if (me->HasUnitState(UNIT_STATE_CASTING))
- {
- return;
- }
-
- while (uint32 const eventId = events.ExecuteEvent())
- {
- switch (eventId)
- {
- case EVENT_HERALD_MIND_FLAY:
- {
- DoCastVictim(SPELL_MIND_FLAY, false);
- events.Repeat(20s);
- break;
- }
- case EVENT_HERALD_SHADOW:
- {
- DoCastVictim(SPELL_SHADOW_BOLT_VOLLEY, false);
- events.Repeat(5s);
- break;
- }
- case EVENT_HERALD_SHIVER:
- {
- if (Unit* pTarget = SelectTarget(SelectTargetMethod::Random, 0, 0.0f, true))
- {
- DoCast(pTarget, SPELL_SHIVER, false);
- }
-
- events.Repeat(15s);
- break;
- }
- }
-
- if (me->HasUnitState(UNIT_STATE_CASTING))
- {
- return;
- }
+ ScheduleTasks();
}
DoMeleeAttackIfReady();
}
private:
- uint8 insanityTimes;
bool insanityPhase; // Indicates if boss enter to insanity phase
uint32 GetPlrInsanityAuraId(uint32 phaseMask) const
@@ -312,6 +250,7 @@ private:
bool CheckPhaseMinions()
{
summons.RemoveNotExisting();
+
if (summons.empty())
{
ResetPlayersPhaseMask();
diff --git a/src/server/scripts/Northrend/AzjolNerub/ahnkahet/boss_jedoga_shadowseeker.cpp b/src/server/scripts/Northrend/AzjolNerub/ahnkahet/boss_jedoga_shadowseeker.cpp
index 574db03388..d780776064 100644
--- a/src/server/scripts/Northrend/AzjolNerub/ahnkahet/boss_jedoga_shadowseeker.cpp
+++ b/src/server/scripts/Northrend/AzjolNerub/ahnkahet/boss_jedoga_shadowseeker.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
@@ -16,7 +16,6 @@
*/
#include "AchievementCriteriaScript.h"
-#include "Containers.h"
#include "CreatureScript.h"
#include "ObjectAccessor.h"
#include "ScriptedCreature.h"
@@ -54,12 +53,9 @@ enum Spells
// FIGHT
SPELL_GIFT_OF_THE_HERALD = 56219,
- SPELL_CYCLONE_STRIKE = 56855, // Self
- SPELL_CYCLONE_STRIKE_H = 60030,
- SPELL_LIGHTNING_BOLT = 56891, // 40Y
- SPELL_LIGHTNING_BOLT_H = 60032, // 40Y
- SPELL_THUNDERSHOCK = 56926, // 30Y
- SPELL_THUNDERSHOCK_H = 60029 // 30Y
+ SPELL_CYCLONE_STRIKE = 56855,
+ SPELL_LIGHTNING_BOLT = 56891,
+ SPELL_THUNDERSHOCK = 56926,
};
enum Events
@@ -93,6 +89,7 @@ enum SummonGroups
{
SUMMON_GROUP_OOC = 0,
SUMMON_GROUP_OOC_TRIGGERS = 1,
+ SUMMON_GROUP_IC_WORSHIPPERS = 2
};
enum Points
@@ -173,7 +170,7 @@ struct boss_jedoga_shadowseeker : public BossAI
me->AddUnitState(UNIT_STATE_NO_ENVIRONMENT_UPD);
me->SetDisableGravity(true);
me->SetHover(true);
- me->GetMotionMaster()->MovePoint(POINT_INITIAL, JedogaPosition[0], false);
+ me->GetMotionMaster()->MovePoint(POINT_INITIAL, JedogaPosition[0], FORCED_MOVEMENT_NONE, 0.f, false);
_Reset();
events.SetPhase(PHASE_NORMAL);
@@ -211,7 +208,7 @@ struct boss_jedoga_shadowseeker : public BossAI
}
}
- sacraficeTarget_GUID.Clear();
+ sacrificeTargetGUID.Clear();
sayPreachTimer = 120000;
ritualTriggered = false;
volunteerWork = true;
@@ -220,7 +217,7 @@ struct boss_jedoga_shadowseeker : public BossAI
void JustSummoned(Creature* summon) override
{
- if (summon->GetEntry() == NPC_JEDOGA_CONTROLLER)
+ if (summon->EntryEquals(NPC_JEDOGA_CONTROLLER, NPC_TWILIGHT_WORSHIPPER))
{
summons.Summon(summon);
}
@@ -247,7 +244,7 @@ struct boss_jedoga_shadowseeker : public BossAI
DespawnOOCSummons();
DoCastSelf(SPELL_HOVER_FALL);
me->GetMotionMaster()->MoveIdle();
- me->GetMotionMaster()->MovePoint(POINT_DOWN, JedogaPosition[1], false);
+ me->GetMotionMaster()->MovePoint(POINT_DOWN, JedogaPosition[1], FORCED_MOVEMENT_NONE, 0.f, false);
if (!combatSummonsSummoned)
{
@@ -270,12 +267,12 @@ struct boss_jedoga_shadowseeker : public BossAI
}
case NPC_TWILIGHT_VOLUNTEER:
{
- if (sacraficeTarget_GUID && summon->GetGUID() != sacraficeTarget_GUID)
+ if (sacrificeTargetGUID && summon->GetGUID() != sacrificeTargetGUID)
{
break;
}
- if (killer != me && killer->GetGUID() != sacraficeTarget_GUID)
+ if (killer != me && killer->GetGUID() != sacrificeTargetGUID)
{
volunteerWork = false;
}
@@ -317,7 +314,7 @@ struct boss_jedoga_shadowseeker : public BossAI
{
if (action == ACTION_SACRAFICE)
{
- if (Creature* target = ObjectAccessor::GetCreature(*me, sacraficeTarget_GUID))
+ if (Creature* target = ObjectAccessor::GetCreature(*me, sacrificeTargetGUID))
{
Unit::Kill(me, target);
}
@@ -329,6 +326,17 @@ struct boss_jedoga_shadowseeker : public BossAI
_JustEngagedWith();
Talk(SAY_AGGRO);
ReschedulleCombatEvents();
+
+ std::list<TempSummon*> tempSummons;
+ me->SummonCreatureGroup(SUMMON_GROUP_IC_WORSHIPPERS, &tempSummons);
+ if (!tempSummons.empty())
+ {
+ for (TempSummon* summon : tempSummons)
+ {
+ if (summon)
+ summon->SetStandState(UNIT_STAND_STATE_KNEEL);
+ }
+ }
}
void KilledUnit(Unit* who) override
@@ -386,9 +394,9 @@ struct boss_jedoga_shadowseeker : public BossAI
me->SetFacingTo(5.66f);
if (!summons.empty())
{
- sacraficeTarget_GUID = Acore::Containers::SelectRandomContainerElement(summons);
- if (ObjectAccessor::GetCreature(*me, sacraficeTarget_GUID))
+ if (Creature* creature = summons.GetRandomCreatureWithEntry(NPC_TWILIGHT_VOLUNTEER))
{
+ sacrificeTargetGUID = creature->GetGUID();
events.ScheduleEvent(EVENT_JEDGA_START_RITUAL, 3s, 0, PHASE_RITUAL);
}
// Something failed, let players continue but do not grant achievement
@@ -397,7 +405,7 @@ struct boss_jedoga_shadowseeker : public BossAI
volunteerWork = false;
me->GetMotionMaster()->Clear();
DoCastSelf(SPELL_HOVER_FALL);
- me->GetMotionMaster()->MovePoint(POINT_DOWN, JedogaPosition[1], false);
+ me->GetMotionMaster()->MovePoint(POINT_DOWN, JedogaPosition[1], FORCED_MOVEMENT_NONE, 0.f, false);
}
}
break;
@@ -461,7 +469,7 @@ struct boss_jedoga_shadowseeker : public BossAI
// Normal phase
case EVENT_JEDOGA_CYCLONE:
{
- DoCastSelf(DUNGEON_MODE(SPELL_CYCLONE_STRIKE, SPELL_CYCLONE_STRIKE_H), false);
+ DoCastSelf(SPELL_CYCLONE_STRIKE, false);
events.Repeat(10s, 14s);
break;
}
@@ -469,7 +477,7 @@ struct boss_jedoga_shadowseeker : public BossAI
{
if (Unit* pTarget = SelectTarget(SelectTargetMethod::Random, 0, 100, true))
{
- DoCast(pTarget, DUNGEON_MODE(SPELL_LIGHTNING_BOLT, SPELL_LIGHTNING_BOLT_H), false);
+ DoCast(pTarget, SPELL_LIGHTNING_BOLT, false);
}
events.Repeat(11s, 15s);
break;
@@ -478,7 +486,7 @@ struct boss_jedoga_shadowseeker : public BossAI
{
if (Unit* pTarget = SelectTarget(SelectTargetMethod::Random, 0, 100, true))
{
- DoCast(pTarget, DUNGEON_MODE(SPELL_THUNDERSHOCK, SPELL_THUNDERSHOCK_H), false);
+ DoCast(pTarget, SPELL_THUNDERSHOCK, false);
}
events.Repeat(16s, 22s);
@@ -504,20 +512,21 @@ struct boss_jedoga_shadowseeker : public BossAI
summons.DespawnEntry(NPC_JEDOGA_CONTROLLER);
DoCastSelf(SPELL_HOVER_FALL);
me->GetMotionMaster()->Clear();
- me->GetMotionMaster()->MovePoint(POINT_DOWN, JedogaPosition[1], false);
+ me->GetMotionMaster()->MovePoint(POINT_DOWN, JedogaPosition[1], FORCED_MOVEMENT_NONE, 0.f, false);
break;
}
case EVENT_JEDGA_START_RITUAL:
{
- sacraficeTarget_GUID = Acore::Containers::SelectRandomContainerElement(summons);
- if (Creature* volunteer = ObjectAccessor::GetCreature(*me, sacraficeTarget_GUID))
+ if (Creature* creature = summons.GetRandomCreatureWithEntry(NPC_TWILIGHT_VOLUNTEER))
{
+ sacrificeTargetGUID = creature->GetGUID();
Talk(SAY_SACRIFICE_1);
- sacraficeTarget_GUID = volunteer->GetGUID();
- volunteer->AI()->DoAction(ACTION_RITUAL_BEGIN);
+ creature->AI()->DoAction(ACTION_RITUAL_BEGIN);
}
break;
}
+ default:
+ break;
}
}
@@ -537,7 +546,7 @@ struct boss_jedoga_shadowseeker : public BossAI
private:
GuidList oocSummons;
GuidList oocTriggers;
- ObjectGuid sacraficeTarget_GUID;
+ ObjectGuid sacrificeTargetGUID;
uint32 sayPreachTimer;
bool combatSummonsSummoned;
bool ritualTriggered;
@@ -663,7 +672,7 @@ struct npc_twilight_volunteer : public ScriptedAI
me->GetMotionMaster()->Clear();
me->SetHomePosition(JedogaPosition[2]);
me->SetWalk(true);
- me->GetMotionMaster()->MovePoint(POINT_RITUAL, JedogaPosition[2], false);
+ me->GetMotionMaster()->MovePoint(POINT_RITUAL, JedogaPosition[2], FORCED_MOVEMENT_NONE, 0.f, false);
if (Creature* jedoga = pInstance->GetCreature(DATA_JEDOGA_SHADOWSEEKER))
{
diff --git a/src/server/scripts/Northrend/AzjolNerub/ahnkahet/boss_prince_taldaram.cpp b/src/server/scripts/Northrend/AzjolNerub/ahnkahet/boss_prince_taldaram.cpp
index de9d3e176e..89adac1952 100644
--- a/src/server/scripts/Northrend/AzjolNerub/ahnkahet/boss_prince_taldaram.cpp
+++ b/src/server/scripts/Northrend/AzjolNerub/ahnkahet/boss_prince_taldaram.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
@@ -20,6 +20,7 @@
#include "Player.h"
#include "ScriptedCreature.h"
#include "SpellInfo.h"
+#include "SpellMgr.h"
#include "SpellScript.h"
#include "SpellScriptLoader.h"
#include "ahnkahet.h"
@@ -38,11 +39,10 @@ enum Spells
SPELL_BEAM_VISUAL = 60342,
SPELL_VANISH = 55964,
SPELL_SHADOWSTEP = 55966,
- SPELL_HOVER_FALL = 60425
+ SPELL_HOVER_FALL = 60425,
+ SPELL_EMBRACE_OF_THE_VAMPYR = 55959,
};
-#define SPELL_EMBRACE_OF_THE_VAMPYR DUNGEON_MODE(55959, 59513)
-
enum Spheres
{
NPC_FLAME_SPHERE_1 = 30106,
@@ -291,7 +291,7 @@ struct boss_taldaram : public BossAI
{
BossAI::DamageTaken(attacker, damage, damageType, school);
- if (me->FindCurrentSpellBySpellId(SPELL_EMBRACE_OF_THE_VAMPYR))
+ if (me->FindCurrentSpellBySpellId(sSpellMgr->GetSpellIdForDifficulty(SPELL_EMBRACE_OF_THE_VAMPYR, me)))
{
vanishDamage += damage;
if (vanishDamage >= DUNGEON_MODE<uint32>(MAX_EMBRACE_DMG, MAX_EMBRACE_DMG_H))
diff --git a/src/server/scripts/Northrend/AzjolNerub/ahnkahet/instance_ahnkahet.cpp b/src/server/scripts/Northrend/AzjolNerub/ahnkahet/instance_ahnkahet.cpp
index f0c56bc782..6143cc540d 100644
--- a/src/server/scripts/Northrend/AzjolNerub/ahnkahet/instance_ahnkahet.cpp
+++ b/src/server/scripts/Northrend/AzjolNerub/ahnkahet/instance_ahnkahet.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/scripts/Northrend/ChamberOfAspects/ObsidianSanctum/boss_sartharion.cpp b/src/server/scripts/Northrend/ChamberOfAspects/ObsidianSanctum/boss_sartharion.cpp
index e0c14e515f..4802010e16 100644
--- a/src/server/scripts/Northrend/ChamberOfAspects/ObsidianSanctum/boss_sartharion.cpp
+++ b/src/server/scripts/Northrend/ChamberOfAspects/ObsidianSanctum/boss_sartharion.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
@@ -130,9 +130,9 @@ enum Misc
ACTION_DRAKE_DIED = 3,
// Movement points
- POINT_FINAL_TENEBRON = 8,
- POINT_FINAL_SHADRON = 4,
- POINT_FINAL_VESPERON = 4,
+ POINT_FINAL_TENEBRON = 9,
+ POINT_FINAL_SHADRON = 5,
+ POINT_FINAL_VESPERON = 5,
// Lava directions. Its used to identify to which side lava was moving by last time
LAVA_LEFT_SIDE = 0,
@@ -583,7 +583,7 @@ public:
}
}
- events.RepeatEvent((below11PctReached ? urand(1400, 2000) : urand(5000, 20000)));
+ events.Repeat((below11PctReached ? randtime(1400ms, 2s) : randtime(5s, 20s)));
break;
}
case EVENT_SARTHARION_BERSERK:
@@ -1071,7 +1071,7 @@ public:
Talk(SAY_TENEBRON_RESPOND);
me->SetCanFly(true);
me->SetSpeed(MOVE_FLIGHT, 3.0f);
- me->GetMotionMaster()->MovePath(me->GetEntry() * 10, false);
+ me->GetMotionMaster()->MoveWaypoint(me->GetEntry() * 10, false);
}
}
@@ -1086,7 +1086,7 @@ public:
Talk(SAY_TENEBRON_BREATH);
}
DoCastVictim(SPELL_SHADOW_BREATH, false);
- events.RepeatEvent(17500);
+ events.Repeat(17500ms);
break;
}
case EVENT_MINIBOSS_SHADOW_FISSURE:
@@ -1095,7 +1095,7 @@ public:
{
DoCast(target, SPELL_SHADOW_FISSURE, false);
}
- events.RepeatEvent(22500);
+ events.Repeat(22500ms);
break;
}
case EVENT_MINIBOSS_OPEN_PORTAL:
@@ -1254,7 +1254,7 @@ public:
Talk(SAY_SHADRON_RESPOND);
me->SetCanFly(true);
me->SetSpeed(MOVE_FLIGHT, 3.0f);
- me->GetMotionMaster()->MovePath(me->GetEntry() * 10, false);
+ me->GetMotionMaster()->MoveWaypoint(me->GetEntry() * 10, false);
}
}
@@ -1270,7 +1270,7 @@ public:
}
DoCastVictim(SPELL_SHADOW_BREATH, false);
- events.RepeatEvent(17500);
+ events.Repeat(17500ms);
break;
}
case EVENT_MINIBOSS_SHADOW_FISSURE:
@@ -1279,7 +1279,7 @@ public:
{
DoCast(target, SPELL_SHADOW_FISSURE, false);
}
- events.RepeatEvent(22500);
+ events.Repeat(22500ms);
break;
}
case EVENT_MINIBOSS_OPEN_PORTAL:
@@ -1370,7 +1370,7 @@ public:
Talk(SAY_SHADRON_RESPOND);
me->SetCanFly(true);
me->SetSpeed(MOVE_FLIGHT, 3.0f);
- me->GetMotionMaster()->MovePath(me->GetEntry() * 10, false);
+ me->GetMotionMaster()->MoveWaypoint(me->GetEntry() * 10, false);
}
}
@@ -1480,7 +1480,7 @@ public:
{
if (param == ACTION_SWITCH_PHASE)
{
- me->DespawnOrUnsummon(1);
+ me->DespawnOrUnsummon(1ms);
}
}
diff --git a/src/server/scripts/Northrend/ChamberOfAspects/ObsidianSanctum/instance_obsidian_sanctum.cpp b/src/server/scripts/Northrend/ChamberOfAspects/ObsidianSanctum/instance_obsidian_sanctum.cpp
index 4dafd5e41b..2b0364e1e7 100644
--- a/src/server/scripts/Northrend/ChamberOfAspects/ObsidianSanctum/instance_obsidian_sanctum.cpp
+++ b/src/server/scripts/Northrend/ChamberOfAspects/ObsidianSanctum/instance_obsidian_sanctum.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/scripts/Northrend/ChamberOfAspects/ObsidianSanctum/obsidian_sanctum.h b/src/server/scripts/Northrend/ChamberOfAspects/ObsidianSanctum/obsidian_sanctum.h
index 665d8a4171..c92d287547 100644
--- a/src/server/scripts/Northrend/ChamberOfAspects/ObsidianSanctum/obsidian_sanctum.h
+++ b/src/server/scripts/Northrend/ChamberOfAspects/ObsidianSanctum/obsidian_sanctum.h
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/scripts/Northrend/ChamberOfAspects/RubySanctum/boss_baltharus_the_warborn.cpp b/src/server/scripts/Northrend/ChamberOfAspects/RubySanctum/boss_baltharus_the_warborn.cpp
index 1e693b33a5..5a8cc49b13 100644
--- a/src/server/scripts/Northrend/ChamberOfAspects/RubySanctum/boss_baltharus_the_warborn.cpp
+++ b/src/server/scripts/Northrend/ChamberOfAspects/RubySanctum/boss_baltharus_the_warborn.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
@@ -152,7 +152,7 @@ public:
if (action == ACTION_INTRO_BALTHARUS && !_introDone)
{
_introDone = true;
- me->m_Events.AddEvent(new DelayedTalk(me, SAY_BALTHARUS_INTRO), me->m_Events.CalculateTime(6000));
+ me->m_Events.AddEventAtOffset(new DelayedTalk(me, SAY_BALTHARUS_INTRO), 6s);
}
else if (action == ACTION_CLONE)
{
@@ -191,7 +191,7 @@ public:
void KilledUnit(Unit* /*victim*/) override
{
- if (events.GetNextEventTime(EVENT_KILL_TALK) == 0)
+ if (!events.HasTimeUntilEvent(EVENT_KILL_TALK))
{
Talk(SAY_KILL);
events.ScheduleEvent(EVENT_KILL_TALK, 6s);
@@ -204,7 +204,7 @@ public:
summon->SetHealth(me->GetHealth());
summon->CastSpell(summon, SPELL_SPAWN_EFFECT, true);
summon->SetReactState(REACT_PASSIVE);
- summon->m_Events.AddEvent(new RestoreFight(summon), summon->m_Events.CalculateTime(2000));
+ summon->m_Events.AddEventAtOffset(new RestoreFight(summon), 2s);
}
void UpdateAI(uint32 diff) override
@@ -379,7 +379,7 @@ public:
// Xinef: after soft reset npc is no longer present
if (me->GetInstanceScript()->GetBossState(DATA_BALTHARUS_THE_WARBORN) == DONE)
- me->DespawnOrUnsummon(1);
+ me->DespawnOrUnsummon(1ms);
}
void DoAction(int32 action) override
diff --git a/src/server/scripts/Northrend/ChamberOfAspects/RubySanctum/boss_general_zarithrian.cpp b/src/server/scripts/Northrend/ChamberOfAspects/RubySanctum/boss_general_zarithrian.cpp
index ac9a9d7343..fb6b32d03f 100644
--- a/src/server/scripts/Northrend/ChamberOfAspects/RubySanctum/boss_general_zarithrian.cpp
+++ b/src/server/scripts/Northrend/ChamberOfAspects/RubySanctum/boss_general_zarithrian.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
@@ -136,7 +136,7 @@ public:
void KilledUnit(Unit* /*victim*/) override
{
- if (events.GetNextEventTime(EVENT_KILL_TALK) == 0)
+ if (!events.HasTimeUntilEvent(EVENT_KILL_TALK))
{
Talk(SAY_KILL);
events.ScheduleEvent(EVENT_KILL_TALK, 6s);
@@ -210,7 +210,8 @@ public:
{
_lavaGoutCount = 0;
AddWaypoints();
- Start(true, true);
+ me->SetWalk(false);
+ Start(true);
}
void JustEngagedWith(Unit* /*who*/) override
diff --git a/src/server/scripts/Northrend/ChamberOfAspects/RubySanctum/boss_halion.cpp b/src/server/scripts/Northrend/ChamberOfAspects/RubySanctum/boss_halion.cpp
index 6ff00560d0..636746f658 100644
--- a/src/server/scripts/Northrend/ChamberOfAspects/RubySanctum/boss_halion.cpp
+++ b/src/server/scripts/Northrend/ChamberOfAspects/RubySanctum/boss_halion.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
@@ -199,7 +199,7 @@ public:
WorldPacket data(SMSG_UPDATE_INSTANCE_ENCOUNTER_UNIT, 4);
data << uint32(ENCOUNTER_FRAME_REFRESH_FRAMES);
- _owner->GetSession()->SendPacket(&data);
+ _owner->SendDirectMessage(&data);
return true;
}
@@ -310,7 +310,7 @@ public:
void KilledUnit(Unit* victim) override
{
- if (victim->IsPlayer() && events.GetNextEventTime(EVENT_KILL_TALK) == 0)
+ if (victim->IsPlayer() && !events.HasTimeUntilEvent(EVENT_KILL_TALK))
{
Talk(SAY_KILL);
events.ScheduleEvent(EVENT_KILL_TALK, 6s);
@@ -335,7 +335,7 @@ public:
void DamageTaken(Unit* attacker, uint32& damage, DamageEffectType, SpellSchoolMask) override
{
- if (events.GetNextEventTime(EVENT_CHECK_HEALTH) != 0)
+ if (events.HasTimeUntilEvent(EVENT_CHECK_HEALTH))
return;
if (!attacker || !me->InSamePhase(attacker))
@@ -477,7 +477,7 @@ public:
void KilledUnit(Unit* victim) override
{
- if (victim->IsPlayer() && _events.GetNextEventTime(EVENT_KILL_TALK) == 0)
+ if (victim->IsPlayer() && !_events.HasTimeUntilEvent(EVENT_KILL_TALK))
{
Talk(SAY_KILL);
_events.ScheduleEvent(EVENT_KILL_TALK, 6s);
@@ -598,7 +598,7 @@ public:
void SetData(uint32 id, uint32 value) override
{
- if (_events.GetNextEventTime(EVENT_CHECK_CORPOREALITY) == 0)
+ if (!events.HasTimeUntilEvent(EVENT_CHECK_CORPOREALITY))
return;
if (id == DATA_MATERIAL_DAMAGE_TAKEN)
@@ -1120,7 +1120,7 @@ class spell_halion_twilight_realm_aura : public AuraScript
target->RemoveAurasDueToSpell(SPELL_FIERY_COMBUSTION, ObjectGuid::Empty, 0, AURA_REMOVE_BY_ENEMY_SPELL);
if (!GetTarget()->IsPlayer())
return;
- GetTarget()->m_Events.AddEvent(new SendEncounterUnit(GetTarget()->ToPlayer()), GetTarget()->m_Events.CalculateTime(500));
+ GetTarget()->m_Events.AddEventAtOffset(new SendEncounterUnit(GetTarget()->ToPlayer()), 500ms);
}
void Register() override
@@ -1153,7 +1153,7 @@ class spell_halion_leave_twilight_realm_aura : public AuraScript
if (!GetTarget()->IsPlayer())
return;
- GetTarget()->m_Events.AddEvent(new SendEncounterUnit(GetTarget()->ToPlayer()), GetTarget()->m_Events.CalculateTime(500));
+ GetTarget()->m_Events.AddEventAtOffset(new SendEncounterUnit(GetTarget()->ToPlayer()), 500ms);
}
void Register() override
@@ -1322,7 +1322,7 @@ public:
void JustDied(Unit* /*killer*/) override
{
- me->DespawnOrUnsummon(1);
+ me->DespawnOrUnsummon(1ms);
}
};
diff --git a/src/server/scripts/Northrend/ChamberOfAspects/RubySanctum/boss_saviana_ragefire.cpp b/src/server/scripts/Northrend/ChamberOfAspects/RubySanctum/boss_saviana_ragefire.cpp
index 5396265952..2bebd1502c 100644
--- a/src/server/scripts/Northrend/ChamberOfAspects/RubySanctum/boss_saviana_ragefire.cpp
+++ b/src/server/scripts/Northrend/ChamberOfAspects/RubySanctum/boss_saviana_ragefire.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
@@ -121,7 +121,7 @@ public:
void KilledUnit(Unit* /*victim*/) override
{
- if (events.GetNextEventTime(EVENT_KILL_TALK) == 0)
+ if (!events.HasTimeUntilEvent(EVENT_KILL_TALK))
{
Talk(SAY_KILL);
events.ScheduleEvent(EVENT_KILL_TALK, 6s);
@@ -144,7 +144,7 @@ public:
me->SetReactState(REACT_PASSIVE);
me->AttackStop();
me->SetDisableGravity(true);
- me->GetMotionMaster()->MovePoint(POINT_TAKEOFF, me->GetPositionX(), me->GetPositionY(), me->GetPositionZ() + 6.0f, false);
+ me->GetMotionMaster()->MovePoint(POINT_TAKEOFF, me->GetPositionX(), me->GetPositionY(), me->GetPositionZ() + 6.0f, FORCED_MOVEMENT_NONE, 0.f, 0.f, false);
events.ScheduleEvent(EVENT_FLIGHT, 50s);
events.DelayEvents(15s);
events.ScheduleEvent(EVENT_AIR_MOVEMENT, 2s);
@@ -163,10 +163,10 @@ public:
events.ScheduleEvent(EVENT_FLAME_BREATH, 20s, 30s);
break;
case EVENT_AIR_MOVEMENT:
- me->GetMotionMaster()->MovePoint(POINT_FLIGHT, 3155.51f, 683.844f, 95.0f, false);
+ me->GetMotionMaster()->MovePoint(POINT_FLIGHT, 3155.51f, 683.844f, 95.0f, FORCED_MOVEMENT_NONE, 0.f, 0.f, false);
break;
case EVENT_LAND_BACK:
- me->GetMotionMaster()->MovePoint(POINT_LAND, 3151.07f, 636.443f, 80.0f, false);
+ me->GetMotionMaster()->MovePoint(POINT_LAND, 3151.07f, 636.443f, 80.0f, FORCED_MOVEMENT_NONE, 0.f, 0.f, false);
break;
case EVENT_LAND_GROUND:
me->SetReactState(REACT_AGGRESSIVE);
diff --git a/src/server/scripts/Northrend/ChamberOfAspects/RubySanctum/instance_ruby_sanctum.cpp b/src/server/scripts/Northrend/ChamberOfAspects/RubySanctum/instance_ruby_sanctum.cpp
index 1ee47c8c2e..e3aa3fdfa1 100644
--- a/src/server/scripts/Northrend/ChamberOfAspects/RubySanctum/instance_ruby_sanctum.cpp
+++ b/src/server/scripts/Northrend/ChamberOfAspects/RubySanctum/instance_ruby_sanctum.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/scripts/Northrend/ChamberOfAspects/RubySanctum/ruby_sanctum.h b/src/server/scripts/Northrend/ChamberOfAspects/RubySanctum/ruby_sanctum.h
index 07e94cbb5c..eefd5857ac 100644
--- a/src/server/scripts/Northrend/ChamberOfAspects/RubySanctum/ruby_sanctum.h
+++ b/src/server/scripts/Northrend/ChamberOfAspects/RubySanctum/ruby_sanctum.h
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheChampion/boss_argent_challenge.cpp b/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheChampion/boss_argent_challenge.cpp
index 47f6266c65..f822281b91 100644
--- a/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheChampion/boss_argent_challenge.cpp
+++ b/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheChampion/boss_argent_challenge.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
@@ -45,12 +45,9 @@ enum EadricEvents
enum PaletressSpells
{
- SPELL_SMITE_N = 66536,
- SPELL_SMITE_H = 67674,
- SPELL_HOLY_FIRE_N = 66538,
- SPELL_HOLY_FIRE_H = 67676,
- SPELL_RENEW_N = 66537,
- SPELL_RENEW_H = 67675,
+ SPELL_SMITE = 66536,
+ SPELL_HOLY_FIRE = 66538,
+ SPELL_RENEW = 66537,
SPELL_HOLY_NOVA = 66546,
SPELL_SHIELD = 66515,
@@ -58,21 +55,11 @@ enum PaletressSpells
SPELL_SUMMON_MEMORY = 66545,
//Memory
- SPELL_OLD_WOUNDS_N = 66620,
- SPELL_OLD_WOUNDS_H = 67679,
- SPELL_SHADOWS_PAST_N = 66619,
- SPELL_SHADOWS_PAST_H = 67678,
- SPELL_WAKING_NIGHTMARE_N = 66552,
- SPELL_WAKING_NIGHTMARE_H = 67677,
+ SPELL_OLD_WOUNDS = 66620,
+ SPELL_SHADOWS_PAST = 66619,
+ SPELL_WAKING_NIGHTMARE = 66552,
};
-#define SPELL_SMITE DUNGEON_MODE(SPELL_SMITE_N, SPELL_SMITE_H)
-#define SPELL_HOLY_FIRE DUNGEON_MODE(SPELL_HOLY_FIRE_N, SPELL_HOLY_FIRE_H)
-#define SPELL_RENEW DUNGEON_MODE(SPELL_RENEW_N, SPELL_RENEW_H)
-#define SPELL_OLD_WOUNDS DUNGEON_MODE(SPELL_OLD_WOUNDS_N, SPELL_OLD_WOUNDS_H)
-#define SPELL_SHADOWS_PAST DUNGEON_MODE(SPELL_SHADOWS_PAST_N, SPELL_SHADOWS_PAST_H)
-#define SPELL_WAKING_NIGHTMARE DUNGEON_MODE(SPELL_WAKING_NIGHTMARE_N, SPELL_WAKING_NIGHTMARE_H)
-
enum PaletressEvents
{
EVENT_SPELL_SMITE = 1,
@@ -125,8 +112,8 @@ public:
void JustEngagedWith(Unit* /*who*/) override
{
events.Reset();
- events.ScheduleEvent(EVENT_SPELL_RADIANCE, 16000);
- events.ScheduleEvent(EVENT_SPELL_HAMMER_RIGHTEOUS, 25000);
+ events.ScheduleEvent(EVENT_SPELL_RADIANCE, 16s);
+ events.ScheduleEvent(EVENT_SPELL_HAMMER_RIGHTEOUS, 25s);
Talk(SAY_EADRIC_AGGRO);
me->CastSpell(me, SPELL_VENGEANCE, false);
if (pInstance)
@@ -409,7 +396,7 @@ public:
void JustDied(Unit* /*killer*/) override
{
- me->DespawnOrUnsummon(20000);
+ me->DespawnOrUnsummon(20s);
if (pInstance)
if (Creature* paletress = ObjectAccessor::GetCreature(*me, pInstance->GetGuidData(DATA_PALETRESS)))
paletress->AI()->DoAction(1);
@@ -477,29 +464,22 @@ enum ArgentSoldierSpells
// monk
SPELL_FLURRY_OF_BLOWS = 67233,
SPELL_PUMMEL = 67235,
- SPELL_DIVINE_SHIELD_H = 67251,
- SPELL_FINAL_MEDITATION_H = 67255,
+ SPELL_DIVINE_SHIELD = 67251,
+ SPELL_FINAL_MEDITATION = 67255,
// priestess
- SPELL_HOLY_SMITE_N = 36176,
- SPELL_HOLY_SMITE_H = 67289,
+ SPELL_HOLY_SMITE = 36176,
SPELL_FOUNTAIN_OF_LIGHT = 67194,
NPC_FOUNTAIN_OF_LIGHT = 35311,
- SPELL_SHADOW_WORD_PAIN_N = 34941,
- SPELL_SHADOW_WORD_PAIN_H = 34942,
- SPELL_MIND_CONTROL_H = 67229,
+ SPELL_SHADOW_WORD_PAIN = 34941,
+ SPELL_MIND_CONTROL = 67229,
// lightwielder
- SPELL_BLAZING_LIGHT_N = 67247,
- SPELL_BLAZING_LIGHT_H = 67290,
+ SPELL_BLAZING_LIGHT = 67247,
SPELL_CLEAVE = 15284,
- SPELL_UNBALANCING_STRIKE_H = 67237,
+ SPELL_UNBALANCING_STRIKE = 67237,
};
-#define SPELL_HOLY_SMITE DUNGEON_MODE(SPELL_HOLY_SMITE_N, SPELL_HOLY_SMITE_H)
-#define SPELL_SHADOW_WORD_PAIN DUNGEON_MODE(SPELL_SHADOW_WORD_PAIN_N, SPELL_SHADOW_WORD_PAIN_H)
-#define SPELL_BLAZING_LIGHT DUNGEON_MODE(SPELL_BLAZING_LIGHT_N, SPELL_BLAZING_LIGHT_H)
-
enum ArgentSoldierEvents
{
EVENT_MONK_SPELL_FLURRY_OF_BLOWS = 1,
@@ -507,10 +487,10 @@ enum ArgentSoldierEvents
EVENT_PRIESTESS_SPELL_HOLY_SMITE,
EVENT_PRIESTESS_SPELL_SHADOW_WORD_PAIN,
EVENT_PRIESTESS_SPELL_FOUNTAIN_OF_LIGHT,
- EVENT_PRIESTESS_SPELL_MIND_CONTROL_H,
+ EVENT_PRIESTESS_SPELL_MIND_CONTROL,
EVENT_LIGHTWIELDER_SPELL_BLAZING_LIGHT,
EVENT_LIGHTWIELDER_SPELL_CLEAVE,
- EVENT_LIGHTWIELDER_SPELL_UNBALANCING_STRIKE_H,
+ EVENT_LIGHTWIELDER_SPELL_UNBALANCING_STRIKE,
};
class npc_argent_soldier : public CreatureScript
@@ -607,7 +587,8 @@ public:
break;
}
- Start(false, true);
+ me->SetWalk(false);
+ Start(false);
uiWaypoint = uiType;
}
@@ -618,8 +599,8 @@ public:
bCheck = false;
damage = me->GetHealth() - 1;
events.DelayEvents(10s);
- me->CastSpell(me, SPELL_DIVINE_SHIELD_H, true);
- me->CastSpell((Unit*)nullptr, SPELL_FINAL_MEDITATION_H, true);
+ me->CastSpell(me, SPELL_DIVINE_SHIELD, true);
+ me->CastSpell((Unit*)nullptr, SPELL_FINAL_MEDITATION, true);
}
}
@@ -638,13 +619,13 @@ public:
events.RescheduleEvent(EVENT_PRIESTESS_SPELL_SHADOW_WORD_PAIN, 3s, 6s);
events.RescheduleEvent(EVENT_PRIESTESS_SPELL_FOUNTAIN_OF_LIGHT, 8s, 15s);
if (IsHeroic())
- events.RescheduleEvent(EVENT_PRIESTESS_SPELL_MIND_CONTROL_H, 12s);
+ events.RescheduleEvent(EVENT_PRIESTESS_SPELL_MIND_CONTROL, 12s);
break;
case NPC_ARGENT_LIGHTWIELDER:
events.RescheduleEvent(EVENT_LIGHTWIELDER_SPELL_BLAZING_LIGHT, 12s, 15s);
events.RescheduleEvent(EVENT_LIGHTWIELDER_SPELL_CLEAVE, 3s, 5s);
if (IsHeroic())
- events.RescheduleEvent(EVENT_LIGHTWIELDER_SPELL_UNBALANCING_STRIKE_H, 8s, 12s);
+ events.RescheduleEvent(EVENT_LIGHTWIELDER_SPELL_UNBALANCING_STRIKE, 8s, 12s);
break;
}
}
@@ -690,9 +671,9 @@ public:
me->CastSpell((Unit*)nullptr, SPELL_FOUNTAIN_OF_LIGHT, false);
events.Repeat(35s, 45s);
break;
- case EVENT_PRIESTESS_SPELL_MIND_CONTROL_H:
+ case EVENT_PRIESTESS_SPELL_MIND_CONTROL:
if (Unit* target = SelectTarget(SelectTargetMethod::Random, 0, 30.0f, true))
- me->CastSpell(target, SPELL_MIND_CONTROL_H, false);
+ me->CastSpell(target, SPELL_MIND_CONTROL, false);
events.Repeat(22s, 30s);
break;
@@ -710,9 +691,9 @@ public:
me->CastSpell(me->GetVictim(), SPELL_CLEAVE, false);
events.Repeat(6s, 8s);
break;
- case EVENT_LIGHTWIELDER_SPELL_UNBALANCING_STRIKE_H:
+ case EVENT_LIGHTWIELDER_SPELL_UNBALANCING_STRIKE:
if (me->GetVictim())
- me->CastSpell(me->GetVictim(), SPELL_UNBALANCING_STRIKE_H, false);
+ me->CastSpell(me->GetVictim(), SPELL_UNBALANCING_STRIKE, false);
events.Repeat(12s, 15s);
break;
}
@@ -722,7 +703,7 @@ public:
void JustDied(Unit* /*pKiller*/) override
{
- me->DespawnOrUnsummon(10000);
+ me->DespawnOrUnsummon(10s);
if (pInstance)
pInstance->SetData(DATA_ARGENT_SOLDIER_DEFEATED, 0);
}
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 47b89b1624..99d69be849 100644
--- a/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheChampion/boss_black_knight.cpp
+++ b/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheChampion/boss_black_knight.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
@@ -18,7 +18,11 @@
#include "CreatureScript.h"
#include "ScriptedCreature.h"
#include "ScriptedEscortAI.h"
+#include "SharedDefines.h"
+#include "Spell.h"
#include "SpellInfo.h"
+#include "SpellScript.h"
+#include "SpellScriptLoader.h"
#include "trial_of_the_champion.h"
enum Spells
@@ -30,49 +34,29 @@ enum Spells
SPELL_BK_KILL_CREDIT = 68663,
// phase 1
- SPELL_PLAGUE_STRIKE_N = 67724,
- SPELL_PLAGUE_STRIKE_H = 67884,
- SPELL_ICY_TOUCH_N = 67718,
- SPELL_ICY_TOUCH_H = 67881,
- SPELL_DEATH_RESPITE_N = 67745,
- SPELL_DEATH_RESPITE_H = 68306,
+ SPELL_PLAGUE_STRIKE = 67724,
+ SPELL_ICY_TOUCH = 67718,
+ SPELL_DEATH_RESPITE = 67745,
SPELL_DEATH_RESPITE_DUMMY = 66798,
- SPELL_OBLITERATE_N = 67725,
- SPELL_OBLITERATE_H = 67883,
+ SPELL_OBLITERATE = 67725,
// phase 2 (+ abilities from phase 1 without death respite)
- SPELL_ARMY_DEAD_N = 67761,
- SPELL_ARMY_DEAD_H = 67874,
- SPELL_DESECRATION_N = 67778,
- SPELL_DESECRATION_H = 67877,
+ SPELL_ARMY_DEAD = 67761,
+ SPELL_DESECRATION = 67778,
SPELL_DESECRATION_SUMMON = 67779,
SPELL_BK_GHOUL_EXPLODE = 67751,
// phase 3
- SPELL_DEATH_BITE_N = 67808,
- SPELL_DEATH_BITE_H = 67875,
- SPELL_MARKED_DEATH_N = 67823,
- SPELL_MARKED_DEATH_H = 67882,
+ SPELL_DEATH_BITE = 67808,
+ SPELL_MARKED_DEATH = 67823,
// ghouls
- SPELL_CLAW_N = 67774,
+ SPELL_CLAW = 67774,
SPELL_CLAW_H = 67879,
- SPELL_EXPLODE_N = 67729,
- SPELL_EXPLODE_H = 67886,
- SPELL_LEAP_N = 67749,
- SPELL_LEAP_H = 67880,
+ SPELL_EXPLODE = 67729,
+ SPELL_EXPLODE_H = 67886,
+ SPELL_LEAP = 67749,
};
-#define SPELL_LEAP DUNGEON_MODE(SPELL_LEAP_N, SPELL_LEAP_H)
-#define SPELL_EXPLODE DUNGEON_MODE(SPELL_EXPLODE_N, SPELL_EXPLODE_H)
-
-#define SPELL_PLAGUE_STRIKE DUNGEON_MODE(SPELL_PLAGUE_STRIKE_N, SPELL_PLAGUE_STRIKE_H)
-#define SPELL_ICY_TOUCH DUNGEON_MODE(SPELL_ICY_TOUCH_N, SPELL_ICY_TOUCH_H)
-#define SPELL_DEATH_RESPITE DUNGEON_MODE(SPELL_DEATH_RESPITE_N, SPELL_DEATH_RESPITE_H)
-#define SPELL_OBLITERATE DUNGEON_MODE(SPELL_OBLITERATE_N, SPELL_OBLITERATE_H)
-#define SPELL_ARMY_DEAD DUNGEON_MODE(SPELL_ARMY_DEAD_N, SPELL_ARMY_DEAD_H)
-#define SPELL_DESECRATION DUNGEON_MODE(SPELL_DESECRATION_N, SPELL_DESECRATION_H)
-#define SPELL_DEATH_BITE DUNGEON_MODE(SPELL_DEATH_BITE_N, SPELL_DEATH_BITE_H)
-#define SPELL_MARKED_DEATH DUNGEON_MODE(SPELL_MARKED_DEATH_N, SPELL_MARKED_DEATH_H)
enum Events
{
@@ -131,7 +115,7 @@ public:
void EnterEvadeMode(EvadeReason why) override
{
- me->DespawnOrUnsummon(1);
+ me->DespawnOrUnsummon(1ms);
ScriptedAI::EnterEvadeMode(why);
}
@@ -182,7 +166,7 @@ public:
events.Reset();
events.ScheduleEvent(EVENT_ANNOUNCER_SAY_ZOMBIE, 2500ms);
events.ScheduleEvent(EVENT_SPELL_PLAGUE_STRIKE, 7s, 9s);
- events.ScheduleEvent(EVENT_SPELL_ICY_TOUCH, 3500ms, 7000ms);
+ events.ScheduleEvent(EVENT_SPELL_ICY_TOUCH, 3500ms, 7s);
events.ScheduleEvent(EVENT_SPELL_DEATH_RESPITE, 13s, 15s);
events.ScheduleEvent(EVENT_SPELL_OBLITERATE, 11s, 19s);
}
@@ -214,7 +198,7 @@ public:
events.Reset();
events.ScheduleEvent(EVENT_SPELL_PLAGUE_STRIKE, 7s, 9s);
- events.ScheduleEvent(EVENT_SPELL_ICY_TOUCH, 3500ms, 7000ms);
+ events.ScheduleEvent(EVENT_SPELL_ICY_TOUCH, 3500ms, 7s);
events.ScheduleEvent(EVENT_SPELL_OBLITERATE, 11s, 19s);
events.ScheduleEvent(EVENT_SPELL_DESECRATION, 2s, 3s);
break;
@@ -339,7 +323,7 @@ public:
void Reset() override
{
- Start(false, true, ObjectGuid::Empty, nullptr);
+ Start(false, ObjectGuid::Empty, nullptr);
SetDespawnAtEnd(true);
me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE);
me->SetImmuneToAll(true);
@@ -420,27 +404,6 @@ public:
}
}
- void SpellHitTarget(Unit* target, SpellInfo const* spell) override
- {
- switch (spell->Id)
- {
- case SPELL_CLAW_N:
- case SPELL_CLAW_H:
- DoResetThreatList();
- if (Unit* target = SelectTarget(SelectTargetMethod::Random, 0, 30.0f))
- {
- me->AddThreat(target, 100.0f);
- AttackStart(target);
- }
- break;
- case SPELL_EXPLODE_H:
- if (target && target->IsPlayer())
- if (pInstance)
- pInstance->SetData(DATA_ACHIEV_IVE_HAD_WORSE, 0);
- break;
- }
- }
-
void UpdateAI(uint32 diff) override
{
if (!UpdateVictim())
@@ -467,7 +430,7 @@ public:
break;
case 2: // claw
if (Unit* target = me->GetVictim())
- me->CastSpell(target, SPELL_CLAW_N, false);
+ me->CastSpell(target, SPELL_CLAW, false);
events.Repeat(6s, 8s);
break;
}
@@ -482,9 +445,51 @@ public:
}
};
+//67774,67879
+class spell_black_knight_ghoul_claw : public SpellScript
+{
+ PrepareSpellScript(spell_black_knight_ghoul_claw);
+
+ void HandleSpellHit(SpellEffIndex /*effIndex*/)
+ {
+ if (Unit* caster = GetCaster())
+ {
+ GetCaster()->GetThreatMgr().ResetAllThreat();
+ if (Unit* target = caster->GetAI()->SelectTarget(SelectTargetMethod::Random, 0, 30.0f))
+ {
+ caster->AddThreat(target, 100.0f);
+ caster->GetAI()->AttackStart(target);
+ }
+ }
+ }
+ void Register() override
+ {
+ OnEffectHitTarget += SpellEffectFn(spell_black_knight_ghoul_claw::HandleSpellHit, EFFECT_0, SPELL_EFFECT_WEAPON_PERCENT_DAMAGE);
+ }
+};
+
+//67886
+class spell_black_knight_ghoul_explode : public SpellScript
+{
+ PrepareSpellScript(spell_black_knight_ghoul_explode);
+
+ void HandleSpellHit(SpellEffIndex /*effIndex*/)
+ {
+ if (GetHitUnit()->IsPlayer())
+ if (InstanceScript* instance = GetCaster()->GetInstanceScript())
+ instance->SetData(DATA_ACHIEV_IVE_HAD_WORSE, 0);
+ }
+ void Register() override
+ {
+ OnEffectHitTarget += SpellEffectFn(spell_black_knight_ghoul_explode::HandleSpellHit, EFFECT_0, SPELL_EFFECT_SCHOOL_DAMAGE);
+ }
+};
+
void AddSC_boss_black_knight()
{
new boss_black_knight();
new npc_black_knight_skeletal_gryphon();
new npc_black_knight_ghoul();
+ RegisterSpellScript(spell_black_knight_ghoul_claw);
+ RegisterSpellScript(spell_black_knight_ghoul_explode);
}
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 649a60c6f2..db05e177a1 100644
--- a/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheChampion/boss_grand_champions.cpp
+++ b/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheChampion/boss_grand_champions.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
@@ -56,38 +56,30 @@ enum MountSpells
enum ChampionSpells
{
// Mage (Ambrose Boltspark, Eressea Dawnsinger)
- SPELL_FIREBALL_N = 66042,
- SPELL_FIREBALL_H = 68310,
- SPELL_BLAST_WAVE_N = 66044,
- SPELL_BLAST_WAVE_H = 68312,
+ SPELL_FIREBALL = 66042,
+ SPELL_BLAST_WAVE = 66044,
SPELL_HASTE = 66045,
- SPELL_POLYMORPH_N = 66043,
- SPELL_POLYMORPH_H = 68311,
+ SPELL_POLYMORPH = 66043,
// Shaman (Colosos, Runok Wildmane)
- SPELL_CHAIN_LIGHTNING_N = 67529,
- SPELL_CHAIN_LIGHTNING_H = 68319,
+ SPELL_CHAIN_LIGHTNING = 67529,
SPELL_EARTH_SHIELD = 67530,
- SPELL_HEALING_WAVE_N = 67528,
- SPELL_HEALING_WAVE_H = 68318,
+ SPELL_HEALING_WAVE = 67528,
SPELL_HEX_OF_MENDING = 67534,
// Hunter (Jaelyne Evensong, Zul'tore)
SPELL_DISENGAGE = 68339,
SPELL_LIGHTNING_ARROWS = 66083,
SPELL_MULTI_SHOT = 66081,
- SPELL_SHOOT_N = 65868,
- SPELL_SHOOT_H = 67988,
+ SPELL_SHOOT = 65868,
// Rogue (Lana Stouthammer Evensong, Deathstalker Visceri)
- SPELL_EVISCERATE_N = 67709,
- SPELL_EVISCERATE_H = 68317,
+ SPELL_EVISCERATE = 67709,
SPELL_FAN_OF_KNIVES = 67706,
SPELL_POISON_BOTTLE = 67701,
// Warrior (Marshal Jacob Alerius, Mokra the Skullcrusher)
- SPELL_MORTAL_STRIKE_N = 68783,
- SPELL_MORTAL_STRIKE_H = 68784,
+ SPELL_MORTAL_STRIKE = 68783,
SPELL_BLADESTORM = 63784,
SPELL_INTERCEPT = 67540,
SPELL_ROLLING_THROW = 67546, // not implemented yet!
@@ -98,15 +90,6 @@ enum Texts
SAY_TRAMPLED = 0,
};
-#define SPELL_FIREBALL DUNGEON_MODE(SPELL_FIREBALL_N, SPELL_FIREBALL_H)
-#define SPELL_BLAST_WAVE DUNGEON_MODE(SPELL_BLAST_WAVE_N, SPELL_BLAST_WAVE_H)
-#define SPELL_POLYMORPH DUNGEON_MODE(SPELL_POLYMORPH_N, SPELL_POLYMORPH_H)
-#define SPELL_CHAIN_LIGHTNING DUNGEON_MODE(SPELL_CHAIN_LIGHTNING_N, SPELL_CHAIN_LIGHTNING_H)
-#define SPELL_HEALING_WAVE DUNGEON_MODE(SPELL_HEALING_WAVE_N, SPELL_HEALING_WAVE_H)
-#define SPELL_SHOOT DUNGEON_MODE(SPELL_SHOOT_N, SPELL_SHOOT_H)
-#define SPELL_EVISCERATE DUNGEON_MODE(SPELL_EVISCERATE_N, SPELL_EVISCERATE_H)
-#define SPELL_MORTAL_STRIKE DUNGEON_MODE(SPELL_MORTAL_STRIKE_N, SPELL_MORTAL_STRIKE_H)
-
enum MountEvents
{
EVENT_NONE = 0,
@@ -213,7 +196,7 @@ public:
data << uint32(VEHICLE_SPELL_RIDE_HARDCODED);
data << uint8(SPELL_FAILED_CUSTOM_ERROR);
data << uint32(SPELL_CUSTOM_ERROR_MUST_HAVE_LANCE_EQUIPPED);
- clicker->ToPlayer()->GetSession()->SendPacket(&data);
+ clicker->ToPlayer()->SendDirectMessage(&data);
return false;
}
};
@@ -246,10 +229,16 @@ public:
events.Reset();
}
+ void MoveInLineOfSight(Unit* who) override
+ {
+ if (pInstance && pInstance->GetData(DATA_INSTANCE_PROGRESS) >= INSTANCE_PROGRESS_GRAND_CHAMPIONS_REACHED_DEST)
+ ScriptedAI::MoveInLineOfSight(who);
+ }
+
void JustEngagedWith(Unit* /*who*/) override
{
events.Reset();
- events.ScheduleEvent(EVENT_MOUNT_CHARGE, 2500ms, 4000ms);
+ events.ScheduleEvent(EVENT_MOUNT_CHARGE, 2500ms, 4s);
events.ScheduleEvent(EVENT_SHIELD_BREAKER, 5s, 8s);
events.ScheduleEvent(EVENT_THRUST, 3s, 5s);
me->CastSpell(me, SPELL_TRAMPLE_AURA, true);
@@ -305,7 +294,7 @@ public:
me->CastSpell(target, SPELL_MINIONS_CHARGE, false);
}
}
- events.Repeat(4500ms, 6000ms);
+ events.Repeat(4500ms, 6s);
}
break;
case EVENT_SHIELD_BREAKER:
@@ -341,7 +330,7 @@ public:
void JustDied(Unit* /*pKiller*/) override
{
me->SetUInt32Value(UNIT_FIELD_MOUNTDISPLAYID, 0);
- me->DespawnOrUnsummon(10000);
+ me->DespawnOrUnsummon(10s);
if (pInstance)
pInstance->SetData(DATA_MOUNT_DIED, 0);
}
@@ -366,7 +355,7 @@ public:
me->CastSpell(me, SPELL_BOSS_DEFEND_PERIODIC, true);
events.Reset();
- events.ScheduleEvent(EVENT_MOUNT_CHARGE, 2500ms, 4000ms);
+ events.ScheduleEvent(EVENT_MOUNT_CHARGE, 2500ms, 4s);
events.ScheduleEvent(EVENT_SHIELD_BREAKER, 5s, 8s);
events.ScheduleEvent(EVENT_THRUST, 3s, 5s);
@@ -410,6 +399,12 @@ public:
}
}
+ void MoveInLineOfSight(Unit* who) override
+ {
+ if (pInstance && pInstance->GetData(DATA_INSTANCE_PROGRESS) >= INSTANCE_PROGRESS_GRAND_CHAMPIONS_REACHED_DEST)
+ npc_escortAI::MoveInLineOfSight(who);
+ }
+
void JustEngagedWith(Unit* /*who*/) override
{
if (pInstance && pInstance->GetData(DATA_INSTANCE_PROGRESS) == INSTANCE_PROGRESS_CHAMPIONS_UNMOUNTED )
@@ -537,7 +532,7 @@ public:
return;
}
- Start(false, true);
+ Start(false);
}
void DamageTaken(Unit*, uint32& damage, DamageEffectType, SpellSchoolMask) override
@@ -628,7 +623,7 @@ public:
me->CastSpell(me, SPELL_BOSS_DEFEND_PERIODIC, true);
me->SetRegeneratingHealth(true);
events.Reset();
- events.ScheduleEvent(EVENT_MOUNT_CHARGE, 2500ms, 4000ms);
+ events.ScheduleEvent(EVENT_MOUNT_CHARGE, 2500ms, 4s);
events.ScheduleEvent(EVENT_SHIELD_BREAKER, 5s, 8s);
events.ScheduleEvent(EVENT_THRUST, 3s, 5s);
me->SetReactState(REACT_AGGRESSIVE);
@@ -754,7 +749,7 @@ public:
me->CastSpell(target, SPELL_MINIONS_CHARGE, false);
}
}
- events.Repeat(4500ms, 6000ms);
+ events.Repeat(4500ms, 6s);
}
break;
case EVENT_SHIELD_BREAKER:
diff --git a/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheChampion/instance_trial_of_the_champion.cpp b/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheChampion/instance_trial_of_the_champion.cpp
index 195d626a73..044512284a 100644
--- a/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheChampion/instance_trial_of_the_champion.cpp
+++ b/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheChampion/instance_trial_of_the_champion.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
@@ -23,7 +23,6 @@
#include "trial_of_the_champion.h"
const Position SpawnPosition = {746.67f, 684.08f, 412.5f, 4.65f};
-#define CLEANUP_CHECK_INTERVAL 5000
/**
* @todo: Missing dialog/RP (already populated in DB) && spawns (can use ToC25 locations?) for:
@@ -88,7 +87,7 @@ public:
VehicleList.clear();
CLEANED = false;
events.Reset();
- events.RescheduleEvent(EVENT_CHECK_PLAYERS, 0);
+ events.RescheduleEvent(EVENT_CHECK_PLAYERS, 0ms);
Counter = 0;
temp1 = 0;
temp2 = 0;
@@ -268,7 +267,7 @@ public:
if (DoNeedCleanup(player))
InstanceCleanup();
- events.RescheduleEvent(EVENT_CHECK_PLAYERS, CLEANUP_CHECK_INTERVAL);
+ events.RescheduleEvent(EVENT_CHECK_PLAYERS, 5s);
}
bool DoNeedCleanup(Player* ignoredPlayer = nullptr)
@@ -443,7 +442,7 @@ public:
Counter = 0;
SaveToDB();
events.Reset();
- events.RescheduleEvent(EVENT_CHECK_PLAYERS, CLEANUP_CHECK_INTERVAL);
+ events.RescheduleEvent(EVENT_CHECK_PLAYERS, 5s);
CLEANED = true;
}
@@ -785,7 +784,7 @@ public:
{
InstanceCleanup();
}
- events.RepeatEvent(CLEANUP_CHECK_INTERVAL);
+ events.Repeat(5s);
}
break;
case EVENT_SUMMON_GRAND_CHAMPION_1:
@@ -812,7 +811,7 @@ public:
while( number == temp1 || number == temp2 );
DoSummonGrandChampion(number, 2);
HandleGameObject(GO_MainGateGUID, true);
- events.ScheduleEvent(EVENT_CLOSE_GATE, 6000);
+ events.ScheduleEvent(EVENT_CLOSE_GATE, 6s);
}
break;
case EVENT_CLOSE_GATE:
@@ -1129,7 +1128,7 @@ public:
if (Creature* boss = instance->GetCreature(NPC_ArgentChampionGUID))
{
boss->GetMotionMaster()->MovePoint(0, SpawnPosition);
- boss->DespawnOrUnsummon(3000);
+ boss->DespawnOrUnsummon(3s);
}
}
break;
diff --git a/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheChampion/trial_of_the_champion.cpp b/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheChampion/trial_of_the_champion.cpp
index c6118f2aac..d4d9337325 100644
--- a/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheChampion/trial_of_the_champion.cpp
+++ b/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheChampion/trial_of_the_champion.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheChampion/trial_of_the_champion.h b/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheChampion/trial_of_the_champion.h
index d8f71c00d1..1d85e7f547 100644
--- a/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheChampion/trial_of_the_champion.h
+++ b/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheChampion/trial_of_the_champion.h
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheCrusader/boss_anubarak_trial.cpp b/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheCrusader/boss_anubarak_trial.cpp
index e7762a71be..552648cbb2 100644
--- a/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheCrusader/boss_anubarak_trial.cpp
+++ b/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheCrusader/boss_anubarak_trial.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
@@ -19,6 +19,7 @@
#include "PassiveAI.h"
#include "Player.h"
#include "ScriptedCreature.h"
+#include "SharedDefines.h"
#include "SpellAuraEffects.h"
#include "SpellScript.h"
#include "SpellScriptLoader.h"
@@ -161,7 +162,7 @@ public:
events.Reset();
bIntro = false;
bPhase3 = false;
- me->ApplySpellImmune(0, IMMUNITY_ID, RAID_MODE(66193, 67855, 67856, 67857), true);
+ me->ApplySpellImmune(0, IMMUNITY_ID, sSpellMgr->GetSpellIdForDifficulty(SPELL_PERMAFROST, me), true);
me->m_SightDistance = 90.0f; // for MoveInLineOfSight distance
}
@@ -501,8 +502,8 @@ public:
void JustDied(Unit* /*killer*/) override
{
- me->CastSpell(me, RAID_MODE(SPELL_TRAITOR_KING_10, SPELL_TRAITOR_KING_25, SPELL_TRAITOR_KING_10, SPELL_TRAITOR_KING_25), true);
- me->m_Events.AddEvent(new HideNpcEvent(*me), me->m_Events.CalculateTime(5000));
+ me->CastSpell(me, SPELL_TRAITOR_KING, true);
+ me->m_Events.AddEventAtOffset(new HideNpcEvent(*me), 5s);
}
bool CanAIAttack(Unit const* target) const override
@@ -574,7 +575,7 @@ public:
if (spell->Id == SPELL_SPIKE_FAIL)
{
me->RemoveAllAuras();
- me->DespawnOrUnsummon(1500);
+ me->DespawnOrUnsummon(1500ms);
}
}
@@ -655,7 +656,7 @@ public:
me->NearTeleportTo(target->GetPositionX() + cos(o) * 5.0f, target->GetPositionY() + std::sin(o) * 5.0f, target->GetPositionZ() + 0.6f, target->GetOrientation());
AttackStart(target);
me->GetMotionMaster()->MoveChase(target);
- events.DelayEvents(3000);
+ events.DelayEvents(3s);
}
}
@@ -679,7 +680,7 @@ public:
events.Repeat(30s, 45s);
break;
case EVENT_SUBMERGE:
- if (HealthBelowPct(80) && !me->HasAura(RAID_MODE(66193, 67855, 67856, 67857))) // not having permafrost - allow submerge
+ if (HealthBelowPct(80) && !me->HasAura(sSpellMgr->GetSpellIdForDifficulty(SPELL_PERMAFROST, me))) // not having permafrost - allow submerge
{
me->GetMotionMaster()->MoveIdle();
me->SetUnitFlag(UNIT_FLAG_NOT_SELECTABLE);
@@ -710,7 +711,7 @@ public:
void JustDied(Unit* /*killer*/) override
{
- me->m_Events.AddEvent(new HideNpcEvent(*me), me->m_Events.CalculateTime(5000));
+ me->m_Events.AddEventAtOffset(new HideNpcEvent(*me), 5s);
}
bool CanAIAttack(Unit const* target) const override
diff --git a/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheCrusader/boss_faction_champions.cpp b/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheCrusader/boss_faction_champions.cpp
index 0a44e0f9d1..d27d43b388 100644
--- a/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheCrusader/boss_faction_champions.cpp
+++ b/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheCrusader/boss_faction_champions.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
@@ -119,7 +119,7 @@ struct boss_faction_championsAI : public ScriptedAI
}
/// @todo - Convert to std::chrono
- void EventMapGCD(EventMap& e, uint32 delay, uint32 gcd = 0)
+ void EventMapGCD(EventMap& e, Milliseconds delay, uint32 gcd = 0)
{
e.DelayEventsToMax(delay, gcd);
}
@@ -316,43 +316,43 @@ public:
if (Creature* target = SelectTarget_MostHPLostFriendlyMissingBuff(SPELL_LIFEBLOOM, 40.0f))
me->CastSpell(target, SPELL_LIFEBLOOM, false);
events.Repeat(10s, 15s);
- EventMapGCD(events, 1500);
+ EventMapGCD(events, 1500ms);
break;
case EVENT_SPELL_NOURISH:
if (Creature* target = SelectTarget_MostHPLostFriendlyMissingBuff(SPELL_NOURISH, 40.0f))
me->CastSpell(target, SPELL_NOURISH, false);
events.Repeat(10s, 15s);
- EventMapGCD(events, 1500);
+ EventMapGCD(events, 1500ms);
break;
case EVENT_SPELL_REGROWTH:
if (Creature* target = SelectTarget_MostHPLostFriendlyMissingBuff(SPELL_REGROWTH, 40.0f))
me->CastSpell(target, SPELL_REGROWTH, false);
events.Repeat(10s, 15s);
- EventMapGCD(events, 1500);
+ EventMapGCD(events, 1500ms);
break;
case EVENT_SPELL_REJUVENATION:
if (Creature* target = SelectTarget_MostHPLostFriendlyMissingBuff(SPELL_REJUVENATION, 40.0f))
me->CastSpell(target, SPELL_REJUVENATION, false);
events.Repeat(10s, 15s);
- EventMapGCD(events, 1500);
+ EventMapGCD(events, 1500ms);
break;
case EVENT_SPELL_THORNS:
if (Creature* target = SelectTarget_MostHPLostFriendlyMissingBuff(SPELL_THORNS, 30.0f))
me->CastSpell(target, SPELL_THORNS, false);
events.Repeat(10s, 15s);
- EventMapGCD(events, 1500);
+ EventMapGCD(events, 1500ms);
break;
case EVENT_SPELL_TRANQUILITY:
me->CastSpell(me, SPELL_TRANQUILITY, false);
events.Repeat(2min, 3min);
- EventMapGCD(events, 1500);
+ EventMapGCD(events, 1500ms);
break;
case EVENT_SPELL_BARKSKIN:
if (HealthBelowPct(50))
{
me->CastSpell(me, SPELL_BARKSKIN, false);
events.Repeat(1min);
- EventMapGCD(events, 1500);
+ EventMapGCD(events, 1500ms);
}
else
events.Repeat(6s);
@@ -360,7 +360,7 @@ public:
case EVENT_SPELL_NATURE_GRASP:
me->CastSpell(me, SPELL_NATURE_GRASP, false);
events.Repeat(1min);
- EventMapGCD(events, 1500);
+ EventMapGCD(events, 1500ms);
break;
}
@@ -445,19 +445,19 @@ public:
if (Creature* target = SelectTarget_MostHPLostFriendlyMissingBuff(SPELL_HEALING_WAVE, 40.0f))
me->CastSpell(target, SPELL_HEALING_WAVE, false);
events.Repeat(10s, 15s);
- EventMapGCD(events, 1500);
+ EventMapGCD(events, 1500ms);
break;
case EVENT_SPELL_RIPTIDE:
if (Creature* target = SelectTarget_MostHPLostFriendlyMissingBuff(SPELL_RIPTIDE, 40.0f))
me->CastSpell(target, SPELL_RIPTIDE, false);
events.Repeat(10s, 15s);
- EventMapGCD(events, 1500);
+ EventMapGCD(events, 1500ms);
break;
case EVENT_SPELL_SPIRIT_CLEANSE:
if (Creature* target = SelectTarget_MostHPLostFriendlyMissingBuff(SPELL_SPIRIT_CLEANSE, 40.0f))
me->CastSpell(target, SPELL_SPIRIT_CLEANSE, false);
events.Repeat(10s, 15s);
- EventMapGCD(events, 1500);
+ EventMapGCD(events, 1500ms);
break;
case EVENT_SPELL_HEROISM_OR_BLOODLUST:
if (me->GetEntry() == NPC_ALLIANCE_SHAMAN_RESTORATION )
@@ -465,25 +465,25 @@ public:
else
me->CastSpell((Unit*)nullptr, SPELL_BLOODLUST, true);
events.Repeat(10min);
- EventMapGCD(events, 1500);
+ EventMapGCD(events, 1500ms);
break;
case EVENT_SPELL_HEX:
if (Unit* target = SelectTarget(SelectTargetMethod::Random, 0, 20.0f, true))
me->CastSpell(target, SPELL_HEX, false);
events.Repeat(45s);
- EventMapGCD(events, 1500);
+ EventMapGCD(events, 1500ms);
break;
case EVENT_SPELL_EARTH_SHIELD:
if (Creature* target = SelectTarget_MostHPLostFriendlyMissingBuff(SPELL_EARTH_SHIELD, 40.0f))
me->CastSpell(target, SPELL_EARTH_SHIELD, false);
events.Repeat(10s, 15s);
- EventMapGCD(events, 1500);
+ EventMapGCD(events, 1500ms);
break;
case EVENT_SPELL_EARTH_SHOCK:
if (me->GetVictim())
me->CastSpell(me->GetVictim(), SPELL_EARTH_SHOCK, false);
events.Repeat(5s, 10s);
- EventMapGCD(events, 1500);
+ EventMapGCD(events, 1500ms);
break;
}
@@ -568,14 +568,14 @@ public:
if (Creature* target = SelectTarget_MostHPLostFriendlyMissingBuff(SPELL_HAND_OF_FREEDOM, 30.0f))
me->CastSpell(target, SPELL_HAND_OF_FREEDOM, false);
events.Repeat(25s);
- EventMapGCD(events, 1500);
+ EventMapGCD(events, 1500ms);
break;
case EVENT_SPELL_BUBBLE:
if (HealthBelowPct(25))
{
me->CastSpell(me, SPELL_BUBBLE, false);
events.Repeat(5min);
- EventMapGCD(events, 1500);
+ EventMapGCD(events, 1500ms);
}
else
events.Repeat(10s);
@@ -584,32 +584,32 @@ public:
if (Creature* target = SelectTarget_MostHPLostFriendlyMissingBuff(SPELL_CLEANSE, 40.0f))
me->CastSpell(target, SPELL_CLEANSE, false);
events.Repeat(10s, 15s);
- EventMapGCD(events, 1500);
+ EventMapGCD(events, 1500ms);
break;
case EVENT_SPELL_FLASH_OF_LIGHT:
if (Creature* target = SelectTarget_MostHPLostFriendlyMissingBuff(SPELL_FLASH_OF_LIGHT, 40.0f))
me->CastSpell(target, SPELL_FLASH_OF_LIGHT, false);
events.Repeat(10s, 15s);
- EventMapGCD(events, 1500);
+ EventMapGCD(events, 1500ms);
break;
case EVENT_SPELL_HOLY_LIGHT:
if (Creature* target = SelectTarget_MostHPLostFriendlyMissingBuff(SPELL_HOLY_LIGHT, 40.0f))
me->CastSpell(target, SPELL_HOLY_LIGHT, false);
events.Repeat(10s, 15s);
- EventMapGCD(events, 1500);
+ EventMapGCD(events, 1500ms);
break;
case EVENT_SPELL_HOLY_SHOCK:
if (Creature* target = SelectTarget_MostHPLostFriendlyMissingBuff(SPELL_HOLY_SHOCK, 40.0f))
me->CastSpell(target, SPELL_HOLY_SHOCK, false);
events.Repeat(10s, 15s);
- EventMapGCD(events, 1500);
+ EventMapGCD(events, 1500ms);
break;
case EVENT_SPELL_HAND_OF_PROTECTION:
if (Creature* target = SelectTarget_MostHPLostFriendlyMissingBuff(SPELL_HAND_OF_PROTECTION, 40.0f))
{
me->CastSpell(target, SPELL_HAND_OF_PROTECTION, false);
events.Repeat(5min);
- EventMapGCD(events, 1500);
+ EventMapGCD(events, 1500ms);
}
else
events.Repeat(10s);
@@ -619,7 +619,7 @@ public:
{
me->CastSpell(target, SPELL_HAMMER_OF_JUSTICE, false);
events.Repeat(40s);
- EventMapGCD(events, 1500);
+ EventMapGCD(events, 1500ms);
}
else
events.Repeat(10s);
@@ -701,32 +701,32 @@ public:
if (Creature* target = SelectTarget_MostHPLostFriendlyMissingBuff(SPELL_RENEW, 40.0f))
me->CastSpell(target, SPELL_RENEW, false);
events.Repeat(10s, 15s);
- EventMapGCD(events, 1500);
+ EventMapGCD(events, 1500ms);
break;
case EVENT_SPELL_SHIELD:
if (Creature* target = SelectTarget_MostHPLostFriendlyMissingBuff(SPELL_SHIELD, 40.0f))
me->CastSpell(target, SPELL_SHIELD, false);
events.Repeat(10s, 15s);
- EventMapGCD(events, 1500);
+ EventMapGCD(events, 1500ms);
break;
case EVENT_SPELL_FLASH_HEAL:
if (Creature* target = SelectTarget_MostHPLostFriendlyMissingBuff(SPELL_FLASH_HEAL, 40.0f))
me->CastSpell(target, SPELL_FLASH_HEAL, false);
events.Repeat(10s, 15s);
- EventMapGCD(events, 1500);
+ EventMapGCD(events, 1500ms);
break;
case EVENT_SPELL_DISPEL:
if (Unit* target = (urand(0, 1) ? SelectTarget(SelectTargetMethod::MaxThreat, 0, 30.0f, true) : SelectTarget_MostHPLostFriendlyMissingBuff(SPELL_DISPEL, 40.0f)))
me->CastSpell(target, SPELL_DISPEL, false);
events.Repeat(10s, 15s);
- EventMapGCD(events, 1500);
+ EventMapGCD(events, 1500ms);
break;
case EVENT_SPELL_MANA_BURN:
if (Unit* target = SelectEnemyCaster(false, 30.0f))
{
me->CastSpell(target, SPELL_MANA_BURN, false);
events.Repeat(10s, 15s);
- EventMapGCD(events, 1500);
+ EventMapGCD(events, 1500ms);
}
else
events.Repeat(6s);
@@ -736,7 +736,7 @@ public:
{
me->CastSpell((Unit*)nullptr, SPELL_PSYCHIC_SCREAM, false);
events.Repeat(30s);
- EventMapGCD(events, 1500);
+ EventMapGCD(events, 1500ms);
}
else
events.Repeat(6s);
@@ -825,7 +825,7 @@ public:
{
me->CastSpell(target, SPELL_SILENCE, false);
events.Repeat(45s);
- EventMapGCD(events, 1500);
+ EventMapGCD(events, 1500ms);
break;
}
else
@@ -835,32 +835,32 @@ public:
if (me->GetVictim())
me->CastSpell(me->GetVictim(), SPELL_VAMPIRIC_TOUCH, false);
events.Repeat(10s, 15s);
- EventMapGCD(events, 1500);
+ EventMapGCD(events, 1500ms);
break;
case EVENT_SPELL_SW_PAIN:
if (me->GetVictim())
me->CastSpell(me->GetVictim(), SPELL_SW_PAIN, false);
events.Repeat(10s, 15s);
- EventMapGCD(events, 1500);
+ EventMapGCD(events, 1500ms);
break;
case EVENT_SPELL_MIND_FLAY:
if (me->GetVictim())
me->CastSpell(me->GetVictim(), SPELL_MIND_FLAY, false);
events.Repeat(10s, 15s);
- EventMapGCD(events, 1500);
+ EventMapGCD(events, 1500ms);
break;
case EVENT_SPELL_MIND_BLAST:
if (me->GetVictim())
me->CastSpell(me->GetVictim(), SPELL_MIND_BLAST, false);
events.Repeat(10s, 15s);
- EventMapGCD(events, 1500);
+ EventMapGCD(events, 1500ms);
break;
case EVENT_SPELL_HORROR:
if (me->GetVictim() && me->GetExactDist2d(me->GetVictim()) <= 30.0f )
{
me->CastSpell(me->GetVictim(), SPELL_HORROR, false);
events.Repeat(2min);
- EventMapGCD(events, 1500);
+ EventMapGCD(events, 1500ms);
}
else
events.Repeat(10s);
@@ -870,7 +870,7 @@ public:
{
me->CastSpell(me, SPELL_DISPERSION, false);
events.Repeat(3min);
- EventMapGCD(events, 1500);
+ EventMapGCD(events, 1500ms);
}
else
events.Repeat(6s);
@@ -879,14 +879,14 @@ public:
if (Unit* target = (urand(0, 1) ? SelectTarget(SelectTargetMethod::MaxThreat, 0, 30.0f, true) : SelectTarget_MostHPLostFriendlyMissingBuff(SPELL_DISPEL, 40.0f)))
me->CastSpell(target, SPELL_DISPEL, false);
events.Repeat(10s, 15s);
- EventMapGCD(events, 1500);
+ EventMapGCD(events, 1500ms);
break;
case EVENT_SPELL_PSYCHIC_SCREAM:
if (EnemiesInRange(8.0f) >= 3 )
{
me->CastSpell((Unit*)nullptr, SPELL_PSYCHIC_SCREAM, false);
events.Repeat(30s);
- EventMapGCD(events, 1500);
+ EventMapGCD(events, 1500ms);
}
else
events.Repeat(6s);
@@ -989,7 +989,7 @@ public:
{
me->CastSpell((Unit*)nullptr, SPELL_HELLFIRE, false);
events.Repeat(30s);
- EventMapGCD(events, 1500);
+ EventMapGCD(events, 1500ms);
}
else
events.Repeat(6s);
@@ -998,43 +998,43 @@ public:
if (me->GetVictim())
me->CastSpell(me->GetVictim(), SPELL_CORRUPTION, false);
events.Repeat(10s, 20s);
- EventMapGCD(events, 1500);
+ EventMapGCD(events, 1500ms);
break;
case EVENT_SPELL_CURSE_OF_AGONY:
if (me->GetVictim())
me->CastSpell(me->GetVictim(), SPELL_CURSE_OF_AGONY, false);
events.Repeat(10s, 20s);
- EventMapGCD(events, 1500);
+ EventMapGCD(events, 1500ms);
break;
case EVENT_SPELL_CURSE_OF_EXHAUSTION:
if (me->GetVictim())
me->CastSpell(me->GetVictim(), SPELL_CURSE_OF_EXHAUSTION, false);
events.Repeat(10s, 20s);
- EventMapGCD(events, 1500);
+ EventMapGCD(events, 1500ms);
break;
case EVENT_SPELL_FEAR:
if (Unit* target = SelectTarget(SelectTargetMethod::Random, 0, 20.0f, true))
me->CastSpell(target, SPELL_FEAR, false);
events.Repeat(10s, 15s);
- EventMapGCD(events, 1500);
+ EventMapGCD(events, 1500ms);
break;
case EVENT_SPELL_SEARING_PAIN:
if (me->GetVictim())
me->CastSpell(me->GetVictim(), SPELL_SEARING_PAIN, false);
events.Repeat(5s, 15s);
- EventMapGCD(events, 1500);
+ EventMapGCD(events, 1500ms);
break;
case EVENT_SPELL_SHADOW_BOLT:
if (me->GetVictim())
me->CastSpell(me->GetVictim(), SPELL_SHADOW_BOLT, false);
events.Repeat(5s, 15s);
- EventMapGCD(events, 1500);
+ EventMapGCD(events, 1500ms);
break;
case EVENT_SPELL_UNSTABLE_AFFLICTION:
if (me->GetVictim())
me->CastSpell(me->GetVictim(), SPELL_UNSTABLE_AFFLICTION, false);
events.Repeat(5s, 15s);
- EventMapGCD(events, 1500);
+ EventMapGCD(events, 1500ms);
break;
}
@@ -1121,20 +1121,20 @@ public:
if (me->GetVictim())
me->CastSpell(me->GetVictim(), SPELL_ARCANE_BARRAGE, false);
events.Repeat(5s, 15s);
- EventMapGCD(events, 1500);
+ EventMapGCD(events, 1500ms);
break;
case EVENT_SPELL_ARCANE_BLAST:
if (me->GetVictim())
me->CastSpell(me->GetVictim(), SPELL_ARCANE_BLAST, false);
events.Repeat(5s, 15s);
- EventMapGCD(events, 1500);
+ EventMapGCD(events, 1500ms);
break;
case EVENT_SPELL_ARCANE_EXPLOSION:
if (EnemiesInRange(9.0f) >= 3 )
{
me->CastSpell((Unit*)nullptr, SPELL_ARCANE_EXPLOSION, false);
events.Repeat(6s);
- EventMapGCD(events, 1500);
+ EventMapGCD(events, 1500ms);
}
else
events.Repeat(6s);
@@ -1144,7 +1144,7 @@ public:
{
me->CastSpell((Unit*)nullptr, SPELL_FROST_NOVA, false);
events.Repeat(15s);
- EventMapGCD(events, 1500);
+ EventMapGCD(events, 1500ms);
// blink disabled, movement not working
}
else
@@ -1155,7 +1155,7 @@ public:
{
me->CastSpell(target, SPELL_COUNTERSPELL, false);
events.Repeat(24s);
- EventMapGCD(events, 1500);
+ EventMapGCD(events, 1500ms);
}
else
events.Repeat(6s);
@@ -1164,14 +1164,14 @@ public:
if (me->GetVictim())
me->CastSpell(me->GetVictim(), SPELL_FROSTBOLT, false);
events.Repeat(5s, 15s);
- EventMapGCD(events, 1500);
+ EventMapGCD(events, 1500ms);
break;
case EVENT_SPELL_ICE_BLOCK:
if (HealthBelowPct(25))
{
me->CastSpell(me, SPELL_ICE_BLOCK, false);
events.Repeat(5min);
- EventMapGCD(events, 1500);
+ EventMapGCD(events, 1500ms);
}
else
events.Repeat(6s);
@@ -1180,7 +1180,7 @@ public:
if (Unit* target = SelectTarget(SelectTargetMethod::Random, 0, 30.0f, true))
me->CastSpell(target, SPELL_POLYMORPH, false);
events.Repeat(15s);
- EventMapGCD(events, 1500);
+ EventMapGCD(events, 1500ms);
break;
}
@@ -1279,14 +1279,14 @@ public:
if (me->GetVictim())
me->CastSpell(me->GetVictim(), SPELL_AIMED_SHOT, false);
events.Repeat(5s, 15s);
- EventMapGCD(events, 1500);
+ EventMapGCD(events, 1500ms);
break;
case EVENT_SPELL_DETERRENCE:
if (HealthBelowPct(25))
{
me->CastSpell(me, SPELL_DETERRENCE, false);
events.Repeat(90s);
- EventMapGCD(events, 1500);
+ EventMapGCD(events, 1500ms);
}
else
events.Repeat(6s);
@@ -1296,7 +1296,7 @@ public:
{
me->CastSpell(me, SPELL_DISENGAGE, false);
events.Repeat(20s);
- EventMapGCD(events, 1500);
+ EventMapGCD(events, 1500ms);
}
else
events.Repeat(6s);
@@ -1305,31 +1305,31 @@ public:
if (me->GetVictim())
me->CastSpell(me->GetVictim(), SPELL_EXPLOSIVE_SHOT, false);
events.Repeat(5s, 15s);
- EventMapGCD(events, 1500);
+ EventMapGCD(events, 1500ms);
break;
case EVENT_SPELL_FROST_TRAP:
me->CastSpell(me, SPELL_FROST_TRAP, false);
events.Repeat(30s);
- EventMapGCD(events, 1500);
+ EventMapGCD(events, 1500ms);
break;
case EVENT_SPELL_STEADY_SHOT:
if (me->GetVictim())
me->CastSpell(me->GetVictim(), SPELL_STEADY_SHOT, false);
events.Repeat(5s, 15s);
- EventMapGCD(events, 1500);
+ EventMapGCD(events, 1500ms);
break;
case EVENT_SPELL_WING_CLIP:
if (me->GetVictim() && me->GetDistance2d(me->GetVictim()) <= 5.0f )
me->CastSpell(me->GetVictim(), SPELL_WING_CLIP, false);
events.Repeat(8s);
- EventMapGCD(events, 1500);
+ EventMapGCD(events, 1500ms);
break;
case EVENT_SPELL_WYVERN_STING:
if (Unit* target = SelectTarget(SelectTargetMethod::Random, 0, 35.0f, true))
{
me->CastSpell(target, SPELL_WYVERN_STING, false);
events.Repeat(1min);
- EventMapGCD(events, 1500);
+ EventMapGCD(events, 1500ms);
break;
}
events.Repeat(10s);
@@ -1429,7 +1429,7 @@ public:
{
me->CastSpell(me, SPELL_BARKSKIN, false);
events.Repeat(1min);
- EventMapGCD(events, 1500);
+ EventMapGCD(events, 1500ms);
}
else
events.Repeat(6s);
@@ -1438,48 +1438,48 @@ public:
if (me->GetVictim())
me->CastSpell(me->GetVictim(), SPELL_WRATH, false);
events.Repeat(5s, 15s);
- EventMapGCD(events, 1500);
+ EventMapGCD(events, 1500ms);
break;
case EVENT_SPELL_MOONFIRE:
if (me->GetVictim())
me->CastSpell(me->GetVictim(), SPELL_MOONFIRE, false);
events.Repeat(5s, 15s);
- EventMapGCD(events, 1500);
+ EventMapGCD(events, 1500ms);
break;
case EVENT_SPELL_STARFIRE:
if (me->GetVictim())
me->CastSpell(me->GetVictim(), SPELL_STARFIRE, false);
events.Repeat(5s, 15s);
- EventMapGCD(events, 1500);
+ EventMapGCD(events, 1500ms);
break;
case EVENT_SPELL_INSECT_SWARM:
if (me->GetVictim())
me->CastSpell(me->GetVictim(), SPELL_INSECT_SWARM, false);
events.Repeat(5s, 15s);
- EventMapGCD(events, 1500);
+ EventMapGCD(events, 1500ms);
break;
case EVENT_SPELL_ENTANGLING_ROOTS:
if (Unit* target = SelectTarget(SelectTargetMethod::Random, 0, 30.0f, true))
me->CastSpell(target, SPELL_ENTANGLING_ROOTS, false);
events.Repeat(10s, 15s);
- EventMapGCD(events, 1500);
+ EventMapGCD(events, 1500ms);
break;
case EVENT_SPELL_FAERIE_FIRE:
if (me->GetVictim())
me->CastSpell(me->GetVictim(), SPELL_FAERIE_FIRE, false);
events.Repeat(15s, 20s);
- EventMapGCD(events, 1500);
+ EventMapGCD(events, 1500ms);
break;
case EVENT_SPELL_CYCLONE:
if (Unit* target = SelectTarget(SelectTargetMethod::MaxDistance, 0, 20.0f, true))
me->CastSpell(target, SPELL_CYCLONE, false);
events.Repeat(25s, 40s);
- EventMapGCD(events, 1500);
+ EventMapGCD(events, 1500ms);
break;
case EVENT_SPELL_FORCE_OF_NATURE:
me->CastSpell((Unit*)nullptr, SPELL_FORCE_OF_NATURE, false);
events.Repeat(3min);
- EventMapGCD(events, 1500);
+ EventMapGCD(events, 1500ms);
break;
}
@@ -1583,7 +1583,7 @@ public:
{
me->CastSpell((Unit*)nullptr, SPELL_INTIMIDATING_SHOUT, false);
events.Repeat(2min);
- EventMapGCD(events, 1500);
+ EventMapGCD(events, 1500ms);
}
else
events.Repeat(5s);
@@ -1597,14 +1597,14 @@ public:
if (me->GetVictim())
me->CastSpell(me->GetVictim(), SPELL_MORTAL_STRIKE, false);
events.Repeat(6s, 8s);
- EventMapGCD(events, 1500);
+ EventMapGCD(events, 1500ms);
break;
case EVENT_SPELL_CHARGE:
if (me->GetVictim() && me->GetDistance2d(me->GetVictim()) > 8.0f && me->GetDistance2d(me->GetVictim()) < 25.0f )
{
me->CastSpell(me->GetVictim(), SPELL_CHARGE, false);
events.Repeat(10s);
- EventMapGCD(events, 1500);
+ EventMapGCD(events, 1500ms);
}
else
events.Repeat(5s);
@@ -1614,7 +1614,7 @@ public:
{
me->CastSpell(me->GetVictim(), SPELL_DISARM, false);
events.Repeat(1min);
- EventMapGCD(events, 1500);
+ EventMapGCD(events, 1500ms);
}
else
events.Repeat(5s);
@@ -1629,7 +1629,7 @@ public:
{
me->CastSpell(me->GetVictim(), SPELL_OVERPOWER, false);
events.Repeat(10s, 15s);
- EventMapGCD(events, 1500);
+ EventMapGCD(events, 1500ms);
}
else
events.Repeat(5s);
@@ -1644,7 +1644,7 @@ public:
{
me->CastSpell(me->GetVictim(), SPELL_SUNDER_ARMOR, false);
events.Repeat(10s, 15s);
- EventMapGCD(events, 1500);
+ EventMapGCD(events, 1500ms);
}
else
events.Repeat(5s);
@@ -1659,7 +1659,7 @@ public:
{
me->CastSpell(me->GetVictim(), SPELL_SHATTERING_THROW, false);
events.Repeat(5min);
- EventMapGCD(events, 1500);
+ EventMapGCD(events, 1500ms);
}
else
events.Repeat(6s);
@@ -1674,7 +1674,7 @@ public:
{
me->CastSpell(me, SPELL_RETALIATION, false);
events.Repeat(5min);
- EventMapGCD(events, 1500);
+ EventMapGCD(events, 1500ms);
}
else
events.Repeat(5s);
@@ -1760,7 +1760,7 @@ public:
{
me->CastSpell(me->GetVictim(), SPELL_CHAINS_OF_ICE, false);
events.Repeat(10s, 15s);
- EventMapGCD(events, 1500);
+ EventMapGCD(events, 1500ms);
}
else
events.Repeat(5s);
@@ -1770,7 +1770,7 @@ public:
{
me->CastSpell(me->GetVictim(), SPELL_DEATH_COIL, false);
events.Repeat(5s, 8s);
- EventMapGCD(events, 1500);
+ EventMapGCD(events, 1500ms);
}
else
events.Repeat(5s);
@@ -1785,7 +1785,7 @@ public:
pos.Relocate(x, y, z);
me->GetVictim()->CastSpell(pos.GetPositionX(), pos.GetPositionY(), pos.GetPositionZ(), 49575, true);
events.Repeat(35s);
- EventMapGCD(events, 2000);
+ EventMapGCD(events, 2s);
}
else
events.Repeat(5s);
@@ -1800,7 +1800,7 @@ public:
{
me->CastSpell(me->GetVictim(), SPELL_FROST_STRIKE, false);
events.Repeat(6s, 10s);
- EventMapGCD(events, 1500);
+ EventMapGCD(events, 1500ms);
}
else
events.Repeat(5s);
@@ -1810,7 +1810,7 @@ public:
{
me->CastSpell(me, SPELL_ICEBOUND_FORTITUDE, false);
events.Repeat(1min);
- EventMapGCD(events, 1500);
+ EventMapGCD(events, 1500ms);
}
else
events.Repeat(6s);
@@ -1820,7 +1820,7 @@ public:
{
me->CastSpell(me->GetVictim(), SPELL_ICY_TOUCH, false);
events.Repeat(10s, 15s);
- EventMapGCD(events, 1500);
+ EventMapGCD(events, 1500ms);
}
else
events.Repeat(5s);
@@ -1830,7 +1830,7 @@ public:
{
me->CastSpell(me->GetVictim(), SPELL_STRANGULATE, false);
events.Repeat(2min);
- EventMapGCD(events, 1500);
+ EventMapGCD(events, 1500ms);
}
else
events.Repeat(5s);
@@ -1922,7 +1922,7 @@ public:
{
me->CastSpell(me->GetVictim(), SPELL_FAN_OF_KNIVES, false);
events.Repeat(6s, 10s);
- EventMapGCD(events, 1500);
+ EventMapGCD(events, 1500ms);
}
else
events.Repeat(5s);
@@ -1932,7 +1932,7 @@ public:
{
me->CastSpell(target, SPELL_BLIND, false);
events.Repeat(2min);
- EventMapGCD(events, 1500);
+ EventMapGCD(events, 1500ms);
}
else
events.Repeat(5s);
@@ -1942,7 +1942,7 @@ public:
{
me->CastSpell(me, SPELL_CLOAK, false);
events.Repeat(90s);
- EventMapGCD(events, 1500);
+ EventMapGCD(events, 1500ms);
}
else
events.Repeat(6s);
@@ -1954,7 +1954,7 @@ public:
{
me->CastSpell(me, SPELL_BLADE_FLURRY, false);
events.Repeat(2min);
- EventMapGCD(events, 1500);
+ EventMapGCD(events, 1500ms);
}
break;
case EVENT_SPELL_SHADOWSTEP:
@@ -1962,7 +1962,7 @@ public:
{
me->CastSpell(me->GetVictim(), SPELL_SHADOWSTEP, false);
events.Repeat(30s);
- EventMapGCD(events, 1500);
+ EventMapGCD(events, 1500ms);
}
else
events.Repeat(5s);
@@ -1977,7 +1977,7 @@ public:
{
me->CastSpell(me->GetVictim(), SPELL_HEMORRHAGE, false);
events.Repeat(5s);
- EventMapGCD(events, 1500);
+ EventMapGCD(events, 1500ms);
}
else
events.Repeat(5s);
@@ -1992,7 +1992,7 @@ public:
{
me->CastSpell(me->GetVictim(), SPELL_EVISCERATE, false);
events.Repeat(15s, 25s);
- EventMapGCD(events, 1500);
+ EventMapGCD(events, 1500ms);
}
else
events.Repeat(5s);
@@ -2037,7 +2037,7 @@ public:
npc_toc_enh_shamanAI(Creature* pCreature) : boss_faction_championsAI(pCreature, AI_MELEE)
{
SetEquipmentSlots(false, 51803, 48013, EQUIP_NO_CHANGE);
- me->SetModifierValue(UNIT_MOD_DAMAGE_OFFHAND, TOTAL_PCT, 1.0f);
+ me->SetStatPctModifier(UNIT_MOD_DAMAGE_OFFHAND, TOTAL_PCT, 1.0f);
me->UpdateDamagePhysical(OFF_ATTACK);
events.Reset();
@@ -2080,7 +2080,7 @@ public:
{
me->CastSpell(target, SPELL_EARTH_SHOCK_ENH, false);
events.Repeat(6s, 8s);
- EventMapGCD(events, 1500);
+ EventMapGCD(events, 1500ms);
}
else
events.Repeat(5s);
@@ -2095,7 +2095,7 @@ public:
{
me->CastSpell(target, SPELL_LAVA_LASH, false);
events.Repeat(6s, 8s);
- EventMapGCD(events, 1500);
+ EventMapGCD(events, 1500ms);
}
else
events.Repeat(5s);
@@ -2110,7 +2110,7 @@ public:
{
me->CastSpell(target, SPELL_STORMSTRIKE, false);
events.Repeat(8s, 9s);
- EventMapGCD(events, 1500);
+ EventMapGCD(events, 1500ms);
}
else
events.Repeat(5s);
@@ -2121,12 +2121,12 @@ public:
else
me->CastSpell((Unit*)nullptr, SPELL_BLOODLUST, true);
events.Repeat(10min);
- EventMapGCD(events, 1500);
+ EventMapGCD(events, 1500ms);
break;
case EVENT_SUMMON_TOTEM:
me->CastSpell((Unit*)nullptr, RAND(SPELL_GROUNDING_TOTEM, SPELL_WINDFURY_TOTEM, SPELL_TREMOR_TOTEM), false);
events.Repeat(30s);
- EventMapGCD(events, 1500);
+ EventMapGCD(events, 1500ms);
break;
}
@@ -2211,7 +2211,7 @@ public:
case EVENT_SPELL_AVENGING_WRATH:
me->CastSpell(me, SPELL_AVENGING_WRATH, false);
events.Repeat(3min);
- EventMapGCD(events, 1500);
+ EventMapGCD(events, 1500ms);
break;
case EVENT_SPELL_CRUSADER_STRIKE:
if (me->HasUnitFlag(UNIT_FLAG_DISARMED))
@@ -2223,7 +2223,7 @@ public:
{
me->CastSpell(target, SPELL_CRUSADER_STRIKE, false);
events.Repeat(6s, 8s);
- EventMapGCD(events, 1500);
+ EventMapGCD(events, 1500ms);
}
else
events.Repeat(5s);
@@ -2233,7 +2233,7 @@ public:
{
me->CastSpell(me, SPELL_DIVINE_SHIELD, false);
events.Repeat(5min);
- EventMapGCD(events, 1500);
+ EventMapGCD(events, 1500ms);
}
else
events.Repeat(5s);
@@ -2248,7 +2248,7 @@ public:
{
me->CastSpell((Unit*)nullptr, SPELL_DIVINE_STORM, false);
events.Repeat(10s, 15s);
- EventMapGCD(events, 1500);
+ EventMapGCD(events, 1500ms);
}
else
events.Repeat(5s);
@@ -2258,7 +2258,7 @@ public:
{
me->CastSpell(target, SPELL_HAMMER_OF_JUSTICE_RET, false);
events.Repeat(40s);
- EventMapGCD(events, 1500);
+ EventMapGCD(events, 1500ms);
}
else
events.Repeat(5s);
@@ -2268,7 +2268,7 @@ public:
{
me->CastSpell(target, SPELL_HAND_OF_PROTECTION_RET, false);
events.Repeat(5min);
- EventMapGCD(events, 1500);
+ EventMapGCD(events, 1500ms);
}
else
events.Repeat(5s);
@@ -2278,7 +2278,7 @@ public:
{
me->CastSpell(target, SPELL_JUDGEMENT_OF_COMMAND, false);
events.Repeat(10s, 15s);
- EventMapGCD(events, 1500);
+ EventMapGCD(events, 1500ms);
}
else
events.Repeat(5s);
@@ -2288,7 +2288,7 @@ public:
{
me->CastSpell(target, SPELL_REPENTANCE, false);
events.Repeat(1min);
- EventMapGCD(events, 1500);
+ EventMapGCD(events, 1500ms);
}
else
events.Repeat(5s);
@@ -2357,13 +2357,13 @@ public:
if (me->GetVictim())
me->CastSpell(me->GetVictim(), SPELL_DEVOUR_MAGIC, false);
events.Repeat(8s, 15s);
- EventMapGCD(events, 1500);
+ EventMapGCD(events, 1500ms);
break;
case EVENT_SPELL_SPELL_LOCK:
if (me->GetVictim())
me->CastSpell(me->GetVictim(), SPELL_SPELL_LOCK, false);
events.Repeat(24s);
- EventMapGCD(events, 1500);
+ EventMapGCD(events, 1500ms);
break;
}
diff --git a/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheCrusader/boss_lord_jaraxxus.cpp b/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheCrusader/boss_lord_jaraxxus.cpp
index 67cd96d419..251f69f02a 100644
--- a/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheCrusader/boss_lord_jaraxxus.cpp
+++ b/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheCrusader/boss_lord_jaraxxus.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
@@ -353,7 +353,7 @@ public:
void JustDied(Unit* /*killer*/) override
{
- me->DespawnOrUnsummon(10000);
+ me->DespawnOrUnsummon(10s);
}
void EnterEvadeMode(EvadeReason /*why*/) override
@@ -434,7 +434,7 @@ public:
void JustDied(Unit* /*killer*/) override
{
- me->DespawnOrUnsummon(10000);
+ me->DespawnOrUnsummon(10s);
}
void EnterEvadeMode(EvadeReason /*why*/) override
diff --git a/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheCrusader/boss_northrend_beasts.cpp b/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheCrusader/boss_northrend_beasts.cpp
index 9ad8b6230d..abd04ee4ae 100644
--- a/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheCrusader/boss_northrend_beasts.cpp
+++ b/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheCrusader/boss_northrend_beasts.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
@@ -848,7 +848,7 @@ public:
me->CastSpell(me, SPELL_STAGGERED_DAZE, true);
me->CastSpell((Unit*)nullptr, SPELL_TRAMPLE, true);
Talk(EMOTE_TRAMPLE_CRASH);
- events.DelayEvents(15000);
+ events.DelayEvents(15s);
}
else
{
diff --git a/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheCrusader/boss_twin_valkyr.cpp b/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheCrusader/boss_twin_valkyr.cpp
index 372081fe04..2ffe2f7dd5 100644
--- a/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheCrusader/boss_twin_valkyr.cpp
+++ b/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheCrusader/boss_twin_valkyr.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
@@ -109,7 +109,7 @@ struct boss_twin_valkyrAI : public ScriptedAI
{
pInstance = pCreature->GetInstanceScript();
me->SetReactState(REACT_PASSIVE);
- me->SetModifierValue(UNIT_MOD_DAMAGE_OFFHAND, TOTAL_PCT, 1.0f);
+ me->SetStatPctModifier(UNIT_MOD_DAMAGE_OFFHAND, TOTAL_PCT, 1.0f);
me->UpdateDamagePhysical(OFF_ATTACK);
LastSynchroHP = (int32)me->GetMaxHealth();
SpecialMask = 0;
@@ -384,7 +384,7 @@ struct boss_twin_valkyrAI : public ScriptedAI
/*
if (Unit* target = SelectTarget(SelectTargetMethod::Random, 0, 0.0f, true, essenceId))
me->CastSpell(target, me->GetEntry()==NPC_LIGHTBANE ? SPELL_LIGHT_TOUCH : SPELL_DARK_TOUCH, false);
- events.RepeatEvent(urand(45000,50000));
+ events.Repeat(45s,50s);
*/
GuidVector tList;
@@ -458,7 +458,7 @@ struct boss_twin_valkyrAI : public ScriptedAI
if ((SpecialMask & 0xF) == 0xF )
SpecialMask = 0;
events.Repeat(45s);
- events.DelayEventsToMax(15000, 1); // no touch of light/darkness during special abilities!
+ events.DelayEventsToMax(15s, 1); // no touch of light/darkness during special abilities!
}
break;
case EVENT_REMOVE_DUAL_WIELD:
@@ -710,7 +710,7 @@ public:
return;
if (urand(0, 2))
- me->DespawnOrUnsummon(0);
+ me->DespawnOrUnsummon(0ms);
}
void MoveToNextPoint()
@@ -884,7 +884,7 @@ class spell_valkyr_ball_periodic_dummy_aura : public AuraScript
creature->GetMotionMaster()->MoveIdle();
creature->CastSpell((Unit*)nullptr, creature->GetEntry() == NPC_CONCENTRATED_LIGHT ? SPELL_UNLEASHED_LIGHT : SPELL_UNLEASHED_DARK, false);
creature->SetDisplayId(11686);
- creature->DespawnOrUnsummon(1500);
+ creature->DespawnOrUnsummon(1500ms);
}
}
diff --git a/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheCrusader/instance_trial_of_the_crusader.cpp b/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheCrusader/instance_trial_of_the_crusader.cpp
index 7dc9c0c591..c91c08a554 100644
--- a/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheCrusader/instance_trial_of_the_crusader.cpp
+++ b/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheCrusader/instance_trial_of_the_crusader.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
@@ -175,7 +175,7 @@ public:
bSwitcher = false;
bNooneDied = true;
events.Reset();
- events.RescheduleEvent(EVENT_CHECK_PLAYERS, 0);
+ events.RescheduleEvent(EVENT_CHECK_PLAYERS, 0ms);
NPC_ChampionGUIDs.clear();
}
@@ -295,22 +295,22 @@ public:
switch (InstanceProgress)
{
case INSTANCE_PROGRESS_INITIAL:
- events.RescheduleEvent(EVENT_SCENE_001, 0);
+ events.RescheduleEvent(EVENT_SCENE_001, 0ms);
break;
case INSTANCE_PROGRESS_INTRO_DONE:
- events.RescheduleEvent(EVENT_SCENE_004, 0);
+ events.RescheduleEvent(EVENT_SCENE_004, 0ms);
break;
case INSTANCE_PROGRESS_BEASTS_DEAD:
- events.RescheduleEvent(EVENT_SCENE_101, 0);
+ events.RescheduleEvent(EVENT_SCENE_101, 0ms);
break;
case INSTANCE_PROGRESS_JARAXXUS_DEAD:
- events.RescheduleEvent(EVENT_SCENE_201, 0);
+ events.RescheduleEvent(EVENT_SCENE_201, 0ms);
break;
case INSTANCE_PROGRESS_FACTION_CHAMPIONS_DEAD:
- events.RescheduleEvent(EVENT_SCENE_301, 0);
+ events.RescheduleEvent(EVENT_SCENE_301, 0ms);
break;
case INSTANCE_PROGRESS_VALKYR_DEAD:
- events.RescheduleEvent(EVENT_SCENE_401, 0);
+ events.RescheduleEvent(EVENT_SCENE_401, 0ms);
break;
}
break;
@@ -331,7 +331,7 @@ public:
if ((northrendBeastsMask & 7) == 7)
SetData(TYPE_NORTHREND_BEASTS_ALL, DONE);
else if ((northrendBeastsMask & 16) == 0)
- events.RescheduleEvent(EVENT_SCENE_005, 2500);
+ events.RescheduleEvent(EVENT_SCENE_005, 2500ms);
}
break;
case TYPE_JORMUNGAR:
@@ -348,9 +348,9 @@ public:
}
if (Creature* c = instance->GetCreature(NPC_AcidmawGUID))
- c->DespawnOrUnsummon(10000);
+ c->DespawnOrUnsummon(10s);
if (Creature* c = instance->GetCreature(NPC_DreadscaleGUID))
- c->DespawnOrUnsummon(10000);
+ c->DespawnOrUnsummon(10s);
if (AchievementTimer + 10 >= GameTime::GetGameTime().count())
DoUpdateAchievementCriteria(ACHIEVEMENT_CRITERIA_TYPE_BE_SPELL_TARGET, SPELL_JORMUNGAR_ACHIEV);
AchievementTimer = 0;
@@ -363,7 +363,7 @@ public:
else if ((northrendBeastsMask & 32) == 0)
{
Counter = 0;
- events.RescheduleEvent(EVENT_SCENE_006, 2500);
+ events.RescheduleEvent(EVENT_SCENE_006, 2500ms);
}
}
else // first one died, start timer for achievement
@@ -390,7 +390,7 @@ public:
InstanceProgress = INSTANCE_PROGRESS_BEASTS_DEAD;
HandleGameObject(GO_EnterGateGUID, true);
events.CancelEvent(EVENT_NORTHREND_BEASTS_ENRAGE);
- events.RescheduleEvent(EVENT_SCENE_BEASTS_DONE, 2500);
+ events.RescheduleEvent(EVENT_SCENE_BEASTS_DONE, 2500ms);
SaveToDB();
}
break;
@@ -402,7 +402,7 @@ public:
{
HandleGameObject(GO_EnterGateGUID, true);
InstanceProgress = INSTANCE_PROGRESS_JARAXXUS_DEAD;
- events.RescheduleEvent(EVENT_SCENE_110, 2500);
+ events.RescheduleEvent(EVENT_SCENE_110, 2500ms);
SaveToDB();
}
break;
@@ -416,11 +416,11 @@ public:
Counter = 0;
EncounterStatus = NOT_STARTED;
InstanceProgress = INSTANCE_PROGRESS_FACTION_CHAMPIONS_DEAD;
- events.RescheduleEvent(EVENT_SCENE_FACTION_CHAMPIONS_DEAD, 2500);
+ events.RescheduleEvent(EVENT_SCENE_FACTION_CHAMPIONS_DEAD, 2500ms);
for (ObjectGuid const& guid : NPC_ChampionGUIDs)
if (Creature* c = instance->GetCreature(guid))
- c->DespawnOrUnsummon(15000);
+ c->DespawnOrUnsummon(15s);
NPC_ChampionGUIDs.clear();
if (Creature* c = instance->GetCreature(NPC_TirionGUID))
@@ -491,7 +491,7 @@ public:
InstanceProgress = INSTANCE_PROGRESS_VALKYR_DEAD;
DoUpdateAchievementCriteria(ACHIEVEMENT_CRITERIA_TYPE_KILL_CREATURE, 34497, 1); // Lightbane
DoUpdateAchievementCriteria(ACHIEVEMENT_CRITERIA_TYPE_KILL_CREATURE, 34496, 1); // Darkbane
- events.RescheduleEvent(EVENT_SCENE_VALKYR_DEAD, 2500);
+ events.RescheduleEvent(EVENT_SCENE_VALKYR_DEAD, 2500ms);
HandleGameObject(GO_EnterGateGUID, true);
SaveToDB();
}
@@ -516,7 +516,7 @@ public:
c->UpdatePosition(Locs[LOC_TIRION_FINAL], true);
c->StopMovingOnCurrentPos();
c->SetFacingTo(Locs[LOC_TIRION_FINAL].GetOrientation());
- events.RescheduleEvent(EVENT_SCENE_501, 20000);
+ events.RescheduleEvent(EVENT_SCENE_501, 20s);
}
if (GameObject* floor = instance->GetGameObject(GO_FloorGUID))
floor->SetDestructibleState(GO_DESTRUCTIBLE_REBUILDING, nullptr, true);
@@ -591,7 +591,7 @@ public:
if (Creature* c = instance->GetCreature(NPC_TirionGUID))
c->AI()->Talk(SAY_STAGE_0_01);
- events.RescheduleEvent(EVENT_SCENE_002, 22000);
+ events.RescheduleEvent(EVENT_SCENE_002, 22s);
}
break;
case EVENT_SCENE_002:
@@ -599,7 +599,7 @@ public:
if (Creature* c = instance->GetCreature(NPC_VarianGUID))
c->AI()->Talk(SAY_STAGE_0_03a);
- events.RescheduleEvent(EVENT_SCENE_003, 5000);
+ events.RescheduleEvent(EVENT_SCENE_003, 5s);
}
break;
case EVENT_SCENE_003:
@@ -607,7 +607,7 @@ public:
if (Creature* c = instance->GetCreature(NPC_GarroshGUID))
c->AI()->Talk(SAY_STAGE_0_03h);
- events.RescheduleEvent(EVENT_SCENE_004, 8000);
+ events.RescheduleEvent(EVENT_SCENE_004, 8s);
}
break;
case EVENT_SCENE_004:
@@ -620,12 +620,12 @@ public:
HandleGameObject(GO_MainGateGUID, true);
HandleGameObject(GO_EnterGateGUID, false);
- events.RescheduleEvent(EVENT_SUMMON_GORMOK, 1000);
+ events.RescheduleEvent(EVENT_SUMMON_GORMOK, 1s);
if (instance->IsHeroic())
{
- events.RescheduleEvent(EVENT_SCENE_005, 150000);
- events.RescheduleEvent(EVENT_SCENE_006, 340000);
- events.RescheduleEvent(EVENT_NORTHREND_BEASTS_ENRAGE, 520000);
+ events.RescheduleEvent(EVENT_SCENE_005, 150s);
+ events.RescheduleEvent(EVENT_SCENE_006, 340s);
+ events.RescheduleEvent(EVENT_NORTHREND_BEASTS_ENRAGE, 520s);
}
}
break;
@@ -650,8 +650,8 @@ public:
if (Creature* gormok = c->SummonCreature(NPC_GORMOK, Locs[LOC_BEHIND_GATE].GetPositionX(), Locs[LOC_BEHIND_GATE].GetPositionY(), Locs[LOC_BEHIND_GATE].GetPositionZ(), Locs[LOC_BEHIND_GATE].GetOrientation(), TEMPSUMMON_CORPSE_TIMED_DESPAWN, 30000))
gormok->GetMotionMaster()->MovePoint(0, Locs[LOC_GATE_FRONT].GetPositionX(), Locs[LOC_GATE_FRONT].GetPositionY(), Locs[LOC_GATE_FRONT].GetPositionZ());
- events.RescheduleEvent(EVENT_GORMOK_ATTACK, 10000);
- events.RescheduleEvent(EVENT_CLOSE_GATE, 6000);
+ events.RescheduleEvent(EVENT_GORMOK_ATTACK, 10s);
+ events.RescheduleEvent(EVENT_CLOSE_GATE, 6s);
}
break;
case EVENT_GORMOK_ATTACK:
@@ -676,8 +676,8 @@ public:
if (Creature* c = instance->GetCreature(NPC_TirionGUID))
c->AI()->Talk(SAY_STAGE_0_04);
- events.RescheduleEvent(EVENT_OPEN_GATE, 3000);
- events.RescheduleEvent(EVENT_SUMMON_ACIDMAW_AND_DREADSCALE, 4000);
+ events.RescheduleEvent(EVENT_OPEN_GATE, 3s);
+ events.RescheduleEvent(EVENT_SUMMON_ACIDMAW_AND_DREADSCALE, 4s);
break;
}
case EVENT_SUMMON_ACIDMAW_AND_DREADSCALE:
@@ -690,7 +690,7 @@ public:
acidmaw->AddAura(53421, acidmaw);
}
- events.RescheduleEvent(EVENT_SCENE_005_2, 4000);
+ events.RescheduleEvent(EVENT_SCENE_005_2, 4s);
break;
}
@@ -699,7 +699,7 @@ public:
if (Creature* dreadscale = instance->GetCreature(NPC_DreadscaleGUID))
dreadscale->GetMotionMaster()->MovePoint(0, Locs[LOC_DREADSCALE].GetPositionX(), Locs[LOC_DREADSCALE].GetPositionY(), Locs[LOC_DREADSCALE].GetPositionZ());
- events.RescheduleEvent(EVENT_ACIDMAW_AND_DREADSCALE_ATTACK, 7000);
+ events.RescheduleEvent(EVENT_ACIDMAW_AND_DREADSCALE_ATTACK, 7s);
break;
}
case EVENT_ACIDMAW_AND_DREADSCALE_ATTACK:
@@ -737,8 +737,8 @@ public:
if (Creature* c = instance->GetCreature(NPC_TirionGUID))
c->AI()->Talk(SAY_STAGE_0_05);
- events.RescheduleEvent(EVENT_OPEN_GATE, 2000);
- events.RescheduleEvent(EVENT_SUMMON_ICEHOWL, 3000);
+ events.RescheduleEvent(EVENT_OPEN_GATE, 2s);
+ events.RescheduleEvent(EVENT_SUMMON_ICEHOWL, 3s);
break;
}
case EVENT_SUMMON_ICEHOWL:
@@ -747,8 +747,8 @@ public:
if (Creature* icehowl = c->SummonCreature(NPC_ICEHOWL, Locs[LOC_BEHIND_GATE].GetPositionX(), Locs[LOC_BEHIND_GATE].GetPositionY(), Locs[LOC_BEHIND_GATE].GetPositionZ(), Locs[LOC_BEHIND_GATE].GetOrientation(), TEMPSUMMON_CORPSE_TIMED_DESPAWN, 630000000))
icehowl->GetMotionMaster()->MovePoint(0, Locs[LOC_GATE_FRONT].GetPositionX(), Locs[LOC_GATE_FRONT].GetPositionY(), Locs[LOC_GATE_FRONT].GetPositionZ());
- events.RescheduleEvent(EVENT_ICEHOWL_ATTACK, 10000);
- events.RescheduleEvent(EVENT_CLOSE_GATE, 6000);
+ events.RescheduleEvent(EVENT_ICEHOWL_ATTACK, 10s);
+ events.RescheduleEvent(EVENT_CLOSE_GATE, 6s);
break;
}
case EVENT_ICEHOWL_ATTACK:
@@ -785,7 +785,7 @@ public:
fizzlebang->AddUnitMovementFlag(MOVEMENTFLAG_WALKING);
fizzlebang->GetMotionMaster()->MovePoint(0, Locs[LOC_BEHIND_GATE].GetPositionX(), Locs[LOC_BEHIND_GATE].GetPositionY() - 65.0f, Locs[LOC_BEHIND_GATE].GetPositionZ() - 1.0f);
}
- events.RescheduleEvent(EVENT_SCENE_102, 20000);
+ events.RescheduleEvent(EVENT_SCENE_102, 20s);
// move Icehowl to side, can't remove corpse because of loot!
if (Creature* icehowl = instance->GetCreature(NPC_IcehowlGUID))
@@ -803,7 +803,7 @@ public:
if (Creature* c = instance->GetCreature(NPC_FizzlebangGUID))
c->AI()->Talk(SAY_STAGE_1_02);
- events.RescheduleEvent(EVENT_SCENE_103, 11000);
+ events.RescheduleEvent(EVENT_SCENE_103, 11s);
break;
}
case EVENT_SCENE_103:
@@ -816,7 +816,7 @@ public:
NPC_PurpleGroundGUID = trigger->GetGUID();
}
- events.RescheduleEvent(EVENT_SCENE_104, 5000);
+ events.RescheduleEvent(EVENT_SCENE_104, 5s);
break;
}
case EVENT_SCENE_104:
@@ -833,7 +833,7 @@ public:
c->HandleEmoteCommand(EMOTE_STATE_SPELL_PRECAST);
}
- events.RescheduleEvent(EVENT_SUMMON_JARAXXUS, 5000);
+ events.RescheduleEvent(EVENT_SUMMON_JARAXXUS, 5s);
break;
}
case EVENT_SUMMON_JARAXXUS:
@@ -846,7 +846,7 @@ public:
c->AI()->Talk(SAY_STAGE_1_04);
}
- events.RescheduleEvent(EVENT_SCENE_105, 3000);
+ events.RescheduleEvent(EVENT_SCENE_105, 3s);
break;
}
case EVENT_SCENE_105:
@@ -860,7 +860,7 @@ public:
c->DespawnOrUnsummon();
NPC_PortalGUID.Clear();
- events.RescheduleEvent(EVENT_SCENE_106, 10000);
+ events.RescheduleEvent(EVENT_SCENE_106, 10s);
break;
}
case EVENT_SCENE_106:
@@ -868,7 +868,7 @@ public:
if (Creature* c = instance->GetCreature(NPC_JaraxxusGUID))
c->AI()->Talk(SAY_STAGE_1_05);
- events.RescheduleEvent(EVENT_SCENE_107, 5000);
+ events.RescheduleEvent(EVENT_SCENE_107, 5s);
break;
}
case EVENT_SCENE_107:
@@ -876,7 +876,7 @@ public:
if (Creature* c = instance->GetCreature(NPC_FizzlebangGUID))
c->AI()->Talk(SAY_STAGE_1_06);
- events.RescheduleEvent(EVENT_SCENE_108, 800);
+ events.RescheduleEvent(EVENT_SCENE_108, 800ms);
break;
}
case EVENT_SCENE_108:
@@ -891,7 +891,7 @@ public:
}
}
- events.RescheduleEvent(EVENT_SCENE_109, 5000);
+ events.RescheduleEvent(EVENT_SCENE_109, 5s);
break;
}
case EVENT_SCENE_109:
@@ -901,7 +901,7 @@ public:
if (Creature* c = instance->GetCreature(NPC_TirionGUID))
c->AI()->Talk(SAY_STAGE_1_07);
- events.RescheduleEvent(EVENT_JARAXXUS_ATTACK, 6000);
+ events.RescheduleEvent(EVENT_JARAXXUS_ATTACK, 6s);
break;
}
case EVENT_JARAXXUS_ATTACK:
@@ -925,7 +925,7 @@ public:
if (Creature* c = instance->GetCreature(NPC_TirionGUID))
c->AI()->Talk(SAY_STAGE_1_08);
- events.RescheduleEvent(EVENT_SCENE_111, 18000);
+ events.RescheduleEvent(EVENT_SCENE_111, 18s);
break;
}
case EVENT_SCENE_111:
@@ -933,7 +933,7 @@ public:
if (Creature* c = instance->GetCreature(NPC_GarroshGUID))
c->AI()->Talk(SAY_STAGE_1_09);
- events.RescheduleEvent(EVENT_SCENE_112, 9000);
+ events.RescheduleEvent(EVENT_SCENE_112, 9s);
break;
}
case EVENT_SCENE_112:
@@ -941,7 +941,7 @@ public:
if (Creature* c = instance->GetCreature(NPC_VarianGUID))
c->AI()->Talk(SAY_STAGE_1_10);
- events.RescheduleEvent(EVENT_SCENE_113, 5000);
+ events.RescheduleEvent(EVENT_SCENE_113, 5s);
break;
}
case EVENT_SCENE_113:
@@ -965,7 +965,7 @@ public:
if (Creature* c = instance->GetCreature(NPC_TirionGUID))
c->AI()->Talk(SAY_STAGE_2_01);
- events.RescheduleEvent(EVENT_SCENE_202, 9000);
+ events.RescheduleEvent(EVENT_SCENE_202, 9s);
break;
}
case EVENT_SCENE_202:
@@ -974,13 +974,13 @@ public:
{
if (Creature* c = instance->GetCreature(NPC_GarroshGUID))
c->AI()->Talk(SAY_STAGE_2_02h);
- events.RescheduleEvent(EVENT_SCENE_203, 15000);
+ events.RescheduleEvent(EVENT_SCENE_203, 15s);
}
else
{
if (Creature* c = instance->GetCreature(NPC_VarianGUID))
c->AI()->Talk(SAY_STAGE_2_02a);
- events.RescheduleEvent(EVENT_SCENE_203, 18000);
+ events.RescheduleEvent(EVENT_SCENE_203, 18s);
}
break;
}
@@ -989,7 +989,7 @@ public:
if (Creature* c = instance->GetCreature(NPC_TirionGUID))
c->AI()->Talk(SAY_STAGE_2_03);
- events.RescheduleEvent(EVENT_SCENE_204, 5000);
+ events.RescheduleEvent(EVENT_SCENE_204, 5s);
break;
}
case EVENT_SCENE_204:
@@ -998,16 +998,16 @@ public:
{
if (Creature* c = instance->GetCreature(NPC_GarroshGUID))
c->AI()->Talk(SAY_STAGE_2_04h);
- events.RescheduleEvent(EVENT_SCENE_205, 6000);
+ events.RescheduleEvent(EVENT_SCENE_205, 6s);
}
else
{
if (Creature* c = instance->GetCreature(NPC_VarianGUID))
c->AI()->Talk(SAY_STAGE_2_04a);
- events.RescheduleEvent(EVENT_SCENE_205, 5000);
+ events.RescheduleEvent(EVENT_SCENE_205, 5s);
}
- events.RescheduleEvent(EVENT_SUMMON_CHAMPIONS, 2500);
+ events.RescheduleEvent(EVENT_SUMMON_CHAMPIONS, 2500ms);
break;
}
case EVENT_SCENE_205:
@@ -1089,7 +1089,7 @@ public:
}
HandleGameObject(GO_EnterGateGUID, false);
- events.RescheduleEvent(EVENT_CHAMPIONS_ATTACK, 4000);
+ events.RescheduleEvent(EVENT_CHAMPIONS_ATTACK, 4s);
break;
}
case EVENT_CHAMPIONS_ATTACK:
@@ -1122,7 +1122,7 @@ public:
if (Creature* c = instance->GetCreature(NPC_TirionGUID))
c->AI()->Talk(SAY_STAGE_3_01);
- events.RescheduleEvent(EVENT_SCENE_302, 13000);
+ events.RescheduleEvent(EVENT_SCENE_302, 13s);
break;
}
case EVENT_SCENE_302:
@@ -1130,7 +1130,7 @@ public:
if (Creature* c = instance->GetCreature(NPC_TirionGUID))
c->AI()->Talk(SAY_STAGE_3_02);
- events.RescheduleEvent(EVENT_SCENE_303, 3000);
+ events.RescheduleEvent(EVENT_SCENE_303, 3s);
break;
}
case EVENT_SCENE_303:
@@ -1145,7 +1145,7 @@ public:
t->GetMotionMaster()->MovePoint(0, Locs[LOC_VALKYR_DEST_LEFT].GetPositionX(), Locs[LOC_VALKYR_DEST_LEFT].GetPositionY(), Locs[LOC_VALKYR_DEST_LEFT].GetPositionZ());
}
- events.RescheduleEvent(EVENT_SCENE_304, 6250);
+ events.RescheduleEvent(EVENT_SCENE_304, 6250ms);
break;
}
case EVENT_SCENE_304:
@@ -1157,7 +1157,7 @@ public:
if (Creature* c = instance->GetCreature(NPC_DarkbaneGUID))
c->GetMotionMaster()->MovePoint(0, Locs[LOC_VALKYR_DEST_2_LEFT].GetPositionX(), Locs[LOC_VALKYR_DEST_2_LEFT].GetPositionY(), Locs[LOC_VALKYR_DEST_2_LEFT].GetPositionZ());
- events.RescheduleEvent(EVENT_VALKYRIES_ATTACK, 3250);
+ events.RescheduleEvent(EVENT_VALKYRIES_ATTACK, 3250ms);
break;
}
case EVENT_VALKYRIES_ATTACK:
@@ -1189,7 +1189,7 @@ public:
if (Creature* c = instance->GetCreature(GetTeamIdInInstance() == TEAM_ALLIANCE ? NPC_VarianGUID : NPC_GarroshGUID))
c->AI()->Talk((GetTeamIdInInstance() == TEAM_ALLIANCE ? SAY_STAGE_3_03a : SAY_STAGE_3_03h));
- events.RescheduleEvent(EVENT_SCENE_401, 60000);
+ events.RescheduleEvent(EVENT_SCENE_401, 60s);
break;
}
case EVENT_SCENE_401:
@@ -1197,7 +1197,7 @@ public:
if (Creature* c = instance->GetCreature(NPC_TirionGUID))
c->AI()->Talk(SAY_STAGE_4_01);
- events.RescheduleEvent(EVENT_SCENE_402, 20000);
+ events.RescheduleEvent(EVENT_SCENE_402, 20s);
break;
}
case EVENT_SCENE_402:
@@ -1214,7 +1214,7 @@ public:
t->SetVisible(false);
}
- events.RescheduleEvent(EVENT_SCENE_403, 2000);
+ events.RescheduleEvent(EVENT_SCENE_403, 2s);
break;
}
case EVENT_SCENE_403:
@@ -1226,7 +1226,7 @@ public:
t->CastSpell(t, 51807, true);
}
- events.RescheduleEvent(EVENT_SCENE_404, 2000);
+ events.RescheduleEvent(EVENT_SCENE_404, 2s);
break;
}
case EVENT_SCENE_404:
@@ -1238,7 +1238,7 @@ public:
c->GetMotionMaster()->MovePoint(0, Locs[LOC_ARTHAS]);
}
- events.RescheduleEvent(EVENT_SCENE_405, 3000);
+ events.RescheduleEvent(EVENT_SCENE_405, 3s);
break;
}
case EVENT_SCENE_405:
@@ -1246,7 +1246,7 @@ public:
if (Creature* c = instance->GetCreature(NPC_TirionGUID))
c->AI()->Talk(SAY_STAGE_4_03);
- events.RescheduleEvent(EVENT_SCENE_406, 7000);
+ events.RescheduleEvent(EVENT_SCENE_406, 7s);
break;
}
case EVENT_SCENE_406:
@@ -1257,8 +1257,8 @@ public:
c->HandleEmoteCommand(EMOTE_ONESHOT_LAUGH);
}
- events.RescheduleEvent(EVENT_SCENE_406_2, 2500);
- events.RescheduleEvent(EVENT_SCENE_407, 12000);
+ events.RescheduleEvent(EVENT_SCENE_406_2, 2500ms);
+ events.RescheduleEvent(EVENT_SCENE_407, 12s);
break;
}
case EVENT_SCENE_406_2:
@@ -1276,7 +1276,7 @@ public:
if (Creature* c = instance->GetCreature(NPC_LichKingGUID))
c->HandleEmoteCommand(EMOTE_ONESHOT_EXCLAMATION);
- events.RescheduleEvent(EVENT_SCENE_408, 4000);
+ events.RescheduleEvent(EVENT_SCENE_408, 4s);
break;
}
case EVENT_SCENE_408:
@@ -1286,7 +1286,7 @@ public:
c->HandleEmoteCommand(EMOTE_ONESHOT_KNEEL);
}
- events.RescheduleEvent(EVENT_SCENE_409, 1500);
+ events.RescheduleEvent(EVENT_SCENE_409, 1500ms);
break;
}
case EVENT_SCENE_409:
@@ -1305,7 +1305,7 @@ public:
SpawnAnubArak();
}
- events.RescheduleEvent(EVENT_SCENE_410, 2000);
+ events.RescheduleEvent(EVENT_SCENE_410, 2s);
break;
}
case EVENT_SCENE_410:
@@ -1314,7 +1314,7 @@ public:
{
c->SetVisible(true);
c->AI()->Talk(SAY_STAGE_4_05);
- c->DespawnOrUnsummon(0);
+ c->DespawnOrUnsummon(0ms);
}
break;
@@ -1328,7 +1328,7 @@ public:
c->SummonGameObject(195682, 668.15f, 134.57f, 142.12f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 630000000);
}
- events.RescheduleEvent(EVENT_SCENE_502, 20000);
+ events.RescheduleEvent(EVENT_SCENE_502, 20s);
break;
}
case EVENT_SCENE_502:
diff --git a/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheCrusader/trial_of_the_crusader.cpp b/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheCrusader/trial_of_the_crusader.cpp
index 475708cce5..a5d71a1779 100644
--- a/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheCrusader/trial_of_the_crusader.cpp
+++ b/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheCrusader/trial_of_the_crusader.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheCrusader/trial_of_the_crusader.h b/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheCrusader/trial_of_the_crusader.h
index edc742da4b..f2598bc84a 100644
--- a/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheCrusader/trial_of_the_crusader.h
+++ b/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheCrusader/trial_of_the_crusader.h
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
@@ -351,8 +351,7 @@ enum EventSpells
SPELL_JORMUNGAR_ACHIEV = 68523,
SPELL_FACTION_CHAMPIONS_KILL_CREDIT = 68184,
SPELL_RESILIENCE_WILL_FIX_IT_CREDIT = 68620,
- SPELL_TRAITOR_KING_10 = 68186,
- SPELL_TRAITOR_KING_25 = 68515,
+ SPELL_TRAITOR_KING = 68186,
SPELL_PORTAL_TO_DALARAN = 53142,
};
diff --git a/src/server/scripts/Northrend/DraktharonKeep/boss_dred.cpp b/src/server/scripts/Northrend/DraktharonKeep/boss_dred.cpp
index 9f27a52844..44a6b1182f 100644
--- a/src/server/scripts/Northrend/DraktharonKeep/boss_dred.cpp
+++ b/src/server/scripts/Northrend/DraktharonKeep/boss_dred.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
@@ -37,15 +37,7 @@ enum Misc
NPC_DRAKKARI_SCYTHECLAW = 26628,
NPC_DRAKKARI_GUTRIPPER = 26641,
- SAY_CLAW_EMOTE = 0,
-
- EVENT_SPELL_BELLOWING_ROAR = 1,
- EVENT_SPELL_GRIEVOUS_BITE = 2,
- EVENT_SPELL_MANGLING_SLASH = 3,
- EVENT_SPELL_FEARSOME_ROAR = 4,
- EVENT_SPELL_PIERCING_SLASH = 5,
- EVENT_SPELL_RAPTOR_CALL = 6,
- EVENT_MENACING_CLAW = 7
+ SAY_CLAW_EMOTE = 0
};
class boss_dred : public CreatureScript
@@ -60,14 +52,52 @@ public:
struct boss_dredAI : public BossAI
{
- boss_dredAI(Creature* creature) : BossAI(creature, DATA_DRED)
- {
- }
+ boss_dredAI(Creature* creature) : BossAI(creature, DATA_DRED) { }
void Reset() override
{
BossAI::Reset();
_raptorCount = 0;
+
+ ScheduleHealthCheckEvent({ 67, 34 }, [&] {
+ DoCastAOE(SPELL_BELLOWING_ROAR);
+ }, false);
+ }
+
+ void ScheduleTasks() override
+ {
+ ScheduleTimedEvent(20s, [&] {
+ DoCastVictim(SPELL_GRIEVOUS_BITE);
+ }, 20s);
+
+ ScheduleTimedEvent(18s + 500ms, [&] {
+ DoCastVictim(SPELL_MANGLING_SLASH);
+ }, 20s);
+
+ ScheduleTimedEvent(10s, 20s, [&] {
+ DoCastAOE(SPELL_FEARSOME_ROAR);
+ }, 17s);
+
+ ScheduleTimedEvent(17s, [&] {
+ DoCastVictim(SPELL_PIERCING_SLASH);
+ }, 20s);
+
+ if (IsHeroic())
+ {
+ ScheduleTimedEvent(16s, [&] {
+ DoCastSelf(SPELL_RAPTOR_CALL);
+ }, 30s);
+
+ ScheduleTimedEvent(21s, [&] {
+ Talk(SAY_CLAW_EMOTE);
+ me->setAttackTimer(BASE_ATTACK, 2000);
+ me->AttackerStateUpdate(me->GetVictim());
+ if (me->GetVictim())
+ me->AttackerStateUpdate(me->GetVictim());
+ if (me->GetVictim())
+ me->AttackerStateUpdate(me->GetVictim());
+ }, 20s);
+ }
}
uint32 GetData(uint32 data) const override
@@ -87,67 +117,6 @@ public:
{
BossAI::JustEngagedWith(who);
_raptorCount = 0;
-
- events.ScheduleEvent(EVENT_SPELL_BELLOWING_ROAR, 33s);
- events.ScheduleEvent(EVENT_SPELL_GRIEVOUS_BITE, 20s);
- events.ScheduleEvent(EVENT_SPELL_MANGLING_SLASH, 18s + 500ms);
- events.ScheduleEvent(EVENT_SPELL_FEARSOME_ROAR, 10s, 20s);
- events.ScheduleEvent(EVENT_SPELL_PIERCING_SLASH, 17s);
- if (IsHeroic())
- {
- events.ScheduleEvent(EVENT_MENACING_CLAW, 21s);
- events.ScheduleEvent(EVENT_SPELL_RAPTOR_CALL, 20s, 25s);
- }
- }
-
- void UpdateAI(uint32 diff) override
- {
- if (!UpdateVictim())
- return;
-
- events.Update(diff);
- if (me->HasUnitState(UNIT_STATE_CASTING))
- return;
-
- switch (events.ExecuteEvent())
- {
- case EVENT_SPELL_BELLOWING_ROAR:
- me->CastSpell(me, SPELL_BELLOWING_ROAR, false);
- events.ScheduleEvent(EVENT_SPELL_BELLOWING_ROAR, 40s);
- break;
- case EVENT_SPELL_GRIEVOUS_BITE:
- me->CastSpell(me->GetVictim(), SPELL_GRIEVOUS_BITE, false);
- events.ScheduleEvent(EVENT_SPELL_GRIEVOUS_BITE, 20s);
- break;
- case EVENT_SPELL_MANGLING_SLASH:
- me->CastSpell(me->GetVictim(), SPELL_MANGLING_SLASH, false);
- events.ScheduleEvent(EVENT_SPELL_MANGLING_SLASH, 20s);
- break;
- case EVENT_SPELL_FEARSOME_ROAR:
- me->CastSpell(me, SPELL_FEARSOME_ROAR, false);
- events.ScheduleEvent(EVENT_SPELL_FEARSOME_ROAR, 17s);
- break;
- case EVENT_SPELL_PIERCING_SLASH:
- me->CastSpell(me->GetVictim(), SPELL_PIERCING_SLASH, false);
- events.ScheduleEvent(EVENT_SPELL_PIERCING_SLASH, 20s);
- break;
- case EVENT_SPELL_RAPTOR_CALL:
- me->CastSpell(me, SPELL_RAPTOR_CALL, false);
- events.ScheduleEvent(EVENT_SPELL_RAPTOR_CALL, 20s);
- break;
- case EVENT_MENACING_CLAW:
- Talk(SAY_CLAW_EMOTE);
- me->setAttackTimer(BASE_ATTACK, 2000);
- me->AttackerStateUpdate(me->GetVictim());
- if (me->GetVictim())
- me->AttackerStateUpdate(me->GetVictim());
- if (me->GetVictim())
- me->AttackerStateUpdate(me->GetVictim());
- events.ScheduleEvent(EVENT_MENACING_CLAW, 20s);
- break;
- }
-
- DoMeleeAttackIfReady();
}
private:
@@ -181,7 +150,23 @@ class spell_dred_raptor_call : public SpellScript
void HandleDummy(SpellEffIndex /*effIndex*/)
{
- GetCaster()->SummonCreature(RAND(NPC_DRAKKARI_GUTRIPPER, NPC_DRAKKARI_SCYTHECLAW), -522.02f, -718.89f, 30.26f, 2.41f);
+ std::list<Creature*> raptors;
+ GetCaster()->GetCreatureListWithEntryInGrid(raptors, { NPC_DRAKKARI_SCYTHECLAW, NPC_DRAKKARI_GUTRIPPER }, 100.0f);
+
+ raptors.remove_if([](Creature* raptor)
+ {
+ return !raptor->IsAlive() || raptor->IsInCombat();
+ });
+
+ if (raptors.empty())
+ return;
+
+ Creature* raptor = Acore::Containers::SelectRandomContainerElement(raptors);
+ if (!raptor)
+ return;
+
+ if (GetCaster()->GetVictim())
+ raptor->AI()->AttackStart(GetCaster()->GetVictim());
}
void Register() override
@@ -193,16 +178,14 @@ class spell_dred_raptor_call : public SpellScript
class achievement_better_off_dred : public AchievementCriteriaScript
{
public:
- achievement_better_off_dred() : AchievementCriteriaScript("achievement_better_off_dred")
- {
- }
+ achievement_better_off_dred() : AchievementCriteriaScript("achievement_better_off_dred") { }
bool OnCheck(Player* /*player*/, Unit* target, uint32 /*criteria_id*/) override
{
if (!target)
return false;
- return target->GetAI()->GetData(target->GetEntry());
+ return target->GetAI()->GetData(target->GetEntry()) >= 6;
}
};
diff --git a/src/server/scripts/Northrend/DraktharonKeep/boss_novos.cpp b/src/server/scripts/Northrend/DraktharonKeep/boss_novos.cpp
index b4bbcfc560..36f8b555c4 100644
--- a/src/server/scripts/Northrend/DraktharonKeep/boss_novos.cpp
+++ b/src/server/scripts/Northrend/DraktharonKeep/boss_novos.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
@@ -47,7 +47,7 @@ enum Spells
SPELL_COPY_OF_SUMMON_MINIONS = 59933,
SPELL_BLIZZARD = 49034,
SPELL_FROSTBOLT = 49037,
- SPELL_TOUCH_OF_MISERY = 50090
+ SPELL_WRATH_OF_MISERY = 50089
};
enum Misc
@@ -56,14 +56,7 @@ enum Misc
NPC_CRYSTAL_HANDLER = 26627,
NPC_SUMMON_CRYSTAL_HANDLER_TARGET = 27583,
- EVENT_SUMMON_FETID_TROLL = 1,
- EVENT_SUMMON_SHADOWCASTER = 2,
- EVENT_SUMMON_HULKING_CORPSE = 3,
- EVENT_SUMMON_CRYSTAL_HANDLER = 4,
- EVENT_CAST_OFFENSIVE_SPELL = 5,
- EVENT_KILL_TALK = 6,
- EVENT_CHECK_PHASE = 7,
- EVENT_SPELL_SUMMON_MINIONS = 8,
+ EVENT_KILL_TALK = 1,
ROOM_RIGHT = 0,
ROOM_LEFT = 1,
@@ -77,198 +70,215 @@ std::unordered_map<uint32, std::tuple <uint32, Position>> const npcSummon =
{ ROOM_STAIRS, { NPC_CRYSTAL_CHANNEL_TARGET, { -378.40f, -813.13f, 59.74f, 0.0f } } },
};
-class boss_novos : public CreatureScript
+// 26631
+struct boss_novos : public BossAI
{
-public:
- boss_novos() : CreatureScript("boss_novos") { }
+ boss_novos(Creature* creature) : BossAI(creature, DATA_NOVOS) { }
- struct boss_novosAI : public BossAI
+ void Reset() override
{
- boss_novosAI(Creature* creature) : BossAI(creature, DATA_NOVOS)
- {
- }
+ BossAI::Reset();
+ instance->SetBossState(DATA_NOVOS_CRYSTALS, IN_PROGRESS);
+ instance->SetBossState(DATA_NOVOS_CRYSTALS, NOT_STARTED);
+ _crystalCounter = 0;
+ _summonTargetRightGUID.Clear();
+ _summonTargetLeftGUID.Clear();
+ _stage = 0;
+
+ me->SetUnitFlag(UNIT_FLAG_DISABLE_MOVE);
+ me->RemoveUnitFlag(UNIT_FLAG_NON_ATTACKABLE);
+ me->RemoveUnitFlag(UNIT_FLAG_NOT_SELECTABLE);
+
+ _achievement = true;
+ }
- void Reset() override
- {
- BossAI::Reset();
- instance->SetBossState(DATA_NOVOS_CRYSTALS, IN_PROGRESS);
- instance->SetBossState(DATA_NOVOS_CRYSTALS, NOT_STARTED);
- _crystalCounter = 0;
- _summonTargetRightGUID.Clear();
- _summonTargetLeftGUID.Clear();
- _stage = 0;
-
- me->SetUnitFlag(UNIT_FLAG_DISABLE_MOVE);
- me->RemoveUnitFlag(UNIT_FLAG_NON_ATTACKABLE);
- me->RemoveUnitFlag(UNIT_FLAG_NOT_SELECTABLE);
-
- _achievement = true;
- }
+ uint32 GetData(uint32 data) const override
+ {
+ if (data == me->GetEntry())
+ return uint32(_achievement);
+ return 0;
+ }
- uint32 GetData(uint32 data) const override
- {
- if (data == me->GetEntry())
- return uint32(_achievement);
- return 0;
- }
+ void SetData(uint32 type, uint32) override
+ {
+ if (type == me->GetEntry())
+ _achievement = false;
+ }
- void SetData(uint32 type, uint32) override
- {
- if (type == me->GetEntry())
- _achievement = false;
- }
+ void MoveInLineOfSight(Unit* /*who*/) override { }
- void MoveInLineOfSight(Unit* /*who*/) override { }
+ void JustEngagedWith(Unit* who) override
+ {
+ Talk(SAY_AGGRO);
+ BossAI::JustEngagedWith(who);
+ scheduler.ClearValidator();
+
+ ScheduleTimedEvent(3s, [&] {
+ if (Creature* trigger = summons.GetCreatureWithEntry(NPC_CRYSTAL_CHANNEL_TARGET))
+ trigger->CastSpell(trigger, SPELL_SUMMON_FETID_TROLL_CORPSE, true, nullptr, nullptr, me->GetGUID());
+ }, 3s);
+
+ ScheduleTimedEvent(9s, [&] {
+ if (Creature* trigger = summons.GetCreatureWithEntry(NPC_CRYSTAL_CHANNEL_TARGET))
+ trigger->CastSpell(trigger, SPELL_SUMMON_RISEN_SHADOWCASTER, true, nullptr, nullptr, me->GetGUID());
+ }, 10s);
+
+ ScheduleTimedEvent(30s, [&] {
+ if (Creature* trigger = summons.GetCreatureWithEntry(NPC_CRYSTAL_CHANNEL_TARGET))
+ trigger->CastSpell(trigger, SPELL_SUMMON_HULKING_CORPSE, true, nullptr, nullptr, me->GetGUID());
+ }, 30s);
+
+ scheduler.Schedule(70s, [this](TaskContext context) {
+ if (me->HasAura(SPELL_BEAM_CHANNEL))
+ {
+ context.Repeat(2s);
+ return;
+ }
- void JustEngagedWith(Unit* who) override
- {
- Talk(SAY_AGGRO);
- BossAI::JustEngagedWith(who);
+ scheduler.CancelAll();
+
+ me->RemoveUnitFlag(UNIT_FLAG_NON_ATTACKABLE|UNIT_FLAG_NOT_SELECTABLE);
+ me->InterruptNonMeleeSpells(false);
- events.ScheduleEvent(EVENT_SUMMON_FETID_TROLL, 3s);
- events.ScheduleEvent(EVENT_SUMMON_SHADOWCASTER, 9s);
- events.ScheduleEvent(EVENT_SUMMON_HULKING_CORPSE, 30s);
- events.ScheduleEvent(EVENT_SUMMON_CRYSTAL_HANDLER, 20s);
- events.ScheduleEvent(EVENT_CHECK_PHASE, 80s);
+ scheduler.SetValidator([this] {
+ return !me->HasUnitState(UNIT_STATE_CASTING);
+ });
- me->CastSpell(me, SPELL_ARCANE_BLAST, true);
- me->CastSpell(me, SPELL_ARCANE_FIELD, true);
- me->CastSpell(me, SPELL_DESPAWN_CRYSTAL_HANDLER, true);
+ ScheduleTimedEvent(5s, 10s, [&] {
+ DoCastRandomTarget(SPELL_BLIZZARD);
+ }, 12s, 25s);
- for (auto& itr : npcSummon)
+ ScheduleTimedEvent(5s, 10s, [&] {
+ DoCastRandomTarget(SPELL_WRATH_OF_MISERY);
+ }, 8s, 16s);
+
+ if (IsHeroic())
{
- uint32 summonEntry;
- Position summonPos;
- std::tie(summonEntry, summonPos) = itr.second;
- if (Creature* creature = me->SummonCreature(summonEntry, summonPos))
- switch (itr.first)
- {
- case ROOM_LEFT:
- _summonTargetLeftGUID = creature->GetGUID();
- break;
- case ROOM_RIGHT:
- _summonTargetRightGUID = creature->GetGUID();
- break;
- }
+ ScheduleTimedEvent(10s, [&] {
+ DoCastAOE(SPELL_SUMMON_MINIONS);
+ }, 37s, 55s);
}
+ });
- me->SetGuidValue(UNIT_FIELD_TARGET, ObjectGuid::Empty);
- me->RemoveAllAuras();
- me->SetUnitFlag(UNIT_FLAG_NON_ATTACKABLE);
- me->SetUnitFlag(UNIT_FLAG_NOT_SELECTABLE);
+ for (Seconds timer : { 16s, 32s, 48s, 64s })
+ {
+ me->m_Events.AddEventAtOffset([&] {
+ Talk(SAY_SUMMONING_ADDS);
+ Talk(EMOTE_SUMMONING_ADDS);
+ if (Creature* target = ObjectAccessor::GetCreature(*me, _stage ? _summonTargetLeftGUID : _summonTargetRightGUID))
+ target->CastSpell(target, SPELL_SUMMON_CRYSTAL_HANDLER, true, nullptr, nullptr, me->GetGUID());
+ _stage = _stage ? 0 : 1;
+ }, timer);
}
- void JustDied(Unit* killer) override
+ me->SetGuidValue(UNIT_FIELD_TARGET, ObjectGuid::Empty);
+ me->RemoveAllAuras();
+ me->SetUnitFlag(UNIT_FLAG_NON_ATTACKABLE | UNIT_FLAG_NOT_SELECTABLE);
+
+ DoCastSelf(SPELL_ARCANE_BLAST, true);
+ DoCastSelf(SPELL_ARCANE_FIELD, true);
+ DoCastSelf(SPELL_DESPAWN_CRYSTAL_HANDLER, true);
+
+ for (auto& itr : npcSummon)
{
- Talk(SAY_DEATH);
- BossAI::JustDied(killer);
- instance->SetBossState(DATA_NOVOS_CRYSTALS, DONE);
+ uint32 summonEntry;
+ Position summonPos;
+ std::tie(summonEntry, summonPos) = itr.second;
+ if (Creature* creature = me->SummonCreature(summonEntry, summonPos))
+ switch (itr.first)
+ {
+ case ROOM_LEFT:
+ _summonTargetLeftGUID = creature->GetGUID();
+ break;
+ case ROOM_RIGHT:
+ _summonTargetRightGUID = creature->GetGUID();
+ break;
+ }
}
+ }
- void KilledUnit(Unit* /*victim*/) override
+ void JustDied(Unit* killer) override
+ {
+ Talk(SAY_DEATH);
+ BossAI::JustDied(killer);
+ instance->SetBossState(DATA_NOVOS_CRYSTALS, DONE);
+ }
+
+ void KilledUnit(Unit* /*victim*/) override
+ {
+ if (!events.HasTimeUntilEvent(EVENT_KILL_TALK))
{
- if (events.GetNextEventTime(EVENT_KILL_TALK) == 0)
- {
- Talk(SAY_KILL);
- events.ScheduleEvent(EVENT_KILL_TALK, 6s);
- }
+ Talk(SAY_KILL);
+ events.ScheduleEvent(EVENT_KILL_TALK, 6s);
}
+ }
- void JustSummoned(Creature* summon) override
+ void JustSummoned(Creature* summon) override
+ {
+ summons.Summon(summon);
+
+ // Phase 1
+ if (me->HasUnitFlag(UNIT_FLAG_NOT_SELECTABLE))
{
- summons.Summon(summon);
- if (me->HasUnitFlag(UNIT_FLAG_NOT_SELECTABLE) && summon->GetEntry() != NPC_CRYSTAL_CHANNEL_TARGET && summon->GetEntry() != NPC_CRYSTAL_HANDLER)
+ if (summon->GetEntry() != NPC_CRYSTAL_CHANNEL_TARGET && summon->GetEntry() != NPC_CRYSTAL_HANDLER)
summon->SetReactState(REACT_DEFENSIVE);
- else if (summon->GetEntry() != NPC_CRYSTAL_CHANNEL_TARGET)
+
+ if (summon->GetEntry() == NPC_FETID_TROLL_CORPSE)
+ summon->GetMotionMaster()->MovePoint(1, -373.56f, -770.86f, 28.59f);
+
+ if (summon->EntryEquals(NPC_CRYSTAL_HANDLER))
summon->SetInCombatWithZone();
}
+ // Phase 2
+ else if (summon->GetEntry() != NPC_CRYSTAL_CHANNEL_TARGET)
+ summon->SetInCombatWithZone();
+ }
- void UpdateAI(uint32 diff) override
- {
- if (!UpdateVictim())
- return;
+ void SummonedCreatureDies(Creature* summon, Unit* /*killer*/) override
+ {
+ if (summon->GetEntry() == NPC_FETID_TROLL_CORPSE)
+ summon->DespawnOrUnsummon(10s);
+ }
- events.Update(diff);
- switch (events.ExecuteEvent())
+ void SummonMovementInform(Creature* summon, uint32 movementType, uint32 pathId) override
+ {
+ if (movementType == POINT_MOTION_TYPE && pathId == 1)
+ {
+ if (summon->GetEntry() == NPC_FETID_TROLL_CORPSE)
{
- case EVENT_SUMMON_FETID_TROLL:
- if (Creature* trigger = summons.GetCreatureWithEntry(NPC_CRYSTAL_CHANNEL_TARGET))
- trigger->CastSpell(trigger, SPELL_SUMMON_FETID_TROLL_CORPSE, true, nullptr, nullptr, me->GetGUID());
- events.ScheduleEvent(EVENT_SUMMON_FETID_TROLL, 3s);
- break;
- case EVENT_SUMMON_HULKING_CORPSE:
- if (Creature* trigger = summons.GetCreatureWithEntry(NPC_CRYSTAL_CHANNEL_TARGET))
- trigger->CastSpell(trigger, SPELL_SUMMON_HULKING_CORPSE, true, nullptr, nullptr, me->GetGUID());
- events.ScheduleEvent(EVENT_SUMMON_HULKING_CORPSE, 30s);
- break;
- case EVENT_SUMMON_SHADOWCASTER:
- if (Creature* trigger = summons.GetCreatureWithEntry(NPC_CRYSTAL_CHANNEL_TARGET))
- trigger->CastSpell(trigger, SPELL_SUMMON_RISEN_SHADOWCASTER, true, nullptr, nullptr, me->GetGUID());
- events.ScheduleEvent(EVENT_SUMMON_SHADOWCASTER, 10s);
- break;
- case EVENT_SUMMON_CRYSTAL_HANDLER:
- if (_crystalCounter++ < 4)
- {
- Talk(SAY_SUMMONING_ADDS);
- Talk(EMOTE_SUMMONING_ADDS);
- if (Creature* target = ObjectAccessor::GetCreature(*me, _stage ? _summonTargetLeftGUID : _summonTargetRightGUID))
- target->CastSpell(target, SPELL_SUMMON_CRYSTAL_HANDLER, true, nullptr, nullptr, me->GetGUID());
- _stage = _stage ? 0 : 1;
- events.ScheduleEvent(EVENT_SUMMON_CRYSTAL_HANDLER, 20s);
- }
- break;
- case EVENT_CHECK_PHASE:
- if (me->HasAura(SPELL_BEAM_CHANNEL))
- {
- events.ScheduleEvent(EVENT_CHECK_PHASE, 2s);
- break;
- }
- events.Reset();
- events.ScheduleEvent(EVENT_CAST_OFFENSIVE_SPELL, 3s);
- events.ScheduleEvent(EVENT_SPELL_SUMMON_MINIONS, 10s);
- me->RemoveUnitFlag(UNIT_FLAG_NON_ATTACKABLE);
- me->RemoveUnitFlag(UNIT_FLAG_NOT_SELECTABLE);
- me->InterruptNonMeleeSpells(false);
- break;
- case EVENT_CAST_OFFENSIVE_SPELL:
- if (!me->HasUnitState(UNIT_STATE_CASTING))
- if (Unit* target = SelectTarget(SelectTargetMethod::Random, 0, 100, true))
- me->CastSpell(target, RAND(SPELL_BLIZZARD, SPELL_FROSTBOLT, SPELL_TOUCH_OF_MISERY), false);
-
- events.ScheduleEvent(EVENT_CAST_OFFENSIVE_SPELL, 500ms);
- break;
- case EVENT_SPELL_SUMMON_MINIONS:
- if (me->HasUnitState(UNIT_STATE_CASTING))
- {
- me->CastSpell(me, SPELL_SUMMON_MINIONS, false);
- events.ScheduleEvent(EVENT_SPELL_SUMMON_MINIONS, 15s);
- break;
- }
- events.ScheduleEvent(EVENT_SPELL_SUMMON_MINIONS, 500ms);
- break;
+ DoZoneInCombat(summon);
+ _achievement = false;
}
}
+ }
- bool CheckEvadeIfOutOfCombatArea() const override
- {
- return !SelectTargetFromPlayerList(80.0f);
- }
+ void UpdateAI(uint32 diff) override
+ {
+ if (!UpdateVictim())
+ return;
- private:
- uint8 _crystalCounter;
- uint8 _stage;
- ObjectGuid _summonTargetRightGUID;
- ObjectGuid _summonTargetLeftGUID;
+ scheduler.Update(diff);
+ events.Update(diff);
- bool _achievement;
- };
+ if (!me->HasUnitFlag(UNIT_FLAG_NOT_SELECTABLE))
+ DoSpellAttackIfReady(SPELL_FROSTBOLT);
+ }
- CreatureAI* GetAI(Creature* creature) const override
+ bool CheckEvadeIfOutOfCombatArea() const override
{
- return GetDraktharonKeepAI<boss_novosAI>(creature);
+ return !SelectTargetFromPlayerList(80.0f);
}
+
+private:
+ uint8 _crystalCounter;
+ uint8 _stage;
+ ObjectGuid _summonTargetRightGUID;
+ ObjectGuid _summonTargetLeftGUID;
+
+ bool _achievement;
};
+// 51403
class spell_novos_despawn_crystal_handler : public SpellScript
{
PrepareSpellScript(spell_novos_despawn_crystal_handler);
@@ -290,6 +300,7 @@ class spell_novos_despawn_crystal_handler : public SpellScript
}
};
+// 47336
class spell_novos_crystal_handler_death_aura : public AuraScript
{
PrepareAuraScript(spell_novos_crystal_handler_death_aura);
@@ -307,6 +318,7 @@ class spell_novos_crystal_handler_death_aura : public AuraScript
}
};
+// 59910
class spell_novos_summon_minions : public SpellScript
{
PrepareSpellScript(spell_novos_summon_minions);
@@ -328,6 +340,7 @@ class spell_novos_summon_minions : public SpellScript
}
};
+// 2057
class achievement_oh_novos : public AchievementCriteriaScript
{
public:
@@ -341,7 +354,7 @@ public:
void AddSC_boss_novos()
{
- new boss_novos();
+ RegisterCreatureAIWithFactory(boss_novos, GetDraktharonKeepAI);
RegisterSpellScript(spell_novos_despawn_crystal_handler);
RegisterSpellScript(spell_novos_crystal_handler_death_aura);
RegisterSpellScript(spell_novos_summon_minions);
diff --git a/src/server/scripts/Northrend/DraktharonKeep/boss_tharon_ja.cpp b/src/server/scripts/Northrend/DraktharonKeep/boss_tharon_ja.cpp
index ac241e409e..1a240ce158 100644
--- a/src/server/scripts/Northrend/DraktharonKeep/boss_tharon_ja.cpp
+++ b/src/server/scripts/Northrend/DraktharonKeep/boss_tharon_ja.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
@@ -33,7 +33,6 @@ enum Yells
enum Spells
{
SPELL_CURSE_OF_LIFE = 49527,
- SPELL_RAIN_OF_FIRE = 49518,
SPELL_SHADOW_VOLLEY = 49528,
// flesh spells
@@ -56,12 +55,10 @@ enum Misc
ACTION_TURN_BONES = 1,
EVENT_SPELL_CURSE_OF_LIFE = 1,
- EVENT_SPELL_RAIN_OF_FIRE = 2,
EVENT_SPELL_SHADOW_VOLLEY = 3,
EVENT_SPELL_EYE_BEAM = 4,
EVENT_SPELL_LIGHTNING_BREATH = 5,
EVENT_SPELL_POISON_CLOUD = 6,
- EVENT_SPELL_TURN_FLESH = 7,
EVENT_TURN_FLESH_REAL = 9,
EVENT_TURN_BONES_REAL = 10,
EVENT_KILL_TALK = 11
@@ -79,9 +76,7 @@ public:
struct boss_tharon_jaAI : public BossAI
{
- boss_tharon_jaAI(Creature* creature) : BossAI(creature, DATA_THARON_JA)
- {
- }
+ boss_tharon_jaAI(Creature* creature) : BossAI(creature, DATA_THARON_JA) { }
void Reset() override
{
@@ -90,21 +85,28 @@ public:
me->ApplySpellImmune(0, IMMUNITY_EFFECT, SPELL_EFFECT_KNOCK_BACK_DEST, true);
me->SetDisplayId(me->GetNativeDisplayId());
me->CastSpell(me, SPELL_CLEAR_GIFT, true);
+
+ ScheduleHealthCheckEvent(55, [&] {
+ Talk(SAY_FLESH);
+ me->GetThreatMgr().ResetAllThreat();
+ me->CastSpell((Unit*)nullptr, SPELL_TURN_FLESH, false);
+
+ events.Reset();
+ events.ScheduleEvent(EVENT_TURN_FLESH_REAL, 3s);
+ }, false);
}
void JustEngagedWith(Unit* who) override
{
Talk(SAY_AGGRO);
BossAI::JustEngagedWith(who);
- events.ScheduleEvent(EVENT_SPELL_CURSE_OF_LIFE, 5s);
- events.ScheduleEvent(EVENT_SPELL_RAIN_OF_FIRE, 14s, 18s);
- events.ScheduleEvent(EVENT_SPELL_SHADOW_VOLLEY, 8s, 10s);
- events.ScheduleEvent(EVENT_SPELL_TURN_FLESH, 1s);
+ events.ScheduleEvent(EVENT_SPELL_CURSE_OF_LIFE, 13s, 24s);
+ events.ScheduleEvent(EVENT_SPELL_SHADOW_VOLLEY, 6s, 29s);
}
void KilledUnit(Unit* /*victim*/) override
{
- if (events.GetNextEventTime(EVENT_KILL_TALK) == 0)
+ if (!events.HasTimeUntilEvent(EVENT_KILL_TALK))
{
Talk(SAY_KILL);
events.ScheduleEvent(EVENT_KILL_TALK, 6s);
@@ -146,36 +148,16 @@ public:
switch (events.ExecuteEvent())
{
case EVENT_SPELL_CURSE_OF_LIFE:
- if (Unit* target = SelectTarget(SelectTargetMethod::Random, 0, 30.0f, true))
- me->CastSpell(target, SPELL_CURSE_OF_LIFE, false);
- events.ScheduleEvent(EVENT_SPELL_CURSE_OF_LIFE, 13s);
- break;
- case EVENT_SPELL_RAIN_OF_FIRE:
- if (Unit* target = SelectTarget(SelectTargetMethod::Random, 0, 30.0f, true))
- me->CastSpell(target, SPELL_RAIN_OF_FIRE, false);
- events.ScheduleEvent(EVENT_SPELL_RAIN_OF_FIRE, 16s);
+ DoCastRandomTarget(SPELL_CURSE_OF_LIFE, 0, 30.0f, false);
+ events.ScheduleEvent(EVENT_SPELL_CURSE_OF_LIFE, 11s, 28s);
break;
case EVENT_SPELL_SHADOW_VOLLEY:
- me->CastSpell(me, SPELL_SHADOW_VOLLEY, false);
- events.ScheduleEvent(EVENT_SPELL_SHADOW_VOLLEY, 9s);
- break;
- case EVENT_SPELL_TURN_FLESH:
- if (me->HealthBelowPct(50))
- {
- Talk(SAY_FLESH);
- me->GetThreatMgr().ResetAllThreat();
- me->CastSpell((Unit*)nullptr, SPELL_TURN_FLESH, false);
-
- events.Reset();
- events.ScheduleEvent(EVENT_TURN_FLESH_REAL, 3s);
- return;
- }
- events.ScheduleEvent(EVENT_SPELL_TURN_FLESH, 1s);
+ DoCastAOE(SPELL_SHADOW_VOLLEY);
+ events.ScheduleEvent(EVENT_SPELL_SHADOW_VOLLEY, 6s, 29s);
break;
case EVENT_TURN_FLESH_REAL:
- me->CastSpell(me, SPELL_DUMMY, true);
-
- me->GetMotionMaster()->MoveChase(me->GetVictim());
+ DoCastSelf(SPELL_DUMMY, true);
+ me->ResumeChasingVictim();
events.ScheduleEvent(EVENT_SPELL_EYE_BEAM, 11s);
events.ScheduleEvent(EVENT_SPELL_LIGHTNING_BREATH, 3s);
events.ScheduleEvent(EVENT_SPELL_POISON_CLOUD, 6s);
@@ -199,7 +181,6 @@ public:
me->CastSpell(me, SPELL_CLEAR_GIFT, true);
events.Reset();
events.ScheduleEvent(EVENT_SPELL_CURSE_OF_LIFE, 1s);
- events.ScheduleEvent(EVENT_SPELL_RAIN_OF_FIRE, 12s, 14s);
events.ScheduleEvent(EVENT_SPELL_SHADOW_VOLLEY, 8s, 10s);
break;
}
@@ -249,7 +230,6 @@ class spell_tharon_ja_dummy_aura : public AuraScript
{
PreventDefaultAction();
GetUnitOwner()->GetThreatMgr().ResetAllThreat();
- GetUnitOwner()->GetMotionMaster()->Clear();
GetUnitOwner()->CastSpell((Unit*)nullptr, SPELL_TURN_BONES, false);
GetUnitOwner()->GetAI()->DoAction(ACTION_TURN_BONES);
}
diff --git a/src/server/scripts/Northrend/DraktharonKeep/boss_trollgore.cpp b/src/server/scripts/Northrend/DraktharonKeep/boss_trollgore.cpp
index 1de17ba57b..8380f1caae 100644
--- a/src/server/scripts/Northrend/DraktharonKeep/boss_trollgore.cpp
+++ b/src/server/scripts/Northrend/DraktharonKeep/boss_trollgore.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
@@ -102,7 +102,7 @@ public:
void KilledUnit(Unit* /*victim*/) override
{
- if (events.GetNextEventTime(EVENT_KILL_TALK) == 0)
+ if (!events.HasTimeUntilEvent(EVENT_KILL_TALK))
{
Talk(SAY_KILL);
events.ScheduleEvent(EVENT_KILL_TALK, 6s);
@@ -130,6 +130,12 @@ public:
if (!UpdateVictim())
return;
+ if (!CheckInRoom())
+ {
+ EnterEvadeMode(EVADE_REASON_BOUNDARY);
+ return;
+ }
+
events.Update(diff);
if (me->HasUnitState(UNIT_STATE_CASTING))
return;
@@ -159,9 +165,9 @@ public:
DoMeleeAttackIfReady();
}
- bool CheckEvadeIfOutOfCombatArea() const override
+ bool CheckInRoom() override
{
- return me->GetHomePosition().GetExactDist2d(me) > 60.0f;
+ return (me->GetPositionY() >= -700.0f && me->GetPositionY() <= -628.0f);
}
private:
@@ -214,7 +220,7 @@ class spell_trollgore_corpse_explode_aura : public AuraScript
void HandleRemove(AuraEffect const* /*aurEff*/, AuraEffectHandleModes /*mode*/)
{
if (Creature* target = GetTarget()->ToCreature())
- target->DespawnOrUnsummon(1);
+ target->DespawnOrUnsummon(1ms);
}
void Register() override
diff --git a/src/server/scripts/Northrend/DraktharonKeep/drak_tharon_keep.h b/src/server/scripts/Northrend/DraktharonKeep/drak_tharon_keep.h
index 422139b32a..dceeeafd84 100644
--- a/src/server/scripts/Northrend/DraktharonKeep/drak_tharon_keep.h
+++ b/src/server/scripts/Northrend/DraktharonKeep/drak_tharon_keep.h
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
@@ -39,6 +39,7 @@ enum Creatures
NPC_KURZEL = 26664,
NPC_DRAKKARI_GUARDIAN = 26620,
NPC_RISEN_DRAKKARI_WARRIOR = 26635,
+ NPC_FETID_TROLL_CORPSE = 27598,
};
enum GameObjects
diff --git a/src/server/scripts/Northrend/DraktharonKeep/instance_drak_tharon_keep.cpp b/src/server/scripts/Northrend/DraktharonKeep/instance_drak_tharon_keep.cpp
index a8f22adf87..9547a1d691 100644
--- a/src/server/scripts/Northrend/DraktharonKeep/instance_drak_tharon_keep.cpp
+++ b/src/server/scripts/Northrend/DraktharonKeep/instance_drak_tharon_keep.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
@@ -31,50 +31,39 @@ DoorData const doorData[] =
{ 0, 0, DOOR_TYPE_ROOM }
};
-class instance_drak_tharon_keep : public InstanceMapScript
+struct instance_drak_tharon_keep : public InstanceScript
{
-public:
- instance_drak_tharon_keep() : InstanceMapScript("instance_drak_tharon_keep", MAP_DRAK_THARON_KEEP) { }
-
- struct instance_drak_tharon_keep_InstanceScript : public InstanceScript
+ instance_drak_tharon_keep(Map* map) : InstanceScript(map)
{
- instance_drak_tharon_keep_InstanceScript(Map* map) : InstanceScript(map)
- {
- SetHeaders(DataHeader);
- SetBossNumber(MAX_ENCOUNTERS);
- LoadDoorData(doorData);
- }
+ SetHeaders(DataHeader);
+ SetBossNumber(MAX_ENCOUNTERS);
+ LoadDoorData(doorData);
+ }
- void OnGameObjectCreate(GameObject* go) override
+ void OnGameObjectCreate(GameObject* go) override
+ {
+ switch (go->GetEntry())
{
- switch (go->GetEntry())
- {
- case GO_NOVOS_CRYSTAL_1:
- case GO_NOVOS_CRYSTAL_2:
- case GO_NOVOS_CRYSTAL_3:
- case GO_NOVOS_CRYSTAL_4:
- AddDoor(go);
- break;
- }
+ case GO_NOVOS_CRYSTAL_1:
+ case GO_NOVOS_CRYSTAL_2:
+ case GO_NOVOS_CRYSTAL_3:
+ case GO_NOVOS_CRYSTAL_4:
+ AddDoor(go);
+ break;
}
+ }
- void OnGameObjectRemove(GameObject* go) override
+ void OnGameObjectRemove(GameObject* go) override
+ {
+ switch (go->GetEntry())
{
- switch (go->GetEntry())
- {
- case GO_NOVOS_CRYSTAL_1:
- case GO_NOVOS_CRYSTAL_2:
- case GO_NOVOS_CRYSTAL_3:
- case GO_NOVOS_CRYSTAL_4:
- RemoveDoor(go);
- break;
- }
+ case GO_NOVOS_CRYSTAL_1:
+ case GO_NOVOS_CRYSTAL_2:
+ case GO_NOVOS_CRYSTAL_3:
+ case GO_NOVOS_CRYSTAL_4:
+ RemoveDoor(go);
+ break;
}
- };
-
- InstanceScript* GetInstanceScript(InstanceMap* map) const override
- {
- return new instance_drak_tharon_keep_InstanceScript(map);
}
};
@@ -89,7 +78,7 @@ class spell_dtk_raise_dead_aura : public AuraScript
void HandleEffectRemove(AuraEffect const* /*aurEff*/, AuraEffectHandleModes /*mode*/)
{
- GetUnitOwner()->ToCreature()->DespawnOrUnsummon(1);
+ GetUnitOwner()->ToCreature()->DespawnOrUnsummon(1ms);
GetUnitOwner()->SummonCreature(NPC_RISEN_DRAKKARI_WARRIOR, *GetUnitOwner());
}
@@ -121,7 +110,7 @@ class spell_dtk_summon_random_drakkari : public SpellScript
void AddSC_instance_drak_tharon_keep()
{
- new instance_drak_tharon_keep();
+ RegisterInstanceScript(instance_drak_tharon_keep, MAP_DRAK_THARON_KEEP);
RegisterSpellScript(spell_dtk_raise_dead_aura);
RegisterSpellScript(spell_dtk_summon_random_drakkari);
}
diff --git a/src/server/scripts/Northrend/FrozenHalls/ForgeOfSouls/boss_bronjahm.cpp b/src/server/scripts/Northrend/FrozenHalls/ForgeOfSouls/boss_bronjahm.cpp
index c8d14deaa9..ef62d41ada 100644
--- a/src/server/scripts/Northrend/FrozenHalls/ForgeOfSouls/boss_bronjahm.cpp
+++ b/src/server/scripts/Northrend/FrozenHalls/ForgeOfSouls/boss_bronjahm.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
@@ -115,7 +115,7 @@ public:
me->GetMotionMaster()->MoveIdle();
me->CastSpell(me, SPELL_TELEPORT, false);
events.CancelEvent(EVENT_SPELL_CORRUPT_SOUL);
- events.DelayEvents(6000);
+ events.DelayEvents(6s);
events.RescheduleEvent(EVENT_SPELL_FEAR, 8s, 14s);
}
}
@@ -242,7 +242,7 @@ public:
{
me->GetMotionMaster()->MoveIdle();
me->CastSpell(b, SPELL_CONSUME_SOUL, true);
- me->DespawnOrUnsummon(1);
+ me->DespawnOrUnsummon(1ms);
return;
}
diff --git a/src/server/scripts/Northrend/FrozenHalls/ForgeOfSouls/boss_devourer_of_souls.cpp b/src/server/scripts/Northrend/FrozenHalls/ForgeOfSouls/boss_devourer_of_souls.cpp
index b848dd2850..102b87ed6a 100644
--- a/src/server/scripts/Northrend/FrozenHalls/ForgeOfSouls/boss_devourer_of_souls.cpp
+++ b/src/server/scripts/Northrend/FrozenHalls/ForgeOfSouls/boss_devourer_of_souls.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
@@ -225,14 +225,14 @@ public:
if (Unit* target = SelectTarget(SelectTargetMethod::Random, 0, 40.0f, true))
me->CastSpell(target, SPELL_WELL_OF_SOULS, false);
events.Repeat(25s, 30s);
- events.DelayEventsToMax(4000, 0);
+ events.DelayEventsToMax(4s, 0);
break;
case EVENT_SPELL_UNLEASHED_SOULS:
me->CastSpell(me, SPELL_UNLEASHED_SOULS, false);
Talk(SAY_FACE_UNLEASH_SOUL);
Talk(EMOTE_UNLEASH_SOUL);
events.Repeat(30s, 40s);
- events.DelayEventsToMax(5000, 0);
+ events.DelayEventsToMax(5s, 0);
me->setAttackTimer(BASE_ATTACK, 5500);
break;
case EVENT_SPELL_WAILING_SOULS:
@@ -241,7 +241,7 @@ public:
if (Unit* target = SelectTarget(SelectTargetMethod::Random, 0, 0.0f, true))
me->CastCustomSpell(SPELL_WAILING_SOULS_TARGETING, SPELLVALUE_MAX_TARGETS, 1, target, false);
events.Repeat(80s);
- events.DelayEventsToMax(20000, 0);
+ events.DelayEventsToMax(20s, 0);
break;
}
diff --git a/src/server/scripts/Northrend/FrozenHalls/ForgeOfSouls/forge_of_souls.cpp b/src/server/scripts/Northrend/FrozenHalls/ForgeOfSouls/forge_of_souls.cpp
index 619fa90a36..66cd897273 100644
--- a/src/server/scripts/Northrend/FrozenHalls/ForgeOfSouls/forge_of_souls.cpp
+++ b/src/server/scripts/Northrend/FrozenHalls/ForgeOfSouls/forge_of_souls.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/scripts/Northrend/FrozenHalls/ForgeOfSouls/forge_of_souls.h b/src/server/scripts/Northrend/FrozenHalls/ForgeOfSouls/forge_of_souls.h
index b8b94e4389..e8ec81c40d 100644
--- a/src/server/scripts/Northrend/FrozenHalls/ForgeOfSouls/forge_of_souls.h
+++ b/src/server/scripts/Northrend/FrozenHalls/ForgeOfSouls/forge_of_souls.h
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/scripts/Northrend/FrozenHalls/ForgeOfSouls/instance_forge_of_souls.cpp b/src/server/scripts/Northrend/FrozenHalls/ForgeOfSouls/instance_forge_of_souls.cpp
index a3e7c184ad..4646d90ae6 100644
--- a/src/server/scripts/Northrend/FrozenHalls/ForgeOfSouls/instance_forge_of_souls.cpp
+++ b/src/server/scripts/Northrend/FrozenHalls/ForgeOfSouls/instance_forge_of_souls.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
@@ -140,7 +140,7 @@ public:
{
for (int8 i = 0; outroPositions[i].entry[GetTeamIdInInstance()] != 0; ++i)
if (Creature* summon = instance->SummonCreature(outroPositions[i].entry[GetTeamIdInInstance()], outroPositions[i].startPosition))
- summon->GetMotionMaster()->MovePath(outroPositions[i].pathId, false);
+ summon->GetMotionMaster()->MoveWaypoint(outroPositions[i].pathId, false);
}
}
diff --git a/src/server/scripts/Northrend/FrozenHalls/HallsOfReflection/boss_falric.cpp b/src/server/scripts/Northrend/FrozenHalls/HallsOfReflection/boss_falric.cpp
index d5e01c2da0..12772dceda 100644
--- a/src/server/scripts/Northrend/FrozenHalls/HallsOfReflection/boss_falric.cpp
+++ b/src/server/scripts/Northrend/FrozenHalls/HallsOfReflection/boss_falric.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
@@ -18,6 +18,7 @@
#include "CreatureScript.h"
#include "halls_of_reflection.h"
#include "ScriptedCreature.h"
+#include "SpellMgr.h"
enum Yells
{
@@ -44,7 +45,7 @@ enum Events
EVENT_UNROOT,
};
-const uint32 hopelessnessId[3][2] = { {72395, 72390}, {72396, 72391}, {72397, 72393} };
+const uint32 hopelessnessId[3] = { 72395, 72396, 72397 };
class boss_falric : public CreatureScript
{
@@ -131,7 +132,7 @@ public:
Talk(SAY_DEFILING_HORROR);
me->CastSpell((Unit*)nullptr, SPELL_DEFILING_HORROR, false);
me->SetControlled(true, UNIT_STATE_ROOT);
- events.DelayEventsToMax(5000, 0);
+ events.DelayEventsToMax(5s, 0);
events.ScheduleEvent(EVENT_UNROOT, 4s);
events.ScheduleEvent(EVENT_DEFILING_HORROR, 20s);
break;
@@ -143,8 +144,9 @@ public:
if ((uiHopelessnessCount == 0 && HealthBelowPct(67)) || (uiHopelessnessCount == 1 && HealthBelowPct(34)) || (uiHopelessnessCount == 2 && HealthBelowPct(11)))
{
if (uiHopelessnessCount)
- me->RemoveOwnedAura(hopelessnessId[uiHopelessnessCount - 1][DUNGEON_MODE(0, 1)]);
- me->CastSpell((Unit*)nullptr, hopelessnessId[uiHopelessnessCount][DUNGEON_MODE(0, 1)], true);
+ me->RemoveOwnedAura(sSpellMgr->GetSpellIdForDifficulty(hopelessnessId[uiHopelessnessCount - 1], me));
+
+ me->CastSpell((Unit*)nullptr, hopelessnessId[uiHopelessnessCount], true);
++uiHopelessnessCount;
}
diff --git a/src/server/scripts/Northrend/FrozenHalls/HallsOfReflection/boss_marwyn.cpp b/src/server/scripts/Northrend/FrozenHalls/HallsOfReflection/boss_marwyn.cpp
index ae13defb1e..119dcef198 100644
--- a/src/server/scripts/Northrend/FrozenHalls/HallsOfReflection/boss_marwyn.cpp
+++ b/src/server/scripts/Northrend/FrozenHalls/HallsOfReflection/boss_marwyn.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/scripts/Northrend/FrozenHalls/HallsOfReflection/halls_of_reflection.cpp b/src/server/scripts/Northrend/FrozenHalls/HallsOfReflection/halls_of_reflection.cpp
index c4b0bdcc7d..43547fcf0c 100644
--- a/src/server/scripts/Northrend/FrozenHalls/HallsOfReflection/halls_of_reflection.cpp
+++ b/src/server/scripts/Northrend/FrozenHalls/HallsOfReflection/halls_of_reflection.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
@@ -571,7 +571,7 @@ public:
pInstance->HandleGameObject(pInstance->GetGuidData(GO_ARTHAS_DOOR), true);
pLichKing->SetVisible(true);
- pLichKing->GetMotionMaster()->MovePoint(0, LichKingMoveMidlelThronePos, false);
+ pLichKing->GetMotionMaster()->MovePoint(0, LichKingMoveMidlelThronePos, FORCED_MOVEMENT_NONE, 0.f, false);
}
@@ -618,7 +618,7 @@ public:
if (Creature* pLichKing = ObjectAccessor::GetCreature(*me, pInstance->GetGuidData(NPC_LICH_KING_EVENT)))
{
pLichKing->SetVisible(true);
- pLichKing->GetMotionMaster()->MovePoint(0, LichKingMoveThronePos, false);
+ pLichKing->GetMotionMaster()->MovePoint(0, LichKingMoveThronePos, FORCED_MOVEMENT_NONE, 0.f, false);
}
events.ScheduleEvent(EVENT_INTRO_LK_2_1, 1s);
break;
@@ -658,7 +658,7 @@ public:
pLichKing->SendMovementFlagUpdate();
pLichKing->CastSpell(pLichKing, SPELL_FROSTMOURNE_EQUIP, false);
pInstance->HandleGameObject(pInstance->GetGuidData(GO_FROSTMOURNE), false);
- events.ScheduleEvent(EVENT_INTRO_LK_4_3, 1750);
+ events.ScheduleEvent(EVENT_INTRO_LK_4_3, 1750ms);
}
events.ScheduleEvent(EVENT_INTRO_LK_5, 6s);
break;
@@ -709,7 +709,7 @@ public:
case EVENT_INTRO_LK_5_2:
if (Creature* pLichKing = ObjectAccessor::GetCreature(*me, pInstance->GetGuidData(NPC_LICH_KING_EVENT)))
{
- pLichKing->GetMotionMaster()->MovePoint(0, LichKingMoveAwayPos, false);
+ pLichKing->GetMotionMaster()->MovePoint(0, LichKingMoveAwayPos, FORCED_MOVEMENT_NONE, 0.f, false);
}
break;
@@ -763,11 +763,11 @@ public:
{
Talk(SAY_SYLVANAS_INTRO_END);
me->HandleEmoteCommand(EMOTE_ONESHOT_EXCLAMATION);
- me->GetMotionMaster()->MovePoint(0, LichKingMoveAwayPos, false);
+ me->GetMotionMaster()->MovePoint(0, LichKingMoveAwayPos, FORCED_MOVEMENT_NONE, 0.f, false);
}
if (Creature* pLoralen = pInstance->instance->GetCreature(pInstance->GetGuidData(NPC_DARK_RANGER_LORALEN)))
{
- pLoralen->GetMotionMaster()->MovePoint(0, LoralenFollowLk1, false);
+ pLoralen->GetMotionMaster()->MovePoint(0, LoralenFollowLk1, FORCED_MOVEMENT_NONE, 0.f, false);
}
events.ScheduleEvent(EVENT_INTRO_LK_10, 1s + 500ms);
break;
@@ -775,7 +775,7 @@ public:
case EVENT_INTRO_LK_10:
if (Creature* pLoralen = pInstance->instance->GetCreature(pInstance->GetGuidData(NPC_DARK_RANGER_LORALEN)))
{
- pLoralen->GetMotionMaster()->MovePoint(0, LoralenFollowLk2, false);
+ pLoralen->GetMotionMaster()->MovePoint(0, LoralenFollowLk2, FORCED_MOVEMENT_NONE, 0.f, false);
}
events.ScheduleEvent(EVENT_INTRO_LK_11, 2s);
@@ -784,7 +784,7 @@ public:
case EVENT_INTRO_LK_11:
if (Creature* pLoralen = pInstance->instance->GetCreature(pInstance->GetGuidData(NPC_DARK_RANGER_LORALEN)))
{
- pLoralen->GetMotionMaster()->MovePoint(0, LoralenFollowLk3, false);
+ pLoralen->GetMotionMaster()->MovePoint(0, LoralenFollowLk3, FORCED_MOVEMENT_NONE, 0.f, false);
}
events.ScheduleEvent(EVENT_INTRO_LK_12, 5s + 500ms);
break;
@@ -796,7 +796,7 @@ public:
}
if (Creature* pLoralen = pInstance->instance->GetCreature(pInstance->GetGuidData(NPC_DARK_RANGER_LORALEN)))
{
- pLoralen->GetMotionMaster()->MovePoint(0, LoralenFollowLkFinal, false);
+ pLoralen->GetMotionMaster()->MovePoint(0, LoralenFollowLkFinal, FORCED_MOVEMENT_NONE, 0.f, false);
}
events.ScheduleEvent(EVENT_INTRO_LK_13, 2s);
break;
@@ -1153,7 +1153,7 @@ public:
ScriptedAI::EnterEvadeMode(why);
if (me->IsSummon())
- me->ToTempSummon()->DespawnOrUnsummon(1);
+ me->ToTempSummon()->DespawnOrUnsummon(1ms);
}
};
};
@@ -1732,7 +1732,7 @@ public:
{
++reqKillCount;
- if (events.GetNextEventTime(EVENT_DECREASE_REQ_COUNT_BY_100))
+ if (events.HasTimeUntilEvent(EVENT_DECREASE_REQ_COUNT_BY_100))
events.RescheduleEvent(EVENT_DECREASE_REQ_COUNT_BY_100, 10s);
summons.Summon(s);
s->SetHomePosition(PathWaypoints[WP_STOP[currentWall + 1]]);
@@ -1950,14 +1950,14 @@ public:
currentStopPoint = 0;
events.Reset();
}
- void DoAction(int32 actionId) override
+ void DoAction(int32 actionId) override
{
switch (actionId)
{
case ACTION_START_INTRO:
events.ScheduleEvent(EVENT_LK_SAY_AGGRO, 0ms);
- events.ScheduleEvent(EVENT_LK_BATTLE_1, 2s +500ms);
+ events.ScheduleEvent(EVENT_LK_BATTLE_1, 2s + 500ms);
events.ScheduleEvent(EVENT_LK_BATTLE_2, 3s);
events.ScheduleEvent(me->GetEntry() == NPC_JAINA_PART2 ? EVENT_JAINA_IMMOBILIZE_LK : EVENT_SYLVANAS_IMMOBILIZE_JUMP, 9s);
break;
@@ -1989,7 +1989,7 @@ public:
path.push_back(G3D::Vector3(me->GetPositionX(), me->GetPositionY(), me->GetPositionZ()));
for (uint8 i = WP_STOP[currentStopPoint - 1] + (currentStopPoint == 1 ? 0 : 1); i <= WP_STOP[currentStopPoint]; ++i)
path.push_back(G3D::Vector3(PathWaypoints[i].GetPositionX(), PathWaypoints[i].GetPositionY(), PathWaypoints[i].GetPositionZ()));
- me->GetMotionMaster()->MoveSplinePath(&path);
+ me->GetMotionMaster()->MoveSplinePath(&path, FORCED_MOVEMENT_RUN);
}
void MovementInform(uint32 type, uint32 /*id*/) override
diff --git a/src/server/scripts/Northrend/FrozenHalls/HallsOfReflection/halls_of_reflection.h b/src/server/scripts/Northrend/FrozenHalls/HallsOfReflection/halls_of_reflection.h
index 60894b5a99..fb5a722c1e 100644
--- a/src/server/scripts/Northrend/FrozenHalls/HallsOfReflection/halls_of_reflection.h
+++ b/src/server/scripts/Northrend/FrozenHalls/HallsOfReflection/halls_of_reflection.h
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/scripts/Northrend/FrozenHalls/HallsOfReflection/instance_halls_of_reflection.cpp b/src/server/scripts/Northrend/FrozenHalls/HallsOfReflection/instance_halls_of_reflection.cpp
index 5b1e99ab34..261006135e 100644
--- a/src/server/scripts/Northrend/FrozenHalls/HallsOfReflection/instance_halls_of_reflection.cpp
+++ b/src/server/scripts/Northrend/FrozenHalls/HallsOfReflection/instance_halls_of_reflection.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
@@ -38,7 +38,7 @@ public:
_owner.GetMotionMaster()->Clear();
_owner.SetVisible(true);
_owner.NearTeleportTo(5300.53f, 1987.80f, 707.70f, 3.89f);
- _owner.m_Events.AddEvent(new UtherBatteredHiltEvent(_owner, 2), _owner.m_Events.CalculateTime(1000));
+ _owner.m_Events.AddEventAtOffset(new UtherBatteredHiltEvent(_owner, 2), 1s);
break;
case 2:
_owner.AI()->Talk(SAY_BATTERED_HILT_HALT);
@@ -52,12 +52,12 @@ public:
{
quel->AI()->Talk(EMOTE_QUEL_SPAWN);
}
- _owner.m_Events.AddEvent(new UtherBatteredHiltEvent(_owner, 4), _owner.m_Events.CalculateTime(3500));
+ _owner.m_Events.AddEventAtOffset(new UtherBatteredHiltEvent(_owner, 4), 3500ms);
break;
case 4:
_owner.SetWalk(false);
_owner.GetMotionMaster()->MovePoint(0, 5337.53f, 1981.21f, 709.32f);
- _owner.m_Events.AddEvent(new UtherBatteredHiltEvent(_owner, 5), _owner.m_Events.CalculateTime(6000));
+ _owner.m_Events.AddEventAtOffset(new UtherBatteredHiltEvent(_owner, 5), 6s);
break;
case 5:
_owner.SetFacingTo(2.82f);
@@ -66,7 +66,7 @@ public:
case 6:
if (InstanceScript* instance = _owner.GetInstanceScript())
instance->SetData(DATA_BATTERED_HILT, 6);
- _owner.m_Events.AddEvent(new UtherBatteredHiltEvent(_owner, 7), _owner.m_Events.CalculateTime(2000));
+ _owner.m_Events.AddEventAtOffset(new UtherBatteredHiltEvent(_owner, 7), 2s);
break;
case 7:
if (InstanceScript* instance = _owner.GetInstanceScript())
@@ -77,7 +77,7 @@ public:
{
quel->AI()->Talk(EMOTE_QUEL_PREPARE);
}
- _owner.m_Events.AddEvent(new UtherBatteredHiltEvent(_owner, 8), _owner.m_Events.CalculateTime(4000));
+ _owner.m_Events.AddEventAtOffset(new UtherBatteredHiltEvent(_owner, 8), 4s);
break;
case 8:
_owner.SetReactState(REACT_AGGRESSIVE);
@@ -87,23 +87,23 @@ public:
break;
case 9:
_owner.AI()->Talk(SAY_BATTERED_HILT_OUTRO1);
- _owner.m_Events.AddEvent(new UtherBatteredHiltEvent(_owner, _eventId + 1), _owner.m_Events.CalculateTime(11000));
+ _owner.m_Events.AddEventAtOffset(new UtherBatteredHiltEvent(_owner, _eventId + 1), 11s);
break;
case 10:
_owner.AI()->Talk(SAY_BATTERED_HILT_OUTRO2);
- _owner.m_Events.AddEvent(new UtherBatteredHiltEvent(_owner, _eventId + 1), _owner.m_Events.CalculateTime(7500));
+ _owner.m_Events.AddEventAtOffset(new UtherBatteredHiltEvent(_owner, _eventId + 1), 7500ms);
break;
case 11:
_owner.AI()->Talk(SAY_BATTERED_HILT_OUTRO3);
- _owner.m_Events.AddEvent(new UtherBatteredHiltEvent(_owner, _eventId + 1), _owner.m_Events.CalculateTime(8000));
+ _owner.m_Events.AddEventAtOffset(new UtherBatteredHiltEvent(_owner, _eventId + 1), 8s);
break;
case 12:
_owner.AI()->Talk(SAY_BATTERED_HILT_OUTRO4);
- _owner.m_Events.AddEvent(new UtherBatteredHiltEvent(_owner, _eventId + 1), _owner.m_Events.CalculateTime(5000));
+ _owner.m_Events.AddEventAtOffset(new UtherBatteredHiltEvent(_owner, _eventId + 1), 5s);
break;
case 13:
_owner.CastSpell((Unit*)nullptr, 73036, true);
- _owner.m_Events.AddEvent(new UtherBatteredHiltEvent(_owner, _eventId + 1), _owner.m_Events.CalculateTime(3000));
+ _owner.m_Events.AddEventAtOffset(new UtherBatteredHiltEvent(_owner, _eventId + 1), 3s);
break;
case 14:
{
@@ -594,7 +594,7 @@ public:
if (Creature* c = instance->GetCreature(NPC_AltarBunnyGUID))
c->CastSpell(c, 70720, true);
if (Creature* c = instance->GetCreature(NPC_UtherGUID))
- c->m_Events.AddEvent(new UtherBatteredHiltEvent(*c, 1), c->m_Events.CalculateTime(3000));
+ c->m_Events.AddEventAtOffset(new UtherBatteredHiltEvent(*c, 1), 3s);
break;
case 3:
if ((BatteredHiltStatus & BHSF_STARTED) == 0 || (BatteredHiltStatus & BHSF_THROWN))
@@ -602,7 +602,7 @@ public:
BatteredHiltStatus |= BHSF_THROWN;
if (Creature* c = instance->GetCreature(NPC_UtherGUID))
{
- c->m_Events.AddEvent(new UtherBatteredHiltEvent(*c, 3), c->m_Events.CalculateTime(5500));
+ c->m_Events.AddEventAtOffset(new UtherBatteredHiltEvent(*c, 3), 5500ms);
}
break;
case 4:
@@ -614,7 +614,7 @@ public:
break;
case 5:
if (Creature* c = instance->GetCreature(NPC_UtherGUID))
- c->m_Events.AddEvent(new UtherBatteredHiltEvent(*c, 6), c->m_Events.CalculateTime(3000));
+ c->m_Events.AddEventAtOffset(new UtherBatteredHiltEvent(*c, 6), 3s);
break;
case 6:
if (Creature* c = instance->GetCreature(NPC_QuelDelarGUID))
@@ -726,7 +726,7 @@ public:
c->SetStandState(UNIT_STAND_STATE_STAND);
c->SetWalk(false);
c->GetMotionMaster()->MovePoint(0, 5313.92f, 1989.36f, 707.70f);
- c->m_Events.AddEvent(new UtherBatteredHiltEvent(*c, 9), c->m_Events.CalculateTime(7000));
+ c->m_Events.AddEventAtOffset(new UtherBatteredHiltEvent(*c, 9), 7s);
}
}
diff --git a/src/server/scripts/Northrend/FrozenHalls/PitOfSaron/boss_forgemaster_garfrost.cpp b/src/server/scripts/Northrend/FrozenHalls/PitOfSaron/boss_forgemaster_garfrost.cpp
index 8d60280251..7dc0906a1c 100644
--- a/src/server/scripts/Northrend/FrozenHalls/PitOfSaron/boss_forgemaster_garfrost.cpp
+++ b/src/server/scripts/Northrend/FrozenHalls/PitOfSaron/boss_forgemaster_garfrost.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
@@ -19,7 +19,9 @@
#include "CreatureScript.h"
#include "Player.h"
#include "ScriptedCreature.h"
+#include "SharedDefines.h"
#include "SpellAuras.h"
+#include "SpellMgr.h"
#include "SpellScript.h"
#include "SpellScriptLoader.h"
#include "pit_of_saron.h"
@@ -54,11 +56,11 @@ enum Spells
SPELL_CHILLING_WAVE = 68778,
SPELL_DEEP_FREEZE = 70381,
-};
-#define SPELL_FORGE_BLADE RAID_MODE(68774, 70334)
-#define SPELL_FORGE_MACE RAID_MODE(68785, 70335)
-#define SPELL_SARONITE_TRIGGERED RAID_MODE(68789, 70851)
+ SPELL_FORGE_BLADE = 68774,
+ SPELL_FORGE_MACE = 68785,
+ SPELL_SARONITE_TRIGGERED = 68789,
+};
enum Events
{
@@ -112,7 +114,7 @@ public:
Talk(SAY_AGGRO);
DoZoneInCombat();
- events.RescheduleEvent(EVENT_SPELL_THROW_SARONITE, 5000ms, 7500ms);
+ events.RescheduleEvent(EVENT_SPELL_THROW_SARONITE, 5s, 7500ms);
if (pInstance)
pInstance->SetData(DATA_GARFROST, IN_PROGRESS);
@@ -154,21 +156,45 @@ public:
if (phase == 1)
{
me->SetControlled(true, UNIT_STATE_ROOT);
- me->CastSpell(me, SPELL_FORGE_BLADE, false);
+ if (me->CastSpell(me, SPELL_FORGE_BLADE, false) == SPELL_CAST_OK)
+ {
+ events.RescheduleEvent(EVENT_SPELL_CHILLING_WAVE, 10s);
+ SetEquipmentSlots(false, EQUIP_ID_SWORD);
+ me->SetReactState(REACT_AGGRESSIVE);
+ me->SetControlled(false, UNIT_STATE_ROOT);
+ me->DisableRotate(false);
+ if (me->GetVictim())
+ {
+ AttackStart(me->GetVictim());
+ me->SetTarget(me->GetVictim()->GetGUID());
+ }
+ }
Talk(SAY_HP_66);
}
else if (phase == 2)
{
me->SetControlled(true, UNIT_STATE_ROOT);
- me->RemoveAurasDueToSpell(SPELL_FORGE_BLADE);
- me->CastSpell(me, SPELL_FORGE_MACE, false);
+ me->RemoveAurasDueToSpell(sSpellMgr->GetSpellIdForDifficulty(SPELL_FORGE_BLADE, me));
+ if (me->CastSpell(me, SPELL_FORGE_MACE, false) == SPELL_CAST_OK)
+ {
+ events.RescheduleEvent(EVENT_SPELL_DEEP_FREEZE, 10s);
+ SetEquipmentSlots(false, EQUIP_ID_MACE);
+ me->SetReactState(REACT_AGGRESSIVE);
+ me->SetControlled(false, UNIT_STATE_ROOT);
+ me->DisableRotate(false);
+ if (me->GetVictim())
+ {
+ AttackStart(me->GetVictim());
+ me->SetTarget(me->GetVictim()->GetGUID());
+ }
+ }
Talk(SAY_HP_33);
}
}
void SpellHitTarget(Unit* /*target*/, SpellInfo const* spell) override
{
- if (spell->Id == uint32(SPELL_SARONITE_TRIGGERED))
+ if (spell->Id == sSpellMgr->GetSpellIdForDifficulty(SPELL_SARONITE_TRIGGERED, me))
{
if (bCanSayBoulderHit)
{
@@ -176,32 +202,6 @@ public:
Talk(SAY_BOULDER_HIT);
}
}
- if (spell->Id == uint32(SPELL_FORGE_BLADE))
- {
- events.RescheduleEvent(EVENT_SPELL_CHILLING_WAVE, 10000);
- SetEquipmentSlots(false, EQUIP_ID_SWORD);
- me->SetReactState(REACT_AGGRESSIVE);
- me->SetControlled(false, UNIT_STATE_ROOT);
- me->DisableRotate(false);
- if (me->GetVictim())
- {
- AttackStart(me->GetVictim());
- me->SetTarget(me->GetVictim()->GetGUID());
- }
- }
- else if (spell->Id == uint32(SPELL_FORGE_MACE))
- {
- events.RescheduleEvent(EVENT_SPELL_DEEP_FREEZE, 10s);
- SetEquipmentSlots(false, EQUIP_ID_MACE);
- me->SetReactState(REACT_AGGRESSIVE);
- me->SetControlled(false, UNIT_STATE_ROOT);
- me->DisableRotate(false);
- if (me->GetVictim())
- {
- AttackStart(me->GetVictim());
- me->SetTarget(me->GetVictim()->GetGUID());
- }
- }
}
void UpdateAI(uint32 diff) override
diff --git a/src/server/scripts/Northrend/FrozenHalls/PitOfSaron/boss_krickandick.cpp b/src/server/scripts/Northrend/FrozenHalls/PitOfSaron/boss_krickandick.cpp
index c5d341dc9f..1b4120677f 100644
--- a/src/server/scripts/Northrend/FrozenHalls/PitOfSaron/boss_krickandick.cpp
+++ b/src/server/scripts/Northrend/FrozenHalls/PitOfSaron/boss_krickandick.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
@@ -298,7 +298,7 @@ public:
if (a == 1)
{
me->setActive(true);
- events.RescheduleEvent(20, 0);
+ events.RescheduleEvent(20, 0ms);
}
}
@@ -369,7 +369,7 @@ public:
if (pInstance)
{
if (Creature* c = pInstance->instance->GetCreature(pInstance->GetGuidData(DATA_TYRANNUS_EVENT_GUID)))
- c->GetMotionMaster()->MovePath(PATH_BEGIN_VALUE + 10, false);
+ c->GetMotionMaster()->MoveWaypoint(PATH_BEGIN_VALUE + 10, false);
if (Creature* c = pInstance->instance->GetCreature(pInstance->GetGuidData(DATA_LEADER_FIRST_GUID)))
c->AI()->Talk(c->GetEntry() == NPC_JAINA_PART1 ? SAY_JAINA_KRICK_2 : SAY_SYLVANAS_KRICK_2);
}
@@ -404,7 +404,7 @@ public:
case 8:
Talk(SAY_OUTRO_KRICK_4);
- events.RescheduleEvent(9, 1500);
+ events.RescheduleEvent(9, 1500ms);
break;
case 9:
if (pInstance)
@@ -430,7 +430,7 @@ public:
if (Creature* c = pInstance->instance->GetCreature(pInstance->GetGuidData(DATA_TYRANNUS_EVENT_GUID)))
c->AI()->Talk(SAY_TYRANNUS_KRICK_2);
- events.RescheduleEvent(11, 9000);
+ events.RescheduleEvent(11, 9s);
break;
case 11:
if (pInstance)
@@ -440,7 +440,7 @@ public:
if (Creature* c = pInstance->instance->GetCreature(pInstance->GetGuidData(DATA_LEADER_FIRST_GUID)))
{
c->AI()->Talk(c->GetEntry() == NPC_JAINA_PART1 ? SAY_JAINA_KRICK_3 : SAY_SYLVANAS_KRICK_3);
- c->GetMotionMaster()->MovePath(PATH_BEGIN_VALUE + 11, false);
+ c->GetMotionMaster()->MoveWaypoint(PATH_BEGIN_VALUE + 11, false);
}
}
me->setActive(false);
@@ -506,7 +506,7 @@ class spell_exploding_orb_auto_grow_aura : public AuraScript
target->RemoveAurasDueToSpell(SPELL_AUTO_GROW);
target->RemoveAurasDueToSpell(SPELL_EXPLODING_ORB_VISUAL);
if (target->IsCreature())
- target->ToCreature()->DespawnOrUnsummon(2000);
+ target->ToCreature()->DespawnOrUnsummon(2s);
}
}
diff --git a/src/server/scripts/Northrend/FrozenHalls/PitOfSaron/boss_scourgelord_tyrannus.cpp b/src/server/scripts/Northrend/FrozenHalls/PitOfSaron/boss_scourgelord_tyrannus.cpp
index 1ea12a8314..ca9ec626dc 100644
--- a/src/server/scripts/Northrend/FrozenHalls/PitOfSaron/boss_scourgelord_tyrannus.cpp
+++ b/src/server/scripts/Northrend/FrozenHalls/PitOfSaron/boss_scourgelord_tyrannus.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
@@ -108,7 +108,7 @@ public:
{
c->RemoveAura(46598);
c->GetMotionMaster()->Clear();
- c->GetMotionMaster()->MovePath(PATH_BEGIN_VALUE + 18, true);
+ c->GetMotionMaster()->MoveWaypoint(PATH_BEGIN_VALUE + 18, true);
}
me->SetHomePosition(exitPos);
me->GetMotionMaster()->MoveJump(exitPos, 10.0f, 2.0f);
@@ -161,7 +161,7 @@ public:
events.RescheduleEvent(EVENT_SPELL_UNHOLY_POWER, 1s);
break;
}
- events.RepeatEvent(3000);
+ events.Repeat(3s);
break;
case EVENT_SPELL_UNHOLY_POWER:
Talk(SAY_DARK_MIGHT);
diff --git a/src/server/scripts/Northrend/FrozenHalls/PitOfSaron/instance_pit_of_saron.cpp b/src/server/scripts/Northrend/FrozenHalls/PitOfSaron/instance_pit_of_saron.cpp
index 5d5d375d4b..1cc7f2ca7a 100644
--- a/src/server/scripts/Northrend/FrozenHalls/PitOfSaron/instance_pit_of_saron.cpp
+++ b/src/server/scripts/Northrend/FrozenHalls/PitOfSaron/instance_pit_of_saron.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/scripts/Northrend/FrozenHalls/PitOfSaron/pit_of_saron.cpp b/src/server/scripts/Northrend/FrozenHalls/PitOfSaron/pit_of_saron.cpp
index a83777d45f..837460b797 100644
--- a/src/server/scripts/Northrend/FrozenHalls/PitOfSaron/pit_of_saron.cpp
+++ b/src/server/scripts/Northrend/FrozenHalls/PitOfSaron/pit_of_saron.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
@@ -341,7 +341,7 @@ public:
Unit::Kill(c, c, false);
}
- c->DespawnOrUnsummon(10000);
+ c->DespawnOrUnsummon(10s);
}
pInstance->SetData(DATA_INSTANCE_PROGRESS, INSTANCE_PROGRESS_FINISHED_INTRO);
}
@@ -551,7 +551,7 @@ public:
while (FBSData[i].entry)
{
if (Creature* c = me->SummonCreature(FBSData[i].entry, 688.69f + i * 1.8f, FBSSpawnPos.GetPositionY() + (float)irand(-2, 2), FBSSpawnPos.GetPositionZ(), 3 * M_PI / 2))
- c->GetMotionMaster()->MovePath(FBSData[i].pathId, false);
+ c->GetMotionMaster()->MoveWaypoint(FBSData[i].pathId, false);
++i;
}
events.RescheduleEvent(2, 3s);
@@ -674,14 +674,14 @@ public:
switch (events.ExecuteEvent())
{
case 1:
- me->GetMotionMaster()->MovePoint(2, PTSTyrannusWaitPos1, false);
+ me->GetMotionMaster()->MovePoint(2, PTSTyrannusWaitPos1, FORCED_MOVEMENT_NONE, 0.f, false);
break;
case 2:
me->SetFacingTo(PTSTyrannusWaitPos1.GetOrientation());
me->setActive(false);
break;
case 3:
- me->GetMotionMaster()->MovePoint(3, PTSTyrannusWaitPos2, false);
+ me->GetMotionMaster()->MovePoint(3, PTSTyrannusWaitPos2, FORCED_MOVEMENT_NONE, 0.f, false);
break;
case 4:
me->SetFacingTo(PTSTyrannusWaitPos2.GetOrientation());
@@ -690,7 +690,7 @@ public:
me->GetMotionMaster()->MoveTakeoff(10, me->GetPositionX() + 2.0f * cos(me->GetOrientation()), me->GetPositionY() + 2.0f * std::sin(me->GetOrientation()), me->GetPositionZ() + 30.0f, 7.0f);
break;
case 6:
- me->GetMotionMaster()->MovePoint(4, PTSTyrannusWaitPos3, false);
+ me->GetMotionMaster()->MovePoint(4, PTSTyrannusWaitPos3, FORCED_MOVEMENT_NONE, 0.f, false);
break;
case 30:
{
@@ -1082,7 +1082,7 @@ public:
s->AddThreat(c, 0.0f);
}
}
- events.RescheduleEvent(10, 3000);
+ events.RescheduleEvent(10, 3s);
break;
}
@@ -1200,16 +1200,16 @@ public:
switch (id)
{
- case 0:
+ case 1:
Talk(me->GetEntry() == NPC_JAINA_PART2 ? SAY_JAINA_OUTRO_2 : SAY_SYLVANAS_OUTRO_2);
break;
- case 1:
+ case 2:
if (me->GetEntry() == NPC_JAINA_PART2)
{
Talk(SAY_JAINA_OUTRO_3);
}
break;
- case 6:
+ case 7:
me->SetNpcFlag(UNIT_NPC_FLAG_QUESTGIVER);
if (GameObject* g = me->FindNearestGameObject(GO_HOR_PORTCULLIS, 50.0f))
g->SetGoState(GO_STATE_ACTIVE);
@@ -1284,7 +1284,7 @@ public:
events.RescheduleEvent(8, 2s);
break;
case 8:
- me->GetMotionMaster()->MovePath(me->GetEntry() == NPC_JAINA_PART2 ? PATH_BEGIN_VALUE + 16 : PATH_BEGIN_VALUE + 17, false);
+ me->GetMotionMaster()->MoveWaypoint(me->GetEntry() == NPC_JAINA_PART2 ? PATH_BEGIN_VALUE + 16 : PATH_BEGIN_VALUE + 17, false);
break;
case 10:
if (Creature* x = pInstance->instance->GetCreature(pInstance->GetGuidData(DATA_MARTIN_OR_GORKUN_GUID)))
@@ -1355,7 +1355,7 @@ public:
}
}
if (minDist < 200.0f * 200.0f)
- _owner.GetMotionMaster()->MovePoint(0, slaveFreePos[pointId], true, false);
+ _owner.GetMotionMaster()->MovePoint(0, slaveFreePos[pointId], FORCED_MOVEMENT_NONE, 0.f, true, false);
return true;
}
@@ -1381,9 +1381,9 @@ class spell_pos_slave_trigger_closest : public SpellScript
target->SetUInt32Value(UNIT_NPC_EMOTESTATE, 0);
if (Creature* c = target->ToCreature())
{
- c->DespawnOrUnsummon(7000);
+ c->DespawnOrUnsummon(7s);
c->AI()->Talk(0, p);
- c->m_Events.AddEvent(new SlaveRunEvent(*c), c->m_Events.CalculateTime(3000));
+ c->m_Events.AddEventAtOffset(new SlaveRunEvent(*c), 3s);
}
}
}
@@ -1406,7 +1406,7 @@ class spell_pos_rimefang_frost_nova : public SpellScript
{
Unit::Kill(caster, target);
if (target->IsCreature())
- target->ToCreature()->DespawnOrUnsummon(30000);
+ target->ToCreature()->DespawnOrUnsummon(30s);
}
}
diff --git a/src/server/scripts/Northrend/FrozenHalls/PitOfSaron/pit_of_saron.h b/src/server/scripts/Northrend/FrozenHalls/PitOfSaron/pit_of_saron.h
index 648ba50e67..4902de7da1 100644
--- a/src/server/scripts/Northrend/FrozenHalls/PitOfSaron/pit_of_saron.h
+++ b/src/server/scripts/Northrend/FrozenHalls/PitOfSaron/pit_of_saron.h
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/scripts/Northrend/Gundrak/boss_drakkari_colossus.cpp b/src/server/scripts/Northrend/Gundrak/boss_drakkari_colossus.cpp
index 8a9463b514..7cb576a4a8 100644
--- a/src/server/scripts/Northrend/Gundrak/boss_drakkari_colossus.cpp
+++ b/src/server/scripts/Northrend/Gundrak/boss_drakkari_colossus.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
@@ -27,6 +27,7 @@ enum Spells
SPELL_MOJO_WAVE = 55626,
SPELL_FREEZE_ANIM = 52656,
SPELL_MIGHTY_BLOW = 54719,
+ SPELL_MORTAL_STRIKE = 54715,
SPELL_ELEMENTAL_SPAWN_EFFECT = 54888,
SPELL_EMERGE = 54850,
@@ -54,9 +55,10 @@ enum Misc
EMOTE_ALTAR = 1,
EVENT_COLOSSUS_MIGHTY_BLOW = 1,
- EVENT_COLOSSUS_HEALTH_1 = 2,
- EVENT_COLOSSUS_HEALTH_2 = 3,
- EVENT_COLOSSUS_START_FIGHT = 4,
+ EVENT_COLOSSUS_MORTAL_STRIKE = 2,
+ EVENT_COLOSSUS_HEALTH_1 = 3,
+ EVENT_COLOSSUS_HEALTH_2 = 4,
+ EVENT_COLOSSUS_START_FIGHT = 5,
EVENT_ELEMENTAL_HEALTH = 10,
EVENT_ELEMENTAL_SURGE = 11,
@@ -123,17 +125,18 @@ public:
void Reset() override
{
BossAI::Reset();
- for (uint8 i = 0; i < 5; i++)
- me->SummonCreature(NPC_LIVING_MOJO, mojoPosition[i].GetPositionX(), mojoPosition[i].GetPositionY(), mojoPosition[i].GetPositionZ(), 0, TEMPSUMMON_MANUAL_DESPAWN, 0);
-
- me->SetUnitFlag(UNIT_FLAG_NON_ATTACKABLE);
- me->RemoveUnitFlag(UNIT_FLAG_NOT_SELECTABLE);
- }
-
- void InitializeAI() override
- {
- BossAI::InitializeAI();
- me->CastSpell(me, SPELL_FREEZE_ANIM, true);
+ if (!me->IsInEvadeMode())
+ {
+ me->CastSpell(me, SPELL_FREEZE_ANIM, true);
+ me->SetUnitFlag(UNIT_FLAG_NON_ATTACKABLE);
+ for (const auto & i : mojoPosition)
+ me->SummonCreature(NPC_LIVING_MOJO, i.GetPositionX(), i.GetPositionY(), i.GetPositionZ(), 0, TEMPSUMMON_MANUAL_DESPAWN, 0);
+ }
+ else
+ {
+ me->RemoveUnitFlag(UNIT_FLAG_NON_ATTACKABLE);
+ me->RemoveUnitFlag(UNIT_FLAG_NOT_SELECTABLE);
+ }
}
void JustReachedHome() override
@@ -142,10 +145,11 @@ public:
me->CastSpell(me, SPELL_FREEZE_ANIM, true);
}
- void JustEngagedWith(Unit* who) override
+ void ScheduleTasks() override
{
- BossAI::JustEngagedWith(who);
+ events.ScheduleEvent(EVENT_COLOSSUS_START_FIGHT, 1s);
events.ScheduleEvent(EVENT_COLOSSUS_MIGHTY_BLOW, 10s);
+ events.ScheduleEvent(EVENT_COLOSSUS_MORTAL_STRIKE, 7s);
events.ScheduleEvent(EVENT_COLOSSUS_HEALTH_1, 1s);
events.ScheduleEvent(EVENT_COLOSSUS_HEALTH_2, 1s);
}
@@ -156,8 +160,8 @@ public:
{
summon->SetRegeneratingHealth(false);
summon->SetReactState(REACT_PASSIVE);
- summon->m_Events.AddEvent(new RestoreFight(summon), summon->m_Events.CalculateTime(3000));
- if (events.GetNextEventTime(EVENT_COLOSSUS_HEALTH_2) == 0)
+ summon->m_Events.AddEventAtOffset(new RestoreFight(summon), 3s);
+ if (!events.HasTimeUntilEvent(EVENT_COLOSSUS_HEALTH_2))
{
summon->SetHealth(summon->GetMaxHealth() / 2);
summon->LowerPlayerDamageReq(summon->GetMaxHealth() / 2);
@@ -180,6 +184,7 @@ public:
summons.Despawn(summon);
if (summon->GetEntry() == NPC_DRAKKARI_ELEMENTAL)
{
+ me->SetHealth(me->GetMaxHealth() / 2);
me->RemoveUnitFlag(UNIT_FLAG_NOT_SELECTABLE);
me->RemoveAurasDueToSpell(SPELL_FREEZE_ANIM);
if (me->GetVictim())
@@ -212,6 +217,10 @@ public:
me->CastSpell(me->GetVictim(), SPELL_MIGHTY_BLOW, false);
events.ScheduleEvent(EVENT_COLOSSUS_MIGHTY_BLOW, 10s);
break;
+ case EVENT_COLOSSUS_MORTAL_STRIKE:
+ DoCastVictim(SPELL_MORTAL_STRIKE);
+ events.ScheduleEvent(EVENT_COLOSSUS_MORTAL_STRIKE, 7s);
+ break;
case EVENT_COLOSSUS_HEALTH_1:
if (me->HealthBelowPct(51))
{
@@ -224,7 +233,7 @@ public:
events.ScheduleEvent(EVENT_COLOSSUS_HEALTH_1, 1s);
break;
case EVENT_COLOSSUS_HEALTH_2:
- if (me->HealthBelowPct(21))
+ if (me->HealthBelowPct(2))
{
me->CastSpell(me, SPELL_EMERGE, false);
me->CastSpell(me, SPELL_EMERGE_SUMMON, true);
@@ -294,12 +303,12 @@ public:
switch (events.ExecuteEvent())
{
case EVENT_ELEMENTAL_HEALTH:
- if (me->HealthBelowPct(51))
+ if (me->HealthBelowPct(56))
{
me->CastSpell(me, SPELL_FACE_ME, true);
me->CastSpell(me, SPELL_SURGE_VISUAL, true);
me->CastSpell(me, SPELL_MERGE, false);
- me->DespawnOrUnsummon(2000);
+ me->DespawnOrUnsummon(2s);
events.Reset();
break;
}
@@ -308,7 +317,7 @@ public:
case EVENT_ELEMENTAL_SURGE:
Talk(SAY_SURGE);
me->CastSpell(me, SPELL_SURGE_VISUAL, true);
- me->CastSpell(me->GetVictim(), SPELL_SURGE, false);
+ DoCastRandomTarget(SPELL_SURGE, 0, 40, true, false, true);
events.ScheduleEvent(EVENT_ELEMENTAL_SURGE, 15s);
break;
case EVENT_ELEMENTAL_VOLLEY:
@@ -373,7 +382,7 @@ public:
{
me->SetReactState(REACT_PASSIVE);
me->GetMotionMaster()->MoveCharge(1672.96f, 743.488f, 143.338f, 7.0f, POINT_MERGE);
- me->DespawnOrUnsummon(1200);
+ me->DespawnOrUnsummon(1200ms);
}
}
diff --git a/src/server/scripts/Northrend/Gundrak/boss_eck.cpp b/src/server/scripts/Northrend/Gundrak/boss_eck.cpp
index 5a4dbcd2cb..12f84b71f1 100644
--- a/src/server/scripts/Northrend/Gundrak/boss_eck.cpp
+++ b/src/server/scripts/Northrend/Gundrak/boss_eck.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
@@ -17,6 +17,7 @@
#include "CreatureScript.h"
#include "ScriptedCreature.h"
+#include "SpellInfo.h"
#include "gundrak.h"
enum Spells
@@ -35,7 +36,8 @@ enum Misc
EVENT_ECK_BITE = 2,
EVENT_ECK_SPIT = 3,
EVENT_ECK_SPRING = 4,
- EVENT_ECK_HEALTH = 5
+ EVENT_ECK_CRAZED_EMOTE = 5,
+ EMOTE_CRAZED = 1
};
class boss_eck : public CreatureScript
@@ -57,7 +59,7 @@ public:
void InitializeAI() override
{
BossAI::InitializeAI();
- me->GetMotionMaster()->MovePoint(POINT_START, 1638.55f, 919.76f, 104.95f, false);
+ me->GetMotionMaster()->MovePoint(POINT_START, 1638.55f, 919.76f, 104.95f, FORCED_MOVEMENT_NONE, 0.f, 0.f, false);
me->SetHomePosition(1642.712f, 934.646f, 107.205f, 0.767f);
me->SetReactState(REACT_PASSIVE);
}
@@ -71,6 +73,15 @@ public:
}
}
+ void SpellHitTarget(Unit* target, SpellInfo const* spell) override
+ {
+ if (spell->Id == SPELL_ECK_SPRING)
+ {
+ me->GetThreatMgr().ResetAllThreat();
+ me->AddThreat(target, 1.0f);
+ }
+ }
+
void Reset() override
{
BossAI::Reset();
@@ -79,10 +90,11 @@ public:
void JustEngagedWith(Unit* who) override
{
BossAI::JustEngagedWith(who);
- events.ScheduleEvent(EVENT_ECK_BERSERK, 60s, 90s);
+ events.ScheduleEvent(EVENT_ECK_CRAZED_EMOTE, 76s, 78s);
+ events.ScheduleEvent(EVENT_ECK_BERSERK, 90s);
events.ScheduleEvent(EVENT_ECK_BITE, 5s);
- events.ScheduleEvent(EVENT_ECK_SPIT, 10s);
- events.ScheduleEvent(EVENT_ECK_SPRING, 8s);
+ events.ScheduleEvent(EVENT_ECK_SPIT, 10s, 37s);
+ events.ScheduleEvent(EVENT_ECK_SPRING, 10s, 24s);
}
void JustDied(Unit* killer) override
@@ -101,18 +113,11 @@ public:
switch (events.ExecuteEvent())
{
- case EVENT_ECK_HEALTH:
- if (me->HealthBelowPct(21))
- {
- events.CancelEvent(EVENT_ECK_BERSERK);
- me->CastSpell(me, SPELL_ECK_BERSERK, false);
- break;
- }
- events.ScheduleEvent(EVENT_ECK_HEALTH, 1s);
+ case EVENT_ECK_CRAZED_EMOTE:
+ Talk(EMOTE_CRAZED);
break;
case EVENT_ECK_BERSERK:
me->CastSpell(me, SPELL_ECK_BERSERK, false);
- events.CancelEvent(EVENT_ECK_HEALTH);
break;
case EVENT_ECK_BITE:
me->CastSpell(me->GetVictim(), SPELL_ECK_BITE, false);
@@ -120,17 +125,14 @@ public:
break;
case EVENT_ECK_SPIT:
me->CastSpell(me->GetVictim(), SPELL_ECK_SPIT, false);
- events.ScheduleEvent(EVENT_ECK_SPIT, 10s);
+ events.ScheduleEvent(EVENT_ECK_SPIT, 11s, 24s);
break;
case EVENT_ECK_SPRING:
if (Unit* target = SelectTarget(SelectTargetMethod::Random, 0, 30.0f, true, false))
{
- me->GetThreatMgr().ResetAllThreat();
- me->AddThreat(target, 500.0f);
me->CastSpell(target, SPELL_ECK_SPRING, false);
}
-
- events.ScheduleEvent(EVENT_ECK_SPRING, 5s, 10s);
+ events.ScheduleEvent(EVENT_ECK_SPRING, 10s, 24s);
break;
}
diff --git a/src/server/scripts/Northrend/Gundrak/boss_gal_darah.cpp b/src/server/scripts/Northrend/Gundrak/boss_gal_darah.cpp
index 2a56ce8873..362edec287 100644
--- a/src/server/scripts/Northrend/Gundrak/boss_gal_darah.cpp
+++ b/src/server/scripts/Northrend/Gundrak/boss_gal_darah.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
@@ -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<boss_gal_darahAI>(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)
- {
- }
-
- uint8 phaseCounter;
- GuidSet impaledList;
-
- void Reset() override
- {
- BossAI::Reset();
- impaledList.clear();
- phaseCounter = 0;
- }
+ BossAI::JustReachedHome();
+ DoCastSelf(SPELL_START_VISUAL);
+ }
- void InitializeAI() override
+ void SpellHit(Unit* /*caster*/, SpellInfo const* spellInfo) override
+ {
+ if (spellInfo->Id == SPELL_TRANSFORM_TO_RHINO)
{
- BossAI::InitializeAI();
- me->CastSpell(me, SPELL_START_VISUAL, false);
+ 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);
}
-
- void JustReachedHome() override
+ else if (spellInfo->Id == SPELL_TRANSFORM_TO_TROLL)
{
- BossAI::JustReachedHome();
- me->CastSpell(me, SPELL_START_VISUAL, false);
+ ScheduleEvents();
}
+ }
- void ScheduleEvents(bool troll)
- {
- events.Reset();
- if (troll)
- {
- events.RescheduleEvent(EVENT_STAMPEDE, 10s);
- events.RescheduleEvent(EVENT_WHIRLING_SLASH, 21s);
- }
- else
+ void ScheduleEvents()
+ {
+ ScheduleTimedEvent(10s, [&] {
+ Talk(SAY_SUMMON_RHINO);
+ if (Unit* target = SelectTarget(SelectTargetMethod::Random, 0, 100.0f))
{
- events.RescheduleEvent(EVENT_PUNCTURE, 10s);
- events.RescheduleEvent(EVENT_ENRAGE, 15s);
- events.RescheduleEvent(EVENT_IMPALING_CHARGE, 21s);
- events.RescheduleEvent(EVENT_STOMP, 5s);
+ _stampedeVictim = target->GetGUID();
+ DoCast(target, SPELL_STAMPEDE);
}
- }
+ }, 15s);
- void JustEngagedWith(Unit* who) override
- {
- Talk(SAY_AGGRO);
- BossAI::JustEngagedWith(who);
-
- ScheduleEvents(true);
- me->RemoveAurasDueToSpell(SPELL_START_VISUAL);
- me->InterruptNonMeleeSpells(true);
- }
+ ScheduleTimedEvent(10s, 16s, [&] {
+ DoCastVictim(SPELL_PUNCTURE);
+ }, 15s, 18s);
- 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;
- }
+ ScheduleTimedEvent(11s, 19s, [&] {
+ DoCastAOE(SPELL_WHIRLING_SLASH);
+ }, 17s, 19s);
- summon->DespawnOrUnsummon(despawnTime);
- }
+ me->m_Events.AddEventAtOffset([&] {
+ scheduler.CancelAll();
+ DoCastSelf(SPELL_TRANSFORM_TO_RHINO);
+ }, 32s);
+ }
- uint32 GetData(uint32 /*type*/) const override
- {
- return impaledList.size();
- }
+ void JustEngagedWith(Unit* who) override
+ {
+ Talk(SAY_AGGRO);
+ BossAI::JustEngagedWith(who);
- void JustDied(Unit* killer) override
- {
- Talk(SAY_DEATH);
- BossAI::JustDied(killer);
- }
+ ScheduleEvents();
+ me->RemoveAurasDueToSpell(SPELL_START_VISUAL);
+ me->InterruptNonMeleeSpells(true);
+ }
- void KilledUnit(Unit*) override
- {
- if (events.GetNextEventTime(EVENT_KILL_TALK) == 0)
- {
- Talk(SAY_SLAY);
- events.ScheduleEvent(EVENT_KILL_TALK, 6s);
- }
- }
+ void JustSummoned(Creature* summon) override
+ {
+ if (Unit* target = ObjectAccessor::GetUnit(*me, _stampedeVictim))
+ summon->CastSpell(target, SPELL_STAMPEDE_DMG, true);
- void UpdateAI(uint32 diff) override
- {
- if (!UpdateVictim())
- return;
+ summons.Summon(summon);
+ }
- events.Update(diff);
- if (me->HasUnitState(UNIT_STATE_CASTING | UNIT_STATE_CHARGING))
- return;
+ uint32 GetData(uint32 /*type*/) const override
+ {
+ return impaledList.size();
+ }
- 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;
- }
+ void JustDied(Unit* killer) override
+ {
+ Talk(SAY_DEATH);
+ BossAI::JustDied(killer);
+ }
- DoMeleeAttackIfReady();
+ void KilledUnit(Unit*) override
+ {
+ if (!events.HasTimeUntilEvent(EVENT_KILL_TALK))
+ {
+ Talk(SAY_SLAY);
+ events.ScheduleEvent(EVENT_KILL_TALK, 6s);
}
- };
+ }
+
+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/boss_moorabi.cpp b/src/server/scripts/Northrend/Gundrak/boss_moorabi.cpp
index a85172a2d6..2d405fe5d5 100644
--- a/src/server/scripts/Northrend/Gundrak/boss_moorabi.cpp
+++ b/src/server/scripts/Northrend/Gundrak/boss_moorabi.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
@@ -83,6 +83,7 @@ public:
BossAI::Reset();
events2.Reset();
events2.ScheduleEvent(EVENT_PHANTOM, 21s);
+ me->SetCanDualWield(true);
}
void JustEngagedWith(Unit* who) override
@@ -91,12 +92,18 @@ public:
BossAI::JustEngagedWith(who);
me->CastSpell(me, SPELL_MOJO_FRENZY, true);
- events.ScheduleEvent(EVENT_GROUND_TREMOR, 18s);
- events.ScheduleEvent(EVENT_NUMBLING_SHOUT, 10s);
+ events.ScheduleEvent(EVENT_GROUND_TREMOR, 13s, 30s);
+ events.ScheduleEvent(EVENT_NUMBLING_SHOUT, 8s, 38s);
events.ScheduleEvent(EVENT_DETERMINED_STAB, 20s);
events.ScheduleEvent(EVENT_TRANSFORMATION, 12s);
}
+ void EnterEvadeMode(EvadeReason why) override
+ {
+ summons.DespawnAll();
+ BossAI::EnterEvadeMode(why);
+ }
+
void SpellHitTarget(Unit* /*caster*/, SpellInfo const* spellInfo) override
{
if (spellInfo->Id == SPELL_TRANSFORMATION)
@@ -104,6 +111,7 @@ public:
me->RemoveAurasDueToSpell(SPELL_MOJO_FRENZY);
events.CancelEvent(EVENT_TRANSFORMATION);
Talk(EMOTE_TRANSFORMED);
+ me->SetCanDualWield(false);
}
}
@@ -111,12 +119,13 @@ public:
{
Talk(SAY_DEATH);
Talk(EMOTE_ALTAR);
+
BossAI::JustDied(killer);
}
void KilledUnit(Unit*) override
{
- if (events.GetNextEventTime(EVENT_KILL_TALK) == 0)
+ if (!events.HasTimeUntilEvent(EVENT_KILL_TALK))
{
Talk(SAY_SLAY);
events.ScheduleEvent(EVENT_KILL_TALK, 6s);
@@ -142,29 +151,52 @@ public:
if (me->HasUnitState(UNIT_STATE_CASTING))
return;
- switch (events.ExecuteEvent())
+ while (uint32 eventId = events.ExecuteEvent())
{
- case EVENT_GROUND_TREMOR:
- if (roll_chance_i(50))
- Talk(SAY_QUAKE);
- me->CastSpell(me, me->GetDisplayId() != me->GetNativeDisplayId() ? SPELL_QUAKE : SPELL_GROUND_TREMOR, false);
- events.ScheduleEvent(EVENT_GROUND_TREMOR, 10s);
- break;
- case EVENT_NUMBLING_SHOUT:
- me->CastSpell(me, me->GetDisplayId() != me->GetNativeDisplayId() ? SPELL_NUMBING_ROAR : SPELL_NUMBING_SHOUT, false);
- events.ScheduleEvent(EVENT_NUMBLING_SHOUT, 10s);
- break;
- case EVENT_DETERMINED_STAB:
- me->CastSpell(me->GetVictim(), me->GetDisplayId() != me->GetNativeDisplayId() ? SPELL_DETERMINED_GORE : SPELL_DETERMINED_STAB, false);
- events.ScheduleEvent(EVENT_DETERMINED_STAB, 8s);
- break;
- case EVENT_TRANSFORMATION:
- Talk(EMOTE_TRANSFORM);
- Talk(SAY_TRANSFORM);
- me->CastSpell(me, SPELL_TRANSFORMATION, false);
- me->CastSpell(me, SPELL_SUMMON_PHANTOM_TRANSFORM, true);
- events.ScheduleEvent(EVENT_TRANSFORMATION, 10s);
- break;
+ switch (eventId)
+ {
+ case EVENT_GROUND_TREMOR:
+ if (roll_chance_i(50))
+ Talk(SAY_QUAKE);
+
+ if (me->GetDisplayId() != me->GetNativeDisplayId())
+ {
+ me->CastSpell(me, SPELL_QUAKE, false);
+ events.ScheduleEvent(EVENT_GROUND_TREMOR, 16s, 63s);
+ }
+ else
+ {
+ me->CastSpell(me, SPELL_GROUND_TREMOR, false);
+ events.ScheduleEvent(EVENT_GROUND_TREMOR, 13s, 27s);
+ }
+ return;
+
+ case EVENT_NUMBLING_SHOUT:
+ if (me->GetDisplayId() != me->GetNativeDisplayId())
+ {
+ me->CastSpell(me, SPELL_NUMBING_ROAR, false);
+ events.ScheduleEvent(EVENT_NUMBLING_SHOUT, 8s, 54s);
+ }
+ else
+ {
+ me->CastSpell(me, SPELL_NUMBING_SHOUT, false);
+ events.ScheduleEvent(EVENT_NUMBLING_SHOUT, 6s, 27s);
+ }
+ return;
+
+ case EVENT_DETERMINED_STAB:
+ me->CastSpell(me->GetVictim(), me->GetDisplayId() != me->GetNativeDisplayId() ? SPELL_DETERMINED_GORE : SPELL_DETERMINED_STAB, false);
+ events.ScheduleEvent(EVENT_DETERMINED_STAB, 8s);
+ return;
+
+ case EVENT_TRANSFORMATION:
+ Talk(EMOTE_TRANSFORM);
+ Talk(SAY_TRANSFORM);
+ me->CastSpell(me, SPELL_TRANSFORMATION, false);
+ me->CastSpell(me, SPELL_SUMMON_PHANTOM_TRANSFORM, true);
+ events.ScheduleEvent(EVENT_TRANSFORMATION, 10s);
+ return;
+ }
}
DoMeleeAttackIfReady();
diff --git a/src/server/scripts/Northrend/Gundrak/boss_slad_ran.cpp b/src/server/scripts/Northrend/Gundrak/boss_slad_ran.cpp
index 68a22e9640..2d8b6ad56c 100644
--- a/src/server/scripts/Northrend/Gundrak/boss_slad_ran.cpp
+++ b/src/server/scripts/Northrend/Gundrak/boss_slad_ran.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
@@ -51,14 +51,7 @@ enum Misc
MAX_CONSTRICTOR = 3,
MAX_SUMMONS = 5,
- EVENT_POISON_NOVA = 1,
- EVENT_POWERFULL_BITE = 2,
- EVENT_VENOM_BOLT = 3,
- EVENT_CHECK_HEALTH1 = 4,
- EVENT_CHECK_HEALTH2 = 5,
- EVENT_SUMMON1 = 6,
- EVENT_SUMMON2 = 7,
- EVENT_KILL_TALK = 8
+ EVENT_KILL_TALK = 1
};
const Position SpawnLoc[] =
@@ -121,17 +114,17 @@ public:
Talk(SAY_AGGRO);
BossAI::JustEngagedWith(who);
- ScheduleTimedEvent(10s, [&]{
+ ScheduleTimedEvent(16s, 53s, [&]{
Talk(EMOTE_NOVA);
DoCastAOE(SPELL_POISON_NOVA);
- }, 15s);
+ }, 16s, 53s);
ScheduleTimedEvent(3s, [&] {
DoCastVictim(SPELL_POWERFULL_BITE);
}, 10s);
ScheduleTimedEvent(15s, [&] {
- DoCastVictim(SPELL_VENOM_BOLT);
+ DoCastRandomTarget(SPELL_VENOM_BOLT, 0, 45.0f, false);
}, 10s);
}
@@ -144,7 +137,7 @@ public:
void KilledUnit(Unit*) override
{
- if (events.GetNextEventTime(EVENT_KILL_TALK) == 0)
+ if (!events.HasTimeUntilEvent(EVENT_KILL_TALK))
{
Talk(SAY_SLAY);
events.ScheduleEvent(EVENT_KILL_TALK, 6s);
diff --git a/src/server/scripts/Northrend/Gundrak/gundrak.h b/src/server/scripts/Northrend/Gundrak/gundrak.h
index 8d38819eab..6c7f02756b 100644
--- a/src/server/scripts/Northrend/Gundrak/gundrak.h
+++ b/src/server/scripts/Northrend/Gundrak/gundrak.h
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
@@ -30,16 +30,21 @@ enum Data
DATA_MOORABI = 1,
DATA_DRAKKARI_COLOSSUS = 2,
DATA_GAL_DARAH = 3,
- DATA_ECK_THE_FEROCIOUS_INIT = 4,
- DATA_ECK_THE_FEROCIOUS = 5,
- MAX_ENCOUNTERS = 6
+ DATA_ECK_THE_FEROCIOUS = 4,
+ MAX_ENCOUNTERS = 5
};
enum Creatures
{
+ NPC_RUINS_DWELLER = 29920,
NPC_ECK_THE_FEROCIOUS = 29932
};
+enum GDTexts
+{
+ EMOTE_SUMMON_ECK = 0
+};
+
enum GameObjects
{
GO_ALTAR_OF_SLAD_RAN = 192518,
@@ -66,4 +71,6 @@ inline AI* GetGundrakAI(T* obj)
return GetInstanceAI<AI>(obj, GundrakScriptName);
}
+#define RegisterGundrakCreatureAI(ai_name) RegisterCreatureAIWithFactory(ai_name, GetGundrakAI)
+
#endif
diff --git a/src/server/scripts/Northrend/Gundrak/instance_gundrak.cpp b/src/server/scripts/Northrend/Gundrak/instance_gundrak.cpp
index 5e32259383..5dd4855d56 100644
--- a/src/server/scripts/Northrend/Gundrak/instance_gundrak.cpp
+++ b/src/server/scripts/Northrend/Gundrak/instance_gundrak.cpp
@@ -1,20 +1,21 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
* with this program. If not, see <http://www.gnu.org/licenses/>.
*/
+#include "CreatureGroups.h"
#include "InstanceMapScript.h"
#include "ScriptedCreature.h"
#include "gundrak.h"
@@ -105,6 +106,9 @@ public:
break;
case GO_ECK_DOORS:
case GO_ECK_UNDERWATER_GATE:
+ if (instance->IsHeroic())
+ AddDoor(gameobject);
+ break;
case GO_GAL_DARAH_DOORS0:
case GO_GAL_DARAH_DOORS1:
case GO_GAL_DARAH_DOORS2:
@@ -119,6 +123,9 @@ public:
{
case GO_ECK_DOORS:
case GO_ECK_UNDERWATER_GATE:
+ if (instance->IsHeroic())
+ RemoveDoor(gameobject);
+ break;
case GO_GAL_DARAH_DOORS0:
case GO_GAL_DARAH_DOORS1:
case GO_GAL_DARAH_DOORS2:
@@ -131,13 +138,6 @@ public:
{
switch (type)
{
- case NPC_ECK_THE_FEROCIOUS:
- if (GetBossState(DATA_ECK_THE_FEROCIOUS_INIT) != DONE)
- {
- SetBossState(DATA_ECK_THE_FEROCIOUS_INIT, NOT_STARTED);
- SetBossState(DATA_ECK_THE_FEROCIOUS_INIT, DONE);
- }
- break;
case GO_ALTAR_OF_SLAD_RAN:
if (GameObject* statue = instance->GetGameObject(_bridgeGUIDs[0]))
statue->SetGoState(GO_STATE_READY);
@@ -188,19 +188,36 @@ public:
if (GameObject* altar = instance->GetGameObject(_drakkariAltarGUID))
altar->RemoveGameObjectFlag(GO_FLAG_NOT_SELECTABLE);
break;
- case DATA_ECK_THE_FEROCIOUS_INIT:
- {
- Position pos = {1624.70f, 891.43f, 95.08f, 1.2f};
- if (instance->IsHeroic())
- instance->SummonCreature(NPC_ECK_THE_FEROCIOUS, pos);
- break;
- }
}
return true;
}
+ void OnUnitDeath(Unit* unit) override
+ {
+ if (!instance->IsHeroic() || !unit->EntryEquals(NPC_RUINS_DWELLER) || IsBossDone(DATA_ECK_THE_FEROCIOUS))
+ return;
+
+ if (Creature* dweller = unit->ToCreature())
+ if (CreatureGroup* formation = dweller->GetFormation())
+ {
+ scheduler.CancelAll();
+ scheduler.Schedule(1s, [this, dweller, formation](TaskContext /*context*/)
+ {
+ if (!formation->IsAnyMemberAlive())
+ {
+ if (dweller)
+ dweller->AI()->Talk(EMOTE_SUMMON_ECK);
+
+ instance->SummonCreature(NPC_ECK_THE_FEROCIOUS, { 1624.70f, 891.43f, 95.08f, 1.2f });
+ }
+ });
+ }
+ }
+
void Update(uint32 diff) override
{
+ scheduler.Update(diff);
+
if (!_activateTimer)
return;
diff --git a/src/server/scripts/Northrend/IcecrownCitadel/boss_blood_prince_council.cpp b/src/server/scripts/Northrend/IcecrownCitadel/boss_blood_prince_council.cpp
index 7f18b8474c..df67759176 100644
--- a/src/server/scripts/Northrend/IcecrownCitadel/boss_blood_prince_council.cpp
+++ b/src/server/scripts/Northrend/IcecrownCitadel/boss_blood_prince_council.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
@@ -375,7 +375,7 @@ public:
me->RemoveUnitFlag2(UNIT_FLAG2_FEIGN_DEATH);
me->SetReactState(REACT_AGGRESSIVE);
me->ForceValuesUpdateAtIndex(UNIT_NPC_FLAGS); // was in sniff. don't ask why
- me->m_Events.AddEvent(new StandUpEvent(*me), me->m_Events.CalculateTime(1000));
+ me->m_Events.AddEventAtOffset(new StandUpEvent(*me), 1s);
DoAction(ACTION_REMOVE_INVOCATION);
me->SetHealth(1);
break;
@@ -645,7 +645,7 @@ public:
me->RemoveUnitFlag2(UNIT_FLAG2_FEIGN_DEATH);
me->SetReactState(REACT_AGGRESSIVE);
me->ForceValuesUpdateAtIndex(UNIT_NPC_FLAGS); // was in sniff. don't ask why
- me->m_Events.AddEvent(new StandUpEvent(*me), me->m_Events.CalculateTime(1000));
+ me->m_Events.AddEventAtOffset(new StandUpEvent(*me), 1s);
DoAction(ACTION_REMOVE_INVOCATION);
me->SetHealth(1);
break;
@@ -889,7 +889,7 @@ public:
summon->CastSpell(summon, SPELL_KINETIC_BOMB, true, nullptr, nullptr, me->GetGUID());
break;
case NPC_SHOCK_VORTEX:
- summon->m_Events.AddEvent(new ShockVortexExplodeEvent(*summon), summon->m_Events.CalculateTime(4500));
+ summon->m_Events.AddEventAtOffset(new ShockVortexExplodeEvent(*summon), 4500ms);
break;
default:
break;
@@ -939,7 +939,7 @@ public:
me->RemoveUnitFlag2(UNIT_FLAG2_FEIGN_DEATH);
me->SetReactState(REACT_AGGRESSIVE);
me->ForceValuesUpdateAtIndex(UNIT_NPC_FLAGS); // was in sniff. don't ask why
- me->m_Events.AddEvent(new StandUpEvent(*me), me->m_Events.CalculateTime(1000));
+ me->m_Events.AddEventAtOffset(new StandUpEvent(*me), 1s);
me->SetHealth(me->GetMaxHealth());
DoAction(ACTION_CAST_INVOCATION);
break;
@@ -1213,7 +1213,7 @@ public:
void JustDied(Unit* /*killer*/) override
{
- me->DespawnOrUnsummon(1);
+ me->DespawnOrUnsummon(1ms);
}
void UpdateAI(uint32 diff) override
@@ -1287,13 +1287,13 @@ public:
me->SetControlled(true, UNIT_STATE_ROOT);
me->StopMoving();
me->CastSpell(me, SPELL_FLAMES, true);
- me->DespawnOrUnsummon(999);
+ me->DespawnOrUnsummon(999ms);
me->CastSpell(me, SPELL_FLAME_SPHERE_DEATH_EFFECT, true);
_exploded = true;
}
}
- void SetGUID(ObjectGuid guid, int32 /*type*/) override
+ void SetGUID(ObjectGuid const& guid, int32 /*type*/) override
{
_chaseGUID = guid;
}
@@ -1331,7 +1331,7 @@ public:
me->SetInCombatWithZone();
return;
}
- me->DespawnOrUnsummon(1);
+ me->DespawnOrUnsummon(1ms);
}
void DamageDealt(Unit* target, uint32& damage, DamageEffectType /*damageType*/, SpellSchoolMask /*damageSchoolMask*/) override
@@ -1424,7 +1424,7 @@ public:
case EVENT_BOMB_DESPAWN:
me->RemoveAllAuras();
me->SetUnitFlag(UNIT_FLAG_NOT_SELECTABLE);
- me->DespawnOrUnsummon(exploded ? 5000 : 0);
+ me->DespawnOrUnsummon(exploded ? 5s : 0ms);
break;
case EVENT_CONTINUE_FALLING:
me->GetMotionMaster()->MovementExpired(false);
diff --git a/src/server/scripts/Northrend/IcecrownCitadel/boss_blood_queen_lana_thel.cpp b/src/server/scripts/Northrend/IcecrownCitadel/boss_blood_queen_lana_thel.cpp
index 5deccbc0b1..e5d0f9befa 100644
--- a/src/server/scripts/Northrend/IcecrownCitadel/boss_blood_queen_lana_thel.cpp
+++ b/src/server/scripts/Northrend/IcecrownCitadel/boss_blood_queen_lana_thel.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
@@ -533,7 +533,7 @@ public:
return _bloodboltedPlayers.count(guid) != 0;
}
- void SetGUID(ObjectGuid guid, int32 type = 0) override
+ void SetGUID(ObjectGuid const& guid, int32 type = 0) override
{
switch (type)
{
diff --git a/src/server/scripts/Northrend/IcecrownCitadel/boss_deathbringer_saurfang.cpp b/src/server/scripts/Northrend/IcecrownCitadel/boss_deathbringer_saurfang.cpp
index f0172727b4..7d5f60c2e9 100644
--- a/src/server/scripts/Northrend/IcecrownCitadel/boss_deathbringer_saurfang.cpp
+++ b/src/server/scripts/Northrend/IcecrownCitadel/boss_deathbringer_saurfang.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
@@ -118,9 +118,6 @@ enum Spells
SPELL_ACHIEVEMENT = 72928,
};
-// Helper to get id of the aura on different modes (HasAura(baseId) wont work)
-#define BOILING_BLOOD_HELPER RAID_MODE<int32>(72385, 72441, 72442, 72443)
-
enum EventTypes
{
EVENT_INTRO_ALLIANCE_1 = 1,
@@ -583,14 +580,14 @@ public:
{
me->RemoveAurasDueToSpell(SPELL_GRIP_OF_AGONY);
me->SetDisableGravity(false);
- me->MonsterMoveWithSpeed(me->GetPositionX(), me->GetPositionY(), 539.2917f, 10.0f);
+ me->GetMotionMaster()->MovePoint(0, me->GetPositionX(), me->GetPositionY(), 539.2917f, FORCED_MOVEMENT_NONE, 10.0f);
for (std::list<Creature*>::iterator itr = _guardList.begin(); itr != _guardList.end(); ++itr)
(*itr)->AI()->DoAction(ACTION_DESPAWN);
/*Talk(SAY_OUTRO_HORDE_1);
- _events.ScheduleEvent(EVENT_OUTRO_HORDE_1, 10000);
- _events.ScheduleEvent(EVENT_OUTRO_HORDE_2, 18000);
- _events.ScheduleEvent(EVENT_OUTRO_HORDE_3, 24000);*/
+ _events.ScheduleEvent(EVENT_OUTRO_HORDE_1, 10s);
+ _events.ScheduleEvent(EVENT_OUTRO_HORDE_2, 18s);
+ _events.ScheduleEvent(EVENT_OUTRO_HORDE_3, 24s);*/
}
break;
case ACTION_EVADE:
@@ -651,8 +648,8 @@ public:
deathbringer->SetUnitFlag(UNIT_FLAG_NOT_SELECTABLE);
deathbringer->setDeathState(DeathState::Alive);
}
- _events.ScheduleEvent(EVENT_OUTRO_HORDE_4, 1000);
- _events.ScheduleEvent(EVENT_OUTRO_HORDE_5, 4000);
+ _events.ScheduleEvent(EVENT_OUTRO_HORDE_4, 1s);
+ _events.ScheduleEvent(EVENT_OUTRO_HORDE_5, 4s);
break;
case POINT_FINAL:
if (Creature* deathbringer = ObjectAccessor::GetCreature(*me, _instance->GetGuidData(DATA_DEATHBRINGER_SAURFANG)))
@@ -845,7 +842,7 @@ public:
{
me->RemoveAurasDueToSpell(SPELL_GRIP_OF_AGONY);
me->SetDisableGravity(false);
- me->MonsterMoveWithSpeed(me->GetPositionX(), me->GetPositionY(), 539.2917f, 10.0f);
+ me->GetMotionMaster()->MovePoint(0, me->GetPositionX(), me->GetPositionY(), 539.2917f, FORCED_MOVEMENT_NONE, 10.0f);
for (std::list<Creature*>::iterator itr = _guardList.begin(); itr != _guardList.end(); ++itr)
(*itr)->AI()->DoAction(ACTION_DESPAWN);
@@ -1030,7 +1027,7 @@ public:
me->GetMotionMaster()->MoveCharge(chargePos[_index].GetPositionX(), chargePos[_index].GetPositionY(), chargePos[_index].GetPositionZ(), 13.0f, POINT_CHARGE);
}
else if (action == ACTION_DESPAWN)
- me->DespawnOrUnsummon(1);
+ me->DespawnOrUnsummon(1ms);
}
private:
diff --git a/src/server/scripts/Northrend/IcecrownCitadel/boss_festergut.cpp b/src/server/scripts/Northrend/IcecrownCitadel/boss_festergut.cpp
index 923b9a341f..3e89974493 100644
--- a/src/server/scripts/Northrend/IcecrownCitadel/boss_festergut.cpp
+++ b/src/server/scripts/Northrend/IcecrownCitadel/boss_festergut.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
@@ -19,7 +19,10 @@
#include "CreatureScript.h"
#include "ObjectMgr.h"
#include "ScriptedCreature.h"
+#include "SharedDefines.h"
#include "SpellAuras.h"
+#include "SpellInfo.h"
+#include "SpellScript.h"
#include "SpellScriptLoader.h"
#include "icecrown_citadel.h"
#include "SpellAuraEffects.h"
@@ -57,10 +60,6 @@ enum Spells
SPELL_PLAGUE_STENCH = 71805,
};
-// Used for HasAura checks
-#define PUNGENT_BLIGHT_HELPER RAID_MODE<uint32>(69195, 71219, 73031, 73032)
-#define INOCULATED_HELPER RAID_MODE<uint32>(69291, 72101, 72102, 72103)
-
uint32 const gaseousBlight[3] = {69157, 69162, 69164};
uint32 const gaseousBlightVisual[3] = {69126, 69152, 69154};
@@ -168,19 +167,6 @@ public:
Talk(SAY_KILL);
}
- void SpellHitTarget(Unit* target, SpellInfo const* spell) override
- {
- if (spell->Id == PUNGENT_BLIGHT_HELPER)
- target->RemoveAurasDueToSpell(INOCULATED_HELPER);
- else if (Player* p = target->ToPlayer())
- {
- // Gaseous Blight damage
- if (((spell->Id == 69159 || spell->Id == 70136 || spell->Id == 69161 || spell->Id == 70139 || spell->Id == 69163 || spell->Id == 70469) && p->GetQuestStatus(QUEST_RESIDUE_RENDEZVOUS_10) == QUEST_STATUS_INCOMPLETE) ||
- ((spell->Id == 70135 || spell->Id == 70138 || spell->Id == 70468 || spell->Id == 70137 || spell->Id == 70140 || spell->Id == 70470) && p->GetQuestStatus(QUEST_RESIDUE_RENDEZVOUS_25) == QUEST_STATUS_INCOMPLETE))
- p->CastSpell(p, SPELL_ORANGE_BLIGHT_RESIDUE, true);
- }
- }
-
void RemoveBlight()
{
if (Creature* gasDummy = ObjectAccessor::GetCreature(*me, _gasDummyGUID))
@@ -233,7 +219,7 @@ public:
Talk(EMOTE_GAS_SPORE);
me->CastCustomSpell(SPELL_GAS_SPORE, SPELLVALUE_MAX_TARGETS, RAID_MODE<int32>(2, 3, 2, 3), me);
events.ScheduleEvent(EVENT_GAS_SPORE, 40s, 45s);
- events.DelayEventsToMax(20000, 1); // delay EVENT_VILE_GAS
+ events.DelayEventsToMax(20s, 1); // delay EVENT_VILE_GAS
break;
case EVENT_VILE_GAS:
{
@@ -313,8 +299,15 @@ class spell_festergut_pungent_blight : public SpellScript
professor->AI()->DoAction(ACTION_FESTERGUT_GAS);
}
+ void HandleHit(SpellEffIndex /*effIndex*/)
+ {
+ if (Unit* target = GetHitUnit())
+ target->RemoveAurasDueToSpell(sSpellMgr->GetSpellIdForDifficulty(SPELL_INOCULATED, GetCaster()));
+ }
+
void Register() override
{
+ OnEffectHitTarget += SpellEffectFn(spell_festergut_pungent_blight::HandleHit, EFFECT_0, SPELL_EFFECT_SCHOOL_DAMAGE);
OnEffectHitTarget += SpellEffectFn(spell_festergut_pungent_blight::HandleScript, EFFECT_1, SPELL_EFFECT_SCRIPT_EFFECT);
}
};
@@ -378,6 +371,34 @@ class spell_festergut_gastric_bloat : public SpellScript
}
};
+class spell_festergut_gaseous_blight : public SpellScript
+{
+ PrepareSpellScript(spell_festergut_gaseous_blight);
+
+ bool Validate(SpellInfo const* /*spell*/) override
+ {
+ return ValidateSpellInfo({ SPELL_ORANGE_BLIGHT_RESIDUE });
+ }
+
+ void HandleScript(SpellEffIndex /*effIndex*/)
+ {
+ if (Player* p = GetHitUnit()->ToPlayer())
+ {
+ if (Map* map = GetCaster()->GetMap())
+ {
+ uint32 questId = map->Is25ManRaid() ? QUEST_RESIDUE_RENDEZVOUS_25 : QUEST_RESIDUE_RENDEZVOUS_10;
+ if (p->GetQuestStatus(questId) == QUEST_STATUS_INCOMPLETE)
+ p->CastSpell(p, SPELL_ORANGE_BLIGHT_RESIDUE, true);
+ }
+ }
+ }
+
+ void Register() override
+ {
+ OnEffectHitTarget += SpellEffectFn(spell_festergut_gaseous_blight::HandleScript, EFFECT_0, SPELL_EFFECT_SCHOOL_DAMAGE);
+ }
+};
+
class achievement_flu_shot_shortage : public AchievementCriteriaScript
{
public:
@@ -468,6 +489,7 @@ void AddSC_boss_festergut()
RegisterSpellScript(spell_festergut_pungent_blight);
RegisterSpellScript(spell_festergut_blighted_spores_aura);
RegisterSpellScript(spell_festergut_gastric_bloat);
+ RegisterSpellScript(spell_festergut_gaseous_blight);
new achievement_flu_shot_shortage();
new npc_stinky_icc();
diff --git a/src/server/scripts/Northrend/IcecrownCitadel/boss_icecrown_gunship_battle.cpp b/src/server/scripts/Northrend/IcecrownCitadel/boss_icecrown_gunship_battle.cpp
index 51969299bc..0e9ff125d7 100644
--- a/src/server/scripts/Northrend/IcecrownCitadel/boss_icecrown_gunship_battle.cpp
+++ b/src/server/scripts/Northrend/IcecrownCitadel/boss_icecrown_gunship_battle.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
@@ -373,7 +373,7 @@ class BattleExperienceEvent : public BasicEvent
{
public:
static uint32 const ExperiencedSpells[5];
- static uint32 const ExperiencedTimes[5];
+ static Milliseconds const ExperiencedTimes[5];
BattleExperienceEvent(Creature* creature) : _creature(creature), _level(0) { }
@@ -388,7 +388,8 @@ public:
_creature->CastSpell(_creature, ExperiencedSpells[_level], true);
if (_level < (_creature->GetMap()->IsHeroic() ? 4 : 3))
{
- _creature->m_Events.AddEvent(this, timer + ExperiencedTimes[_level]);
+ Milliseconds nextExperienceEventTime = Milliseconds(timer) + ExperiencedTimes[_level];
+ _creature->m_Events.AddEventAtOffset(this, nextExperienceEventTime);
return false;
}
@@ -401,7 +402,7 @@ private:
};
uint32 const BattleExperienceEvent::ExperiencedSpells[5] = { 0, SPELL_EXPERIENCED, SPELL_VETERAN, SPELL_ELITE, SPELL_ADDS_BERSERK };
-uint32 const BattleExperienceEvent::ExperiencedTimes[5] = { 100000, 70000, 60000, 90000, 0 };
+Milliseconds const BattleExperienceEvent::ExperiencedTimes[5] = { 100s, 70s, 60s, 90s, 0ms };
class PassengerController
{
@@ -503,7 +504,7 @@ public:
float x, y, z, o;
_dest.GetPosition(x, y, z, o);
_owner->GetTransport()->CalculatePassengerPosition(x, y, z, &o);
- _owner->GetMotionMaster()->MovePoint(EVENT_CHARGE_PREPATH, x, y, z, false);
+ _owner->GetMotionMaster()->MovePoint(EVENT_CHARGE_PREPATH, x, y, z, FORCED_MOVEMENT_NONE, 0.f, false);
return true;
}
@@ -668,14 +669,14 @@ public:
continue;
Creature* c = (*itr)->ToCreature();
if (c->GetEntry() == NPC_SKYBREAKER_MARINE || c->GetEntry() == NPC_SKYBREAKER_SERGEANT || c->GetEntry() == NPC_KOR_KRON_REAVER || c->GetEntry() == NPC_KOR_KRON_SERGEANT)
- c->DespawnOrUnsummon(1);
+ c->DespawnOrUnsummon(1ms);
}
}
}
else
{
uint32 teleportSpellId = _teamIdInInstance == TEAM_HORDE ? SPELL_TELEPORT_PLAYERS_ON_RESET_H : SPELL_TELEPORT_PLAYERS_ON_RESET_A;
- me->m_Events.AddEvent(new ResetEncounterEvent(me, teleportSpellId, _instance->GetGuidData(DATA_ENEMY_GUNSHIP)), me->m_Events.CalculateTime(8000));
+ me->m_Events.AddEventAtOffset(new ResetEncounterEvent(me, teleportSpellId, _instance->GetGuidData(DATA_ENEMY_GUNSHIP)), 8s);
}
}
@@ -703,7 +704,7 @@ public:
}
}
- void SetGUID(ObjectGuid guid, int32 id/* = 0*/) override
+ void SetGUID(ObjectGuid const& guid, int32 id/* = 0*/) override
{
if (id != ACTION_SHIP_VISITS_ENEMY && id != ACTION_SHIP_VISITS_SELF)
return;
@@ -847,7 +848,7 @@ public:
{
time_t now = GameTime::GetGameTime().count();
if (_firstMageCooldown > now)
- _events.ScheduleEvent(EVENT_SUMMON_MAGE, (_firstMageCooldown - now) * IN_MILLISECONDS);
+ _events.ScheduleEvent(EVENT_SUMMON_MAGE, Seconds(_firstMageCooldown - now));
else
_events.ScheduleEvent(EVENT_SUMMON_MAGE, 1ms);
}
@@ -880,7 +881,7 @@ public:
init.DisableTransportPathTransformations();
init.MovebyPath(path, 0);
init.Launch();
- me->DespawnOrUnsummon(18000);
+ me->DespawnOrUnsummon(18s);
}
}
@@ -915,7 +916,7 @@ public:
{
float x, y, z, o;
me->GetHomePosition(x, y, z, o);
- me->GetMotionMaster()->MovePoint(0, x, y, z, false);
+ me->GetMotionMaster()->MovePoint(0, x, y, z, FORCED_MOVEMENT_NONE, 0.f, false);
}
}
else
@@ -1072,7 +1073,7 @@ public:
{
float x, y, z, o;
me->GetHomePosition(x, y, z, o);
- me->GetMotionMaster()->MovePoint(0, x, y, z, false);
+ me->GetMotionMaster()->MovePoint(0, x, y, z, FORCED_MOVEMENT_NONE, 0.f, false);
}
}
}
@@ -1183,7 +1184,7 @@ public:
{
time_t now = GameTime::GetGameTime().count();
if (_firstMageCooldown > now)
- _events.ScheduleEvent(EVENT_SUMMON_MAGE, (_firstMageCooldown - now) * IN_MILLISECONDS);
+ _events.ScheduleEvent(EVENT_SUMMON_MAGE, Seconds(_firstMageCooldown - now));
else
_events.ScheduleEvent(EVENT_SUMMON_MAGE, 1ms);
}
@@ -1216,7 +1217,7 @@ public:
init.DisableTransportPathTransformations();
init.MovebyPath(path, 0);
init.Launch();
- me->DespawnOrUnsummon(18000);
+ me->DespawnOrUnsummon(18s);
}
}
@@ -1251,7 +1252,7 @@ public:
{
float x, y, z, o;
me->GetHomePosition(x, y, z, o);
- me->GetMotionMaster()->MovePoint(0, x, y, z, false);
+ me->GetMotionMaster()->MovePoint(0, x, y, z, FORCED_MOVEMENT_NONE, 0.f, false);
}
}
else
@@ -1411,7 +1412,7 @@ public:
{
float x, y, z, o;
me->GetHomePosition(x, y, z, o);
- me->GetMotionMaster()->MovePoint(0, x, y, z, false);
+ me->GetMotionMaster()->MovePoint(0, x, y, z, FORCED_MOVEMENT_NONE, 0.f, false);
}
}
}
@@ -1518,7 +1519,7 @@ struct gunship_npc_AI : public ScriptedAI
me->SetTransportHomePosition(Slot->TargetPosition);
me->GetTransport()->CalculatePassengerPosition(x, y, z, &o);
me->SetHomePosition(x, y, z, o);
- me->GetMotionMaster()->MovePoint(EVENT_CHARGE_PREPATH, x, y, z, false);
+ me->GetMotionMaster()->MovePoint(EVENT_CHARGE_PREPATH, x, y, z, FORCED_MOVEMENT_NONE, 0.f, false);
}
}
@@ -1544,7 +1545,7 @@ struct gunship_npc_AI : public ScriptedAI
if (type == POINT_MOTION_TYPE && pointId == EVENT_CHARGE_PREPATH && Slot)
{
me->SetFacingTo(Slot->TargetPosition.GetOrientation());
- me->m_Events.AddEvent(new BattleExperienceEvent(me), me->m_Events.CalculateTime(BattleExperienceEvent::ExperiencedTimes[0]));
+ me->m_Events.AddEventAtOffset(new BattleExperienceEvent(me), BattleExperienceEvent::ExperiencedTimes[0]);
me->CastSpell(me, SPELL_BATTLE_EXPERIENCE, true);
me->SetReactState(REACT_AGGRESSIVE);
}
@@ -1579,7 +1580,7 @@ struct npc_gunship_boarding_addAI : public ScriptedAI
{
SetSlotInfo(data);
me->SetReactState(REACT_PASSIVE);
- me->m_Events.AddEvent(new DelayedMovementEvent(me, Slot->TargetPosition), me->m_Events.CalculateTime(3000 * (Index - SLOT_MARINE_1)));
+ me->m_Events.AddEventAtOffset(new DelayedMovementEvent(me, Slot->TargetPosition), Milliseconds(3000 * (Index - SLOT_MARINE_1)));
}
}
@@ -1608,7 +1609,7 @@ struct npc_gunship_boarding_addAI : public ScriptedAI
if (type == POINT_MOTION_TYPE && pointId == EVENT_CHARGE_PREPATH && Slot)
{
me->SetFacingTo(Slot->TargetPosition.GetOrientation());
- me->m_Events.AddEvent(new BattleExperienceEvent(me), me->m_Events.CalculateTime(BattleExperienceEvent::ExperiencedTimes[0]));
+ me->m_Events.AddEventAtOffset(new BattleExperienceEvent(me), BattleExperienceEvent::ExperiencedTimes[0]);
me->CastSpell(me, SPELL_BATTLE_EXPERIENCE, true);
me->SetReactState(REACT_AGGRESSIVE);
@@ -2271,7 +2272,7 @@ class spell_igb_overheat_aura : public AuraScript
WorldPacket data(SMSG_CLIENT_CONTROL_UPDATE, GetUnitOwner()->GetPackGUID().size() + 1);
data << GetUnitOwner()->GetPackGUID();
data << uint8(value);
- player->GetSession()->SendPacket(&data);
+ player->SendDirectMessage(&data);
}
}
}
diff --git a/src/server/scripts/Northrend/IcecrownCitadel/boss_lady_deathwhisper.cpp b/src/server/scripts/Northrend/IcecrownCitadel/boss_lady_deathwhisper.cpp
index 54b279510d..d83bd041d8 100644
--- a/src/server/scripts/Northrend/IcecrownCitadel/boss_lady_deathwhisper.cpp
+++ b/src/server/scripts/Northrend/IcecrownCitadel/boss_lady_deathwhisper.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
@@ -482,7 +482,7 @@ public:
minrange = summon->GetExactDist(p);
}
- summon->ToTempSummon()->DespawnOrUnsummon(30000);
+ summon->ToTempSummon()->DespawnOrUnsummon(30s);
}
else
{
@@ -522,7 +522,7 @@ public:
darnavan->GetMotionMaster()->MoveIdle();
darnavan->StopMoving();
darnavan->SetReactState(REACT_PASSIVE);
- darnavan->m_Events.AddEvent(new DaranavanMoveEvent(*darnavan), darnavan->m_Events.CalculateTime(10000));
+ darnavan->m_Events.AddEventAtOffset(new DaranavanMoveEvent(*darnavan), 10s);
darnavan->AI()->Talk(SAY_DARNAVAN_RESCUED);
if (Player* owner = killer->GetCharmerOrOwnerPlayerOrPlayerItself())
{
@@ -949,7 +949,7 @@ public:
me->GetMotionMaster()->MovementExpired();
me->StopMoving();
me->SetControlled(true, UNIT_STATE_STUNNED);
- me->DespawnOrUnsummon(500);
+ me->DespawnOrUnsummon(500ms);
break;
default:
break;
@@ -977,7 +977,7 @@ public:
if (!me->GetVictim() || me->GetVictim()->GetGUID() != targetGUID)
{
- me->DespawnOrUnsummon(1);
+ me->DespawnOrUnsummon(1ms);
return;
}
diff --git a/src/server/scripts/Northrend/IcecrownCitadel/boss_lord_marrowgar.cpp b/src/server/scripts/Northrend/IcecrownCitadel/boss_lord_marrowgar.cpp
index 7faa41fd27..751c8e4084 100644
--- a/src/server/scripts/Northrend/IcecrownCitadel/boss_lord_marrowgar.cpp
+++ b/src/server/scripts/Northrend/IcecrownCitadel/boss_lord_marrowgar.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
@@ -206,8 +206,8 @@ public:
if (Aura* pStorm = me->GetAura(SPELL_BONE_STORM))
pStorm->SetDuration(int32(_boneStormDuration));
events.ScheduleEvent(EVENT_BONE_STORM_MOVE, 0ms);
- events.ScheduleEvent(EVENT_END_BONE_STORM, _boneStormDuration + 1);
- }
+ events.ScheduleEvent(EVENT_END_BONE_STORM, Milliseconds(_boneStormDuration + 1));
+ }
break;
case EVENT_BONE_STORM_MOVE:
{
@@ -397,7 +397,7 @@ public:
trapped->NearTeleportTo(exitPos.GetPositionX(), exitPos.GetPositionY(), exitPos.GetPositionZ(), exitPos.GetOrientation(), false);
}
- me->DespawnOrUnsummon(1);
+ me->DespawnOrUnsummon(1ms);
}
void JustDied(Unit* /*killer*/) override
@@ -429,7 +429,7 @@ public:
summonerUnit->SetPetGUID(petGUID);
summonerUnit->GetMotionMaster()->Clear();
summonerUnit->StopMoving();
- events.ScheduleEvent(1, 8000);
+ events.ScheduleEvent(1, 8s);
hasTrappedUnit = true;
}
}
@@ -451,13 +451,13 @@ public:
}
else
{
- me->DespawnOrUnsummon(1);
+ me->DespawnOrUnsummon(1ms);
return;
}
}
else
{
- me->DespawnOrUnsummon(1);
+ me->DespawnOrUnsummon(1ms);
return;
}
diff --git a/src/server/scripts/Northrend/IcecrownCitadel/boss_professor_putricide.cpp b/src/server/scripts/Northrend/IcecrownCitadel/boss_professor_putricide.cpp
index cb93c1bf6b..0093196915 100644
--- a/src/server/scripts/Northrend/IcecrownCitadel/boss_professor_putricide.cpp
+++ b/src/server/scripts/Northrend/IcecrownCitadel/boss_professor_putricide.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
@@ -352,7 +352,7 @@ public:
{
if (summon->GetEntry() != 38308 && summon->GetEntry() != 38309 && (!me->IsInCombat() || me->IsInEvadeMode()))
{
- summon->DespawnOrUnsummon(1);
+ summon->DespawnOrUnsummon(1ms);
return;
}
@@ -566,14 +566,14 @@ public:
{
SpellInfo const* spell = sSpellMgr->GetSpellInfo(SPELL_CREATE_CONCOCTION);
me->CastSpell(me, SPELL_CREATE_CONCOCTION, false);
- events.ScheduleEvent(EVENT_PHASE_TRANSITION, sSpellMgr->GetSpellForDifficultyFromSpell(spell, me)->CalcCastTime() + 2250);
+ events.ScheduleEvent(EVENT_PHASE_TRANSITION, Milliseconds(sSpellMgr->GetSpellForDifficultyFromSpell(spell, me)->CalcCastTime() + 2250));
break;
}
case 3:
{
SpellInfo const* spell = sSpellMgr->GetSpellInfo(SPELL_GUZZLE_POTIONS);
me->CastSpell(me, SPELL_GUZZLE_POTIONS, false);
- events.ScheduleEvent(EVENT_PHASE_TRANSITION, sSpellMgr->GetSpellForDifficultyFromSpell(spell, me)->CalcCastTime() + 2250);
+ events.ScheduleEvent(EVENT_PHASE_TRANSITION, Milliseconds(sSpellMgr->GetSpellForDifficultyFromSpell(spell, me)->CalcCastTime() + 2250));
break;
}
default:
@@ -670,8 +670,8 @@ public:
void ChangePhase()
{
- uint32 heroicDelay = (IsHeroic() ? 25000 : 0);
- events.DelayEvents(24000 + heroicDelay, EVENT_GROUP_ABILITIES);
+ Milliseconds heroicDelay = (IsHeroic() ? 25s : 0ms);
+ events.DelayEvents(24s + heroicDelay, EVENT_GROUP_ABILITIES);
me->AttackStop();
if (!IsHeroic())
{
@@ -715,8 +715,8 @@ public:
{
case 1:
_phase = 2;
- events.ScheduleEvent(EVENT_MALLEABLE_GOO, urand(25000, 28000) + heroicDelay, EVENT_GROUP_ABILITIES);
- events.ScheduleEvent(EVENT_CHOKING_GAS_BOMB, urand(35000, 40000) + heroicDelay, EVENT_GROUP_ABILITIES);
+ events.ScheduleEvent(EVENT_MALLEABLE_GOO, randtime(25s, 28s) + heroicDelay, EVENT_GROUP_ABILITIES);
+ events.ScheduleEvent(EVENT_CHOKING_GAS_BOMB, randtime(35s, 40s) + heroicDelay, EVENT_GROUP_ABILITIES);
break;
case 2:
_phase = 3;
@@ -745,7 +745,7 @@ public:
ObjectGuid targetGUID;
- void SetGUID(ObjectGuid guid, int32 type) override
+ void SetGUID(ObjectGuid const& guid, int32 type) override
{
if (type == -1)
targetGUID = guid;
@@ -757,7 +757,7 @@ public:
if (Creature* professor = ObjectAccessor::GetCreature(*me, instance->GetGuidData(DATA_PROFESSOR_PUTRICIDE)))
{
if (!professor->IsInCombat())
- me->DespawnOrUnsummon(1);
+ me->DespawnOrUnsummon(1ms);
else
professor->AI()->JustSummoned(me);
}
@@ -1056,7 +1056,7 @@ class spell_putricide_ooze_channel : public SpellScript
if (targets.empty())
{
FinishCast(SPELL_FAILED_NO_VALID_TARGETS);
- GetCaster()->ToCreature()->DespawnOrUnsummon(1); // despawn next update
+ GetCaster()->ToCreature()->DespawnOrUnsummon(1ms); // despawn next update
return;
}
@@ -1491,7 +1491,7 @@ class spell_putricide_eat_ooze : public SpellScript
{
target->RemoveAurasDueToSpell(SPELL_GROW_STACKER);
target->RemoveAura(grow);
- target->DespawnOrUnsummon(1);
+ target->DespawnOrUnsummon(1ms);
}
else
grow->ModStackAmount(-4);
diff --git a/src/server/scripts/Northrend/IcecrownCitadel/boss_rotface.cpp b/src/server/scripts/Northrend/IcecrownCitadel/boss_rotface.cpp
index e9e7acfbd4..964192bbdb 100644
--- a/src/server/scripts/Northrend/IcecrownCitadel/boss_rotface.cpp
+++ b/src/server/scripts/Northrend/IcecrownCitadel/boss_rotface.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
@@ -72,8 +72,6 @@ enum Spells
SPELL_AWAKEN_PLAGUED_ZOMBIES = 71159,
};
-#define MUTATED_INFECTION RAID_MODE<int32>(69674, 71224, 73022, 73023)
-
enum Events
{
EVENT_NONE,
@@ -131,13 +129,13 @@ public:
{
}
- uint32 infectionCooldown;
+ Milliseconds infectionCooldown;
ObjectGuid _oozeFloodDummyGUIDs[4][2];
uint8 _oozeFloodStage;
void Reset() override
{
- infectionCooldown = 14000;
+ infectionCooldown = 14s;
for (uint8 i = 0; i < 4; ++i)
for (uint8 j = 0; j < 2; ++j)
@@ -193,7 +191,7 @@ public:
void JustDied(Unit* /*killer*/) override
{
- instance->DoRemoveAurasDueToSpellOnPlayers(MUTATED_INFECTION);
+ instance->DoRemoveAurasDueToSpellOnPlayers(sSpellMgr->GetSpellIdForDifficulty(SPELL_MUTATED_INFECTION, me));
_JustDied();
Talk(SAY_DEATH);
if (Creature* professor = ObjectAccessor::GetCreature(*me, instance->GetGuidData(DATA_PROFESSOR_PUTRICIDE)))
@@ -211,7 +209,7 @@ public:
if (me->IsAlive() && me->IsInCombat() && !me->IsInEvadeMode())
summons.Summon(summon);
else
- summon->DespawnOrUnsummon(1);
+ summon->DespawnOrUnsummon(1ms);
}
void KilledUnit(Unit* victim) override
@@ -283,14 +281,14 @@ public:
DoCastSelf(SPELL_SLIME_SPRAY);
}
}
- events.DelayEvents(1);
+ events.DelayEvents(1ms);
events.ScheduleEvent(EVENT_SLIME_SPRAY, 20s);
events.ScheduleEvent(EVENT_UNROOT, 0ms);
break;
case EVENT_HASTEN_INFECTIONS:
- if (infectionCooldown >= 8000)
+ if (infectionCooldown >= 8s)
{
- infectionCooldown -= 2000;
+ infectionCooldown -= 2s;
events.ScheduleEvent(EVENT_HASTEN_INFECTIONS, 90s);
}
break;
@@ -373,7 +371,7 @@ public:
{
if (Creature* rotface = ObjectAccessor::GetCreature(*me, instance->GetGuidData(DATA_ROTFACE)))
rotface->AI()->SummonedCreatureDespawn(me);
- me->DespawnOrUnsummon(0);
+ me->DespawnOrUnsummon(0ms);
}
void UpdateAI(uint32 diff) override
@@ -798,7 +796,7 @@ class spell_rotface_unstable_ooze_explosion_suicide_aura : public AuraScript
target->SetVisible(false);
target->RemoveAllAuras();
//target->ToCreature()->DespawnOrUnsummon();
- target->ToCreature()->DespawnOrUnsummon(60000);
+ target->ToCreature()->DespawnOrUnsummon(60s);
}
void Register() override
diff --git a/src/server/scripts/Northrend/IcecrownCitadel/boss_sindragosa.cpp b/src/server/scripts/Northrend/IcecrownCitadel/boss_sindragosa.cpp
index 884cda64a8..ddcc19954b 100644
--- a/src/server/scripts/Northrend/IcecrownCitadel/boss_sindragosa.cpp
+++ b/src/server/scripts/Northrend/IcecrownCitadel/boss_sindragosa.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
@@ -384,7 +384,7 @@ public:
me->SetUnitFlag(UNIT_FLAG_NON_ATTACKABLE);
me->SetSpeed(MOVE_RUN, 4.28571f);
float moveTime = me->GetExactDist(&SindragosaFlyInPos) / (me->GetSpeed(MOVE_RUN) * 0.001f);
- me->m_Events.AddEvent(new FrostwyrmLandEvent(*me, SindragosaLandPos), me->m_Events.CalculateTime(uint64(moveTime) + 250));
+ me->m_Events.AddEventAtOffset(new FrostwyrmLandEvent(*me, SindragosaLandPos), Milliseconds(uint32(moveTime) + 250));
me->GetMotionMaster()->MovePoint(POINT_FROSTWYRM_FLY_IN, SindragosaFlyInPos);
if (!instance->GetData(DATA_SINDRAGOSA_INTRO))
@@ -478,7 +478,7 @@ public:
{
summons.Summon(summon);
if (summon->GetEntry() == NPC_FROST_BOMB)
- summon->m_Events.AddEvent(new FrostBombExplosion(summon, me->GetGUID()), summon->m_Events.CalculateTime(5500));
+ summon->m_Events.AddEventAtOffset(new FrostBombExplosion(summon, me->GetGUID()), 5500ms);
}
void SummonedCreatureDespawn(Creature* summon) override
@@ -523,7 +523,7 @@ public:
me->SetControlled(true, UNIT_STATE_ROOT);
me->SendMovementFlagUpdate();
me->CastSpell(me->GetVictim(), SPELL_TAIL_SMASH, false);
- events.DelayEventsToMax(1, 0);
+ events.DelayEventsToMax(1ms, 0);
events.ScheduleEvent(EVENT_UNROOT, 0ms);
events.ScheduleEvent(EVENT_TAIL_SMASH, 22s, 27s, EVENT_GROUP_LAND_PHASE);
break;
@@ -532,7 +532,7 @@ public:
me->SetControlled(true, UNIT_STATE_ROOT);
me->SendMovementFlagUpdate();
me->CastSpell(me->GetVictim(), _isThirdPhase ? SPELL_FROST_BREATH_P2 : SPELL_FROST_BREATH_P1, false);
- events.DelayEventsToMax(1, 0);
+ events.DelayEventsToMax(1ms, 0);
events.ScheduleEvent(EVENT_UNROOT, 0ms);
events.ScheduleEvent(EVENT_FROST_BREATH, 20s, 25s, EVENT_GROUP_LAND_PHASE);
break;
@@ -547,11 +547,10 @@ public:
break;
case EVENT_ICY_GRIP:
me->CastSpell((Unit*)nullptr, SPELL_ICY_GRIP, false);
- events.DelayEventsToMax(1001, 0);
+ events.DelayEventsToMax(1001ms, 0);
events.ScheduleEvent(EVENT_BLISTERING_COLD, 1s, EVENT_GROUP_LAND_PHASE);
- if (uint32 evTime = events.GetNextEventTime(EVENT_ICE_TOMB))
- if (events.GetTimer() > evTime || evTime - events.GetTimer() < 7000)
- events.RescheduleEvent(EVENT_ICE_TOMB, 7s);
+ if (events.GetTimeUntilEvent(EVENT_ICE_TOMB) < 7s)
+ events.RescheduleEvent(EVENT_ICE_TOMB, 7s);
break;
case EVENT_BLISTERING_COLD:
Talk(EMOTE_WARN_BLISTERING_COLD);
@@ -652,9 +651,8 @@ public:
Talk(EMOTE_WARN_FROZEN_ORB, target);
me->CastSpell(target, SPELL_ICE_TOMB_DUMMY, true);
me->CastSpell(target, SPELL_FROST_BEACON, true);
- if (uint32 evTime = events.GetNextEventTime(EVENT_ICY_GRIP))
- if (events.GetTimer() > evTime || evTime - events.GetTimer() < 8000)
- events.RescheduleEvent(EVENT_ICY_GRIP, 8s, EVENT_GROUP_LAND_PHASE);
+ if (events.GetTimeUntilEvent(EVENT_ICY_GRIP) < 8s)
+ events.RescheduleEvent(EVENT_ICY_GRIP, 8s, EVENT_GROUP_LAND_PHASE);
}
events.ScheduleEvent(EVENT_ICE_TOMB, 18s, 22s);
break;
@@ -700,7 +698,7 @@ public:
uint32 _existenceCheckTimer;
uint16 _asphyxiationTimer;
- void SetGUID(ObjectGuid guid, int32 type) override
+ void SetGUID(ObjectGuid const& guid, int32 type) override
{
if (type == DATA_TRAPPED_PLAYER)
_trappedPlayerGUID = guid;
@@ -722,7 +720,7 @@ public:
player->RemoveAurasDueToSpell(SPELL_ICE_TOMB_DAMAGE);
player->RemoveAurasDueToSpell(SPELL_ASPHYXIATION);
player->RemoveAurasDueToSpell(SPELL_ICE_TOMB_UNTARGETABLE);
- me->DespawnOrUnsummon(5000);
+ me->DespawnOrUnsummon(5s);
}
}
@@ -1081,7 +1079,7 @@ class spell_sindragosa_ice_tomb_trap_aura : public AuraScript
void AfterApply(AuraEffect const* /*aurEff*/, AuraEffectHandleModes /*mode*/)
{
if (Unit* c = GetCaster())
- GetTarget()->m_Events.AddEvent(new IceTombSummonEvent(GetTarget(), c->GetGUID()), GetTarget()->m_Events.CalculateTime(500));
+ GetTarget()->m_Events.AddEventAtOffset(new IceTombSummonEvent(GetTarget(), c->GetGUID()), 500ms);
}
void ExtraRemoveEffect(AuraEffect const* /*aurEff*/, AuraEffectHandleModes /*mode*/)
@@ -1247,7 +1245,7 @@ public:
me->setActive(true);
me->SetImmuneToPC(true);
float moveTime = me->GetExactDist(&SpinestalkerFlyPos) / (me->GetSpeed(MOVE_RUN) * 0.001f);
- me->m_Events.AddEvent(new FrostwyrmLandEvent(*me, SpinestalkerLandPos), me->m_Events.CalculateTime(uint64(moveTime) + 250));
+ me->m_Events.AddEventAtOffset(new FrostwyrmLandEvent(*me, SpinestalkerLandPos), Milliseconds(uint32(moveTime) + 250));
me->SetDefaultMovementType(IDLE_MOTION_TYPE);
me->GetMotionMaster()->MoveIdle();
me->StopMoving();
@@ -1378,7 +1376,7 @@ public:
me->setActive(true);
me->SetImmuneToPC(true);
float moveTime = me->GetExactDist(&RimefangFlyPos) / (me->GetSpeed(MOVE_RUN) * 0.001f);
- me->m_Events.AddEvent(new FrostwyrmLandEvent(*me, RimefangLandPos), me->m_Events.CalculateTime(uint64(moveTime) + 250));
+ me->m_Events.AddEventAtOffset(new FrostwyrmLandEvent(*me, RimefangLandPos), Milliseconds(uint32(moveTime) + 250));
me->SetDefaultMovementType(IDLE_MOTION_TYPE);
me->GetMotionMaster()->MoveIdle();
me->StopMoving();
@@ -1451,8 +1449,8 @@ public:
else destZ = me->GetPositionZ() + 25.0f;
me->GetMotionMaster()->MoveTakeoff(0, me->GetPositionX(), me->GetPositionY(), destZ, me->GetSpeed(MOVE_RUN));
float moveTime = std::fabs(destZ - me->GetPositionZ()) / (me->GetSpeed(MOVE_RUN) * 0.001f);
- _events.ScheduleEvent(EVENT_ICY_BLAST, uint32(moveTime) + urand(60000, 70000));
- _events.ScheduleEvent(EVENT_ICY_BLAST_CAST, uint32(moveTime) + 250);
+ _events.Repeat(Milliseconds(uint32(moveTime) + urand(60000, 70000)));
+ _events.ScheduleEvent(EVENT_ICY_BLAST_CAST, Milliseconds(uint32(moveTime) + 250));
break;
}
case EVENT_ICY_BLAST_CAST:
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 d746989103..862bd3d5c6 100644
--- a/src/server/scripts/Northrend/IcecrownCitadel/boss_the_lich_king.cpp
+++ b/src/server/scripts/Northrend/IcecrownCitadel/boss_the_lich_king.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
@@ -141,7 +141,6 @@ enum Spells
SPELL_SOUL_REAPER = 69409, // instant
SPELL_SOUL_REAPER_BUFF = 69410,
SPELL_SUMMON_VALKYR = 69037, // instant
- SPELL_SUMMON_VALKYR_PERIODIC = 74361,
SPELL_WINGS_OF_THE_DAMNED = 74352,
SPELL_VALKYR_TARGET_SEARCH = 69030,
SPELL_HARVEST_SOUL_VALKYR = 68985, // vehicle aura used by Val'kyr Shadowguard and Strangulate Vehicle
@@ -188,14 +187,6 @@ enum Spells
SPELL_FRENZY = 28747,
};
-#define NECROTIC_PLAGUE_LK RAID_MODE<uint32>(70337, 73912, 73913, 73914)
-#define NECROTIC_PLAGUE_PLR RAID_MODE<uint32>(70338, 73785, 73786, 73787)
-#define REMORSELESS_WINTER_1 RAID_MODE<uint32>(68981, 74270, 74271, 74272)
-#define REMORSELESS_WINTER_2 RAID_MODE<uint32>(72259, 74273, 74274, 74275)
-#define SUMMON_VALKYR RAID_MODE<uint32>(69037, 74361, 69037, 74361)
-//#define HARVEST_SOUL RAID_MODE<uint32>(68980, 74325, 74296, 74297)
-#define HARVESTED_SOUL_BUFF RAID_MODE<uint32>(72679, 74318, 74319, 74320)
-
enum Events
{
EVENT_NONE,
@@ -375,7 +366,7 @@ void SendPacketToPlayers(WorldPacket const* data, Unit* source)
for (Map::PlayerList::const_iterator itr = players.begin(); itr != players.end(); ++itr)
if (Player* player = itr->GetSource())
if (player->GetAreaId() == AREA_THE_FROZEN_THRONE)
- player->GetSession()->SendPacket(data);
+ player->SendDirectMessage(data);
}
struct ShadowTrapLKTargetSelector
@@ -552,7 +543,7 @@ public:
if (--_counter)
{
- _owner->m_Events.AddEvent(this, _owner->m_Events.CalculateTime(3000));
+ _owner->m_Events.AddEventAtOffset(this, 3s);
return false;
}
@@ -826,12 +817,12 @@ public:
me->SetDisableGravity(false);
me->GetMotionMaster()->MoveFall();
if (Creature* frostmourne = me->FindNearestCreature(NPC_FROSTMOURNE_TRIGGER, 50.0f))
- frostmourne->DespawnOrUnsummon(1);
+ frostmourne->DespawnOrUnsummon(1ms);
if (Creature* terenas = me->FindNearestCreature(NPC_TERENAS_MENETHIL_OUTRO, 50.0f))
- terenas->DespawnOrUnsummon(1);
+ terenas->DespawnOrUnsummon(1ms);
- me->m_Events.AddEvent(new LichKingDeathEvent(*me), me->m_Events.CalculateTime(2500)); // die after spinning anim is over, so death anim is visible
- me->m_Events.AddEvent(new LichKingMovieEvent(*me), me->m_Events.CalculateTime(11500));
+ me->m_Events.AddEventAtOffset(new LichKingDeathEvent(*me), 2500ms); // die after spinning anim is over, so death anim is visible
+ me->m_Events.AddEventAtOffset(new LichKingMovieEvent(*me), 11500ms);
}
if (!_bFordringMustFallYell && me->GetHealth() < 500000)
@@ -862,7 +853,7 @@ public:
summon->CastSpell(summon, SPELL_RISEN_WITCH_DOCTOR_SPAWN, true);
summon->SetReactState(REACT_PASSIVE);
summon->HandleEmoteCommand(EMOTE_ONESHOT_EMERGE);
- summon->m_Events.AddEvent(new StartMovementEvent(me, summon), summon->m_Events.CalculateTime(5000));
+ summon->m_Events.AddEventAtOffset(new StartMovementEvent(me, summon), 5s);
break;
case NPC_RAGING_SPIRIT:
summon->SetHomePosition(CenterPosition);
@@ -872,7 +863,7 @@ public:
summon->SetReactState(REACT_PASSIVE);
summon->GetMotionMaster()->MoveRandom(10.0f);
if (_phase == PHASE_THREE)
- summon->m_Events.AddEvent(new VileSpiritActivateEvent(summon), summon->m_Events.CalculateTime(15000));
+ summon->m_Events.AddEventAtOffset(new VileSpiritActivateEvent(summon), 15s);
break;
}
case NPC_STRANGULATE_VEHICLE:
@@ -885,8 +876,8 @@ public:
summon->StopMovingOnCurrentPos();
break;
case NPC_VALKYR_SHADOWGUARD:
- if (_phase == PHASE_THREE || events.GetNextEventTime(EVENT_QUAKE_2))
- summon->DespawnOrUnsummon(1);
+ if (_phase == PHASE_THREE || events.HasTimeUntilEvent(EVENT_QUAKE_2))
+ summon->DespawnOrUnsummon(1ms);
break;
default:
break;
@@ -915,7 +906,7 @@ public:
void SpellHit(Unit* /*caster*/, SpellInfo const* spell) override
{
- if (spell->Id == HARVESTED_SOUL_BUFF && me->IsInCombat() && !IsHeroic() && _phase != PHASE_OUTRO && _lastTalkTimeBuff + 5 <= GameTime::GetGameTime().count())
+ if (spell->Id == sSpellMgr->GetSpellIdForDifficulty(SPELL_HARVESTED_SOUL_LK_BUFF, me) && me->IsInCombat() && !IsHeroic() && _phase != PHASE_OUTRO && _lastTalkTimeBuff + 5 <= GameTime::GetGameTime().count())
{
_lastTalkTimeBuff = GameTime::GetGameTime().count();
Talk(SAY_LK_FROSTMOURNE_KILL);
@@ -924,7 +915,7 @@ public:
void SpellHitTarget(Unit* /*target*/, SpellInfo const* spell) override
{
- if (spell->Id == REMORSELESS_WINTER_1 || spell->Id == REMORSELESS_WINTER_2)
+ if (spell->Id == sSpellMgr->GetSpellIdForDifficulty(SPELL_REMORSELESS_WINTER_1, me) || spell->Id == sSpellMgr->GetSpellIdForDifficulty(SPELL_REMORSELESS_WINTER_2, me))
{
me->GetMap()->SetZoneOverrideLight(AREA_THE_FROZEN_THRONE, LIGHT_SNOWSTORM, 5s);
me->GetMap()->SetZoneWeather(AREA_THE_FROZEN_THRONE, WEATHER_STATE_LIGHT_SNOW, 0.5f);
@@ -944,7 +935,7 @@ public:
Talk(SAY_LK_REMORSELESS_WINTER);
me->GetMap()->SetZoneMusic(AREA_THE_FROZEN_THRONE, MUSIC_SPECIAL);
me->CastSpell(me, SPELL_REMORSELESS_WINTER_1, false);
- //events.DelayEvents(62500, EVENT_GROUP_BERSERK); // delay berserk timer, its not ticking during phase transitions, 15mins on movies
+ //events.DelayEvents(62500ms, EVENT_GROUP_BERSERK); // delay berserk timer, its not ticking during phase transitions, 15mins on movies
events.ScheduleEvent(EVENT_QUAKE, 62s + 500ms);
events.ScheduleEvent(EVENT_PAIN_AND_SUFFERING, 3500ms, EVENT_GROUP_ABILITIES);
events.ScheduleEvent(EVENT_SUMMON_ICE_SPHERE, 8s, EVENT_GROUP_ABILITIES);
@@ -956,7 +947,7 @@ public:
me->GetMap()->SetZoneMusic(AREA_THE_FROZEN_THRONE, MUSIC_SPECIAL);
me->CastSpell(me, SPELL_REMORSELESS_WINTER_2, false);
summons.DespawnEntry(NPC_VALKYR_SHADOWGUARD);
- //events.DelayEvents(62500, EVENT_GROUP_BERSERK); // delay berserk timer, its not ticking during phase transitions, 15 mins on movies
+ //events.DelayEvents(62500ms, EVENT_GROUP_BERSERK); // delay berserk timer, its not ticking during phase transitions, 15 mins on movies
events.ScheduleEvent(EVENT_QUAKE_2, 62s + 500ms);
events.ScheduleEvent(EVENT_PAIN_AND_SUFFERING, 3500ms, EVENT_GROUP_ABILITIES);
events.ScheduleEvent(EVENT_SUMMON_ICE_SPHERE, 8s, EVENT_GROUP_ABILITIES);
@@ -1064,7 +1055,7 @@ public:
events.ScheduleEvent(EVENT_INFEST, 22s + 500ms, EVENT_GROUP_ABILITIES);
break;
case EVENT_NECROTIC_PLAGUE:
- if (Unit* target = SelectTarget(SelectTargetMethod::Random, 0, NecroticPlagueTargetCheck(me, NECROTIC_PLAGUE_LK, NECROTIC_PLAGUE_PLR)))
+ if (Unit* target = SelectTarget(SelectTargetMethod::Random, 0, NecroticPlagueTargetCheck(me, sSpellMgr->GetSpellIdForDifficulty(SPELL_NECROTIC_PLAGUE, me), sSpellMgr->GetSpellIdForDifficulty(SPELL_NECROTIC_PLAGUE_JUMP, me))))
{
Talk(EMOTE_NECROTIC_PLAGUE_WARNING, target);
me->CastSpell(target, SPELL_NECROTIC_PLAGUE, false);
@@ -1081,11 +1072,11 @@ public:
case EVENT_PAIN_AND_SUFFERING:
if (Unit* target = SelectTarget(SelectTargetMethod::Random, 0, 0.0f, true))
{
- //events.DelayEventsToMax(500, EVENT_GROUP_ABILITIES);
+ //events.DelayEventsToMax(500ms, EVENT_GROUP_ABILITIES);
me->SetFacingTo(me->GetAngle(target));
me->CastSpell(target, SPELL_PAIN_AND_SUFFERING, false);
}
- events.ScheduleEvent(EVENT_PAIN_AND_SUFFERING, (IsHeroic() ? urand(1250, 1750) : urand(1750, 2250)), EVENT_GROUP_ABILITIES);
+ events.Repeat((IsHeroic() ? randtime(1250ms, 1750ms) : randtime(1750ms, 2250ms)));
break;
case EVENT_SUMMON_ICE_SPHERE:
me->CastSpell((Unit*)nullptr, SPELL_SUMMON_ICE_SPHERE, false);
@@ -1098,21 +1089,21 @@ public:
break;
case EVENT_DEFILE:
{
- uint32 evTime = events.GetNextEventTime(EVENT_SUMMON_VALKYR);
+ Milliseconds evTime = events.GetTimeUntilEvent(EVENT_SUMMON_VALKYR);
// if defile (cast time 2sec) is less than 3 before valkyr appears
// we've to decide
- if (evTime && (events.GetTimer() > evTime || evTime - events.GetTimer() < 5000))
+ if (evTime < 5s)
{
// if valkyr is less than 1.5 secs after defile (cast time 2 sec) then we've a sync issue, so
// we need to cancel it (break) and schedule a defile to be casted 5 or 4 seconds after valkyr
- if (events.GetTimer() > evTime || evTime - events.GetTimer() < 3500)
+ if (evTime < 3500ms)
{
- uint32 t = events.GetTimer() > evTime ? 0 : evTime - events.GetTimer();
- events.ScheduleEvent(EVENT_DEFILE, t + (Is25ManRaid() ? 5000 : 4000), EVENT_GROUP_ABILITIES);
+ Milliseconds t = evTime > 0ms ? evTime : 0ms;
+ events.ScheduleEvent(EVENT_DEFILE, t + (Is25ManRaid() ? 5s : 4s), EVENT_GROUP_ABILITIES);
break;
}
- // if valkyr is coming between 1.5 and 3 seconds after defile then we've to
+ // if valkyr is coming within 2,5 seconds after defile then we've to
// delay valkyr just a bit
events.RescheduleEvent(EVENT_SUMMON_VALKYR, 5s, EVENT_GROUP_ABILITIES);
}
@@ -1145,17 +1136,14 @@ public:
{
me->GetMap()->SetZoneMusic(AREA_THE_FROZEN_THRONE, MUSIC_SPECIAL);
Talk(SAY_LK_SUMMON_VALKYR);
- me->CastSpell((Unit*)nullptr, SUMMON_VALKYR, false);
+ me->CastSpell((Unit*)nullptr, SPELL_SUMMON_VALKYR, false);
events.ScheduleEvent(EVENT_SUMMON_VALKYR, 45s, EVENT_GROUP_ABILITIES);
// schedule a defile (or reschedule it) if next defile event
// doesn't exist ( now > next defile ) or defile is coming too soon
- uint32 minTime = (Is25ManRaid() ? 5000 : 4000);
- if (uint32 evTime = events.GetNextEventTime(EVENT_DEFILE))
- if (events.GetTimer() > evTime || evTime - events.GetTimer() < minTime)
- {
- events.RescheduleEvent(EVENT_DEFILE, minTime, EVENT_GROUP_ABILITIES);
- }
+ Milliseconds minTime = (Is25ManRaid() ? 5s : 4s);
+ if (events.GetTimeUntilEvent(EVENT_DEFILE) < minTime)
+ events.RescheduleEvent(EVENT_DEFILE, minTime, EVENT_GROUP_ABILITIES);
}
break;
case EVENT_VILE_SPIRITS:
@@ -1180,7 +1168,7 @@ public:
me->SetReactState(REACT_PASSIVE);
me->AttackStop();
events.ScheduleEvent(EVENT_START_ATTACK, 55s);
- events.DelayEvents(52500, EVENT_GROUP_VILE_SPIRITS);
+ events.DelayEvents(52500ms, EVENT_GROUP_VILE_SPIRITS);
events.CancelEvent(EVENT_DEFILE);
events.CancelEvent(EVENT_SOUL_REAPER);
events.ScheduleEvent(EVENT_FROSTMOURNE_HEROIC, 6s, EVENT_GROUP_ABILITIES);
@@ -1192,7 +1180,7 @@ public:
if (summon->GetEntry() == NPC_VILE_SPIRIT)
{
summon->m_Events.KillAllEvents(true);
- summon->m_Events.AddEvent(new VileSpiritActivateEvent(summon), summon->m_Events.CalculateTime(55000));
+ summon->m_Events.AddEventAtOffset(new VileSpiritActivateEvent(summon), 55s);
summon->GetMotionMaster()->Clear(true);
summon->StopMoving();
summon->SetReactState(REACT_PASSIVE);
@@ -1216,7 +1204,7 @@ public:
{
spawner->CastSpell(spawner, SPELL_SUMMON_SPIRIT_BOMB_1, true); // summons bombs randomly
spawner->CastSpell(spawner, SPELL_SUMMON_SPIRIT_BOMB_2, true); // summons bombs on players
- spawner->m_Events.AddEvent(new TriggerWickedSpirit(spawner), spawner->m_Events.CalculateTime(3000));
+ spawner->m_Events.AddEventAtOffset(new TriggerWickedSpirit(spawner), 3s);
terenas->SetImmuneToAll(true); // to avoid being healed by player trinket procs. terenas' health doesn't matter on heroic
}
}
@@ -1508,9 +1496,9 @@ public:
theLichKing->GetMotionMaster()->MovePoint(0, CenterPosition);
uint32 travelTime = 1000 * theLichKing->GetExactDist(&CenterPosition) / theLichKing->GetSpeed(MOVE_WALK) + 1000;
- _events.ScheduleEvent(EVENT_OUTRO_LK_TALK_4, 1 + travelTime);
- _events.ScheduleEvent(EVENT_OUTRO_LK_RAISE_DEAD, 1000 + travelTime);
- _events.ScheduleEvent(EVENT_OUTRO_LK_TALK_5, 29000 + travelTime);
+ _events.ScheduleEvent(EVENT_OUTRO_LK_TALK_4, Milliseconds(1 + travelTime));
+ _events.ScheduleEvent(EVENT_OUTRO_LK_RAISE_DEAD, Milliseconds(1000 + travelTime));
+ _events.ScheduleEvent(EVENT_OUTRO_LK_TALK_5, Milliseconds(29000 + travelTime));
}
break;
case EVENT_OUTRO_LK_TALK_4:
@@ -2081,7 +2069,7 @@ class spell_the_lich_king_shadow_trap_periodic : public SpellScript
if (Aura* a = GetCaster()->GetAura(SPELL_SHADOW_TRAP_AURA))
a->SetDuration(0);
if (GetCaster()->IsCreature())
- GetCaster()->ToCreature()->DespawnOrUnsummon(3000);
+ GetCaster()->ToCreature()->DespawnOrUnsummon(3s);
}
void Register() override
@@ -2137,7 +2125,7 @@ public:
{
me->RemoveAllAuras();
me->CastSpell(me, SPELL_ICE_BURST, true);
- me->DespawnOrUnsummon(1000);
+ me->DespawnOrUnsummon(1s);
targetGUID.Clear();
timer = 9999;
me->InterruptNonMeleeSpells(true);
@@ -2241,7 +2229,7 @@ public:
if (Player* plr = ScriptedAI::SelectTargetFromPlayerList(100.0f, 0, true))
plr->CastSpell(me, SPELL_RAGING_SPIRIT_VISUAL_CLONE, true);
else
- me->DespawnOrUnsummon(1);
+ me->DespawnOrUnsummon(1ms);
}
}
@@ -2355,8 +2343,7 @@ class spell_the_lich_king_defile : public SpellScript
{
targets.remove_if(VehicleCheck());
targets.remove_if(Acore::AllWorldObjectsInExactRange(GetCaster(), 10.0f * GetCaster()->GetFloatValue(OBJECT_FIELD_SCALE_X), true));
- uint32 strangulatedAura[4] = {68980, 74325, 74296, 74297};
- targets.remove_if(Acore::UnitAuraCheck(true, strangulatedAura[GetCaster()->GetMap()->GetDifficulty()]));
+ targets.remove_if(Acore::UnitAuraCheck(true, sSpellMgr->GetSpellIdForDifficulty(SPELL_HARVEST_SOUL, GetCaster())));
}
void ChangeDamageAndGrow()
@@ -2452,7 +2439,7 @@ public:
if (IsHeroic())
GoSiphon();
else
- me->DespawnOrUnsummon(1000);
+ me->DespawnOrUnsummon(1s);
}
void DamageTaken(Unit*, uint32& damage, DamageEffectType, SpellSchoolMask) override
@@ -2522,7 +2509,7 @@ public:
if (IsHeroic())
GoSiphon();
else
- me->DespawnOrUnsummon(1000);
+ me->DespawnOrUnsummon(1s);
}
break;
case POINT_START_SIPHON:
@@ -2539,7 +2526,7 @@ public:
}
}
- void SetGUID(ObjectGuid guid, int32 /* = 0*/) override
+ void SetGUID(ObjectGuid const& guid, int32 /* = 0*/) override
{
_grabbedPlayer = guid;
}
@@ -2568,8 +2555,8 @@ public:
me->AddUnitState(UNIT_STATE_NO_ENVIRONMENT_UPD);
me->SetCanFly(false);
me->SetDisableGravity(false);
- me->GetMotionMaster()->MovePoint(POINT_DROP_PLAYER, _destPoint, false);
- me->SetDisableGravity(true, true);
+ me->GetMotionMaster()->MovePoint(POINT_DROP_PLAYER, _destPoint, FORCED_MOVEMENT_NONE, 0.f, false);
+ me->SetDisableGravity(true);
me->RemoveUnitFlag(UNIT_FLAG_NON_ATTACKABLE);
break;
case EVENT_MOVE_TO_SIPHON_POS:
@@ -2620,7 +2607,7 @@ public:
me->GetMotionMaster()->Clear();
me->StopMovingOnCurrentPos();
- _events.ScheduleEvent(EVENT_MOVE_TO_DROP_POS, 0);
+ _events.ScheduleEvent(EVENT_MOVE_TO_DROP_POS, 0ms);
}
};
@@ -2735,7 +2722,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);
}
}
@@ -2886,7 +2873,7 @@ class spell_the_lich_king_vile_spirit_damage_target_search : public SpellScript
c->GetMotionMaster()->Clear(true);
c->StopMoving();
c->CastSpell((Unit*)nullptr, SPELL_SPIRIT_BURST, true);
- c->DespawnOrUnsummon(3000);
+ c->DespawnOrUnsummon(3s);
c->SetUnitFlag(UNIT_FLAG_NOT_SELECTABLE);
}
}
@@ -3002,7 +2989,7 @@ public:
_events.Reset();
me->RemoveAllAuras();
- me->DespawnOrUnsummon(500);
+ me->DespawnOrUnsummon(500ms);
if (Creature* lichKing = ObjectAccessor::GetCreature(*me, _instance->GetGuidData(DATA_THE_LICH_KING)))
lichKing->AI()->SummonedCreatureDespawn(me);
@@ -3053,7 +3040,7 @@ public:
case EVENT_DESPAWN_SELF:
if (Creature* lichKing = ObjectAccessor::GetCreature(*me, _instance->GetGuidData(DATA_THE_LICH_KING)))
lichKing->AI()->SummonedCreatureDespawn(me);
- me->DespawnOrUnsummon(1);
+ me->DespawnOrUnsummon(1ms);
break;
default:
break;
@@ -3101,7 +3088,7 @@ public:
{
_events.Reset();
me->CastSpell((Unit*)nullptr, SPELL_RESTORE_SOUL, false);
- me->DespawnOrUnsummon(3000);
+ me->DespawnOrUnsummon(3s);
}
break;
}
@@ -3121,14 +3108,14 @@ public:
if (Creature* warden = me->FindNearestCreature(NPC_SPIRIT_WARDEN, 20.0f))
{
warden->CastSpell((Unit*)nullptr, SPELL_DESTROY_SOUL, false);
- warden->DespawnOrUnsummon(2000);
+ warden->DespawnOrUnsummon(2s);
}
me->CastSpell(me, SPELL_TERENAS_LOSES_INSIDE, false);
me->SetDisplayId(16946);
me->SetReactState(REACT_PASSIVE);
me->AttackStop();
me->SetUnitFlag(UNIT_FLAG_NOT_SELECTABLE);
- me->DespawnOrUnsummon(2000);
+ me->DespawnOrUnsummon(2s);
}
}
}
@@ -3417,7 +3404,7 @@ public:
npc_lk_spirit_bombAI(Creature* creature) : NullCreatureAI(creature)
{
me->SetReactState(REACT_PASSIVE);
- me->DespawnOrUnsummon(45000); // for safety
+ me->DespawnOrUnsummon(45s); // for safety
timer = 0;
}
@@ -3450,7 +3437,7 @@ public:
timer = 0;
me->RemoveAllAuras();
me->CastSpell((Unit*)nullptr, SPELL_EXPLOSION, false);
- me->DespawnOrUnsummon(1000);
+ me->DespawnOrUnsummon(1s);
}
else
timer -= diff;
diff --git a/src/server/scripts/Northrend/IcecrownCitadel/boss_valithria_dreamwalker.cpp b/src/server/scripts/Northrend/IcecrownCitadel/boss_valithria_dreamwalker.cpp
index 75bdea092b..afab4da611 100644
--- a/src/server/scripts/Northrend/IcecrownCitadel/boss_valithria_dreamwalker.cpp
+++ b/src/server/scripts/Northrend/IcecrownCitadel/boss_valithria_dreamwalker.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
@@ -52,8 +52,8 @@ enum Spells
SPELL_NIGHTMARE_PORTAL_VISUAL_PRE = 71986,
SPELL_NIGHTMARE_CLOUD = 71970,
SPELL_NIGHTMARE_CLOUD_VISUAL = 71939,
- SPELL_PRE_SUMMON_DREAM_PORTAL = 72224,
- SPELL_PRE_SUMMON_NIGHTMARE_PORTAL = 72480,
+ SPELL_PRE_SUMMON_DREAM_PORTAL = 72224, // normal
+ SPELL_PRE_SUMMON_NIGHTMARE_PORTAL = 72480, // heroic
SPELL_SUMMON_DREAM_PORTAL = 71305,
SPELL_SUMMON_NIGHTMARE_PORTAL = 71987,
SPELL_DREAMWALKERS_RAGE = 71189,
@@ -94,16 +94,13 @@ enum Spells
SPELL_GUT_SPRAY = 70633,
SPELL_ROT_WORM_SPAWNER = 70675,
- // Dream Cloud
+ // Dream Cloud (normal)
SPELL_EMERALD_VIGOR = 70873,
- // Nightmare Cloud
+ // Nightmare Cloud (heroic)
SPELL_TWISTED_NIGHTMARE = 71941,
};
-#define SUMMON_PORTAL RAID_MODE<uint32>(SPELL_PRE_SUMMON_DREAM_PORTAL, SPELL_PRE_SUMMON_DREAM_PORTAL, SPELL_PRE_SUMMON_NIGHTMARE_PORTAL, SPELL_PRE_SUMMON_NIGHTMARE_PORTAL)
-#define EMERALD_VIGOR RAID_MODE<uint32>(SPELL_EMERALD_VIGOR, SPELL_EMERALD_VIGOR, SPELL_TWISTED_NIGHTMARE, SPELL_TWISTED_NIGHTMARE)
-
enum Events
{
// Valithria Dreamwalker
@@ -177,14 +174,14 @@ private:
class DelayedCastEvent : public BasicEvent
{
public:
- DelayedCastEvent(Creature* trigger, uint32 spellId, ObjectGuid originalCaster, uint32 despawnTime) : _trigger(trigger), _originalCaster(originalCaster), _spellId(spellId), _despawnTime(despawnTime)
+ DelayedCastEvent(Creature* trigger, uint32 spellId, ObjectGuid originalCaster, Milliseconds despawnTime) : _trigger(trigger), _originalCaster(originalCaster), _spellId(spellId), _despawnTime(despawnTime)
{
}
bool Execute(uint64 /*time*/, uint32 /*diff*/) override
{
_trigger->CastSpell(_trigger, _spellId, false, nullptr, nullptr, _originalCaster);
- if (_despawnTime)
+ if (_despawnTime > 0ms)
_trigger->DespawnOrUnsummon(_despawnTime);
return true;
}
@@ -193,7 +190,7 @@ private:
Creature* _trigger;
ObjectGuid _originalCaster;
uint32 _spellId;
- uint32 _despawnTime;
+ Milliseconds _despawnTime;
};
class AuraRemoveEvent : public BasicEvent
@@ -406,7 +403,7 @@ public:
// this display id was found in sniff instead of the one on aura
me->SetDisplayId(11686);
me->SetUnitFlag(UNIT_FLAG_NOT_SELECTABLE);
- me->DespawnOrUnsummon(4000);
+ me->DespawnOrUnsummon(4s);
if (Creature* lichKing = ObjectAccessor::GetCreature(*me, _instance->GetGuidData(DATA_VALITHRIA_LICH_KING)))
lichKing->CastSpell(lichKing, SPELL_SPAWN_CHEST, false);
_instance->SetData(DATA_WEEKLY_QUEST_ID, 0); // show hidden npc if necessary
@@ -417,13 +414,13 @@ public:
{
if (summon->GetEntry() == NPC_DREAM_PORTAL_PRE_EFFECT)
{
- summon->m_Events.AddEvent(new DelayedCastEvent(summon, SPELL_SUMMON_DREAM_PORTAL, me->GetGUID(), 6000), summon->m_Events.CalculateTime(15000));
- summon->m_Events.AddEvent(new AuraRemoveEvent(summon, SPELL_DREAM_PORTAL_VISUAL_PRE), summon->m_Events.CalculateTime(15000));
+ summon->m_Events.AddEventAtOffset(new DelayedCastEvent(summon, SPELL_SUMMON_DREAM_PORTAL, me->GetGUID(), 6s), 15s);
+ summon->m_Events.AddEventAtOffset(new AuraRemoveEvent(summon, SPELL_DREAM_PORTAL_VISUAL_PRE), 15s);
}
else if (summon->GetEntry() == NPC_NIGHTMARE_PORTAL_PRE_EFFECT)
{
- summon->m_Events.AddEvent(new DelayedCastEvent(summon, SPELL_SUMMON_NIGHTMARE_PORTAL, me->GetGUID(), 6000), summon->m_Events.CalculateTime(15000));
- summon->m_Events.AddEvent(new AuraRemoveEvent(summon, SPELL_NIGHTMARE_PORTAL_VISUAL_PRE), summon->m_Events.CalculateTime(15000));
+ summon->m_Events.AddEventAtOffset(new DelayedCastEvent(summon, SPELL_SUMMON_NIGHTMARE_PORTAL, me->GetGUID(), 6s), 15s);
+ summon->m_Events.AddEventAtOffset(new AuraRemoveEvent(summon, SPELL_NIGHTMARE_PORTAL_VISUAL_PRE), 15s);
}
}
@@ -462,7 +459,7 @@ public:
if (!IsHeroic())
Talk(SAY_VALITHRIA_DREAM_PORTAL);
for (uint32 i = 0; i < _portalCount; ++i)
- me->CastSpell(me, SUMMON_PORTAL, false);
+ me->CastSpell(me, SPELL_PRE_SUMMON_DREAM_PORTAL, false);
_events.ScheduleEvent(EVENT_DREAM_PORTAL, 45s, 48s);
break;
case EVENT_DREAM_SLIP:
@@ -579,7 +576,7 @@ public:
void DoAction(int32 action) override
{
if (action == ACTION_DEATH)
- me->m_Events.AddEvent(new ValithriaDespawner(me), me->m_Events.CalculateTime(5000));
+ me->m_Events.AddEventAtOffset(new ValithriaDespawner(me), 5s);
else if (action == ACTION_ENTER_COMBAT)
{
if (!me->IsInCombat())
@@ -750,9 +747,9 @@ public:
void JustSummoned(Creature* summon) override
{
if (summon->GetEntry() == NPC_COLUMN_OF_FROST)
- summon->m_Events.AddEvent(new DelayedCastEvent(summon, SPELL_COLUMN_OF_FROST_DAMAGE, ObjectGuid::Empty, 8000), summon->m_Events.CalculateTime(2000));
+ summon->m_Events.AddEventAtOffset(new DelayedCastEvent(summon, SPELL_COLUMN_OF_FROST_DAMAGE, ObjectGuid::Empty, 8s), 2s);
else if (summon->GetEntry() == NPC_MANA_VOID)
- summon->DespawnOrUnsummon(36000);
+ summon->DespawnOrUnsummon(36s);
}
void UpdateAI(uint32 diff) override
@@ -885,8 +882,8 @@ public:
me->GetMotionMaster()->Clear(false);
me->GetMotionMaster()->MoveIdle();
// must use originalCaster the same for all clouds to allow stacking
- me->CastSpell(me, EMERALD_VIGOR, false, nullptr, nullptr, _instance->GetGuidData(DATA_VALITHRIA_DREAMWALKER));
- me->DespawnOrUnsummon(1000);
+ me->CastSpell(me, SPELL_EMERALD_VIGOR, false, nullptr, nullptr, _instance->GetGuidData(DATA_VALITHRIA_DREAMWALKER));
+ me->DespawnOrUnsummon(1s);
break;
default:
break;
@@ -1054,7 +1051,7 @@ public:
timer = 0;
me->SetDisplayId(11686);
me->SetUnitFlag(UNIT_FLAG_NOT_SELECTABLE);
- me->DespawnOrUnsummon(2000);
+ me->DespawnOrUnsummon(2s);
}
else
timer -= diff;
@@ -1096,7 +1093,7 @@ public:
void JustSummoned(Creature* summon) override
{
if (me->GetInstanceScript() && me->GetInstanceScript()->GetBossState(DATA_VALITHRIA_DREAMWALKER) == DONE)
- summon->DespawnOrUnsummon(1);
+ summon->DespawnOrUnsummon(1ms);
else if (Unit* target = SelectTargetFromPlayerList(200.0f))
summon->AI()->AttackStart(target);
}
diff --git a/src/server/scripts/Northrend/IcecrownCitadel/icecrown_citadel.cpp b/src/server/scripts/Northrend/IcecrownCitadel/icecrown_citadel.cpp
index 5c6e308310..8254ed5efb 100644
--- a/src/server/scripts/Northrend/IcecrownCitadel/icecrown_citadel.cpp
+++ b/src/server/scripts/Northrend/IcecrownCitadel/icecrown_citadel.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
@@ -533,13 +533,13 @@ public:
case EVENT_SAURFANG_RUN:
if (Creature* factionNPC = ObjectAccessor::GetCreature(*me, _factionNPC))
{
- factionNPC->GetMotionMaster()->MovePath(factionNPC->GetSpawnId() * 10, false);
- factionNPC->DespawnOrUnsummon(46500);
+ factionNPC->GetMotionMaster()->MoveWaypoint(factionNPC->GetSpawnId() * 10, false);
+ factionNPC->DespawnOrUnsummon(46500ms);
std::list<Creature*> followers;
factionNPC->GetCreaturesWithEntryInRange(followers, 30, _instance->GetData(DATA_TEAMID_IN_INSTANCE) == TEAM_HORDE ? NPC_KOR_KRON_GENERAL : NPC_ALLIANCE_COMMANDER);
for (Creature* follower : followers)
{
- follower->DespawnOrUnsummon(46500);
+ follower->DespawnOrUnsummon(46500ms);
}
}
me->setActive(false);
@@ -679,7 +679,7 @@ public:
{
case 1000:
case 11000:
- _events.ScheduleEvent(EVENT_ACTIVATE_TRAP, uint32(action));
+ _events.ScheduleEvent(EVENT_ACTIVATE_TRAP, Milliseconds(action));
break;
default:
break;
@@ -772,7 +772,7 @@ public:
}
}
- void SetGUID(ObjectGuid guid, int32 type/* = 0*/) override
+ void SetGUID(ObjectGuid const& guid, int32 type/* = 0*/) override
{
if (type == ACTION_VRYKUL_DEATH)
{
@@ -934,7 +934,7 @@ public:
case EVENT_START_PATHING:
me->RemoveUnitFlag(UNIT_FLAG_NON_ATTACKABLE);
me->SetImmuneToAll(false);
- Start(true, true);
+ Start(true);
break;
case EVENT_SCOURGE_STRIKE:
DoCastVictim(SPELL_SCOURGE_STRIKE);
@@ -1016,15 +1016,15 @@ public:
if (Creature* crok = ObjectAccessor::GetCreature(*me, instance->GetGuidData(DATA_CROK_SCOURGEBANE))) // _isEventDone = true, setActive(false)
crok->AI()->DoAction(ACTION_RESET_EVENT);
- uint64 delay = 6000;
+ Milliseconds delay = 6s;
for (uint32 i = 0; i < 4; ++i)
if (Creature* crusader = ObjectAccessor::GetCreature(*me, instance->GetGuidData(DATA_CAPTAIN_ARNATH + i)))
if (crusader->IsAlive())
{
if (crusader->GetEntry() == crusader->GetCreatureData()->id1)
{
- crusader->m_Events.AddEvent(new CaptainSurviveTalk(*crusader), crusader->m_Events.CalculateTime(delay));
- delay += 6000;
+ crusader->m_Events.AddEventAtOffset(new CaptainSurviveTalk(*crusader), delay);
+ delay += 6s;
}
else
Unit::Kill(crusader, crusader);
@@ -1810,7 +1810,7 @@ public:
{
_vehicleCheckTimer = 500;
if (!me->GetVehicle())
- me->DespawnOrUnsummon(100);
+ me->DespawnOrUnsummon(100ms);
}
else
_vehicleCheckTimer -= diff;
@@ -2151,7 +2151,7 @@ class spell_svalna_remove_spear : public SpellScript
{
if (Unit* vehicle = target->GetVehicleBase())
vehicle->RemoveAurasDueToSpell(SPELL_IMPALING_SPEAR);
- target->DespawnOrUnsummon(1);
+ target->DespawnOrUnsummon(1ms);
}
}
@@ -2796,38 +2796,38 @@ class SeveredEssenceSpellInfo
public:
uint8 Class;
uint32 id;
- uint32 cooldown_ms;
+ Milliseconds cooldown_ms;
uint8 targetType;
float range;
};
SeveredEssenceSpellInfo sesi_spells[] =
{
- {CLASS_SHAMAN, 71938, 5000, 1, 0.0f},
- {CLASS_PALADIN, 57767, 8000, 2, 30.0f},
- {CLASS_WARLOCK, 71937, 10000, 1, 0.0f},
- {CLASS_DEATH_KNIGHT, 49576, 15000, 1, 30.0f},
- {CLASS_ROGUE, 71933, 8000, 1, 0.0f},
- {CLASS_MAGE, 71928, 4000, 1, 40.0f},
- {CLASS_PALADIN, 71930, 5000, 2, 40.0f},
- {CLASS_ROGUE, 71955, 40000, 1, 30.0f},
- {CLASS_PRIEST, 71931, 5000, 2, 40.0f},
- {CLASS_SHAMAN, 71934, 7000, 1, 0.0f},
- {CLASS_DRUID, 71925, 5000, 1, 0.0f},
- {CLASS_DEATH_KNIGHT, 71951, 8000, 1, 0.0f},
- {CLASS_DEATH_KNIGHT, 71924, 8000, 1, 0.0f},
- {CLASS_WARLOCK, 71965, 20000, 0, 0.0f},
- {CLASS_PRIEST, 71932, 8000, 2, 40.0f},
- {CLASS_DRUID, 71926, 10000, 1, 0.0f},
- {CLASS_WARLOCK, 71936, 9000, 1, 0.0f},
- {CLASS_ROGUE, 57640, 3000, 1, 0.0f},
- {CLASS_WARRIOR, 71961, 5000, 1, 0.0f},
- {CLASS_MAGE, 71929, 10000, 1, 0.0f},
- {CLASS_WARRIOR, 53395, 5000, 1, 0.0f},
- {CLASS_WARRIOR, 71552, 5000, 1, 0.0f},
- {CLASS_HUNTER, 36984, 7000, 1, 0.0f},
- {CLASS_HUNTER, 29576, 5000, 1, 0.0f},
- {0, 0, 0, 0, 0.0f},
+ { CLASS_SHAMAN, 71938, 5s, 1, 0.0f },
+ { CLASS_PALADIN, 57767, 8s, 2, 30.0f },
+ { CLASS_WARLOCK, 71937, 10s, 1, 0.0f },
+ { CLASS_DEATH_KNIGHT, 49576, 15s, 1, 30.0f },
+ { CLASS_ROGUE, 71933, 8s, 1, 0.0f },
+ { CLASS_MAGE, 71928, 4s, 1, 40.0f },
+ { CLASS_PALADIN, 71930, 5s, 2, 40.0f },
+ { CLASS_ROGUE, 71955, 40s, 1, 30.0f },
+ { CLASS_PRIEST, 71931, 5s, 2, 40.0f },
+ { CLASS_SHAMAN, 71934, 7s, 1, 0.0f },
+ { CLASS_DRUID, 71925, 5s, 1, 0.0f },
+ { CLASS_DEATH_KNIGHT, 71951, 8s, 1, 0.0f },
+ { CLASS_DEATH_KNIGHT, 71924, 8s, 1, 0.0f },
+ { CLASS_WARLOCK, 71965, 20s, 0, 0.0f },
+ { CLASS_PRIEST, 71932, 8s, 2, 40.0f },
+ { CLASS_DRUID, 71926, 10s, 1, 0.0f },
+ { CLASS_WARLOCK, 71936, 9s, 1, 0.0f },
+ { CLASS_ROGUE, 57640, 3s, 1, 0.0f },
+ { CLASS_WARRIOR, 71961, 5s, 1, 0.0f },
+ { CLASS_MAGE, 71929, 10s, 1, 0.0f },
+ { CLASS_WARRIOR, 53395, 5s, 1, 0.0f },
+ { CLASS_WARRIOR, 71552, 5s, 1, 0.0f },
+ { CLASS_HUNTER, 36984, 7s, 1, 0.0f },
+ { CLASS_HUNTER, 29576, 5s, 1, 0.0f },
+ { 0, 0, 0ms, 0, 0.0f }
};
class npc_icc_severed_essence : public CreatureScript
@@ -2862,7 +2862,7 @@ public:
if (sesi_spells[i].id)
{
if (Class == sesi_spells[i].Class)
- events.ScheduleEvent(i + 1, sesi_spells[i].cooldown_ms / 4);
+ events.ScheduleEvent(i + 1, Milliseconds(sesi_spells[i].cooldown_ms / 4));
}
else
break;
@@ -2895,7 +2895,7 @@ public:
if (target)
me->CastSpell(target, sesi_spells[e - 1].id, TRIGGERED_IGNORE_SHAPESHIFT);
- events.RepeatEvent(sesi_spells[e - 1].cooldown_ms);
+ events.Repeat(sesi_spells[e - 1].cooldown_ms);
}
if (Class == CLASS_HUNTER)
@@ -3337,7 +3337,7 @@ public:
void ScheduleBroodlings()
{
for (uint8 i = 0; i < 30; ++i)
- events.ScheduleEvent(EVENT_SUMMON_BROODLING, 10000 + i * 350);
+ events.ScheduleEvent(EVENT_SUMMON_BROODLING, Milliseconds(10000 + i * 350));
}
void SummonBroodling()
@@ -3347,7 +3347,7 @@ public:
if (Creature* broodling = me->SummonCreature(NPC_NERUBAR_BROODLING, me->GetPositionX() + cos(o) * dist, me->GetPositionY() + std::sin(o) * dist, 250.0f, Position::NormalizeOrientation(o - M_PI)))
{
broodling->CastSpell(broodling, SPELL_WEB_BEAM2, false);
- broodling->GetMotionMaster()->MovePoint(POINT_ENTER_COMBAT, broodling->GetPositionX(), broodling->GetPositionY(), 213.03f, false);
+ broodling->GetMotionMaster()->MovePoint(POINT_ENTER_COMBAT, broodling->GetPositionX(), broodling->GetPositionY(), 213.03f, FORCED_MOVEMENT_NONE, 0.f, 0.f, false);
}
}
@@ -3521,7 +3521,7 @@ public:
me->CastSpell(me, SPELL_GIANT_INSECT_SWARM, true);
for (uint8 i = 0; i < 60; ++i)
- events.ScheduleEvent(EVENT_GAUNTLET_PHASE1, i * 1000);
+ events.ScheduleEvent(EVENT_GAUNTLET_PHASE1, Seconds(i));
events.ScheduleEvent(EVENT_GAUNTLET_PHASE2, 1min);
}
}
diff --git a/src/server/scripts/Northrend/IcecrownCitadel/icecrown_citadel.h b/src/server/scripts/Northrend/IcecrownCitadel/icecrown_citadel.h
index 20983aa15e..d3f5a724b5 100644
--- a/src/server/scripts/Northrend/IcecrownCitadel/icecrown_citadel.h
+++ b/src/server/scripts/Northrend/IcecrownCitadel/icecrown_citadel.h
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/scripts/Northrend/IcecrownCitadel/icecrown_citadel_teleport.cpp b/src/server/scripts/Northrend/IcecrownCitadel/icecrown_citadel_teleport.cpp
index cacdc72373..b873233ac5 100644
--- a/src/server/scripts/Northrend/IcecrownCitadel/icecrown_citadel_teleport.cpp
+++ b/src/server/scripts/Northrend/IcecrownCitadel/icecrown_citadel_teleport.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/scripts/Northrend/IcecrownCitadel/instance_icecrown_citadel.cpp b/src/server/scripts/Northrend/IcecrownCitadel/instance_icecrown_citadel.cpp
index 394225e21a..3f0b454902 100644
--- a/src/server/scripts/Northrend/IcecrownCitadel/instance_icecrown_citadel.cpp
+++ b/src/server/scripts/Northrend/IcecrownCitadel/instance_icecrown_citadel.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
@@ -268,7 +268,7 @@ public:
if (GetBossState(DATA_LADY_DEATHWHISPER) == DONE && GetBossState(DATA_ICECROWN_GUNSHIP_BATTLE) != DONE)
SpawnGunship();
- if (GetBossState(DATA_SINDRAGOSA) != DONE && IsSindragosaIntroDone && !GetCreature(DATA_SINDRAGOSA) && Events.GetTimeUntilEvent(EVENT_RESPAWN_SINDRAGOSA) == Milliseconds::max())
+ if (GetBossState(DATA_SINDRAGOSA) != DONE && IsSindragosaIntroDone && !GetCreature(DATA_SINDRAGOSA) && !Events.HasTimeUntilEvent(EVENT_RESPAWN_SINDRAGOSA))
{
Events.ScheduleEvent(EVENT_RESPAWN_SINDRAGOSA, 30s);
}
@@ -499,7 +499,7 @@ public:
break;
case NPC_INFILTRATOR_MINCHAR_BQ:
if (BloodQuickeningState == DONE)
- creature->DespawnOrUnsummon(1);
+ creature->DespawnOrUnsummon(1ms);
break;
case NPC_MINCHAR_BEAM_STALKER:
if (BloodQuickeningState != DONE)
@@ -513,7 +513,7 @@ public:
spellId = BLOOD_BEAM_VISUAL_LLEG;
else
spellId = BLOOD_BEAM_VISUAL_RLEG;
- creature->m_Events.AddEvent(new DelayedCastMincharEvent(creature, spellId), creature->m_Events.CalculateTime(1000));
+ creature->m_Events.AddEventAtOffset(new DelayedCastMincharEvent(creature, spellId), 1s);
}
break;
case NPC_SKYBREAKER_DECKHAND:
@@ -608,7 +608,7 @@ public:
std::string name2("Kor'kron ");
if (!creature->GetTransport() && creature->GetPositionZ() <= 205.0f && creature->GetExactDist2d(-439.0f, 2210.0f) <= 150.0f && (creature->GetEntry() == 37544 || creature->GetEntry() == 37545 || creature->GetName().compare(0, name1.length(), name1) == 0 || creature->GetName().compare(0, name2.length(), name2) == 0))
if (!creature->GetLootRecipient())
- creature->m_Events.AddEvent(new RespawnEvent(*creature), creature->m_Events.CalculateTime(3000));
+ creature->m_Events.AddEventAtOffset(new RespawnEvent(*creature), 3s);
switch (creature->GetEntry())
{
@@ -661,7 +661,7 @@ public:
{
c->CastSpell(c, VOID_ZONE_VISUAL, true);
unit->SummonCreature(NPC_RISEN_DEATHSPEAKER_SERVANT, *unit, TEMPSUMMON_MANUAL_DESPAWN);
- unit->ToCreature()->DespawnOrUnsummon(3000);
+ unit->ToCreature()->DespawnOrUnsummon(3s);
}
break;
default:
@@ -1742,7 +1742,7 @@ public:
{
sindragosa->setActive(true);
sindragosa->SetDisableGravity(true);
- sindragosa->GetMotionMaster()->MovePath(NPC_SINDRAGOSA * 10, true);
+ sindragosa->GetMotionMaster()->MoveWaypoint(NPC_SINDRAGOSA * 10, true);
if (TempSummon* summon = sindragosa->ToTempSummon())
{
diff --git a/src/server/scripts/Northrend/Naxxramas/boss_anubrekhan.cpp b/src/server/scripts/Northrend/Naxxramas/boss_anubrekhan.cpp
index b8cc1d9c2a..a312ea1d71 100644
--- a/src/server/scripts/Northrend/Naxxramas/boss_anubrekhan.cpp
+++ b/src/server/scripts/Northrend/Naxxramas/boss_anubrekhan.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
@@ -35,10 +35,8 @@ enum GuardSays
enum Spells
{
- SPELL_IMPALE_10 = 28783,
- SPELL_IMPALE_25 = 56090,
- SPELL_LOCUST_SWARM_10 = 28785,
- SPELL_LOCUST_SWARM_25 = 54021,
+ SPELL_IMPALE = 28783,
+ SPELL_LOCUST_SWARM = 28785,
SPELL_SUMMON_CORPSE_SCRABS_5 = 29105,
SPELL_SUMMON_CORPSE_SCRABS_10 = 28864,
SPELL_BERSERK = 26662
@@ -138,12 +136,12 @@ public:
}
ScheduleTimedEvent(15s, [&] {
- DoCastRandomTarget(RAID_MODE(SPELL_IMPALE_10, SPELL_IMPALE_25));
+ DoCastRandomTarget(SPELL_IMPALE);
}, 20s);
ScheduleTimedEvent(70s, 2min, [&] {
Talk(EMOTE_LOCUST);
- DoCastSelf(RAID_MODE(SPELL_LOCUST_SWARM_10, SPELL_LOCUST_SWARM_25));
+ DoCastSelf(SPELL_LOCUST_SWARM);
me->m_Events.AddEventAtOffset([&]
{
diff --git a/src/server/scripts/Northrend/Naxxramas/boss_faerlina.cpp b/src/server/scripts/Northrend/Naxxramas/boss_faerlina.cpp
index 9ab1fcde0f..d6ddf9c64c 100644
--- a/src/server/scripts/Northrend/Naxxramas/boss_faerlina.cpp
+++ b/src/server/scripts/Northrend/Naxxramas/boss_faerlina.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
@@ -18,6 +18,7 @@
#include "CreatureScript.h"
#include "ScriptedCreature.h"
#include "SpellInfo.h"
+#include "SpellMgr.h"
#include "naxxramas.h"
enum Yells
@@ -37,7 +38,6 @@ enum Spells
SPELL_RAIN_OF_FIRE = 28794,
SPELL_FRENZY = 28798,
SPELL_WIDOWS_EMBRACE = 28732,
- SPELL_MINION_WIDOWS_EMBRACE = 54097
};
enum Groups
@@ -143,7 +143,7 @@ public:
void SpellHit(Unit* caster, SpellInfo const* spell) override
{
- if (spell->Id == RAID_MODE(SPELL_WIDOWS_EMBRACE, SPELL_MINION_WIDOWS_EMBRACE))
+ if (spell->Id == sSpellMgr->GetSpellIdForDifficulty(SPELL_WIDOWS_EMBRACE, me))
{
Talk(EMOTE_WIDOWS_EMBRACE);
scheduler.RescheduleGroup(GROUP_FRENZY, 1min);
diff --git a/src/server/scripts/Northrend/Naxxramas/boss_four_horsemen.cpp b/src/server/scripts/Northrend/Naxxramas/boss_four_horsemen.cpp
index 6439f45add..693253cbb9 100644
--- a/src/server/scripts/Northrend/Naxxramas/boss_four_horsemen.cpp
+++ b/src/server/scripts/Northrend/Naxxramas/boss_four_horsemen.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
@@ -33,23 +33,17 @@ enum Spells
SPELL_MARK_OF_ZELIEK = 28835,
SPELL_MARK_DAMAGE = 28836,
// Korth'azz
- SPELL_KORTHAZZ_METEOR_10 = 28884,
- SPELL_KORTHAZZ_METEOR_25 = 57467,
+ SPELL_KORTHAZZ_METEOR = 28884,
// Blaumeux
- SPELL_BLAUMEUX_SHADOW_BOLT_10 = 57374,
- SPELL_BLAUMEUX_SHADOW_BOLT_25 = 57464,
- SPELL_BLAUMEUX_VOID_ZONE_10 = 28863,
- SPELL_BLAUMEUX_VOID_ZONE_25 = 57463,
+ SPELL_BLAUMEUX_SHADOW_BOLT = 57374,
+ SPELL_BLAUMEUX_VOID_ZONE = 28863,
SPELL_BLAUMEUX_UNYIELDING_PAIN = 57381,
// Zeliek
- SPELL_ZELIEK_HOLY_WRATH_10 = 28883,
- SPELL_ZELIEK_HOLY_WRATH_25 = 57466,
- SPELL_ZELIEK_HOLY_BOLT_10 = 57376,
- SPELL_ZELIEK_HOLY_BOLT_25 = 57465,
+ SPELL_ZELIEK_HOLY_WRATH = 28883,
+ SPELL_ZELIEK_HOLY_BOLT = 57376,
SPELL_ZELIEK_CONDEMNATION = 57377,
// Rivendare
- SPELL_RIVENDARE_UNHOLY_SHADOW_10 = 28882,
- SPELL_RIVENDARE_UNHOLY_SHADOW_25 = 57369
+ SPELL_RIVENDARE_UNHOLY_SHADOW = 28882,
};
enum Events
@@ -87,15 +81,13 @@ enum FourHorsemen
const uint32 TABLE_SPELL_MARK[4] = {SPELL_MARK_OF_ZELIEK, SPELL_MARK_OF_BLAUMEUX, SPELL_MARK_OF_RIVENDARE, SPELL_MARK_OF_KORTHAZZ};
// PRIMARY SPELL
-const uint32 TABLE_SPELL_PRIMARY_10[4] = {SPELL_ZELIEK_HOLY_BOLT_10, SPELL_BLAUMEUX_SHADOW_BOLT_10, SPELL_RIVENDARE_UNHOLY_SHADOW_10, SPELL_KORTHAZZ_METEOR_10};
-const uint32 TABLE_SPELL_PRIMARY_25[4] = {SPELL_ZELIEK_HOLY_BOLT_25, SPELL_BLAUMEUX_SHADOW_BOLT_25, SPELL_RIVENDARE_UNHOLY_SHADOW_25, SPELL_KORTHAZZ_METEOR_25};
+const uint32 TABLE_SPELL_PRIMARY[4] = {SPELL_ZELIEK_HOLY_BOLT, SPELL_BLAUMEUX_SHADOW_BOLT, SPELL_RIVENDARE_UNHOLY_SHADOW, SPELL_KORTHAZZ_METEOR};
// PUNISH
const uint32 TABLE_SPELL_PUNISH[4] = {SPELL_ZELIEK_CONDEMNATION, SPELL_BLAUMEUX_UNYIELDING_PAIN, 0, 0};
// SECONDARY SPELL
-const uint32 TABLE_SPELL_SECONDARY_10[4] = {SPELL_ZELIEK_HOLY_WRATH_10, SPELL_BLAUMEUX_VOID_ZONE_10, 0, 0};
-const uint32 TABLE_SPELL_SECONDARY_25[4] = {SPELL_ZELIEK_HOLY_WRATH_25, SPELL_BLAUMEUX_VOID_ZONE_25, 0, 0};
+const uint32 TABLE_SPELL_SECONDARY[4] = {SPELL_ZELIEK_HOLY_WRATH, SPELL_BLAUMEUX_VOID_ZONE, 0, 0};
const Position WaypointPositions[12] =
{
@@ -308,11 +300,11 @@ public:
return;
case EVENT_PRIMARY_SPELL:
Talk(SAY_TAUNT);
- me->CastSpell(me->GetVictim(), RAID_MODE(TABLE_SPELL_PRIMARY_10[horsemanId], TABLE_SPELL_PRIMARY_25[horsemanId]), false);
+ me->CastSpell(me->GetVictim(), TABLE_SPELL_PRIMARY[horsemanId], false);
events.Repeat(15s);
return;
case EVENT_SECONDARY_SPELL:
- me->CastSpell(me->GetVictim(), RAID_MODE(TABLE_SPELL_SECONDARY_10[horsemanId], TABLE_SPELL_SECONDARY_25[horsemanId]), false);
+ me->CastSpell(me->GetVictim(), TABLE_SPELL_SECONDARY[horsemanId], false);
events.Repeat(15s);
return;
}
@@ -328,7 +320,7 @@ public:
}
if (me->IsWithinDistInMap(me->GetVictim(), 45.0f) && me->IsValidAttackTarget(me->GetVictim()))
{
- DoCastVictim(RAID_MODE(TABLE_SPELL_PRIMARY_10[horsemanId], TABLE_SPELL_PRIMARY_25[horsemanId]));
+ DoCastVictim(TABLE_SPELL_PRIMARY[horsemanId]);
}
else if (!me->IsWithinDistInMap(me->GetVictim(), 45.0f) || !me->IsValidAttackTarget(me->GetVictim()))
{
diff --git a/src/server/scripts/Northrend/Naxxramas/boss_gluth.cpp b/src/server/scripts/Northrend/Naxxramas/boss_gluth.cpp
index 30b678a876..189b24880b 100644
--- a/src/server/scripts/Northrend/Naxxramas/boss_gluth.cpp
+++ b/src/server/scripts/Northrend/Naxxramas/boss_gluth.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
@@ -25,10 +25,8 @@
enum Spells
{
SPELL_MORTAL_WOUND = 25646,
- SPELL_ENRAGE_10 = 28371,
- SPELL_ENRAGE_25 = 54427,
- SPELL_DECIMATE_10 = 28374,
- SPELL_DECIMATE_25 = 54426,
+ SPELL_ENRAGE = 28371,
+ SPELL_DECIMATE = 28374,
SPELL_DECIMATE_DAMAGE = 28375,
SPELL_BERSERK = 26662,
SPELL_INFECTED_WOUND = 29306,
@@ -115,7 +113,7 @@ public:
me->SetInCombatWithZone();
events.ScheduleEvent(EVENT_MORTAL_WOUND, 10s);
events.ScheduleEvent(EVENT_ENRAGE, 22s);
- events.ScheduleEvent(EVENT_DECIMATE, RAID_MODE(110000, 90000));
+ events.ScheduleEvent(EVENT_DECIMATE, RAID_MODE(110s, 90s));
events.ScheduleEvent(EVENT_BERSERK, 6min);
events.ScheduleEvent(EVENT_SUMMON_ZOMBIE, 10s);
events.ScheduleEvent(EVENT_CAN_EAT_ZOMBIE, 1s);
@@ -184,7 +182,7 @@ public:
break;
case EVENT_ENRAGE:
Talk(EMOTE_ENRAGE);
- me->CastSpell(me, RAID_MODE(SPELL_ENRAGE_10, SPELL_ENRAGE_25), true);
+ me->CastSpell(me, SPELL_ENRAGE, true);
events.Repeat(22s);
break;
case EVENT_MORTAL_WOUND:
@@ -193,8 +191,8 @@ public:
break;
case EVENT_DECIMATE:
Talk(EMOTE_DECIMATE);
- me->CastSpell(me, RAID_MODE(SPELL_DECIMATE_10, SPELL_DECIMATE_25), false);
- events.RepeatEvent(RAID_MODE(110000, 90000));
+ me->CastSpell(me, SPELL_DECIMATE, false);
+ events.Repeat(RAID_MODE(110s, 90s));
break;
case EVENT_SUMMON_ZOMBIE:
{
@@ -218,7 +216,7 @@ public:
break;
}
case EVENT_CAN_EAT_ZOMBIE:
- events.RepeatEvent(1000);
+ events.Repeat(1s);
if (me->GetVictim()->GetEntry() == NPC_ZOMBIE_CHOW && me->IsWithinMeleeRange(me->GetVictim()))
{
me->CastCustomSpell(SPELL_CHOW_SEARCHER, SPELLVALUE_RADIUS_MOD, 20000, me, true);
diff --git a/src/server/scripts/Northrend/Naxxramas/boss_gothik.cpp b/src/server/scripts/Northrend/Naxxramas/boss_gothik.cpp
index 939f0bf194..23eb083d22 100644
--- a/src/server/scripts/Northrend/Naxxramas/boss_gothik.cpp
+++ b/src/server/scripts/Northrend/Naxxramas/boss_gothik.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
@@ -41,8 +41,7 @@ enum Spells
{
// Gothik
SPELL_HARVEST_SOUL = 28679,
- SPELL_SHADOW_BOLT_10 = 29317,
- SPELL_SHADOW_BOLT_25 = 56405,
+ SPELL_SHADOW_BOLT = 29317,
// Teleport spells
SPELL_TELEPORT_DEAD = 28025,
SPELL_TELEPORT_LIVE = 28026,
@@ -267,7 +266,7 @@ public:
std::vector<Player*> tList;
for(Map::PlayerList::const_iterator itr = pList.begin(); itr != pList.end(); ++itr)
{
- if (!me->IsWithinDistInMap(itr->GetSource(), 200.0f, true, false) || !itr->GetSource()->IsAlive() || itr->GetSource()->IsGameMaster())
+ if (!me->IsWithinDistInMap(itr->GetSource(), 200.0f, true, false, false) || !itr->GetSource()->IsAlive() || itr->GetSource()->IsGameMaster())
{
continue;
}
@@ -400,7 +399,7 @@ public:
Talk(SAY_INTRO_4);
break;
case EVENT_SHADOW_BOLT:
- me->CastSpell(me->GetVictim(), RAID_MODE(SPELL_SHADOW_BOLT_10, SPELL_SHADOW_BOLT_25), false);
+ me->CastSpell(me->GetVictim(), SPELL_SHADOW_BOLT, false);
events.Repeat(1s);
break;
case EVENT_HARVEST_SOUL:
@@ -440,7 +439,7 @@ public:
if (gothikWaves[waveCount][0])
{
SummonHelpers(gothikWaves[waveCount][0]);
- events.RepeatEvent(gothikWaves[waveCount][1]);
+ events.Repeat(Milliseconds(gothikWaves[waveCount][1]));
}
else
{
@@ -522,7 +521,7 @@ public:
events.ScheduleEvent(EVENT_SHADOW_BOLT_VOLLEY, 3s);
break;
case NPC_DEAD_RIDER:
- events.ScheduleEvent(EVENT_DRAIN_LIFE, 2000ms, 3500ms);
+ events.ScheduleEvent(EVENT_DRAIN_LIFE, 2s, 3500ms);
events.ScheduleEvent(EVENT_UNHOLY_FRENZY, 5s, 9s);
break;
case NPC_DEAD_HORSE:
diff --git a/src/server/scripts/Northrend/Naxxramas/boss_grobbulus.cpp b/src/server/scripts/Northrend/Naxxramas/boss_grobbulus.cpp
index 9a88b24a7b..e37646f122 100644
--- a/src/server/scripts/Northrend/Naxxramas/boss_grobbulus.cpp
+++ b/src/server/scripts/Northrend/Naxxramas/boss_grobbulus.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
@@ -29,10 +29,8 @@ enum Spells
SPELL_POISON_CLOUD = 28240,
SPELL_MUTATING_INJECTION = 28169,
SPELL_MUTATING_EXPLOSION = 28206,
- SPELL_SLIME_SPRAY_10 = 28157,
- SPELL_SLIME_SPRAY_25 = 54364,
- SPELL_POISON_CLOUD_DAMAGE_AURA_10 = 28158,
- SPELL_POISON_CLOUD_DAMAGE_AURA_25 = 54362,
+ SPELL_SLIME_SPRAY = 28157,
+ SPELL_POISON_CLOUD_DAMAGE_AURA = 28158,
SPELL_BERSERK = 26662,
SPELL_BOMBARD_SLIME = 28280
};
@@ -102,15 +100,7 @@ public:
events.ScheduleEvent(EVENT_POISON_CLOUD, 15s);
events.ScheduleEvent(EVENT_MUTATING_INJECTION, 20s);
events.ScheduleEvent(EVENT_SLIME_SPRAY, 10s);
- events.ScheduleEvent(EVENT_BERSERK, RAID_MODE(720000, 540000));
- }
-
- void SpellHitTarget(Unit* target, SpellInfo const* spellInfo) override
- {
- if (spellInfo->Id == RAID_MODE(SPELL_SLIME_SPRAY_10, SPELL_SLIME_SPRAY_25) && target->IsPlayer())
- {
- me->SummonCreature(NPC_FALLOUT_SLIME, target->GetPositionX(), target->GetPositionY(), target->GetPositionZ());
- }
+ events.ScheduleEvent(EVENT_BERSERK, RAID_MODE(720s, 540s));
}
void JustSummoned(Creature* cr) override
@@ -169,7 +159,7 @@ public:
break;
case EVENT_SLIME_SPRAY:
Talk(EMOTE_SLIME);
- me->CastSpell(me->GetVictim(), RAID_MODE(SPELL_SLIME_SPRAY_10, SPELL_SLIME_SPRAY_25), false);
+ me->CastSpell(me->GetVictim(), SPELL_SLIME_SPRAY, false);
events.Repeat(20s);
break;
case EVENT_MUTATING_INJECTION:
@@ -177,7 +167,7 @@ public:
{
me->CastSpell(target, SPELL_MUTATING_INJECTION, false);
}
- events.RepeatEvent(6000 + uint32(120 * me->GetHealthPct()));
+ events.Repeat(Milliseconds(6000 + uint32(120 * me->GetHealthPct())));
break;
}
DoMeleeAttackIfReady();
@@ -223,7 +213,7 @@ public:
auraVisualTimer += diff;
if (auraVisualTimer >= 1000)
{
- me->CastSpell(me, (me->GetMap()->Is25ManRaid() ? SPELL_POISON_CLOUD_DAMAGE_AURA_25 : SPELL_POISON_CLOUD_DAMAGE_AURA_10), true);
+ me->CastSpell(me, SPELL_POISON_CLOUD_DAMAGE_AURA, true);
auraVisualTimer = 0;
}
}
@@ -291,10 +281,27 @@ class spell_grobbulus_mutating_injection_aura : public AuraScript
}
};
+class spell_grobbulus_slime_spray : public SpellScript
+{
+ PrepareSpellScript(spell_grobbulus_slime_spray);
+
+ void HandleHit()
+ {
+ if (Unit* target = GetHitUnit())
+ GetCaster()->SummonCreature(NPC_FALLOUT_SLIME, target->GetPositionX(), target->GetPositionY(), target->GetPositionZ());
+ }
+
+ void Register() override
+ {
+ OnHit += SpellHitFn(spell_grobbulus_slime_spray::HandleHit);
+ }
+};
+
void AddSC_boss_grobbulus()
{
new boss_grobbulus();
new boss_grobbulus_poison_cloud();
RegisterSpellScript(spell_grobbulus_mutating_injection_aura);
RegisterSpellScript(spell_grobbulus_poison);
+ RegisterSpellScript(spell_grobbulus_slime_spray);
}
diff --git a/src/server/scripts/Northrend/Naxxramas/boss_heigan.cpp b/src/server/scripts/Northrend/Naxxramas/boss_heigan.cpp
index de73995e96..b7a3822d51 100644
--- a/src/server/scripts/Northrend/Naxxramas/boss_heigan.cpp
+++ b/src/server/scripts/Northrend/Naxxramas/boss_heigan.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
@@ -34,8 +34,7 @@ enum Says
enum Spells
{
SPELL_SPELL_DISRUPTION = 29310,
- SPELL_DECREPIT_FEVER_10 = 29998,
- SPELL_DECREPIT_FEVER_25 = 55011,
+ SPELL_DECREPIT_FEVER = 29998,
SPELL_PLAGUE_CLOUD = 29350,
SPELL_TELEPORT_SELF = 30211
};
@@ -168,7 +167,7 @@ public:
events.Repeat(10s);
break;
case EVENT_DECEPIT_FEVER:
- me->CastSpell(me, RAID_MODE(SPELL_DECREPIT_FEVER_10, SPELL_DECREPIT_FEVER_25), false);
+ me->CastSpell(me, SPELL_DECREPIT_FEVER, false);
events.Repeat(22s, 25s);
break;
case EVENT_PLAGUE_CLOUD:
diff --git a/src/server/scripts/Northrend/Naxxramas/boss_kelthuzad.cpp b/src/server/scripts/Northrend/Naxxramas/boss_kelthuzad.cpp
index 57866c7b00..38fce66207 100644
--- a/src/server/scripts/Northrend/Naxxramas/boss_kelthuzad.cpp
+++ b/src/server/scripts/Northrend/Naxxramas/boss_kelthuzad.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
@@ -43,10 +43,8 @@ enum Yells
enum Spells
{
// Kel'Thzuad
- SPELL_FROST_BOLT_SINGLE_10 = 28478,
- SPELL_FROST_BOLT_SINGLE_25 = 55802,
- SPELL_FROST_BOLT_MULTI_10 = 28479,
- SPELL_FROST_BOLT_MULTI_25 = 55807,
+ SPELL_FROST_BOLT_SINGLE = 28478,
+ SPELL_FROST_BOLT_MULTI = 28479,
SPELL_SHADOW_FISURE = 27810,
SPELL_VOID_BLAST = 27812,
SPELL_DETONATE_MANA = 27819,
@@ -367,11 +365,11 @@ public:
me->CastSpell(me, SPELL_BERSERK, true);
break;
case EVENT_FROST_BOLT_SINGLE:
- me->CastSpell(me->GetVictim(), RAID_MODE(SPELL_FROST_BOLT_SINGLE_10, SPELL_FROST_BOLT_SINGLE_25), false);
+ me->CastSpell(me->GetVictim(), SPELL_FROST_BOLT_SINGLE, false);
events.Repeat(2s, 10s);
break;
case EVENT_FROST_BOLT_MULTI:
- me->CastSpell(me, RAID_MODE(SPELL_FROST_BOLT_MULTI_10, SPELL_FROST_BOLT_MULTI_25), false);
+ me->CastSpell(me, SPELL_FROST_BOLT_MULTI, false);
events.Repeat(15s, 30s);
break;
case EVENT_SHADOW_FISSURE:
@@ -451,7 +449,7 @@ public:
cr->AI()->Talk(SAY_ANSWER_REQUEST);
for (uint8 i = 0 ; i < RAID_MODE(2, 4); ++i)
- events.ScheduleEvent(EVENT_SUMMON_GUARDIAN_OF_ICECROWN, 10000 + (i * 5000));
+ events.ScheduleEvent(EVENT_SUMMON_GUARDIAN_OF_ICECROWN, Milliseconds(10000 + (i * 5000)));
break;
}
@@ -507,7 +505,7 @@ public:
{
if (!me->IsInCombat())
{
- me->DespawnOrUnsummon(500);
+ me->DespawnOrUnsummon(500ms);
}
}
if (param == ACTION_GUARDIANS_OFF)
diff --git a/src/server/scripts/Northrend/Naxxramas/boss_loatheb.cpp b/src/server/scripts/Northrend/Naxxramas/boss_loatheb.cpp
index fe8d1589e2..0a91706ea8 100644
--- a/src/server/scripts/Northrend/Naxxramas/boss_loatheb.cpp
+++ b/src/server/scripts/Northrend/Naxxramas/boss_loatheb.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
@@ -23,10 +23,8 @@ enum Spells
{
SPELL_NECROTIC_AURA = 55593,
SPELL_SUMMON_SPORE = 29234,
- SPELL_DEATHBLOOM_10 = 29865,
- SPELL_DEATHBLOOM_25 = 55053,
- SPELL_INEVITABLE_DOOM_10 = 29204,
- SPELL_INEVITABLE_DOOM_25 = 55052,
+ SPELL_DEATHBLOOM = 29865,
+ SPELL_INEVITABLE_DOOM = 29204,
SPELL_BERSERK = 26662
};
@@ -134,11 +132,11 @@ public:
events.Repeat(20s);
break;
case EVENT_DEATHBLOOM:
- me->CastSpell(me, RAID_MODE(SPELL_DEATHBLOOM_10, SPELL_DEATHBLOOM_25), false);
+ me->CastSpell(me, SPELL_DEATHBLOOM, false);
events.Repeat(30s);
break;
case EVENT_INEVITABLE_DOOM:
- me->CastSpell(me, RAID_MODE(SPELL_INEVITABLE_DOOM_10, SPELL_INEVITABLE_DOOM_25), false);
+ me->CastSpell(me, SPELL_INEVITABLE_DOOM, false);
doomCounter++;
events.Repeat(doomCounter < 6 ? 30s : 15s);
break;
diff --git a/src/server/scripts/Northrend/Naxxramas/boss_maexxna.cpp b/src/server/scripts/Northrend/Naxxramas/boss_maexxna.cpp
index 76bf91ccb0..ce6c18f110 100644
--- a/src/server/scripts/Northrend/Naxxramas/boss_maexxna.cpp
+++ b/src/server/scripts/Northrend/Naxxramas/boss_maexxna.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
@@ -26,14 +26,10 @@
enum Spells
{
- SPELL_WEB_SPRAY_10 = 29484,
- SPELL_WEB_SPRAY_25 = 54125,
- SPELL_POISON_SHOCK_10 = 28741,
- SPELL_POISON_SHOCK_25 = 54122,
- SPELL_NECROTIC_POISON_10 = 54121,
- SPELL_NECROTIC_POISON_25 = 28776,
- SPELL_FRENZY_10 = 54123,
- SPELL_FRENZY_25 = 54124,
+ SPELL_WEB_SPRAY = 29484,
+ SPELL_POISON_SHOCK = 28741,
+ SPELL_NECROTIC_POISON = 54121,
+ SPELL_FRENZY = 54123,
SPELL_WEB_WRAP_STUN = 28622,
SPELL_WEB_WRAP_SUMMON = 28627,
SPELL_WEB_WRAP_KILL_WEBS = 52512,
@@ -231,15 +227,15 @@ public:
{
case EVENT_WEB_SPRAY:
Talk(EMOTE_WEB_SPRAY);
- me->CastSpell(me, RAID_MODE(SPELL_WEB_SPRAY_10, SPELL_WEB_SPRAY_25), true);
+ me->CastSpell(me, SPELL_WEB_SPRAY, true);
events.Repeat(40s);
break;
case EVENT_POISON_SHOCK:
- me->CastSpell(me->GetVictim(), RAID_MODE(SPELL_POISON_SHOCK_10, SPELL_POISON_SHOCK_25), false);
+ me->CastSpell(me->GetVictim(), SPELL_POISON_SHOCK, false);
events.Repeat(10s);
break;
case EVENT_NECROTIC_POISON:
- me->CastSpell(me->GetVictim(), RAID_MODE(SPELL_NECROTIC_POISON_10, SPELL_NECROTIC_POISON_25), false);
+ me->CastSpell(me->GetVictim(), SPELL_NECROTIC_POISON, false);
events.Repeat(30s);
break;
case EVENT_SUMMON_SPIDERLINGS:
@@ -253,7 +249,7 @@ public:
case EVENT_HEALTH_CHECK:
if (me->GetHealthPct() < 30)
{
- me->CastSpell(me, RAID_MODE(SPELL_FRENZY_10, SPELL_FRENZY_25), true);
+ me->CastSpell(me, SPELL_FRENZY, true);
break;
}
events.Repeat(1s);
diff --git a/src/server/scripts/Northrend/Naxxramas/boss_noth.cpp b/src/server/scripts/Northrend/Naxxramas/boss_noth.cpp
index 79045abcfd..33d6ff3917 100644
--- a/src/server/scripts/Northrend/Naxxramas/boss_noth.cpp
+++ b/src/server/scripts/Northrend/Naxxramas/boss_noth.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
@@ -34,10 +34,8 @@ enum Says
enum Spells
{
- SPELL_CURSE_OF_THE_PLAGUEBRINGER_10 = 29213,
- SPELL_CURSE_OF_THE_PLAGUEBRINGER_25 = 54835,
- SPELL_CRIPPLE_10 = 29212,
- SPELL_CRIPPLE_25 = 54814,
+ SPELL_CURSE_OF_THE_PLAGUEBRINGER = 29213,
+ SPELL_CRIPPLE = 29212,
SPELL_SUMMON_PLAGUED_WARRIORS = 29237,
SPELL_TELEPORT = 29216,
SPELL_TELEPORT_BACK = 29231,
@@ -207,7 +205,7 @@ public:
case EVENT_CURSE:
if (events.GetPhaseMask() == 0)
{
- me->CastCustomSpell(RAID_MODE(SPELL_CURSE_OF_THE_PLAGUEBRINGER_10, SPELL_CURSE_OF_THE_PLAGUEBRINGER_25), SPELLVALUE_MAX_TARGETS, RAID_MODE(3, 10), me, false);
+ me->CastCustomSpell(SPELL_CURSE_OF_THE_PLAGUEBRINGER, SPELLVALUE_MAX_TARGETS, RAID_MODE(3, 10), me, false);
}
events.Repeat(25s);
break;
@@ -228,7 +226,7 @@ public:
break;
case EVENT_BLINK:
DoResetThreatList();
- me->CastSpell(me, RAID_MODE(SPELL_CRIPPLE_10, SPELL_CRIPPLE_25), false);
+ me->CastSpell(me, SPELL_CRIPPLE, false);
me->CastSpell(me, SPELL_BLINK, true);
Talk(EMOTE_BLINK);
events.Repeat(30s);
diff --git a/src/server/scripts/Northrend/Naxxramas/boss_patchwerk.cpp b/src/server/scripts/Northrend/Naxxramas/boss_patchwerk.cpp
index 3342c9a236..319f089661 100644
--- a/src/server/scripts/Northrend/Naxxramas/boss_patchwerk.cpp
+++ b/src/server/scripts/Northrend/Naxxramas/boss_patchwerk.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
@@ -30,8 +30,7 @@ enum Yells
enum Spells
{
- SPELL_HATEFUL_STRIKE_10 = 41926,
- SPELL_HATEFUL_STRIKE_25 = 59192,
+ SPELL_HATEFUL_STRIKE = 41926,
SPELL_FRENZY = 28131,
SPELL_BERSERK = 26662,
SPELL_SLIME_BOLT = 32309
@@ -155,7 +154,7 @@ public:
}
if (finalTarget)
{
- me->CastSpell(finalTarget, RAID_MODE(SPELL_HATEFUL_STRIKE_10, SPELL_HATEFUL_STRIKE_25), false);
+ me->CastSpell(finalTarget, SPELL_HATEFUL_STRIKE, false);
}
events.Repeat(1s);
break;
diff --git a/src/server/scripts/Northrend/Naxxramas/boss_razuvious.cpp b/src/server/scripts/Northrend/Naxxramas/boss_razuvious.cpp
index 14f3342454..4aae788f54 100644
--- a/src/server/scripts/Northrend/Naxxramas/boss_razuvious.cpp
+++ b/src/server/scripts/Northrend/Naxxramas/boss_razuvious.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
@@ -34,8 +34,7 @@ enum Says
enum Spells
{
SPELL_UNBALANCING_STRIKE = 26613,
- SPELL_DISRUPTING_SHOUT_10 = 55543,
- SPELL_DISRUPTING_SHOUT_25 = 29107,
+ SPELL_DISRUPTING_SHOUT = 55543,
SPELL_JAGGED_KNIFE = 55550,
SPELL_HOPELESS = 29125,
SPELL_TAUNT = 29060
@@ -267,7 +266,7 @@ public:
events.Repeat(20s);
break;
case EVENT_DISRUPTING_SHOUT:
- me->CastSpell(me, RAID_MODE(SPELL_DISRUPTING_SHOUT_10, SPELL_DISRUPTING_SHOUT_25), false);
+ me->CastSpell(me, SPELL_DISRUPTING_SHOUT, false);
events.Repeat(15s);
break;
case EVENT_JAGGED_KNIFE:
diff --git a/src/server/scripts/Northrend/Naxxramas/boss_sapphiron.cpp b/src/server/scripts/Northrend/Naxxramas/boss_sapphiron.cpp
index 98717dcbb1..50c51861e2 100644
--- a/src/server/scripts/Northrend/Naxxramas/boss_sapphiron.cpp
+++ b/src/server/scripts/Northrend/Naxxramas/boss_sapphiron.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
@@ -33,14 +33,11 @@ enum Yells
enum Spells
{
// Fight
- SPELL_FROST_AURA_10 = 28531,
- SPELL_FROST_AURA_25 = 55799,
+ SPELL_FROST_AURA = 28531,
SPELL_CLEAVE = 19983,
- SPELL_TAIL_SWEEP_10 = 55697,
- SPELL_TAIL_SWEEP_25 = 55696,
+ SPELL_TAIL_SWEEP = 55697,
SPELL_SUMMON_BLIZZARD = 28560,
- SPELL_LIFE_DRAIN_10 = 28542,
- SPELL_LIFE_DRAIN_25 = 55665,
+ SPELL_LIFE_DRAIN = 28542,
SPELL_BERSERK = 26662,
// Ice block
@@ -160,7 +157,7 @@ public:
{
BossAI::JustEngagedWith(who);
EnterCombatSelfFunction();
- me->CastSpell(me, RAID_MODE(SPELL_FROST_AURA_10, SPELL_FROST_AURA_25), true);
+ me->CastSpell(me, SPELL_FROST_AURA, true);
events.ScheduleEvent(EVENT_BERSERK, 15min);
events.ScheduleEvent(EVENT_CLEAVE, 5s);
events.ScheduleEvent(EVENT_TAIL_SWEEP, 10s);
@@ -258,11 +255,11 @@ public:
events.Repeat(10s);
return;
case EVENT_TAIL_SWEEP:
- me->CastSpell(me, RAID_MODE(SPELL_TAIL_SWEEP_10, SPELL_TAIL_SWEEP_25), false);
+ me->CastSpell(me, SPELL_TAIL_SWEEP, false);
events.Repeat(10s);
return;
case EVENT_LIFE_DRAIN:
- me->CastCustomSpell(RAID_MODE(SPELL_LIFE_DRAIN_10, SPELL_LIFE_DRAIN_25), SPELLVALUE_MAX_TARGETS, RAID_MODE(2, 5), me, false);
+ me->CastCustomSpell(SPELL_LIFE_DRAIN, SPELLVALUE_MAX_TARGETS, RAID_MODE(2, 5), me, false);
events.Repeat(24s);
return;
case EVENT_BLIZZARD:
@@ -280,7 +277,7 @@ public:
{
cr->GetMotionMaster()->MoveRandom(40);
}
- events.RepeatEvent(RAID_MODE(8000, 6500));
+ events.Repeat(RAID_MODE(8000ms, 6500ms));
return;
}
case EVENT_FLIGHT_START:
@@ -349,7 +346,7 @@ public:
blockList.push_back((*itr)->GetGUID());
currentTarget = (*itr)->GetGUID();
--iceboltCount;
- events.ScheduleEvent(EVENT_FLIGHT_ICEBOLT, (me->GetExactDist(*itr) / 13.0f)*IN_MILLISECONDS);
+ events.ScheduleEvent(EVENT_FLIGHT_ICEBOLT, Seconds(uint32(me->GetExactDist(*itr) / 13.0f)));
}
else
{
diff --git a/src/server/scripts/Northrend/Naxxramas/boss_thaddius.cpp b/src/server/scripts/Northrend/Naxxramas/boss_thaddius.cpp
index cf953363d4..200a3962c7 100644
--- a/src/server/scripts/Northrend/Naxxramas/boss_thaddius.cpp
+++ b/src/server/scripts/Northrend/Naxxramas/boss_thaddius.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
@@ -59,20 +59,17 @@ enum Spells
SPELL_SHOCK_VISUAL = 28159,
// Stalagg
- SPELL_POWER_SURGE_10 = 54529,
- SPELL_POWER_SURGE_25 = 28134,
+ SPELL_POWER_SURGE = 54529,
SPELL_STALAGG_CHAIN = 28096,
// Feugen
- SPELL_STATIC_FIELD_10 = 28135,
- SPELL_STATIC_FIELD_25 = 54528,
+ SPELL_STATIC_FIELD = 28135,
SPELL_FEUGEN_CHAIN = 28111,
// Thaddius
SPELL_POLARITY_SHIFT = 28089,
SPELL_BALL_LIGHTNING = 28299,
- SPELL_CHAIN_LIGHTNING_10 = 28167,
- SPELL_CHAIN_LIGHTNING_25 = 54531,
+ SPELL_CHAIN_LIGHTNING = 28167,
SPELL_BERSERK = 27680,
SPELL_THADDIUS_VISUAL_LIGHTNING = 28136,
SPELL_THADDIUS_SPAWN_STUN = 28160,
@@ -308,16 +305,17 @@ public:
me->SetReactState(REACT_AGGRESSIVE);
me->SetControlled(false, UNIT_STATE_STUNNED);
me->RemoveUnitFlag(UNIT_FLAG_NON_ATTACKABLE);
+ me->SetControlled(false, UNIT_STATE_ROOT);
events.ScheduleEvent(EVENT_THADDIUS_CHAIN_LIGHTNING, 14s);
events.ScheduleEvent(EVENT_THADDIUS_BERSERK, 6min);
- events.ScheduleEvent(EVENT_THADDIUS_POLARITY_SHIFT, 30s);
+ events.ScheduleEvent(EVENT_THADDIUS_POLARITY_SHIFT, 20s);
events.ScheduleEvent(EVENT_ALLOW_BALL_LIGHTNING, 5s);
return;
case EVENT_THADDIUS_BERSERK:
me->CastSpell(me, SPELL_BERSERK, true);
break;
case EVENT_THADDIUS_CHAIN_LIGHTNING:
- me->CastSpell(me->GetVictim(), RAID_MODE(SPELL_CHAIN_LIGHTNING_10, SPELL_CHAIN_LIGHTNING_25), false);
+ me->CastSpell(me->GetVictim(), SPELL_CHAIN_LIGHTNING, false);
events.Repeat(15s);
break;
case EVENT_THADDIUS_POLARITY_SHIFT:
@@ -497,11 +495,11 @@ public:
switch (events.ExecuteEvent())
{
case EVENT_MINION_POWER_SURGE:
- me->CastSpell(me, RAID_MODE(SPELL_POWER_SURGE_10, SPELL_POWER_SURGE_25), false);
+ me->CastSpell(me, SPELL_POWER_SURGE, false);
events.Repeat(19s);
break;
case EVENT_MINION_STATIC_FIELD:
- me->CastSpell(me, RAID_MODE(SPELL_STATIC_FIELD_10, SPELL_STATIC_FIELD_25), false);
+ me->CastSpell(me, SPELL_STATIC_FIELD, false);
events.Repeat(3s);
break;
case EVENT_MINION_MAGNETIC_PULL:
@@ -685,22 +683,18 @@ public:
};
};
-class at_thaddius_entrance : public AreaTriggerScript
+class at_thaddius_entrance : public OnlyOnceAreaTriggerScript
{
public:
- at_thaddius_entrance() : AreaTriggerScript("at_thaddius_entrance") { }
+ at_thaddius_entrance() : OnlyOnceAreaTriggerScript("at_thaddius_entrance") { }
- bool OnTrigger(Player* player, AreaTrigger const* /*areaTrigger*/) override
+ bool _OnTrigger(Player* player, const AreaTrigger* /*trigger*/) override
{
- InstanceScript* instance = player->GetInstanceScript();
- if (!instance || instance->GetData(DATA_THADDIUS_INTRO) || instance->GetBossState(BOSS_THADDIUS) == DONE)
- return true;
-
- if (Creature* thaddius = instance->GetCreature(DATA_THADDIUS_BOSS))
- thaddius->AI()->Talk(SAY_GREET);
-
- instance->SetData(DATA_THADDIUS_INTRO, 1);
- return true;
+ if (InstanceScript* instance = player->GetInstanceScript())
+ if (instance->GetBossState(BOSS_THADDIUS) != DONE)
+ if (Creature* thaddius = instance->GetCreature(DATA_THADDIUS_BOSS))
+ thaddius->AI()->Talk(SAY_GREET);
+ return false;
}
};
diff --git a/src/server/scripts/Northrend/Naxxramas/instance_naxxramas.cpp b/src/server/scripts/Northrend/Naxxramas/instance_naxxramas.cpp
index 894ee59604..1530cab2e2 100644
--- a/src/server/scripts/Northrend/Naxxramas/instance_naxxramas.cpp
+++ b/src/server/scripts/Northrend/Naxxramas/instance_naxxramas.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
@@ -547,12 +547,17 @@ public:
}
case DONE:
{
+ if (!horsemanKilled) // if no horsemen are found, assume wing is cleared
+ {
+ ActivateWingPortal(DATA_HORSEMAN_PORTAL);
+ break;
+ }
+
_events.RescheduleEvent(EVENT_AND_THEY_WOULD_ALL_GO_DOWN_TOGETHER, 15s);
if (horsemanKilled != HorsemanCount)
return false;
- // all horsemans are killed
if (Creature* cr = GetCreature(DATA_BARON_RIVENDARE_BOSS))
cr->CastSpell(cr, SPELL_THE_FOUR_HORSEMAN_CREDIT, true);
@@ -745,7 +750,7 @@ public:
if (Creature* cr = me->SummonCreature(NPC_LIVING_POISON, entry.Start, TEMPSUMMON_TIMED_DESPAWN, entry.DespawnTime))
{
cr->AddUnitMovementFlag(MOVEMENTFLAG_WALKING);
- cr->GetMotionMaster()->MovePoint(0, entry.End, false);
+ cr->GetMotionMaster()->MovePoint(0, entry.End, FORCED_MOVEMENT_NONE, 0.f, false);
}
_events.Repeat(5s);
diff --git a/src/server/scripts/Northrend/Naxxramas/naxxramas.h b/src/server/scripts/Northrend/Naxxramas/naxxramas.h
index c67b8c2153..4b790f1cca 100644
--- a/src/server/scripts/Northrend/Naxxramas/naxxramas.h
+++ b/src/server/scripts/Northrend/Naxxramas/naxxramas.h
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
@@ -75,17 +75,15 @@ enum NaxxramasData
DATA_DANCE_FAIL = 301,
DATA_SPORE_KILLED = 302,
DATA_FRENZY_REMOVED = 303,
- DATA_THADDIUS_INTRO = 304,
- DATA_CHARGES_CROSSED = 305,
- DATA_HUNDRED_CLUB = 306,
- DATA_ABOMINATION_KILLED = 307,
+ DATA_CHARGES_CROSSED = 304,
+ DATA_HUNDRED_CLUB = 305,
+ DATA_ABOMINATION_KILLED = 306,
};
enum NaxxramasPersistentData
{
- PERSISTENT_DATA_THADDIUS_INTRO = 0,
- PERSISTENT_DATA_KELTHUZAD_DIALOG = 1,
- PERSISTENT_DATA_IMMORTAL_FAIL = 2,
+ PERSISTENT_DATA_KELTHUZAD_DIALOG = 0,
+ PERSISTENT_DATA_IMMORTAL_FAIL = 1,
PERSISTENT_DATA_COUNT
};
diff --git a/src/server/scripts/Northrend/Nexus/EyeOfEternity/boss_malygos.cpp b/src/server/scripts/Northrend/Nexus/EyeOfEternity/boss_malygos.cpp
index eb39ef71b6..bdf1ba1187 100644
--- a/src/server/scripts/Northrend/Nexus/EyeOfEternity/boss_malygos.cpp
+++ b/src/server/scripts/Northrend/Nexus/EyeOfEternity/boss_malygos.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
@@ -57,10 +57,8 @@ enum MovementInformPoints
enum MalygosSpells
{
SPELL_BERSERK = 64238,
- SPELL_ARCANE_BREATH_N = 56272,
- SPELL_ARCANE_BREATH_H = 60072,
- SPELL_ARCANE_STORM_N = 61693,
- SPELL_ARCANE_STORM_H = 61694,
+ SPELL_ARCANE_BREATH = 56272,
+ SPELL_ARCANE_STORM = 61693,
SPELL_VORTEX_VISUAL = 55873,
SPELL_VORTEX_CONTROL_VEHICLE = 56263,
@@ -80,8 +78,7 @@ enum MalygosSpells
SPELL_DESTROY_PLATFORM_VISUAL = 59084,
SPELL_ARCANE_PULSE = 57432,
- SPELL_PH3_SURGE_OF_POWER_N = 57407,
- SPELL_PH3_SURGE_OF_POWER_H = 60936,
+ SPELL_PH3_SURGE_OF_POWER = 57407,
SPELL_STATIC_FIELD_MAIN = 57430,
SPELL_STATIC_FIELD_SUMMON = 57431,
@@ -89,10 +86,6 @@ enum MalygosSpells
SPELL_STATIC_FIELD_DAMAGE = 57429,
};
-#define SPELL_ARCANE_BREATH DUNGEON_MODE(SPELL_ARCANE_BREATH_N, SPELL_ARCANE_BREATH_H)
-#define SPELL_ARCANE_STORM DUNGEON_MODE(SPELL_ARCANE_STORM_N, SPELL_ARCANE_STORM_H)
-#define SPELL_PH3_SURGE_OF_POWER DUNGEON_MODE(SPELL_PH3_SURGE_OF_POWER_N, SPELL_PH3_SURGE_OF_POWER_H)
-
enum MalygosEvents
{
EVENT_INTRO_MOVE_CENTER = 1,
@@ -241,6 +234,8 @@ public:
me->SetUnitFlag(UNIT_FLAG_NON_ATTACKABLE | UNIT_FLAG_PACIFIED);
me->RemoveUnitFlag(UNIT_FLAG_DISABLE_MOVE);
+ me->SetAnimTier(AnimTier::Fly);
+
if (pInstance)
{
pInstance->SetData(DATA_ENCOUNTER_STATUS, NOT_STARTED);
@@ -284,12 +279,6 @@ public:
case MI_POINT_SURGE_OF_POWER_CENTER:
events.RescheduleEvent(EVENT_SURGE_OF_POWER_WARNING, 0ms, 1);
break;
- }
- }
- else if (type == EFFECT_MOTION_TYPE)
- {
- switch (id)
- {
case MI_POINT_INTRO_LAND:
me->SetDisableGravity(false);
events.RescheduleEvent(EVENT_START_FIGHT, 0ms, 1);
@@ -408,7 +397,7 @@ public:
}
case EVENT_INTRO_LAND:
{
- me->GetMotionMaster()->MoveLand(MI_POINT_INTRO_LAND, me->GetPositionX(), me->GetPositionY(), CenterPos.GetPositionZ(), 7.0f);
+ me->GetMotionMaster()->MovePoint(MI_POINT_INTRO_LAND, me->GetPositionX(), me->GetPositionY(), CenterPos.GetPositionZ(), FORCED_MOVEMENT_RUN, 0.f, 0.f, true, true, MOTION_SLOT_ACTIVE, AnimTier::Ground);
break;
}
case EVENT_START_FIGHT:
@@ -469,9 +458,9 @@ public:
me->GetMotionMaster()->MoveIdle();
me->StopMoving();
me->SetDisableGravity(true);
- me->GetMotionMaster()->MoveTakeoff(MI_POINT_VORTEX_TAKEOFF, me->GetPositionX(), me->GetPositionY(), CenterPos.GetPositionZ() + 20.0f, 7.0f);
+ me->GetMotionMaster()->MovePoint(MI_POINT_VORTEX_TAKEOFF, me->GetPositionX(), me->GetPositionY(), CenterPos.GetPositionZ() + 20.0f, FORCED_MOVEMENT_RUN, 0.f, 0.f, true, true, MOTION_SLOT_ACTIVE, AnimTier::Fly);
- events.DelayEvents(25000, 1); // don't delay berserk (group 0)
+ events.DelayEvents(25s, 1); // don't delay berserk (group 0)
}
break;
case EVENT_VORTEX_FLY_TO_CENTER:
@@ -521,16 +510,14 @@ public:
}
//pPlayer->ClearUnitState(UNIT_STATE_ONVEHICLE);
- Movement::MoveSplineInit init(pPlayer);
+ Movement::MoveSplineInit init(pPlayer); // TODO: has to be removed and handled with vehicle exit and vehicle enter code
init.MoveTo(CenterPos.GetPositionX(), CenterPos.GetPositionY(), CenterPos.GetPositionZ());
init.SetFacing(pPlayer->GetOrientation());
init.SetTransportExit();
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();
@@ -548,7 +535,7 @@ public:
break;
}
case EVENT_VORTEX_LAND_0:
- me->GetMotionMaster()->MoveLand(MI_POINT_VORTEX_LAND, CenterPos, 7.0f);
+ me->GetMotionMaster()->MovePoint(MI_POINT_VORTEX_LAND, CenterPos, FORCED_MOVEMENT_RUN, 0.f, true, true, AnimTier::Ground);
break;
case EVENT_VORTEX_LAND_1:
@@ -582,7 +569,7 @@ public:
me->GetMotionMaster()->MoveIdle();
me->DisableSpline();
me->SetDisableGravity(true);
- me->GetMotionMaster()->MoveTakeoff(MI_POINT_CENTER_AIR_PH_2, me->GetPositionX(), me->GetPositionY(), me->GetPositionZ() + 32.0f, 7.0f);
+ me->GetMotionMaster()->MovePoint(MI_POINT_CENTER_AIR_PH_2, me->GetPositionX(), me->GetPositionY(), me->GetPositionZ() + 32.0f, FORCED_MOVEMENT_RUN, 0.f, 0.f, true, true, MOTION_SLOT_ACTIVE, AnimTier::Fly);
events.RescheduleEvent(EVENT_START_PHASE_2_MOVE_TO_SIDE, 22s + 500ms, 1);
break;
}
@@ -674,7 +661,7 @@ public:
case EVENT_CHECK_TRASH_DEAD:
{
if (me->FindNearestCreature(NPC_SCION_OF_ETERNITY, 250.0f, true) || me->FindNearestCreature(NPC_NEXUS_LORD, 250.0f, true))
- events.RepeatEvent(3000);
+ events.Repeat(3s);
else
{
me->SendMeleeAttackStop();
@@ -708,7 +695,7 @@ public:
case EVENT_MOVE_TO_PHASE_3_POSITION:
{
me->SendMeleeAttackStop(me->GetVictim());
- me->GetMotionMaster()->MoveTakeoff(MI_POINT_PH_3_FIGHT_POSITION, CenterPos.GetPositionX(), CenterPos.GetPositionY(), CenterPos.GetPositionZ() - 5.0f, me->GetSpeed(MOVE_RUN));
+ me->GetMotionMaster()->MovePoint(MI_POINT_PH_3_FIGHT_POSITION, CenterPos.GetPositionX(), CenterPos.GetPositionY(), CenterPos.GetPositionZ() - 5.0f, FORCED_MOVEMENT_RUN, 0.f, 0.f, true, true, MOTION_SLOT_ACTIVE, AnimTier::Fly);
me->GetThreatMgr().ClearAllThreat(); // players on vehicle are unattackable -> leads to EnterEvadeMode() because target is not acceptable!
@@ -727,7 +714,7 @@ public:
{
c->SetFaction(pPlayer->GetFaction());
//pPlayer->CastCustomSpell(60683, SPELLVALUE_BASE_POINT0, 1, c, true);
- c->m_Events.AddEvent(new EoEDrakeEnterVehicleEvent(*c, pPlayer->GetGUID()), c->m_Events.CalculateTime(500));
+ c->m_Events.AddEventAtOffset(new EoEDrakeEnterVehicleEvent(*c, pPlayer->GetGUID()), 500ms);
AttackStart(c);
}
}
@@ -803,10 +790,10 @@ public:
{
case NPC_ARCANE_OVERLOAD:
summon->CastSpell(summon, SPELL_ARCANE_OVERLOAD_DMG, true);
- summon->DespawnOrUnsummon(45000);
+ summon->DespawnOrUnsummon(45s);
break;
case NPC_STATIC_FIELD:
- summon->DespawnOrUnsummon(20000);
+ summon->DespawnOrUnsummon(20s);
break;
}
}
@@ -898,9 +885,9 @@ public:
{
Player* plr = pass->ToPlayer();
float speed = plr->GetDistance(me->GetPositionX(), me->GetPositionY(), me->GetPositionZ()) / (1.0f * 0.001f);
- plr->MonsterMoveWithSpeed(me->GetPositionX(), me->GetPositionY(), me->GetPositionZ(), speed);
+ plr->SetDisableGravity(false); // packet only would lead to issues elsewhere
+ plr->GetMotionMaster()->MoveCharge(me->GetPositionX(), me->GetPositionY(), me->GetPositionZ(), speed);
plr->RemoveAura(SPELL_FREEZE_ANIM);
- plr->SetDisableGravity(false, true);
plr->SetGuidValue(PLAYER_FARSIGHT, ObjectGuid::Empty);
sScriptMgr->AnticheatSetCanFlybyServer(plr, false);
@@ -941,10 +928,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);
@@ -998,7 +982,7 @@ public:
MoveTimer = 0;
me->GetMotionMaster()->MoveIdle();
me->DisableSpline();
- me->MonsterMoveWithSpeed(me->GetPositionX(), me->GetPositionY(), me->GetPositionZ() + 0.05f, 7.0f);
+ me->GetMotionMaster()->MovePoint(0, me->GetPositionX(), me->GetPositionY(), me->GetPositionZ() + 0.05f, FORCED_MOVEMENT_NONE, 7.0f);
break;
}
}
@@ -1013,12 +997,11 @@ public:
MoveTimer = 0;
me->GetMotionMaster()->MoveIdle();
me->DisableSpline();
- me->MonsterMoveWithSpeed(me->GetPositionX(), me->GetPositionY(), CenterPos.GetPositionZ(), 100.0f);
- me->SetPosition(me->GetPositionX(), me->GetPositionY(), CenterPos.GetPositionZ(), me->GetOrientation());
+ me->GetMotionMaster()->MovePoint(0, me->GetPositionX(), me->GetPositionY(), CenterPos.GetPositionZ(), FORCED_MOVEMENT_NONE, 100.0f);
me->ReplaceAllUnitFlags(UNIT_FLAG_NOT_SELECTABLE | UNIT_FLAG_NON_ATTACKABLE | UNIT_FLAG_DISABLE_MOVE);
me->RemoveAura(SPELL_POWER_SPARK_VISUAL);
me->CastSpell(me, SPELL_POWER_SPARK_GROUND_BUFF, true);
- me->DespawnOrUnsummon(60000);
+ me->DespawnOrUnsummon(60s);
}
}
}
@@ -1221,8 +1204,9 @@ public:
if (Vehicle* v = me->GetVehicle())
v->RemoveAllPassengers();
- if (Player* player = killer->GetCharmerOrOwnerPlayerOrPlayerItself())
- player->UpdateAchievementCriteria(ACHIEVEMENT_CRITERIA_TYPE_GET_KILLING_BLOWS, 1, 0, me);
+ if (killer)
+ if (Player* player = killer->GetCharmerOrOwnerPlayerOrPlayerItself())
+ player->UpdateAchievementCriteria(ACHIEVEMENT_CRITERIA_TYPE_GET_KILLING_BLOWS, 1, 0, me);
}
void MoveInLineOfSight(Unit* /*who*/) override {}
@@ -1459,14 +1443,14 @@ public:
else if (pass && pass->IsPlayer() && me->IsAlive())
{
me->SetDisplayId(11686); // prevents nasty falling animation at despawn
- me->DespawnOrUnsummon(1);
+ me->DespawnOrUnsummon(1ms);
}
}
void JustDied(Unit* /*killer*/) override
{
me->SetDisplayId(11686); // prevents nasty falling animation at despawn
- me->DespawnOrUnsummon(1);
+ me->DespawnOrUnsummon(1ms);
}
};
};
diff --git a/src/server/scripts/Northrend/Nexus/EyeOfEternity/eye_of_eternity.h b/src/server/scripts/Northrend/Nexus/EyeOfEternity/eye_of_eternity.h
index b61b1d7cb7..88ad0e9209 100644
--- a/src/server/scripts/Northrend/Nexus/EyeOfEternity/eye_of_eternity.h
+++ b/src/server/scripts/Northrend/Nexus/EyeOfEternity/eye_of_eternity.h
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
@@ -71,15 +71,12 @@ enum eSpells
SPELL_TELEPORT_VISUAL = 52096,
SPELL_SCION_ARCANE_BARRAGE = 56397,
- SPELL_ARCANE_SHOCK_N = 57058,
- SPELL_ARCANE_SHOCK_H = 60073,
+ SPELL_ARCANE_SHOCK = 57058,
SPELL_HASTE = 57060,
SPELL_ALEXSTRASZA_GIFT = 61028,
};
-#define SPELL_ARCANE_SHOCK DUNGEON_MODE(SPELL_ARCANE_SHOCK_N, SPELL_ARCANE_SHOCK_H)
-
enum eAchiev
{
ACHIEV_CRITERIA_DENYIN_THE_SCION_10 = 7573,
diff --git a/src/server/scripts/Northrend/Nexus/EyeOfEternity/instance_eye_of_eternity.cpp b/src/server/scripts/Northrend/Nexus/EyeOfEternity/instance_eye_of_eternity.cpp
index 4f4b09b758..41a86c0639 100644
--- a/src/server/scripts/Northrend/Nexus/EyeOfEternity/instance_eye_of_eternity.cpp
+++ b/src/server/scripts/Northrend/Nexus/EyeOfEternity/instance_eye_of_eternity.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
@@ -29,7 +29,7 @@ bool EoEDrakeEnterVehicleEvent::Execute(uint64 /*eventTime*/, uint32 /*updateTim
p->CastCustomSpell(60683, SPELLVALUE_BASE_POINT0, 1, &_owner, true);
return true;
}
- _owner.DespawnOrUnsummon(1);
+ _owner.DespawnOrUnsummon(1ms);
return true;
}
@@ -89,7 +89,7 @@ public:
c->SetCanFly(true);
c->SetFaction(pPlayer->GetFaction());
//pPlayer->CastCustomSpell(60683, SPELLVALUE_BASE_POINT0, 1, c, true);
- c->m_Events.AddEvent(new EoEDrakeEnterVehicleEvent(*c, pPlayer->GetGUID()), c->m_Events.CalculateTime(500));
+ c->m_Events.AddEventAtOffset(new EoEDrakeEnterVehicleEvent(*c, pPlayer->GetGUID()), 500ms);
}
}
}
diff --git a/src/server/scripts/Northrend/Nexus/Nexus/boss_anomalus.cpp b/src/server/scripts/Northrend/Nexus/Nexus/boss_anomalus.cpp
index 397f9ec8bb..a029169021 100644
--- a/src/server/scripts/Northrend/Nexus/Nexus/boss_anomalus.cpp
+++ b/src/server/scripts/Northrend/Nexus/Nexus/boss_anomalus.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
@@ -94,7 +94,7 @@ struct boss_anomalus : public BossAI
{
if (activeRifts > 0 && --activeRifts == 0 && me->HasAura(SPELL_RIFT_SHIELD))
{
- events.DelayEvents(me->GetAura(SPELL_RIFT_SHIELD)->GetDuration() - 46000);
+ events.DelayEvents(Milliseconds(me->GetAura(SPELL_RIFT_SHIELD)->GetDuration() - 46000));
me->RemoveAura(SPELL_RIFT_SHIELD);
me->InterruptNonMeleeSpells(false);
}
@@ -114,7 +114,6 @@ struct boss_anomalus : public BossAI
BossAI::JustEngagedWith(who);
activeRifts = 0;
- events.SetTimer(45000);
events.ScheduleEvent(EVENT_ANOMALUS_SPARK, 5s);
events.ScheduleEvent(EVENT_ANOMALUS_HEALTH, 1s);
events.ScheduleEvent(EVENT_ANOMALUS_SPAWN_RIFT, IsHeroic() ? 15s : 25s);
@@ -164,7 +163,7 @@ struct boss_anomalus : public BossAI
Talk(EMOTE_RIFT);
me->CastSpell(me, SPELL_CREATE_RIFT, false);
//Once we hit 51% hp mark, after each rift we spawn an empowered
- events.ScheduleEvent(me->HealthBelowPct(51) ? EVENT_ANOMALUS_SPAWN_RIFT_EMPOWERED : EVENT_ANOMALUS_SPAWN_RIFT, IsHeroic() ? 15000 : 25000);
+ events.ScheduleEvent(me->HealthBelowPct(51) ? EVENT_ANOMALUS_SPAWN_RIFT_EMPOWERED : EVENT_ANOMALUS_SPAWN_RIFT, IsHeroic() ? 15s : 25s);
break;
case EVENT_ANOMALUS_SPAWN_RIFT_EMPOWERED:
Talk(SAY_RIFT);
@@ -172,7 +171,7 @@ struct boss_anomalus : public BossAI
me->CastSpell(me, SPELL_CREATE_RIFT, false);
me->CastSpell(me, SPELL_RIFT_SHIELD, true);
- me->m_Events.AddEvent(new ChargeRifts(me), me->m_Events.CalculateTime(1000));
+ me->m_Events.AddEventAtOffset(new ChargeRifts(me), 1s);
events.DelayEvents(46s);
//As we just spawned an empowered spawn a normal one
events.ScheduleEvent(EVENT_ANOMALUS_SPAWN_RIFT, IsHeroic() ? 15s : 25s);
diff --git a/src/server/scripts/Northrend/Nexus/Nexus/boss_commander_stoutbeard_kolurg.cpp b/src/server/scripts/Northrend/Nexus/Nexus/boss_commander_stoutbeard_kolurg.cpp
index 6f75592854..8ed740ffc8 100644
--- a/src/server/scripts/Northrend/Nexus/Nexus/boss_commander_stoutbeard_kolurg.cpp
+++ b/src/server/scripts/Northrend/Nexus/Nexus/boss_commander_stoutbeard_kolurg.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/scripts/Northrend/Nexus/Nexus/boss_keristrasza.cpp b/src/server/scripts/Northrend/Nexus/Nexus/boss_keristrasza.cpp
index a367d60592..23cd3f12a0 100644
--- a/src/server/scripts/Northrend/Nexus/Nexus/boss_keristrasza.cpp
+++ b/src/server/scripts/Northrend/Nexus/Nexus/boss_keristrasza.cpp
@@ -2,14 +2,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
@@ -75,7 +75,7 @@ struct boss_keristrasza : public BossAI
me->CastSpell(me, SPELL_INTENSE_COLD, true);
events.ScheduleEvent(EVENT_CRYSTALFIRE_BREATH, 14s);
- events.ScheduleEvent(EVENT_CRYSTAL_CHAINS, DUNGEON_MODE(20000, 11000));
+ events.ScheduleEvent(EVENT_CRYSTAL_CHAINS, DUNGEON_MODE(20s, 11s));
events.ScheduleEvent(EVENT_TAIL_SWEEP, 5s);
events.ScheduleEvent(EVENT_HEALTH_CHECK, 1s);
events.ScheduleEvent(EVENT_ACHIEVEMENT_CHECK, 1s);
@@ -89,7 +89,7 @@ struct boss_keristrasza : public BossAI
void KilledUnit(Unit*) override
{
- if (events.GetNextEventTime(EVENT_KILL_TALK) == 0)
+ if (!events.HasTimeUntilEvent(EVENT_KILL_TALK))
{
Talk(SAY_SLAY);
events.ScheduleEvent(EVENT_KILL_TALK, 6s);
@@ -174,7 +174,7 @@ struct boss_keristrasza : public BossAI
me->CastSpell(me, SPELL_CRYSTALIZE, false);
else if (Unit* target = SelectTarget(SelectTargetMethod::Random, 0, 40.0f, true))
me->CastSpell(target, SPELL_CRYSTAL_CHAINS, false);
- events.ScheduleEvent(EVENT_CRYSTAL_CHAINS, DUNGEON_MODE(20000, 11000));
+ events.ScheduleEvent(EVENT_CRYSTAL_CHAINS, DUNGEON_MODE(20s, 11s));
break;
}
diff --git a/src/server/scripts/Northrend/Nexus/Nexus/boss_magus_telestra.cpp b/src/server/scripts/Northrend/Nexus/Nexus/boss_magus_telestra.cpp
index 90781cfbc7..39c204807f 100644
--- a/src/server/scripts/Northrend/Nexus/Nexus/boss_magus_telestra.cpp
+++ b/src/server/scripts/Northrend/Nexus/Nexus/boss_magus_telestra.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
@@ -132,7 +132,7 @@ struct boss_magus_telestra : public BossAI
void KilledUnit(Unit*) override
{
- if (events.GetNextEventTime(EVENT_KILL_TALK) == 0)
+ if (!events.HasTimeUntilEvent(EVENT_KILL_TALK))
{
Talk(SAY_KILL);
events.ScheduleEvent(EVENT_KILL_TALK, 6s);
@@ -150,7 +150,7 @@ struct boss_magus_telestra : public BossAI
if (spellInfo->Id >= SPELL_FIRE_MAGUS_DEATH && spellInfo->Id <= SPELL_ARCANE_MAGUS_DEATH && caster->ToCreature())
{
events.ScheduleEvent(EVENT_MAGUS_FAIL_ACHIEVEMENT, 5s);
- caster->ToCreature()->DespawnOrUnsummon(1000);
+ caster->ToCreature()->DespawnOrUnsummon(1s);
if (++copiesDied >= 3)
{
diff --git a/src/server/scripts/Northrend/Nexus/Nexus/boss_ormorok.cpp b/src/server/scripts/Northrend/Nexus/Nexus/boss_ormorok.cpp
index 82b36095db..397f68f44e 100644
--- a/src/server/scripts/Northrend/Nexus/Nexus/boss_ormorok.cpp
+++ b/src/server/scripts/Northrend/Nexus/Nexus/boss_ormorok.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
@@ -93,7 +93,7 @@ struct boss_ormorok : public BossAI
void KilledUnit(Unit* /*victim*/) override
{
- if (events.GetNextEventTime(EVENT_KILL_TALK) == 0)
+ if (!events.HasTimeUntilEvent(EVENT_KILL_TALK))
{
Talk(SAY_KILL);
events.ScheduleEvent(EVENT_KILL_TALK, 6s);
diff --git a/src/server/scripts/Northrend/Nexus/Nexus/instance_nexus.cpp b/src/server/scripts/Northrend/Nexus/Nexus/instance_nexus.cpp
index 402b1b6e60..87dbcdfe9f 100644
--- a/src/server/scripts/Northrend/Nexus/Nexus/instance_nexus.cpp
+++ b/src/server/scripts/Northrend/Nexus/Nexus/instance_nexus.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/scripts/Northrend/Nexus/Nexus/nexus.h b/src/server/scripts/Northrend/Nexus/Nexus/nexus.h
index 43099ce518..4d84bfa96f 100644
--- a/src/server/scripts/Northrend/Nexus/Nexus/nexus.h
+++ b/src/server/scripts/Northrend/Nexus/Nexus/nexus.h
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/scripts/Northrend/Nexus/Oculus/boss_drakos.cpp b/src/server/scripts/Northrend/Nexus/Oculus/boss_drakos.cpp
index 3781b4799d..b6f9e9462c 100644
--- a/src/server/scripts/Northrend/Nexus/Oculus/boss_drakos.cpp
+++ b/src/server/scripts/Northrend/Nexus/Oculus/boss_drakos.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
@@ -22,8 +22,7 @@
enum Spells
{
SPELL_MAGIC_PULL = 51336,
- SPELL_THUNDERING_STOMP_N = 50774,
- SPELL_THUNDERING_STOMP_H = 59370,
+ SPELL_THUNDERING_STOMP = 50774,
SPELL_UNSTABLE_SPHERE_PASSIVE = 50756,
SPELL_UNSTABLE_SPHERE_PULSE = 50757,
@@ -44,8 +43,6 @@ enum Events
EVENT_SUMMON_x4 = 4,
};
-#define SPELL_THUNDERING_STOMP DUNGEON_MODE(SPELL_THUNDERING_STOMP_N, SPELL_THUNDERING_STOMP_H)
-
enum Yells
{
SAY_AGGRO = 0,
diff --git a/src/server/scripts/Northrend/Nexus/Oculus/boss_eregos.cpp b/src/server/scripts/Northrend/Nexus/Oculus/boss_eregos.cpp
index 4b491b156d..2f37707b6e 100644
--- a/src/server/scripts/Northrend/Nexus/Oculus/boss_eregos.cpp
+++ b/src/server/scripts/Northrend/Nexus/Oculus/boss_eregos.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
@@ -22,10 +22,8 @@
enum Spells
{
- SPELL_ARCANE_BARRAGE_N = 50804,
- SPELL_ARCANE_BARRAGE_H = 59381,
- SPELL_ARCANE_VOLLEY_N = 51153,
- SPELL_ARCANE_VOLLEY_H = 59382,
+ SPELL_ARCANE_BARRAGE = 50804,
+ SPELL_ARCANE_VOLLEY = 51153,
SPELL_ENRAGED_ASSAULT = 51170,
SPELL_PLANAR_ANOMALIES = 57959,
SPELL_PLANAR_SHIFT = 51162,
@@ -38,9 +36,6 @@ enum Spells
SPELL_DRAKE_STOP_TIME = 49838,
};
-#define SPELL_ARCANE_BARRAGE DUNGEON_MODE(SPELL_ARCANE_BARRAGE_N, SPELL_ARCANE_BARRAGE_H)
-#define SPELL_ARCANE_VOLLEY DUNGEON_MODE(SPELL_ARCANE_VOLLEY_N, SPELL_ARCANE_VOLLEY_H)
-
enum VarosNPCs
{
NPC_LEY_GUARDIAN_WHELP = 28276,
@@ -208,7 +203,7 @@ public:
break;
case EVENT_SUMMON_WHELPS:
for( uint8 i = 0; i < 5; ++i )
- events.ScheduleEvent(EVENT_SUMMON_SINGLE_WHELP, urand(0, 8000));
+ events.ScheduleEvent(EVENT_SUMMON_SINGLE_WHELP, 0ms, 8s);
events.Repeat(40s);
break;
case EVENT_SUMMON_SINGLE_WHELP:
diff --git a/src/server/scripts/Northrend/Nexus/Oculus/boss_urom.cpp b/src/server/scripts/Northrend/Nexus/Oculus/boss_urom.cpp
index 6793cc0505..7ed99cfb44 100644
--- a/src/server/scripts/Northrend/Nexus/Oculus/boss_urom.cpp
+++ b/src/server/scripts/Northrend/Nexus/Oculus/boss_urom.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
@@ -29,15 +29,10 @@ enum Spells
SPELL_TELEPORT = 51112,
SPELL_FROSTBOMB = 51103,
- SPELL_TIME_BOMB_N = 51121,
- SPELL_TIME_BOMB_H = 59376,
- SPELL_EMPOWERED_ARCANE_EXPLOSION_N = 51110,
- SPELL_EMPOWERED_ARCANE_EXPLOSION_H = 59377,
+ SPELL_TIME_BOMB = 51121,
+ SPELL_EMPOWERED_ARCANE_EXPLOSION = 51110,
};
-#define SPELL_EMPOWERED_ARCANE_EXPLOSION DUNGEON_MODE(SPELL_EMPOWERED_ARCANE_EXPLOSION_N, SPELL_EMPOWERED_ARCANE_EXPLOSION_H)
-//#define SPELL_TIME_BOMB DUNGEON_MODE(SPELL_TIME_BOMB_N, SPELL_TIME_BOMB_H)
-
enum UromNPCs
{
NPC_PHANTASMAL_CLOUDSCRAPER = 27645,
@@ -298,9 +293,9 @@ public:
//At this point we are still in casting state so we need to clear it for DoCastAOE not to fail
me->ClearUnitState(UNIT_STATE_CASTING);
- DoCastAOE(DUNGEON_MODE(SPELL_EMPOWERED_ARCANE_EXPLOSION_N, SPELL_EMPOWERED_ARCANE_EXPLOSION_H));
+ DoCastAOE(SPELL_EMPOWERED_ARCANE_EXPLOSION);
me->AddUnitState(UNIT_STATE_CASTING);
- events.RescheduleEvent(EVENT_TELE_BACK, DUNGEON_MODE(9000, 7000));
+ events.RescheduleEvent(EVENT_TELE_BACK, DUNGEON_MODE(9s, 7s));
default:
break;
}
@@ -347,7 +342,7 @@ public:
break;
case EVENT_TIME_BOMB:
if (Unit* target = SelectTarget(SelectTargetMethod::Random, 0, 100.0f, true))
- DoCast(target, DUNGEON_MODE(SPELL_TIME_BOMB_N, SPELL_TIME_BOMB_H));
+ DoCast(target, SPELL_TIME_BOMB);
events.Repeat(20s, 25s);
break;
case EVENT_TELEPORT_TO_CENTER:
diff --git a/src/server/scripts/Northrend/Nexus/Oculus/boss_varos.cpp b/src/server/scripts/Northrend/Nexus/Oculus/boss_varos.cpp
index be7191ca09..e7ef244604 100644
--- a/src/server/scripts/Northrend/Nexus/Oculus/boss_varos.cpp
+++ b/src/server/scripts/Northrend/Nexus/Oculus/boss_varos.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
@@ -23,13 +23,10 @@ enum Spells
{
SPELL_CORE_AURA_PASSIVE = 50798,
- SPELL_AMPLIFY_MAGIC_N = 51054,
- SPELL_AMPLIFY_MAGIC_H = 59371,
+ SPELL_AMPLIFY_MAGIC = 51054,
- SPELL_ENERGIZE_CORES_N = 50785,
- SPELL_ENERGIZE_CORES_H = 59372,
- SPELL_ENERGIZE_CORES_THIN_N = 61407,
- SPELL_ENERGIZE_CORES_THIN_H = 62136,
+ SPELL_ENERGIZE_CORES = 50785,
+ SPELL_ENERGIZE_CORES_THIN = 61407,
SPELL_ENERGIZE_CORES_TRIGGER_1 = 54069,
SPELL_ENERGIZE_CORES_TRIGGER_2 = 56251,
@@ -63,10 +60,6 @@ enum Events
EVENT_ENERGIZE_CORES_DAMAGE = 7,
};
-#define SPELL_AMPLIFY_MAGIC DUNGEON_MODE(SPELL_AMPLIFY_MAGIC_N, SPELL_AMPLIFY_MAGIC_H)
-#define SPELL_ENERGIZE_CORES DUNGEON_MODE(SPELL_ENERGIZE_CORES_N, SPELL_ENERGIZE_CORES_H)
-#define SPELL_ENERGIZE_CORES_THIN DUNGEON_MODE(SPELL_ENERGIZE_CORES_THIN_N, SPELL_ENERGIZE_CORES_THIN_H)
-
enum Says
{
SAY_AGGRO = 0,
diff --git a/src/server/scripts/Northrend/Nexus/Oculus/instance_oculus.cpp b/src/server/scripts/Northrend/Nexus/Oculus/instance_oculus.cpp
index a9d2ca2045..fcf59ae2ed 100644
--- a/src/server/scripts/Northrend/Nexus/Oculus/instance_oculus.cpp
+++ b/src/server/scripts/Northrend/Nexus/Oculus/instance_oculus.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
@@ -63,23 +63,27 @@ public:
memset(&m_auiEncounter, 0, sizeof(m_auiEncounter));
}
- void OnCreatureCreate(Creature* pCreature) override
+ void OnCreatureCreate(Creature* creature) override
{
- switch (pCreature->GetEntry())
+ switch (creature->GetEntry())
{
case NPC_DRAKOS:
- uiDrakosGUID = pCreature->GetGUID();
+ uiDrakosGUID = creature->GetGUID();
break;
case NPC_VAROS:
- uiVarosGUID = pCreature->GetGUID();
+ uiVarosGUID = creature->GetGUID();
break;
case NPC_UROM:
- uiUromGUID = pCreature->GetGUID();
+ uiUromGUID = creature->GetGUID();
break;
case NPC_EREGOS:
- uiEregosGUID = pCreature->GetGUID();
+ uiEregosGUID = creature->GetGUID();
break;
}
+
+ if (sWorld->getBoolConfig(CONFIG_ALLOW_TWO_SIDE_INTERACTION_GROUP))
+ if (creature->EntryEquals(NPC_AMBER_DRAKE, NPC_EMERALD_DRAKE, NPC_RUBY_DRAKE))
+ creature->SetFaction(FACTION_FRIENDLY); // Friendly faction to allow interaction from both factions
}
void OnGameObjectCreate(GameObject* pGo) override
diff --git a/src/server/scripts/Northrend/Nexus/Oculus/oculus.cpp b/src/server/scripts/Northrend/Nexus/Oculus/oculus.cpp
index 01cdb73fb3..0faf90823c 100644
--- a/src/server/scripts/Northrend/Nexus/Oculus/oculus.cpp
+++ b/src/server/scripts/Northrend/Nexus/Oculus/oculus.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
@@ -38,7 +38,6 @@ enum Drakes
// Centrifuge Constructs
SPELL_EMPOWERING_BLOWS = 50044,
- H_SPELL_EMPOWERING_BLOWS = 59213,
SPELL_AMBER_SHOCK_CHARGE = 49836,
SPELL_RUBY_EVASIVE_CHARGES = 50241,
@@ -387,7 +386,7 @@ public:
}
else
{
- me->DespawnOrUnsummon(2050);
+ me->DespawnOrUnsummon(2050ms);
me->SetOrientation(2.5f);
me->SetSpeedRate(MOVE_FLIGHT, 1.0f);
Position pos = me->GetPosition();
@@ -444,7 +443,7 @@ public:
}
else
{
- me->DespawnOrUnsummon(2050);
+ me->DespawnOrUnsummon(2050ms);
me->SetOrientation(2.5f);
me->SetSpeedRate(MOVE_FLIGHT, 1.0f);
Position pos = me->GetPosition();
@@ -461,7 +460,7 @@ public:
{
if (despawnTimer >= 5000)
{
- me->DespawnOrUnsummon(2050);
+ me->DespawnOrUnsummon(2050ms);
me->SetOrientation(2.5f);
Position pos = me->GetPosition();
Position offset = { 10.0f, 10.0f, 12.0f, 0.0f };
@@ -490,7 +489,7 @@ public:
void JustEngagedWith(Unit* /*who*/) override
{
- DoCast(IsHeroic() ? H_SPELL_EMPOWERING_BLOWS : SPELL_EMPOWERING_BLOWS);
+ DoCast(SPELL_EMPOWERING_BLOWS);
}
void UpdateAI(uint32 /*diff*/) override
diff --git a/src/server/scripts/Northrend/Nexus/Oculus/oculus.h b/src/server/scripts/Northrend/Nexus/Oculus/oculus.h
index e08d0541c0..47aac3ec84 100644
--- a/src/server/scripts/Northrend/Nexus/Oculus/oculus.h
+++ b/src/server/scripts/Northrend/Nexus/Oculus/oculus.h
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/scripts/Northrend/Ulduar/HallsOfLightning/boss_bjarngrim.cpp b/src/server/scripts/Northrend/Ulduar/HallsOfLightning/boss_bjarngrim.cpp
index 9435ba6491..0e352c4596 100644
--- a/src/server/scripts/Northrend/Ulduar/HallsOfLightning/boss_bjarngrim.cpp
+++ b/src/server/scripts/Northrend/Ulduar/HallsOfLightning/boss_bjarngrim.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
@@ -49,8 +49,7 @@ enum BjarngrimSpells
// STORMFORGED LIEUTENANT
SPELL_ARC_WELD = 59085,
- SPELL_RENEW_STEEL_N = 52774,
- SPELL_RENEW_STEEL_H = 59160,
+ SPELL_RENEW_STEEL = 52774,
};
enum BjarngrimOther
@@ -91,6 +90,9 @@ enum BjarngrimEvents
// STORMFORGED LIEUTENANT
EVENT_ARC_WELD = 41,
EVENT_RENEW_STEEL = 42,
+
+ // CHARGE UP
+ EVENT_CHARGE_UP = 51,
};
enum Yells
@@ -106,334 +108,343 @@ enum Yells
EMOTE_BERSEKER_STANCE = 8,
};
-class boss_bjarngrim : public CreatureScript
+struct boss_bjarngrim : public npc_escortAI
{
-public:
- boss_bjarngrim() : CreatureScript("boss_bjarngrim") { }
+ boss_bjarngrim(Creature* creature) : npc_escortAI(creature), summons(creature)
+ {
+ m_pInstance = creature->GetInstanceScript();
+ InitializeWaypoints();
+ me->SetWalk(true);
+ Start(true, ObjectGuid::Empty, nullptr, false, true);
+ }
- CreatureAI* GetAI(Creature* creature) const override
+ void InitializeWaypoints()
{
- return GetHallsOfLightningAI<boss_bjarngrimAI>(creature);
+ AddWaypoint(1, 1262.0f, -26.9f, 33.5f, 10000);
+ AddWaypoint(2, 1262.18f, 99.3f, 33.5f, 10000);
+ AddWaypoint(3, 1262.0f, -26.9f, 33.5f, 0);
+ AddWaypoint(4, 1332.0f, -26.6f, 40.18f, 10000);
+ AddWaypoint(5, 1395.092f, 36.6425f, 50.038f, 10000);
+ AddWaypoint(6, 1332.0f, -26.6f, 40.18f, 0);
+ AddWaypoint(7, 1262.0f, -26.9f, 33.5f, 0);
}
- struct boss_bjarngrimAI : public npc_escortAI
+ void Reset() override
{
- boss_bjarngrimAI(Creature* creature) : npc_escortAI(creature), summons(creature)
- {
- m_pInstance = creature->GetInstanceScript();
-
- // Init waypoints
- AddWaypoint(1, 1262.18f, 99.3f, 33.5f, 0);
- AddWaypoint(2, 1281.6f, 99.5f, 33.5f, 0);
- AddWaypoint(3, 1311.7f, 99.4f, 40.1f, 0);
- AddWaypoint(4, 1332.5f, 99.7f, 40.18f, 0);
- AddWaypoint(5, 1311.7f, 99.4f, 40.1f, 0);
- AddWaypoint(6, 1281.6f, 99.5f, 33.5f, 0);
- AddWaypoint(7, 1262.18f, 99.3f, 33.5f, 0);
- AddWaypoint(8, 1262, -26.9f, 33.5f, 0);
- AddWaypoint(9, 1281.2f, -26.8f, 33.5f, 0);
- AddWaypoint(10, 1311.3f, -26.9f, 40.03f, 0);
- AddWaypoint(11, 1332, -26.6f, 40.18f, 0);
- AddWaypoint(12, 1311.3f, -26.9f, 40.03f, 0);
- AddWaypoint(13, 1281.2f, -26.8f, 33.5f, 0);
- AddWaypoint(14, 1262, -26.9f, 33.5f, 0);
-
- Start(true, false, ObjectGuid::Empty, nullptr, false, true);
- }
+ events.Reset();
+ summons.DespawnAll();
- InstanceScript* m_pInstance;
- EventMap events;
- SummonList summons;
- uint8 m_uiStance;
+ for (uint8 i = 0; i < 2; ++i)
+ if (Creature* dwarf = me->SummonCreature(NPC_STORMFORGED_LIEUTENANT, me->GetPositionX() + urand(4, 12), me->GetPositionY() + urand(4, 12), me->GetPositionZ()))
+ {
+ float angle = i == 0 ? 2.5f : 3.78f;
+ dwarf->GetMotionMaster()->MoveFollow(me, 3, angle);
+ summons.Summon(dwarf);
+ }
- void Reset() override
- {
- events.Reset();
- summons.DespawnAll();
-
- for (uint8 i = 0; i < 2; ++i)
- if (Creature* dwarf = me->SummonCreature(NPC_STORMFORGED_LIEUTENANT, me->GetPositionX() + urand(4, 12), me->GetPositionY() + urand(4, 12), me->GetPositionZ()))
- {
- dwarf->GetMotionMaster()->MoveFollow(me, 3, rand_norm() * 2 * 3.14f);
- summons.Summon(dwarf);
- }
-
- me->RemoveAllAuras();
- me->CastSpell(me, SPELL_TEMPORARY_ELECTRICAL_CHARGE, true);
- RollStance(0, STANCE_DEFENSIVE);
-
- if (m_pInstance)
- m_pInstance->SetData(TYPE_BJARNGRIM, NOT_STARTED);
- }
+ me->RemoveAllAuras();
- void JustEngagedWith(Unit*) override
- {
- me->SetInCombatWithZone();
- Talk(SAY_AGGRO);
+ if (m_pInstance)
+ m_pInstance->SetBossState(DATA_BJARNGRIM, NOT_STARTED);
- events.ScheduleEvent(EVENT_BJARNGRIM_CHANGE_STANCE, 20s, 0);
+ DoCastSelf(SPELL_BATTLE_STANCE, true);
+ SetEquipmentSlots(false, EQUIP_SWORD, EQUIP_SHIELD, EQUIP_NO_CHANGE);
+ }
- // DEFENSIVE STANCE
- events.ScheduleEvent(EVENT_BJARNGRIM_REFLECTION, 8s, STANCE_DEFENSIVE);
- events.ScheduleEvent(EVENT_BJARNGRIM_PUMMEL, 5s, STANCE_DEFENSIVE);
- events.ScheduleEvent(EVENT_BJARNGRIM_KNOCK, 16s, STANCE_DEFENSIVE);
- events.ScheduleEvent(EVENT_BJARNGRIM_IRONFORM, 12s, STANCE_DEFENSIVE);
+ void JustEngagedWith(Unit*) override
+ {
+ me->SetInCombatWithZone();
+ Talk(SAY_AGGRO);
- // BERSERKER STANCE
- events.ScheduleEvent(EVENT_BJARNGRIM_MORTAL_STRIKE, 24s, STANCE_BERSERKER);
- events.ScheduleEvent(EVENT_BJARNGRIM_WHIRLWIND, 26s, STANCE_BERSERKER);
+ RollStance(STANCE_BATTLE);
- // BATTLE STANCE
- events.ScheduleEvent(EVENT_BJARNGRIM_INTERCEPT, 23s, STANCE_BATTLE);
- events.ScheduleEvent(EVENT_BJARNGRIM_CLEAVE, 25s, STANCE_BATTLE);
- events.ScheduleEvent(EVENT_BJARNGRIM_SLAM, 30s, STANCE_BATTLE);
+ events.ScheduleEvent(EVENT_BJARNGRIM_CHANGE_STANCE, 20s, 0);
- if (m_pInstance)
- {
- m_pInstance->SetData(TYPE_BJARNGRIM, IN_PROGRESS);
- m_pInstance->SetData(DATA_BJARNGRIM_ACHIEVEMENT, me->HasAura(SPELL_TEMPORARY_ELECTRICAL_CHARGE));
- }
- }
+ // DEFENSIVE STANCE
+ events.ScheduleEvent(EVENT_BJARNGRIM_REFLECTION, 8s, STANCE_DEFENSIVE);
+ events.ScheduleEvent(EVENT_BJARNGRIM_KNOCK, 16s, STANCE_DEFENSIVE);
+ events.ScheduleEvent(EVENT_BJARNGRIM_IRONFORM, 12s, STANCE_DEFENSIVE);
- void KilledUnit(Unit* victim) override
- {
- if (!victim->IsPlayer())
- return;
+ // BERSERKER STANCE
+ events.ScheduleEvent(EVENT_BJARNGRIM_INTERCEPT, 23s, STANCE_BERSERKER);
+ events.ScheduleEvent(EVENT_BJARNGRIM_CLEAVE, 25s, STANCE_BERSERKER);
+ events.ScheduleEvent(EVENT_BJARNGRIM_WHIRLWIND, 26s, STANCE_BERSERKER);
- Talk(SAY_SLAY);
- }
+ // BATTLE STANCE
+ events.ScheduleEvent(EVENT_BJARNGRIM_PUMMEL, 5s, STANCE_BATTLE);
+ events.ScheduleEvent(EVENT_BJARNGRIM_MORTAL_STRIKE, 24s, STANCE_BATTLE);
+ events.ScheduleEvent(EVENT_BJARNGRIM_SLAM, 30s, STANCE_BATTLE);
- void JustDied(Unit*) override
+ if (m_pInstance)
{
- Talk(SAY_DEATH);
-
- if (m_pInstance)
- m_pInstance->SetData(TYPE_BJARNGRIM, DONE);
+ m_pInstance->SetBossState(DATA_BJARNGRIM, IN_PROGRESS);
+ m_pInstance->SetData(DATA_BJARNGRIM_ACHIEVEMENT, me->HasAura(SPELL_TEMPORARY_ELECTRICAL_CHARGE));
}
+ }
- void RemoveStanceAura(uint8 stance)
- {
- switch (stance)
- {
- case STANCE_DEFENSIVE:
- me->RemoveAura(SPELL_DEFENSIVE_STANCE);
- me->RemoveAura(SPELL_DEFENSIVE_AURA);
- break;
- case STANCE_BERSERKER:
- me->RemoveAura(SPELL_BERSERKER_STANCE);
- me->RemoveAura(SPELL_BERSERKER_AURA);
- break;
- case STANCE_BATTLE:
- me->RemoveAura(SPELL_BATTLE_STANCE);
- me->RemoveAura(SPELL_BATTLE_AURA);
- break;
- }
- }
+ void KilledUnit(Unit* victim) override
+ {
+ if (!victim->IsPlayer())
+ return;
- void RollStance(uint8 stance, uint8 force = 0)
+ Talk(SAY_SLAY);
+ }
+
+ void JustDied(Unit*) override
+ {
+ Talk(SAY_DEATH);
+
+ if (m_pInstance)
+ m_pInstance->SetBossState(DATA_BJARNGRIM, DONE);
+ }
+
+ void RemoveStanceAura(uint8 stance)
+ {
+ switch (stance)
{
- if (urand(0, 1))
- stance = (++stance == 4 ? 1 : stance);
- else
- stance = (--stance == 0 ? 3 : stance);
+ case STANCE_DEFENSIVE:
+ me->RemoveAura(SPELL_DEFENSIVE_STANCE);
+ me->RemoveAura(SPELL_DEFENSIVE_AURA);
+ break;
+ case STANCE_BERSERKER:
+ me->RemoveAura(SPELL_BERSERKER_STANCE);
+ me->RemoveAura(SPELL_BERSERKER_AURA);
+ break;
+ case STANCE_BATTLE:
+ me->RemoveAura(SPELL_BATTLE_STANCE);
+ me->RemoveAura(SPELL_BATTLE_AURA);
+ break;
+ }
+ }
- if (force)
- stance = force;
+ void RollStance(uint8 stance, uint8 force = 0)
+ {
+ if (urand(0, 1))
+ stance = (++stance == 4 ? 1 : stance);
+ else
+ stance = (--stance == 0 ? 3 : stance);
- switch (stance)
- {
- case STANCE_DEFENSIVE:
- Talk(SAY_DEFENSIVE_STANCE);
+ if (force)
+ stance = force;
- me->CastSpell(me, SPELL_DEFENSIVE_STANCE, true);
- me->CastSpell(me, SPELL_DEFENSIVE_AURA, true);
+ switch (stance)
+ {
+ case STANCE_DEFENSIVE:
+ Talk(SAY_DEFENSIVE_STANCE);
- events.DelayEvents(20000, STANCE_BERSERKER);
- events.DelayEvents(20000, STANCE_BATTLE);
+ DoCastSelf(SPELL_DEFENSIVE_STANCE, true);
+ DoCastSelf(SPELL_DEFENSIVE_AURA, true);
- SetEquipmentSlots(false, EQUIP_SWORD, EQUIP_SHIELD, EQUIP_NO_CHANGE);
- break;
- case STANCE_BERSERKER:
- Talk(SAY_BERSERKER_STANCE);
+ events.DelayEvents(20s, STANCE_BERSERKER);
+ events.DelayEvents(20s, STANCE_BATTLE);
- me->CastSpell(me, SPELL_BERSERKER_STANCE, true);
- me->CastSpell(me, SPELL_BERSERKER_AURA, true);
+ SetEquipmentSlots(false, EQUIP_SWORD, EQUIP_SHIELD, EQUIP_NO_CHANGE);
+ break;
+ case STANCE_BERSERKER:
+ Talk(SAY_BERSERKER_STANCE);
- events.DelayEvents(20000, STANCE_DEFENSIVE);
- events.DelayEvents(20000, STANCE_BATTLE);
+ DoCastSelf(SPELL_BERSERKER_STANCE, true);
+ DoCastSelf(SPELL_BERSERKER_AURA, true);
- SetEquipmentSlots(false, EQUIP_SWORD, EQUIP_SWORD, EQUIP_NO_CHANGE);
- break;
- case STANCE_BATTLE:
- Talk(SAY_BATTLE_STANCE);
+ events.DelayEvents(20s, STANCE_DEFENSIVE);
+ events.DelayEvents(20s, STANCE_BATTLE);
- me->CastSpell(me, SPELL_BATTLE_STANCE, true);
- me->CastSpell(me, SPELL_BATTLE_AURA, true);
+ SetEquipmentSlots(false, EQUIP_SWORD, EQUIP_SWORD, EQUIP_NO_CHANGE);
+ break;
+ case STANCE_BATTLE:
+ Talk(SAY_BATTLE_STANCE);
- events.DelayEvents(20000, STANCE_BERSERKER);
- events.DelayEvents(20000, STANCE_DEFENSIVE);
+ DoCastSelf(SPELL_BATTLE_STANCE, true);
+ DoCastSelf(SPELL_BATTLE_AURA, true);
- SetEquipmentSlots(false, EQUIP_MACE, EQUIP_UNEQUIP, EQUIP_NO_CHANGE);
- break;
- }
+ events.DelayEvents(20s, STANCE_BERSERKER);
+ events.DelayEvents(20s, STANCE_DEFENSIVE);
- m_uiStance = stance;
+ SetEquipmentSlots(false, EQUIP_MACE, EQUIP_UNEQUIP, EQUIP_NO_CHANGE);
+ break;
}
- void WaypointReached(uint32 Point) override
+ m_uiStance = stance;
+ }
+
+ void WaypointReached(uint32 Point) override
+ {
+ if (Point == 1)
{
- if (Point == 1 || Point == 8)
- me->CastSpell(me, SPELL_TEMPORARY_ELECTRICAL_CHARGE, true);
- else if (Point == 7 || Point == 14)
- me->RemoveAura(SPELL_TEMPORARY_ELECTRICAL_CHARGE);
+ events.CancelEvent(EVENT_CHARGE_UP);
+ events.ScheduleEvent(EVENT_CHARGE_UP, 2500ms, 0);
}
-
- void UpdateEscortAI(uint32 diff) override
+ else if (Point == 2)
{
- if (!me->IsInCombat())
- return;
+ events.CancelEvent(EVENT_CHARGE_UP);
+ }
+ else if (Point == 3)
+ {
+ me->RemoveAura(SPELL_TEMPORARY_ELECTRICAL_CHARGE);
+ }
+ else if (Point == 4)
+ {
+ events.CancelEvent(EVENT_CHARGE_UP);
+ events.ScheduleEvent(EVENT_CHARGE_UP, 2500ms, 0);
+ }
+ else if (Point == 5)
+ {
+ events.CancelEvent(EVENT_CHARGE_UP);
+ }
+ else if (Point == 6)
+ {
+ me->RemoveAura(SPELL_TEMPORARY_ELECTRICAL_CHARGE);
+ }
+ }
+
+ void UpdateEscortAI(uint32 diff) override
+ {
+ events.Update(diff);
- // Return since we have no target
- if (!UpdateVictim())
+ if (uint32 eventId = events.ExecuteEvent())
+ {
+ if (eventId == EVENT_CHARGE_UP)
{
- Reset();
+ me->CastSpell(me, SPELL_CHARGE_UP, true);
+ me->CastSpell(me, SPELL_TEMPORARY_ELECTRICAL_CHARGE, true);
return;
}
+ }
- events.Update(diff);
+ if (!me->IsInCombat())
+ return;
- if (me->HasUnitState(UNIT_STATE_CASTING))
- return;
+ // Return since we have no target
+ if (!UpdateVictim())
+ {
+ Reset();
+ return;
+ }
- switch (events.ExecuteEvent())
- {
- case EVENT_BJARNGRIM_CHANGE_STANCE:
- // roll new stance
- RemoveStanceAura(m_uiStance);
- RollStance(m_uiStance);
- events.Repeat(20s);
- break;
-
- ///////////////////////////////////////////////////////
- ///// DEFENSIVE STANCE
- ///////////////////////////////////////////////////////
- case EVENT_BJARNGRIM_REFLECTION:
- me->CastSpell(me, SPELL_BJARNGRIM_REFLETION, true);
- events.Repeat(8s, 9s);
- break;
- case EVENT_BJARNGRIM_PUMMEL:
- me->CastSpell(me->GetVictim(), SPELL_PUMMEL, false);
- events.Repeat(10s, 11s);
- break;
- case EVENT_BJARNGRIM_KNOCK:
- me->CastSpell(me, SPELL_KNOCK_AWAY, false);
- events.Repeat(20s, 21s);
- break;
- case EVENT_BJARNGRIM_IRONFORM:
- me->CastSpell(me, SPELL_IRONFORM, true);
- events.Repeat(18s, 23s);
- break;
-
- ///////////////////////////////////////////////////////
- ///// BERSERKER STANCE
- ///////////////////////////////////////////////////////
- case EVENT_BJARNGRIM_MORTAL_STRIKE:
- me->CastSpell(me->GetVictim(), SPELL_MORTAL_STRIKE, false);
- events.Repeat(10s);
- break;
- case EVENT_BJARNGRIM_WHIRLWIND:
- me->CastSpell(me, SPELL_WHIRLWIND, true);
- events.Repeat(25s);
- break;
-
- ///////////////////////////////////////////////////////
- ///// BATTLE STANCE
- ///////////////////////////////////////////////////////
- case EVENT_BJARNGRIM_INTERCEPT:
- if (Unit* target = SelectTarget(SelectTargetMethod::Random))
- me->CastSpell(target, SPELL_INTERCEPT, true);
-
- events.Repeat(30s);
- break;
- case EVENT_BJARNGRIM_CLEAVE:
- me->CastSpell(me->GetVictim(), SPELL_CLEAVE, false);
- events.Repeat(25s);
- break;
- case EVENT_BJARNGRIM_SLAM:
- me->CastSpell(me->GetVictim(), SPELL_SLAM, false);
- events.Repeat(10s, 12s);
- break;
- }
+ if (me->HasUnitState(UNIT_STATE_CASTING))
+ return;
- DoMeleeAttackIfReady();
+ switch (events.ExecuteEvent())
+ {
+ case EVENT_BJARNGRIM_CHANGE_STANCE:
+ // roll new stance
+ RemoveStanceAura(m_uiStance);
+ RollStance(m_uiStance);
+ events.Repeat(20s);
+ break;
+
+ case EVENT_CHARGE_UP:
+ DoCastSelf(SPELL_CHARGE_UP, true);
+ DoCastSelf(SPELL_TEMPORARY_ELECTRICAL_CHARGE, true);
+ break;
+
+ // DEFENSIVE STANCE
+ case EVENT_BJARNGRIM_REFLECTION:
+ DoCastSelf(SPELL_BJARNGRIM_REFLETION, true);
+ events.Repeat(8s, 9s);
+ break;
+ case EVENT_BJARNGRIM_PUMMEL:
+ DoCastVictim(SPELL_PUMMEL);
+ events.Repeat(10s, 11s);
+ break;
+ case EVENT_BJARNGRIM_KNOCK:
+ DoCastAOE(SPELL_KNOCK_AWAY);
+ events.Repeat(20s, 21s);
+ break;
+ case EVENT_BJARNGRIM_IRONFORM:
+ DoCastSelf(SPELL_IRONFORM, true);
+ events.Repeat(18s, 23s);
+ break;
+
+ // BERSERKER STANCE
+ case EVENT_BJARNGRIM_MORTAL_STRIKE:
+ DoCastVictim(SPELL_MORTAL_STRIKE);
+ events.Repeat(10s);
+ break;
+ case EVENT_BJARNGRIM_WHIRLWIND:
+ DoCastSelf(SPELL_WHIRLWIND, true);
+ events.Repeat(25s);
+ break;
+
+ // BATTLE STANCE
+ case EVENT_BJARNGRIM_INTERCEPT:
+ DoCastRandomTarget(SPELL_INTERCEPT, 0, 40.0f, false, true);
+ events.Repeat(30s);
+ break;
+ case EVENT_BJARNGRIM_CLEAVE:
+ DoCastVictim(SPELL_CLEAVE);
+ events.Repeat(25s);
+ break;
+ case EVENT_BJARNGRIM_SLAM:
+ DoCastVictim(SPELL_SLAM);
+ events.Repeat(10s, 12s);
+ break;
}
- };
+
+ DoMeleeAttackIfReady();
+ }
+
+ private:
+ InstanceScript* m_pInstance;
+ EventMap events;
+ SummonList summons;
+ uint8 m_uiStance;
};
-class npc_stormforged_lieutenant : public CreatureScript
+struct npc_stormforged_lieutenant : public ScriptedAI
{
-public:
- npc_stormforged_lieutenant() : CreatureScript("npc_stormforged_lieutenant") { }
+ npc_stormforged_lieutenant(Creature* creature) : ScriptedAI(creature) { }
- CreatureAI* GetAI(Creature* creature) const override
+ void Reset() override
{
- return GetHallsOfLightningAI<npc_stormforged_lieutenantAI>(creature);
+ if (me->IsSummon())
+ BjarngrimGUID = me->ToTempSummon()->GetSummonerGUID();
+ else
+ BjarngrimGUID.Clear();
}
- struct npc_stormforged_lieutenantAI : public ScriptedAI
+ void JustEngagedWith(Unit*) override
{
- npc_stormforged_lieutenantAI(Creature* creature) : ScriptedAI(creature) { }
+ events.ScheduleEvent(EVENT_ARC_WELD, 2s);
+ events.ScheduleEvent(EVENT_RENEW_STEEL, 10s, 11s);
+ }
- EventMap events;
- ObjectGuid BjarngrimGUID;
+ void UpdateAI(uint32 diff) override
+ {
+ //Return since we have no target
+ if (!UpdateVictim())
+ return;
- void Reset() override
- {
- if (me->IsSummon())
- BjarngrimGUID = me->ToTempSummon()->GetSummonerGUID();
- else
- BjarngrimGUID.Clear();
- }
+ events.Update(diff);
- void JustEngagedWith(Unit*) override
- {
- events.ScheduleEvent(EVENT_ARC_WELD, 2s);
- events.ScheduleEvent(EVENT_RENEW_STEEL, 10s, 11s);
- }
+ if (me->HasUnitState(UNIT_STATE_CASTING))
+ return;
- void UpdateAI(uint32 diff) override
+ switch (events.ExecuteEvent())
{
- //Return since we have no target
- if (!UpdateVictim())
- return;
-
- events.Update(diff);
-
- if (me->HasUnitState(UNIT_STATE_CASTING))
- return;
+ case EVENT_ARC_WELD:
+ me->CastSpell(me->GetVictim(), SPELL_ARC_WELD, true);
+ events.Repeat(20s);
+ break;
+ case EVENT_RENEW_STEEL:
+ if (Creature* bjarngrim = ObjectAccessor::GetCreature(*me, BjarngrimGUID))
+ if (bjarngrim->IsAlive())
+ me->CastSpell(bjarngrim, SPELL_RENEW_STEEL, true);
+
+ events.Repeat(10s, 14s);
+ break;
+ }
- switch (events.ExecuteEvent())
- {
- case EVENT_ARC_WELD:
- me->CastSpell(me->GetVictim(), SPELL_ARC_WELD, true);
- events.Repeat(20s);
- break;
- case EVENT_RENEW_STEEL:
- if (Creature* bjarngrim = ObjectAccessor::GetCreature(*me, BjarngrimGUID))
- if (bjarngrim->IsAlive())
- me->CastSpell(bjarngrim, me->GetMap()->IsHeroic() ? SPELL_RENEW_STEEL_H : SPELL_RENEW_STEEL_N, true);
-
- events.Repeat(10s, 14s);
- break;
- }
+ DoMeleeAttackIfReady();
+ }
- DoMeleeAttackIfReady();
- }
- };
+ private:
+ EventMap events;
+ ObjectGuid BjarngrimGUID;
};
void AddSC_boss_bjarngrim()
{
- new boss_bjarngrim();
- new npc_stormforged_lieutenant();
+ RegisterHallOfLightningCreatureAI(boss_bjarngrim);
+ RegisterHallOfLightningCreatureAI(npc_stormforged_lieutenant);
}
diff --git a/src/server/scripts/Northrend/Ulduar/HallsOfLightning/boss_ionar.cpp b/src/server/scripts/Northrend/Ulduar/HallsOfLightning/boss_ionar.cpp
index 752ef36a30..a45a90cdeb 100644
--- a/src/server/scripts/Northrend/Ulduar/HallsOfLightning/boss_ionar.cpp
+++ b/src/server/scripts/Northrend/Ulduar/HallsOfLightning/boss_ionar.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
@@ -25,10 +25,8 @@
enum IonarSpells
{
- SPELL_BALL_LIGHTNING_N = 52780,
- SPELL_BALL_LIGHTNING_H = 59800,
- SPELL_STATIC_OVERLOAD_N = 52658,
- SPELL_STATIC_OVERLOAD_H = 59795,
+ SPELL_BALL_LIGHTNING = 52780,
+ SPELL_STATIC_OVERLOAD = 52658,
SPELL_STATIC_OVERLOAD_KNOCK = 53337,
SPELL_DISPERSE = 52770,
@@ -36,8 +34,7 @@ enum IonarSpells
SPELL_SPARK_DESPAWN = 52776,
//Spark of Ionar
- SPELL_SPARK_VISUAL_TRIGGER_N = 52667,
- SPELL_SPARK_VISUAL_TRIGGER_H = 59833,
+ SPELL_SPARK_VISUAL_TRIGGER = 52667,
SPELL_RANDOM_LIGHTNING = 52663,
};
@@ -66,213 +63,191 @@ enum IonarEvents
EVENT_CHECK_HEALTH = 3,
EVENT_CALL_SPARKS = 4,
EVENT_RESTORE = 5,
+ EVENT_CHANGE_TARGET = 6,
};
-class boss_ionar : public CreatureScript
+struct boss_ionar : public BossAI
{
-public:
- boss_ionar() : CreatureScript("boss_ionar") { }
+ boss_ionar(Creature* creature) : BossAI(creature, DATA_IONAR) { }
- CreatureAI* GetAI(Creature* creature) const override
+ void Reset() override
{
- return GetHallsOfLightningAI<boss_ionarAI>(creature);
+ _Reset();
+ me->SetVisible(true);
+
+ ScheduleHealthCheckEvent(50, [&] {
+ DoCastSelf(SPELL_DISPERSE);
+ });
}
- struct boss_ionarAI : public ScriptedAI
+ void ScheduleEvents(bool spark)
{
- boss_ionarAI(Creature* creature) : ScriptedAI(creature), summons(creature)
- {
- m_pInstance = creature->GetInstanceScript();
- }
-
- InstanceScript* m_pInstance;
- EventMap events;
- SummonList summons;
- uint8 HealthCheck;
-
- void Reset() override
- {
- HealthCheck = 50;
- events.Reset();
- summons.DespawnAll();
-
- me->SetVisible(true);
-
- if (m_pInstance)
- m_pInstance->SetData(TYPE_IONAR, NOT_STARTED);
- }
-
- void ScheduleEvents(bool spark)
- {
- events.SetPhase(1);
- if (!spark)
- events.RescheduleEvent(EVENT_CHECK_HEALTH, 1s, 0, 1);
+ events.SetPhase(1);
+ if (!spark)
+ events.RescheduleEvent(EVENT_CHECK_HEALTH, 1s, 0, 1);
- events.RescheduleEvent(EVENT_BALL_LIGHTNING, 10s, 0, 1);
- events.RescheduleEvent(EVENT_STATIC_OVERLOAD, 5s, 0, 1);
- }
-
- void JustEngagedWith(Unit*) override
- {
- me->SetInCombatWithZone();
- Talk(SAY_AGGRO);
-
- if (m_pInstance)
- m_pInstance->SetData(TYPE_IONAR, IN_PROGRESS);
-
- ScheduleEvents(false);
- }
+ events.RescheduleEvent(EVENT_BALL_LIGHTNING, 7s, 11s, 0, 1);
+ events.RescheduleEvent(EVENT_STATIC_OVERLOAD, 6s, 12s, 0, 1);
+ }
- void JustDied(Unit*) override
- {
- Talk(SAY_DEATH);
+ void JustEngagedWith(Unit*) override
+ {
+ _JustEngagedWith();
+ Talk(SAY_AGGRO);
+ ScheduleEvents(false);
+ }
- summons.DespawnAll();
+ void JustDied(Unit*) override
+ {
+ _JustDied();
+ Talk(SAY_DEATH);
+ }
- if (m_pInstance)
- m_pInstance->SetData(TYPE_IONAR, DONE);
- }
+ void KilledUnit(Unit* victim) override
+ {
+ if (!victim->IsPlayer())
+ return;
- void KilledUnit(Unit* victim) override
- {
- if (!victim->IsPlayer())
- return;
+ Talk(SAY_SLAY);
+ }
- Talk(SAY_SLAY);
- }
+ void SpellHit(Unit* /*caster*/, SpellInfo const* spell) override
+ {
+ if (spell->Id == SPELL_DISPERSE)
+ Split();
+ }
- void SpellHit(Unit* /*caster*/, SpellInfo const* spell) override
- {
- if (spell->Id == SPELL_DISPERSE)
- Split();
- }
+ void Split()
+ {
+ Talk(SAY_SPLIT);
- void Split()
+ for (uint8 i = 0; i < 5; ++i)
{
- Talk(SAY_SPLIT);
-
- Creature* spark;
- for (uint8 i = 0; i < 5; ++i)
+ if (Creature* spark = me->SummonCreature(NPC_SPARK_OF_IONAR, me->GetPosition(), TEMPSUMMON_TIMED_DESPAWN, 20000))
{
- if ((spark = me->SummonCreature(NPC_SPARK_OF_IONAR, me->GetPositionX(), me->GetPositionY(), me->GetPositionZ(), 0, TEMPSUMMON_TIMED_DESPAWN, 20000)))
- {
- summons.Summon(spark);
- spark->CastSpell(spark, me->GetMap()->IsHeroic() ? SPELL_SPARK_VISUAL_TRIGGER_H : SPELL_SPARK_VISUAL_TRIGGER_N, true);
- spark->CastSpell(spark, SPELL_RANDOM_LIGHTNING, true);
- spark->SetUnitFlag(UNIT_FLAG_PACIFIED | UNIT_FLAG_NOT_SELECTABLE | UNIT_FLAG_NON_ATTACKABLE);
- spark->SetHomePosition(me->GetPositionX(), me->GetPositionY(), me->GetPositionZ(), 0);
+ spark->CastSpell(spark, SPELL_SPARK_VISUAL_TRIGGER, true);
+ spark->CastSpell(spark, SPELL_RANDOM_LIGHTNING, true);
+ spark->SetUnitFlag(UNIT_FLAG_PACIFIED | UNIT_FLAG_NOT_SELECTABLE | UNIT_FLAG_NON_ATTACKABLE);
+ spark->SetHomePosition(me->GetPosition());
- if (Player* tgt = SelectTargetFromPlayerList(100))
- spark->GetMotionMaster()->MoveFollow(tgt, 0.0f, 0.0f, MOTION_SLOT_CONTROLLED);
- }
+ if (Player* tgt = SelectTargetFromPlayerList(100))
+ spark->GetMotionMaster()->MoveFollow(tgt, 0.0f, 0.0f, MOTION_SLOT_CONTROLLED);
}
-
- me->SetVisible(false);
- me->SetControlled(true, UNIT_STATE_STUNNED);
-
- events.SetPhase(2);
- events.ScheduleEvent(EVENT_CALL_SPARKS, 15s, 0, 2);
}
- void UpdateAI(uint32 diff) override
- {
- if (!UpdateVictim())
- return;
-
- events.Update(diff);
+ me->SetVisible(false);
+ me->SetControlled(true, UNIT_STATE_STUNNED);
- if (me->HasUnitState(UNIT_STATE_CASTING))
- return;
+ events.SetPhase(2);
+ events.ScheduleEvent(EVENT_CALL_SPARKS, 20s, 0, 2);
+ }
- switch (events.ExecuteEvent())
- {
- case EVENT_BALL_LIGHTNING:
- if (Unit* target = SelectTarget(SelectTargetMethod::Random))
- me->CastSpell(target, me->GetMap()->IsHeroic() ? SPELL_BALL_LIGHTNING_H : SPELL_BALL_LIGHTNING_N, false);
+ void UpdateAI(uint32 diff) override
+ {
+ if (!UpdateVictim())
+ return;
- events.Repeat(10s, 11s);
- break;
- case EVENT_STATIC_OVERLOAD:
- if (Unit* target = SelectTarget(SelectTargetMethod::Random))
- me->CastSpell(target, me->GetMap()->IsHeroic() ? SPELL_STATIC_OVERLOAD_H : SPELL_STATIC_OVERLOAD_N, false);
+ events.Update(diff);
- events.Repeat(5s, 6s);
- break;
- case EVENT_CHECK_HEALTH:
- if (HealthBelowPct(HealthCheck))
- me->CastSpell(me, SPELL_DISPERSE, false);
+ if (me->HasUnitState(UNIT_STATE_CASTING))
+ return;
- events.Repeat(1s);
- return;
- case EVENT_CALL_SPARKS:
- {
- EntryCheckPredicate pred(NPC_SPARK_OF_IONAR);
- summons.DoAction(ACTION_CALLBACK, pred);
- events.ScheduleEvent(EVENT_RESTORE, 2s, 0, 2);
- return;
- }
- case EVENT_RESTORE:
+ switch (events.ExecuteEvent())
+ {
+ case EVENT_BALL_LIGHTNING:
+ DoCastRandomTarget(SPELL_BALL_LIGHTNING, 1, 0.0f, false);
+ events.Repeat(8s, 18s);
+ break;
+ case EVENT_STATIC_OVERLOAD:
+ DoCastRandomTarget(SPELL_STATIC_OVERLOAD);
+ events.Repeat(9s, 14s);
+ break;
+ case EVENT_CALL_SPARKS:
+ {
EntryCheckPredicate pred(NPC_SPARK_OF_IONAR);
- summons.DoAction(ACTION_SPARK_DESPAWN, pred);
-
- me->SetVisible(true);
- me->SetControlled(false, UNIT_STATE_STUNNED);
- ScheduleEvents(true);
+ summons.DoAction(ACTION_CALLBACK, pred);
+ events.ScheduleEvent(EVENT_RESTORE, 5s, 0, 2);
return;
- }
+ }
+ case EVENT_RESTORE:
+ EntryCheckPredicate pred(NPC_SPARK_OF_IONAR);
+ summons.DoAction(ACTION_SPARK_DESPAWN, pred);
- DoMeleeAttackIfReady();
+ me->SetVisible(true);
+ me->SetControlled(false, UNIT_STATE_STUNNED);
+ ScheduleEvents(true);
+ return;
}
- };
+
+ DoMeleeAttackIfReady();
+ }
};
-class npc_spark_of_ionar : public CreatureScript
+struct npc_spark_of_ionar : public ScriptedAI
{
-public:
- npc_spark_of_ionar() : CreatureScript("npc_spark_of_ionar") { }
+ npc_spark_of_ionar(Creature* creature) : ScriptedAI(creature) { }
- CreatureAI* GetAI(Creature* creature) const override
+ void MoveInLineOfSight(Unit*) override { }
+ void AttackStart(Unit* /*who*/) override { }
+
+ void Reset() override
{
- return GetHallsOfLightningAI<npc_spark_of_ionarAI>(creature);
+ returning = false;
+ _events.ScheduleEvent(EVENT_CHANGE_TARGET, 3s);
}
- struct npc_spark_of_ionarAI : public ScriptedAI
+ void DamageTaken(Unit*, uint32& damage, DamageEffectType, SpellSchoolMask) override
{
- npc_spark_of_ionarAI(Creature* creature) : ScriptedAI(creature) { }
-
- bool returning;
+ damage = 0;
+ }
- void MoveInLineOfSight(Unit*) override { }
- void UpdateAI(uint32) override { }
- void AttackStart(Unit* /*who*/) override { }
+ void UpdateAI(uint32 diff) override
+ {
+ if (returning)
+ return;
- void Reset() override { returning = false; }
+ _events.Update(diff);
- void DamageTaken(Unit*, uint32& damage, DamageEffectType, SpellSchoolMask) override
+ while (uint32 eventId = _events.ExecuteEvent())
{
- damage = 0;
+ switch (eventId)
+ {
+ case EVENT_CHANGE_TARGET:
+ if (Player* tgt = SelectTargetFromPlayerList(100))
+ {
+ me->GetMotionMaster()->Clear();
+ me->GetMotionMaster()->MoveFollow(tgt, 0.0f, 0.0f, MOTION_SLOT_CONTROLLED);
+ }
+ _events.Repeat(3s);
+ break;
+ }
}
+ }
- void DoAction(int32 param) override
+ void DoAction(int32 param) override
+ {
+ if (param == ACTION_CALLBACK)
{
- if (param == ACTION_CALLBACK)
- {
- me->SetSpeed(MOVE_RUN, 2.5f);
- me->GetThreatMgr().ClearAllThreat();
- me->CombatStop(true);
- me->GetMotionMaster()->MoveTargetedHome();
- returning = true;
- }
- else if (param == ACTION_SPARK_DESPAWN)
- {
- me->GetMotionMaster()->MoveIdle();
+ _events.Reset();
+ me->SetSpeed(MOVE_RUN, 2.5f);
+ me->GetThreatMgr().ClearAllThreat();
+ me->CombatStop(true);
+ me->GetMotionMaster()->MoveTargetedHome();
+ returning = true;
+ }
+ else if (param == ACTION_SPARK_DESPAWN)
+ {
+ me->GetMotionMaster()->MoveIdle();
- me->RemoveAllAuras();
- me->CastSpell(me, SPELL_SPARK_DESPAWN, true);
- me->DespawnOrUnsummon(1000);
- }
+ me->RemoveAllAuras();
+ me->CastSpell(me, SPELL_SPARK_DESPAWN, true);
+ me->DespawnOrUnsummon(1s);
}
- };
+ }
+
+ private:
+ EventMap _events;
+ bool returning;
};
// 52658, 59795 - Static Overload
@@ -291,7 +266,8 @@ class spell_ionar_static_overload : public AuraScript
return;
if (Unit* target = GetTarget())
- target->CastSpell(target, SPELL_STATIC_OVERLOAD_KNOCK, true);
+ if (target->GetMap() && !target->GetMap()->IsHeroic())
+ target->CastSpell(target, SPELL_STATIC_OVERLOAD_KNOCK, true);
}
void Register() override
@@ -302,7 +278,7 @@ class spell_ionar_static_overload : public AuraScript
void AddSC_boss_ionar()
{
- new boss_ionar();
- new npc_spark_of_ionar();
+ RegisterHallOfLightningCreatureAI(boss_ionar);
+ RegisterHallOfLightningCreatureAI(npc_spark_of_ionar);
RegisterSpellScript(spell_ionar_static_overload);
}
diff --git a/src/server/scripts/Northrend/Ulduar/HallsOfLightning/boss_loken.cpp b/src/server/scripts/Northrend/Ulduar/HallsOfLightning/boss_loken.cpp
index 75c4c06d20..d35b11025b 100644
--- a/src/server/scripts/Northrend/Ulduar/HallsOfLightning/boss_loken.cpp
+++ b/src/server/scripts/Northrend/Ulduar/HallsOfLightning/boss_loken.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
@@ -25,13 +25,12 @@
enum LokenSpells
{
SPELL_ARC_LIGHTNING = 52921,
- SPELL_LIGHTNING_NOVA_N = 52960,
- SPELL_LIGHTNING_NOVA_H = 59835,
+ SPELL_LIGHTNING_NOVA = 52960,
SPELL_LIGHTNING_NOVA_VISUAL = 56502,
SPELL_LIGHTNING_NOVA_THUNDERS = 52663,
- SPELL_PULSING_SHOCKWAVE_N = 52961,
- SPELL_PULSING_SHOCKWAVE_H = 59836,
+ SPELL_PULSING_SHOCKWAVE = 52961,
+ SPELL_PULSING_SHOCKWAVE_AURA = 59414,
// Achievement
ACHIEVEMENT_TIMELY_DEATH = 20384
@@ -51,207 +50,103 @@ enum Yells
EMOTE_NOVA = 9
};
-enum LokenEvents
+struct boss_loken : public BossAI
{
- EVENT_LIGHTNING_NOVA = 1,
- EVENT_SHOCKWAVE = 2,
- EVENT_ARC_LIGHTNING = 3,
- EVENT_CHECK_HEALTH = 4,
- EVENT_AURA_REMOVE = 5
-};
-
-class boss_loken : public CreatureScript
-{
-public:
- boss_loken() : CreatureScript("boss_loken") { }
-
- CreatureAI* GetAI(Creature* creature) const override
- {
- return GetHallsOfLightningAI<boss_lokenAI>(creature);
- }
+ boss_loken(Creature* creature) : BossAI(creature, DATA_LOKEN), _introDone(false) { }
- struct boss_lokenAI : public ScriptedAI
+ void Reset() override
{
- boss_lokenAI(Creature* creature) : ScriptedAI(creature)
- {
- m_pInstance = creature->GetInstanceScript();
- if (m_pInstance)
- isActive = m_pInstance->GetData(TYPE_LOKEN_INTRO);
- }
-
- InstanceScript* m_pInstance;
- EventMap events;
+ _Reset();
+ instance->DoStopTimedAchievement(ACHIEVEMENT_TIMED_TYPE_EVENT, ACHIEVEMENT_TIMELY_DEATH);
- bool isActive;
- uint32 IntroTimer;
- uint8 HealthCheck;
+ me->RemoveAllAuras();
- void MoveInLineOfSight(Unit*) override { }
+ ScheduleHealthCheckEvent(75, [&] {
+ Talk(SAY_75HEALTH);
+ });
- void Reset() override
- {
- events.Reset();
- if (m_pInstance)
- {
- m_pInstance->DoStopTimedAchievement(ACHIEVEMENT_TIMED_TYPE_EVENT, ACHIEVEMENT_TIMELY_DEATH);
- m_pInstance->SetData(TYPE_LOKEN, NOT_STARTED);
- }
-
- HealthCheck = 75;
- IntroTimer = 0;
- me->RemoveAllAuras();
+ ScheduleHealthCheckEvent(50, [&] {
+ Talk(SAY_50HEALTH);
+ });
- if (!isActive)
- {
- me->SetControlled(true, UNIT_STATE_STUNNED);
- me->SetUnitFlag(UNIT_FLAG_NON_ATTACKABLE);
- }
- else
- {
- me->SetControlled(false, UNIT_STATE_STUNNED);
- me->RemoveUnitFlag(UNIT_FLAG_NON_ATTACKABLE);
- }
- }
-
- void JustEngagedWith(Unit*) override
- {
- me->SetInCombatWithZone();
- Talk(SAY_AGGRO);
-
- events.ScheduleEvent(EVENT_ARC_LIGHTNING, 10s);
- events.ScheduleEvent(EVENT_SHOCKWAVE, 3s);
- events.ScheduleEvent(EVENT_LIGHTNING_NOVA, 15s);
-
- if (m_pInstance)
- {
- m_pInstance->SetData(TYPE_LOKEN, IN_PROGRESS);
+ ScheduleHealthCheckEvent(25, [&] {
+ Talk(SAY_25HEALTH);
+ });
+ }
- if (me->GetMap()->IsHeroic())
- m_pInstance->DoStartTimedAchievement(ACHIEVEMENT_TIMED_TYPE_EVENT, ACHIEVEMENT_TIMELY_DEATH);
- }
- }
+ void MoveInLineOfSight(Unit* who) override
+ {
+ BossAI::MoveInLineOfSight(who);
- void JustDied(Unit*) override
- {
- Talk(SAY_DEATH);
+ if (_introDone || !who->IsPlayer() || !me->IsWithinDistInMap(who, 40.0f))
+ return;
- if (m_pInstance)
- m_pInstance->SetData(TYPE_LOKEN, DONE);
- }
+ Talk(SAY_INTRO_1);
+ Talk(SAY_INTRO_2, 10s);
+ _introDone = true;
+ }
- void LokenSpeach(bool hp)
+ void OnAuraRemove(AuraApplication* auraApp, AuraRemoveMode /*mode*/) override
+ {
+ if (auraApp->GetBase()->GetId() == SPELL_LIGHTNING_NOVA_VISUAL)
{
- if (hp)
- {
- switch (HealthCheck)
- {
- case 75:
- Talk(SAY_75HEALTH);
- break;
- case 50:
- Talk(SAY_50HEALTH);
- break;
- case 25:
- Talk(SAY_25HEALTH);
- break;
- }
- }
- else
- Talk(SAY_NOVA);
+ me->RemoveAura(SPELL_LIGHTNING_NOVA_THUNDERS);
+ me->ClearUnitState(UNIT_STATE_CASTING);
+ me->ResumeChasingVictim();
}
+ }
- void KilledUnit(Unit* victim) override
+ void ScheduleTasks() override
+ {
+ me->m_Events.AddEventAtOffset([&] {
+ DoCastAOE(SPELL_PULSING_SHOCKWAVE_AURA, true);
+ me->ClearUnitState(UNIT_STATE_CASTING); // the aura above is a channeled spell, so we need this
+ DoCastSelf(SPELL_PULSING_SHOCKWAVE);
+ }, 3s);
+
+ ScheduleTimedEvent(15s, [&] {
+ Talk(SAY_NOVA);
+ Talk(EMOTE_NOVA);
+ DoCastSelf(SPELL_LIGHTNING_NOVA_VISUAL, true);
+ DoCastSelf(SPELL_LIGHTNING_NOVA_THUNDERS, true);
+ DoCastAOE(SPELL_LIGHTNING_NOVA);
+ me->GetMotionMaster()->Clear();
+ me->GetMotionMaster()->MoveIdle();
+ }, 15s);
+
+ if (IsHeroic())
{
- if (!victim->IsPlayer())
- return;
+ ScheduleTimedEvent(10s, [&] {
+ DoCastRandomTarget(SPELL_ARC_LIGHTNING, 0, 100.0f, false);
+ }, 12s);
- Talk(SAY_SLAY);
+ instance->DoStartTimedAchievement(ACHIEVEMENT_TIMED_TYPE_EVENT, ACHIEVEMENT_TIMELY_DEATH);
}
+ }
- void UpdateAI(uint32 diff) override
- {
- if (!isActive)
- {
- IntroTimer += diff;
- if (IntroTimer > 5000 && IntroTimer < 10000)
- {
- if (SelectTargetFromPlayerList(60))
- {
- Talk(SAY_INTRO_1);
- IntroTimer = 10000;
- }
- else
- IntroTimer = 0;
- }
-
- if (IntroTimer >= 30000 && IntroTimer < 40000)
- {
- Talk(SAY_INTRO_2);
- IntroTimer = 40000;
- }
- if (IntroTimer >= 60000)
- {
- isActive = true;
- if (m_pInstance)
- m_pInstance->SetData(TYPE_LOKEN_INTRO, 1);
-
- me->SetControlled(false, UNIT_STATE_STUNNED);
- me->RemoveUnitFlag(UNIT_FLAG_NON_ATTACKABLE);
-
- if (Player* target = SelectTargetFromPlayerList(80))
- AttackStart(target);
- }
-
- return;
- }
-
- //Return since we have no target
- if (!UpdateVictim())
- return;
-
- events.Update(diff);
-
- if (me->HasUnitState(UNIT_STATE_CASTING))
- return;
-
- switch (events.ExecuteEvent())
- {
- case EVENT_CHECK_HEALTH:
- if (HealthBelowPct(HealthCheck))
- {
- LokenSpeach(true);
- HealthCheck -= 25;
- }
-
- events.Repeat(1s);
- break;
- case EVENT_LIGHTNING_NOVA:
- events.Repeat(15s);
- me->CastSpell(me, SPELL_LIGHTNING_NOVA_VISUAL, true);
- me->CastSpell(me, SPELL_LIGHTNING_NOVA_THUNDERS, true);
+ void JustEngagedWith(Unit*) override
+ {
+ me->m_Events.KillAllEvents(false);
+ _JustEngagedWith();
+ Talk(SAY_AGGRO);
+ }
- events.DelayEvents(5s);
- events.ScheduleEvent(EVENT_AURA_REMOVE, me->GetMap()->IsHeroic() ? 4s : 5s);
+ void JustDied(Unit*) override
+ {
+ _JustDied();
+ Talk(SAY_DEATH);
+ }
- me->CastSpell(me, me->GetMap()->IsHeroic() ? SPELL_LIGHTNING_NOVA_H : SPELL_LIGHTNING_NOVA_N, false);
- break;
- case EVENT_SHOCKWAVE:
- me->CastSpell(me, me->GetMap()->IsHeroic() ? SPELL_PULSING_SHOCKWAVE_H : SPELL_PULSING_SHOCKWAVE_N, false);
- break;
- case EVENT_ARC_LIGHTNING:
- if (Unit* target = SelectTargetFromPlayerList(100, SPELL_ARC_LIGHTNING))
- me->CastSpell(target, SPELL_ARC_LIGHTNING, false);
+ void KilledUnit(Unit* victim) override
+ {
+ if (!victim->IsPlayer())
+ return;
- events.Repeat(12s);
- break;
- case EVENT_AURA_REMOVE:
- me->RemoveAura(SPELL_LIGHTNING_NOVA_THUNDERS);
- break;
- }
+ Talk(SAY_SLAY);
+ }
- DoMeleeAttackIfReady();
- }
- };
+ private:
+ bool _introDone;
};
class spell_loken_pulsing_shockwave : public SpellScript
@@ -276,6 +171,6 @@ class spell_loken_pulsing_shockwave : public SpellScript
void AddSC_boss_loken()
{
- new boss_loken();
+ RegisterHallOfLightningCreatureAI(boss_loken);
RegisterSpellScript(spell_loken_pulsing_shockwave);
}
diff --git a/src/server/scripts/Northrend/Ulduar/HallsOfLightning/boss_volkhan.cpp b/src/server/scripts/Northrend/Ulduar/HallsOfLightning/boss_volkhan.cpp
index c64594b114..351c5ebe51 100644
--- a/src/server/scripts/Northrend/Ulduar/HallsOfLightning/boss_volkhan.cpp
+++ b/src/server/scripts/Northrend/Ulduar/HallsOfLightning/boss_volkhan.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
@@ -23,19 +23,16 @@
enum VolkahnSpells
{
// Volkhan
- SPELL_HEAT_N = 52387,
- SPELL_HEAT_H = 59528,
- SPELL_SHATTERING_STOMP_N = 52237,
- SPELL_SHATTERING_STOMP_H = 59529,
+ SPELL_HEAT = 52387,
+ SPELL_SHATTERING_STOMP = 52237,
SPELL_TEMPER = 52238,
SPELL_SUMMON_MOLTEN_GOLEM = 52405,
//Molten Golem
SPELL_BLAST_WAVE = 23113,
- SPELL_IMMOLATION_STRIKE_N = 52433,
- SPELL_IMMOLATION_STRIKE_H = 59530,
- SPELL_SHATTER_N = 52429,
- SPELL_SHATTER_H = 59527,
+ SPELL_COOL_DOWN = 52443,
+ SPELL_IMMOLATION_STRIKE = 52433,
+ SPELL_SHATTER = 52429,
};
enum VolkhanOther
@@ -44,6 +41,7 @@ enum VolkhanOther
NPC_VOLKHAN_ANVIL = 28823,
NPC_MOLTEN_GOLEM = 28695,
NPC_BRITTLE_GOLEM = 28681,
+ NPC_SLAG = 28585,
// Misc
ACTION_SHATTER = 1,
@@ -63,8 +61,8 @@ enum VolkhanEvents
EVENT_MOVE_TO_ANVIL = 5,
// Molten Golem
- EVENT_BLAST = 11,
- EVENT_IMMOLATION = 12,
+ EVENT_IMMOLATION_STRIKE = 12,
+ EVENT_CHANGE_TARGET = 13,
};
enum Yells
@@ -78,506 +76,326 @@ enum Yells
EMOTE_SHATTER = 6,
};
-class boss_volkhan : public CreatureScript
+struct boss_volkhan : public BossAI
{
-public:
- boss_volkhan() : CreatureScript("boss_volkhan") { }
+ boss_volkhan(Creature* creature) : BossAI(creature, DATA_VOLKHAN) { }
- CreatureAI* GetAI(Creature* creature) const override
+ void Reset() override
{
- return GetHallsOfLightningAI<boss_volkhanAI>(creature);
+ _Reset();
+ x = y = z = PointID = ShatteredCount = 0;
+ shatteredStompCast = false;
+ me->SetSpeed(MOVE_RUN, 1.2f, true);
+ me->SetReactState(REACT_AGGRESSIVE);
+ instance->SetData(DATA_VOLKHAN_ACHIEVEMENT, true);
}
- struct boss_volkhanAI : public ScriptedAI
+ void JustEngagedWith(Unit*) override
{
- boss_volkhanAI(Creature* creature) : ScriptedAI(creature), summons(creature)
- {
- m_pInstance = creature->GetInstanceScript();
- }
+ _JustEngagedWith();
+ me->SetInCombatWithZone();
+ Talk(SAY_AGGRO);
+ events.ScheduleEvent(EVENT_MOVE_TO_ANVIL, randtime(9s, 14s));
+ events.ScheduleEvent(EVENT_HEAT, randtime(18s, 38s));
+ events.ScheduleEvent(EVENT_CHECK_HEALTH, 1s);
+ events.ScheduleEvent(EVENT_POSITION, 4s);
+ }
- InstanceScript* m_pInstance;
- EventMap events;
- SummonList summons;
- uint8 HealthCheck;
- float x, y, z;
- uint8 PointID;
- uint8 ShatteredCount;
+ void JustDied(Unit*) override
+ {
+ _JustDied();
+ Talk(SAY_DEATH);
- void Reset() override
- {
- x = y = z = PointID = ShatteredCount = 0;
- HealthCheck = 100;
- events.Reset();
- summons.DespawnAll();
- me->SetSpeed(MOVE_RUN, 1.2f, true);
- me->SetReactState(REACT_AGGRESSIVE);
+ std::list<Creature*> slags;
+ GetCreatureListWithEntryInGrid(slags, me, NPC_SLAG, 100.0f);
- if (m_pInstance)
+ if (!slags.empty())
+ {
+ for (Creature* slag : slags)
{
- m_pInstance->SetData(TYPE_VOLKHAN, NOT_STARTED);
- m_pInstance->SetData(DATA_VOLKHAN_ACHIEVEMENT, true);
+ if (slag)
+ slag->DespawnOrUnsummon();
}
}
+ }
- void JustEngagedWith(Unit*) override
+ void GetNextPos()
+ {
+ if (me->GetPositionY() < -180)
{
- me->SetInCombatWithZone();
- Talk(SAY_AGGRO);
-
- if (m_pInstance)
- m_pInstance->SetData(TYPE_VOLKHAN, IN_PROGRESS);
+ if (me->GetPositionX() > 1330)
+ x = 1355;
+ else
+ x = 1308;
- ScheduleEvents(false);
+ y = -178;
+ z = 52.5f;
}
-
- void JustDied(Unit*) override
+ else if (me->GetPositionY() < -145)
{
- Talk(SAY_DEATH);
-
- summons.DespawnAll();
+ if (me->GetPositionX() > 1330)
+ x = 1355;
+ else
+ x = 1308;
- if (m_pInstance)
- m_pInstance->SetData(TYPE_VOLKHAN, DONE);
+ y = -137;
+ z = 52.5f;
}
-
- void GetNextPos()
+ else if (me->GetPositionY() < -130)
{
- if (me->GetPositionY() < -180)
- {
- if (me->GetPositionX() > 1330)
- x = 1355;
- else
- x = 1308;
-
- y = -178;
- z = 52.5f;
- }
- else if (me->GetPositionY() < -145)
- {
- if (me->GetPositionX() > 1330)
- x = 1355;
- else
- x = 1308;
-
- y = -137;
- z = 52.5f;
- }
- else if (me->GetPositionY() < -130)
- {
- if (me->GetPositionX() > 1330)
- x = 1343;
- else
- x = 1320;
-
- y = -123;
- z = 56.7f;
- }
+ if (me->GetPositionX() > 1330)
+ x = 1343;
else
- {
- PointID = POINT_ANVIL;
- x = 1327;
- y = -96;
- z = 56.7f;
- }
- }
-
- void KilledUnit(Unit* victim) override
- {
- if (!victim->IsPlayer())
- return;
+ x = 1320;
- Talk(SAY_SLAY);
+ y = -123;
+ z = 56.7f;
}
-
- void ScheduleEvents(bool anvil)
+ else
{
- events.SetPhase(1);
- events.RescheduleEvent(EVENT_HEAT, 8s, 0, 1);
- events.RescheduleEvent(EVENT_SHATTER, 10s, 0, 1);
- events.RescheduleEvent(EVENT_CHECK_HEALTH, anvil ? 1s : 6s, 0, 1);
- events.RescheduleEvent(EVENT_POSITION, 4s, 0, 1);
+ PointID = POINT_ANVIL;
+ x = 1327;
+ y = -96;
+ z = 56.7f;
}
+ }
- void JustSummoned(Creature* summon) override
- {
- summons.Summon(summon);
- if (summon->GetEntry() == NPC_MOLTEN_GOLEM)
- {
- summon->SetFaction(me->GetFaction());
+ void KilledUnit(Unit* victim) override
+ {
+ if (!victim->IsPlayer())
+ return;
- if (Unit* target = SelectTarget(SelectTargetMethod::Random))
- summon->AI()->AttackStart(target);
- }
- }
+ Talk(SAY_SLAY);
+ }
- void DoAction(int32 param) override
+ void JustSummoned(Creature* summon) override
+ {
+ summons.Summon(summon);
+ if (summon->GetEntry() == NPC_MOLTEN_GOLEM)
{
- if (param == ACTION_DESTROYED)
- {
- ShatteredCount++;
- if (ShatteredCount > 4)
- m_pInstance->SetData(DATA_VOLKHAN_ACHIEVEMENT, false);
- }
+ summon->SetFaction(me->GetFaction());
+
+ if (Unit* target = SelectTarget(SelectTargetMethod::Random))
+ summon->AI()->AttackStart(target);
}
+ }
- void MovementInform(uint32 type, uint32 id) override
+ void DoAction(int32 param) override
+ {
+ if (param == ACTION_DESTROYED)
{
- if (type != POINT_MOTION_TYPE)
- return;
-
- if (id == POINT_ANVIL)
- {
- me->SetSpeed(MOVE_RUN, 1.2f, true);
- me->SetReactState(REACT_AGGRESSIVE);
- me->CastSpell(me, SPELL_TEMPER, false);
- PointID = 0;
- ScheduleEvents(true);
-
- // update orientation at server
- me->SetOrientation(2.19f);
-
- // and client
- WorldPacket data;
- me->BuildHeartBeatMsg(&data);
- me->SendMessageToSet(&data, false);
- me->SetControlled(true, UNIT_STATE_ROOT);
- }
- else
- events.ScheduleEvent(EVENT_MOVE_TO_ANVIL, 0ms, 0, 2);
+ ShatteredCount++;
+ if (ShatteredCount > 4)
+ instance->SetData(DATA_VOLKHAN_ACHIEVEMENT, false);
}
+ }
- void SpellHitTarget(Unit* /*who*/, SpellInfo const* spellInfo) override
+ bool HasActiveGolem()
+ {
+ for (ObjectGuid const& guid : summons)
{
- if (spellInfo->Id == SPELL_TEMPER)
+ if (Creature* golem = ObjectAccessor::GetCreature(*me, guid))
{
- me->CastSpell(me, SPELL_SUMMON_MOLTEN_GOLEM, true);
- me->CastSpell(me, SPELL_SUMMON_MOLTEN_GOLEM, true);
- me->GetMotionMaster()->MoveChase(me->GetVictim());
- me->SetControlled(false, UNIT_STATE_ROOT);
+ if (golem->GetEntry() == NPC_MOLTEN_GOLEM && golem->IsAlive())
+ return true;
}
}
+ return false;
+ }
- void GoToAnvil()
- {
- events.SetPhase(2);
- HealthCheck -= 20;
- me->SetSpeed(MOVE_RUN, 4.0f, true);
- me->SetReactState(REACT_PASSIVE);
-
- Talk(SAY_FORGE);
-
- if (me->GetMotionMaster()->GetCurrentMovementGeneratorType() == CHASE_MOTION_TYPE)
- me->GetMotionMaster()->MovementExpired();
-
- events.ScheduleEvent(EVENT_MOVE_TO_ANVIL, 0ms, 0, 2);
- }
+ void MovementInform(uint32 type, uint32 id) override
+ {
+ if (type != POINT_MOTION_TYPE)
+ return;
- void UpdateAI(uint32 diff) override
+ if (id == POINT_ANVIL)
{
- //Return since we have no target
- if (!UpdateVictim())
- return;
-
- events.Update(diff);
-
- if (me->HasUnitState(UNIT_STATE_CASTING))
- return;
+ me->SetSpeed(MOVE_RUN, 1.2f, true);
+ DoCastSelf(SPELL_TEMPER);
+ PointID = 0;
- switch (events.ExecuteEvent())
- {
- case EVENT_HEAT:
- me->CastSpell(me, me->GetMap()->IsHeroic() ? SPELL_HEAT_H : SPELL_HEAT_N, true);
- events.Repeat(8s);
- break;
- case EVENT_CHECK_HEALTH:
- if (HealthBelowPct(HealthCheck))
- GoToAnvil();
-
- events.Repeat(1s);
- return;
- case EVENT_SHATTER:
- {
- events.Repeat(10s);
- summons.DoAction(ACTION_SHATTER);
- break;
- }
- case EVENT_MOVE_TO_ANVIL:
- GetNextPos();
- me->GetMotionMaster()->MovePoint(PointID, x, y, z);
- return;
- case EVENT_POSITION:
- if (me->GetDistance(1331.9f, -106, 56) > 95)
- EnterEvadeMode();
- else
- events.Repeat(4s);
-
- return;
- }
+ // update orientation at server
+ me->SetOrientation(2.19f);
- DoMeleeAttackIfReady();
+ // and client
+ me->SendMovementFlagUpdate(false);
+ me->SetControlled(true, UNIT_STATE_ROOT);
}
- };
-};
-
-class npc_molten_golem : public CreatureScript
-{
-public:
- npc_molten_golem() : CreatureScript("npc_molten_golem") { }
-
- CreatureAI* GetAI(Creature* creature) const override
- {
- return GetHallsOfLightningAI<npc_molten_golemAI>(creature);
+ else
+ me->GetMotionMaster()->MovePoint(PointID, x, y, z);
}
- struct npc_molten_golemAI : public ScriptedAI
+ void SpellHitTarget(Unit* /*who*/, SpellInfo const* spellInfo) override
{
- npc_molten_golemAI(Creature* creature) : ScriptedAI(creature)
+ if (spellInfo->Id == SPELL_TEMPER)
{
- m_pInstance = creature->GetInstanceScript();
- }
-
- EventMap events;
- InstanceScript* m_pInstance;
+ DoCastSelf(SPELL_SUMMON_MOLTEN_GOLEM, true);
+ DoCastSelf(SPELL_SUMMON_MOLTEN_GOLEM, true);
+ me->SetControlled(false, UNIT_STATE_ROOT);
+ me->SetReactState(REACT_AGGRESSIVE);
+ if (me->GetVictim())
+ me->GetMotionMaster()->MoveChase(me->GetVictim());
- void Reset() override
- {
- events.Reset();
- events.ScheduleEvent(EVENT_BLAST, 7s);
- events.ScheduleEvent(EVENT_IMMOLATION, 3s);
+ events.RescheduleEvent(EVENT_HEAT, randtime(9s, 24s));
}
+ }
- void DamageTaken(Unit*, uint32& uiDamage, DamageEffectType, SpellSchoolMask) override
- {
- if (me->GetEntry() == NPC_BRITTLE_GOLEM)
- {
- uiDamage = 0;
- return;
- }
+ void GoToAnvil()
+ {
+ me->SetSpeed(MOVE_RUN, 4.0f, true);
+ me->SetReactState(REACT_PASSIVE);
- if (uiDamage >= me->GetHealth())
- {
- me->UpdateEntry(NPC_BRITTLE_GOLEM, 0, false);
- me->SetUnitFlag(UNIT_FLAG_NON_ATTACKABLE | UNIT_FLAG_NOT_SELECTABLE | UNIT_FLAG_DISABLE_MOVE);
- me->SetHealth(me->GetMaxHealth());
- me->RemoveAllAuras();
- me->AttackStop();
- uiDamage = 0;
+ Talk(SAY_FORGE);
- if (me->IsNonMeleeSpellCast(false))
- me->InterruptNonMeleeSpells(false);
+ if (me->GetMotionMaster()->GetCurrentMovementGeneratorType() == CHASE_MOTION_TYPE)
+ me->GetMotionMaster()->MovementExpired();
- me->SetControlled(true, UNIT_STATE_STUNNED);
- }
- }
+ GetNextPos();
+ me->GetMotionMaster()->MovePoint(PointID, x, y, z);
+ }
- void DoAction(int32 param) override
- {
- if (me->GetEntry() == NPC_BRITTLE_GOLEM && param == ACTION_SHATTER)
- {
- if (Creature* volkhan = ObjectAccessor::GetCreature(*me, m_pInstance->GetGuidData(TYPE_VOLKHAN)))
- volkhan->AI()->DoAction(ACTION_DESTROYED);
+ void UpdateAI(uint32 diff) override
+ {
+ if (!UpdateVictim())
+ return;
- me->CastSpell(me, me->GetMap()->IsHeroic() ? SPELL_SHATTER_H : SPELL_SHATTER_N, true);
- me->DespawnOrUnsummon(500);
- }
- }
+ events.Update(diff);
+
+ if (me->HasUnitState(UNIT_STATE_CASTING))
+ return;
- void UpdateAI(uint32 diff) override
+ switch (events.ExecuteEvent())
{
- //Return since we have no target or if we are frozen
- if (!UpdateVictim() || me->GetEntry() == NPC_BRITTLE_GOLEM)
+ case EVENT_HEAT:
+ if (HasActiveGolem())
+ {
+ DoCastSelf(SPELL_HEAT);
+ events.Repeat(randtime(9s, 24s));
+ }
+ break;
+ case EVENT_CHECK_HEALTH:
+ if (!shatteredStompCast && HealthBelowPct(25))
+ {
+ shatteredStompCast = true;
+ DoCastAOE(SPELL_SHATTERING_STOMP);
+ Talk(SAY_STOMP);
+ summons.DoAction(ACTION_SHATTER);
+ }
+ events.Repeat(1s);
return;
-
- events.Update(diff);
-
- if (me->HasUnitState(UNIT_STATE_CASTING))
+ case EVENT_MOVE_TO_ANVIL:
+ GoToAnvil();
+ events.Repeat(randtime(30s, 36s));
+ return;
+ case EVENT_POSITION:
+ if (me->GetDistance(1331.9f, -106, 56) > 95)
+ EnterEvadeMode();
+ else
+ events.Repeat(4s);
return;
-
- switch (events.ExecuteEvent())
- {
- case EVENT_BLAST:
- me->CastSpell(me, SPELL_BLAST_WAVE, false);
- events.Repeat(14s);
- break;
- case EVENT_IMMOLATION:
- me->CastSpell(me->GetVictim(), me->GetMap()->IsHeroic() ? SPELL_IMMOLATION_STRIKE_H : SPELL_IMMOLATION_STRIKE_N, false);
- events.Repeat(5s);
- break;
- }
-
- DoMeleeAttackIfReady();
}
- };
-};
-
-enum monumentSpells
-{
- SPELL_FREEZE_ANIM = 16245,
- SPELL_AWAKEN = 52875,
-
- SPELL_PIERCING_HOWL = 23600,
- SPELL_PENETRATING_STRIKE = 52890,
- SPELL_FRIGHTENING_SHOUT = 19134,
- SPELL_BLADE_TURNING_N = 52891,
- SPELL_BLADE_TURNING_H = 59173,
-
- SPELL_DEADLY_THROW_N = 52885,
- SPELL_DEADLY_THROW_H = 59180,
- SPELL_DEFLECTION_N = 52879,
- SPELL_DEFLECTION_H = 59181,
- SPELL_THROW_N = 52904,
- SPELL_THROW_H = 59179,
-};
-
-enum monumentEvents
-{
- EVENT_PIERCING_HOWL = 1,
- EVENT_PENETRATING_STRIKE = 2,
- EVENT_FRIGHTENING_SHOUT = 3,
- EVENT_BLADE_TURNING = 4,
- EVENT_DEADLY_THROW = 11,
- EVENT_DEFLECTION = 12,
- EVENT_THROW = 13,
+ DoMeleeAttackIfReady();
+ }
- EVENT_UNFREEZE = 20,
+ private:
+ float x, y, z;
+ uint8 PointID;
+ uint8 ShatteredCount;
+ bool shatteredStompCast;
};
-class npc_hol_monument : public CreatureScript
+struct npc_molten_golem : public ScriptedAI
{
-public:
- npc_hol_monument() : CreatureScript("npc_hol_monument") {}
+ npc_molten_golem(Creature* creature) : ScriptedAI(creature)
+ {
+ m_pInstance = creature->GetInstanceScript();
+ }
- CreatureAI* GetAI(Creature* creature) const override
+ void Reset() override
{
- return GetHallsOfLightningAI<npc_hol_monumentAI>(creature);
+ events.Reset();
+ events.ScheduleEvent(EVENT_IMMOLATION_STRIKE, 3s);
+ events.ScheduleEvent(EVENT_CHANGE_TARGET, 5s);
+ DoCastSelf(SPELL_COOL_DOWN, true);
}
- struct npc_hol_monumentAI : public ScriptedAI
+ void DamageTaken(Unit*, uint32& uiDamage, DamageEffectType, SpellSchoolMask) override
{
- npc_hol_monumentAI(Creature* creature) : ScriptedAI(creature)
+ if (me->GetEntry() == NPC_BRITTLE_GOLEM)
{
- _attackGUID.Clear();
- _isActive = urand(0, 1);
- me->SetUnitFlag(UNIT_FLAG_NON_ATTACKABLE);
- me->CastSpell(me, SPELL_FREEZE_ANIM, true);
+ uiDamage = 0;
+ return;
}
- EventMap events;
- bool _isActive;
- ObjectGuid _attackGUID;
-
- void Reset() override
+ if (uiDamage >= me->GetHealth())
{
- }
+ if (me->GetMap()->IsHeroic())
+ DoCastSelf(SPELL_BLAST_WAVE, true);
- void MoveInLineOfSight(Unit* who) override
- {
- if (_attackGUID)
- ScriptedAI::MoveInLineOfSight(who);
- else if (_isActive && who->IsPlayer())
- {
- if ((who->GetPositionX() < me->GetPositionX() || who->GetPositionY() < -220.0f) && me->GetDistance2d(who) < 40)
- {
- _isActive = false;
- _attackGUID = who->GetGUID();
- events.Reset();
- events.RescheduleEvent(EVENT_UNFREEZE, 5s);
- }
- }
- }
+ me->UpdateEntry(NPC_BRITTLE_GOLEM, 0, false);
+ me->SetUnitFlag(UNIT_FLAG_NON_ATTACKABLE | UNIT_FLAG_NOT_SELECTABLE | UNIT_FLAG_DISABLE_MOVE);
+ me->SetHealth(me->GetMaxHealth());
+ me->RemoveAllAuras();
+ me->AttackStop();
+ uiDamage = 0;
- void JustEngagedWith(Unit*) override
- {
- events.Reset();
- if (me->GetEntry() == 28961) // NPC_TITANIUM_SIEGEBREAKER
- {
- events.ScheduleEvent(EVENT_PIERCING_HOWL, 10s, 25s);
- events.ScheduleEvent(EVENT_PENETRATING_STRIKE, 5s, 10s);
- events.ScheduleEvent(EVENT_FRIGHTENING_SHOUT, 20s, 28s);
- events.ScheduleEvent(EVENT_BLADE_TURNING, 12s);
- }
- else
- {
- events.ScheduleEvent(EVENT_THROW, 10s, 25s);
- events.ScheduleEvent(EVENT_DEADLY_THROW, 15s, 30s);
- events.ScheduleEvent(EVENT_DEFLECTION, 15s);
- }
- }
+ if (me->IsNonMeleeSpellCast(false))
+ me->InterruptNonMeleeSpells(false);
- void AttackStart(Unit* who) override
- {
- if (!_attackGUID || !_isActive)
- return;
- ScriptedAI::AttackStart(who);
+ me->SetControlled(true, UNIT_STATE_STUNNED);
}
+ }
- void UpdateAI(uint32 diff) override
+ void DoAction(int32 param) override
+ {
+ if (me->GetEntry() == NPC_BRITTLE_GOLEM && param == ACTION_SHATTER)
{
- if (!_isActive && !_attackGUID)
- return;
-
- events.Update(diff);
- uint32 eventId = events.ExecuteEvent();
+ if (Creature* volkhan = m_pInstance->GetCreature(DATA_VOLKHAN))
+ volkhan->AI()->DoAction(ACTION_DESTROYED);
- if (eventId == EVENT_UNFREEZE)
- {
- me->RemoveUnitFlag(UNIT_FLAG_NON_ATTACKABLE);
- me->CastSpell(me, SPELL_AWAKEN, true);
- me->RemoveAllAuras();
- _isActive = true;
- if (Unit* target = ObjectAccessor::GetUnit(*me, _attackGUID))
- AttackStart(target);
- return;
- }
+ me->CastSpell(me, SPELL_SHATTER, true);
+ me->DespawnOrUnsummon(500ms);
+ }
+ }
- //Return since we have no target or if we are disabled from fight
- if (!UpdateVictim())
- return;
+ void UpdateAI(uint32 diff) override
+ {
+ //Return since we have no target or if we are frozen
+ if (!UpdateVictim() || me->GetEntry() == NPC_BRITTLE_GOLEM)
+ return;
- if (me->HasUnitState(UNIT_STATE_CASTING))
- return;
+ events.Update(diff);
- switch (eventId)
- {
- case EVENT_PIERCING_HOWL:
- me->CastSpell(me->GetVictim(), SPELL_PIERCING_HOWL, false);
- events.Repeat(10s, 25s);
- break;
- case EVENT_PENETRATING_STRIKE:
- me->CastSpell(me->GetVictim(), SPELL_PENETRATING_STRIKE, false);
- events.Repeat(5s, 10s);
- break;
- case EVENT_FRIGHTENING_SHOUT:
- me->CastSpell(me->GetVictim(), SPELL_FRIGHTENING_SHOUT, false);
- events.Repeat(20s, 28s);
- break;
- case EVENT_BLADE_TURNING:
- me->CastSpell(me->GetVictim(), me->GetMap()->IsHeroic() ? SPELL_BLADE_TURNING_H : SPELL_BLADE_TURNING_N, false);
- events.Repeat(12s);
- break;
- case EVENT_THROW:
- me->CastSpell(SelectTarget(SelectTargetMethod::Random, 0, 50.0f, true, 0), me->GetMap()->IsHeroic() ? SPELL_THROW_H : SPELL_THROW_N, true);
- events.Repeat(10s, 25s);
- break;
- case EVENT_DEADLY_THROW:
- me->CastSpell(SelectTarget(SelectTargetMethod::Random, 0, 50.0f, true, 0), me->GetMap()->IsHeroic() ? SPELL_DEADLY_THROW_H : SPELL_DEADLY_THROW_N, true);
- events.Repeat(15s, 30s);
- break;
- case EVENT_DEFLECTION:
- me->CastSpell(me, me->GetMap()->IsHeroic() ? SPELL_DEFLECTION_H : SPELL_DEFLECTION_N, false);
- events.Repeat(15s);
- break;
- }
+ if (me->HasUnitState(UNIT_STATE_CASTING))
+ return;
- DoMeleeAttackIfReady();
+ switch (events.ExecuteEvent())
+ {
+ case EVENT_IMMOLATION_STRIKE:
+ if (SelectTarget(SelectTargetMethod::MaxThreat, 0, 0.0f, true, true, -SPELL_IMMOLATION_STRIKE))
+ DoCastVictim(SPELL_IMMOLATION_STRIKE);
+ events.Repeat(5s);
+ break;
+ case EVENT_CHANGE_TARGET:
+ if (Unit* target = SelectTarget(SelectTargetMethod::Random, 0, 0.0f, true))
+ {
+ me->GetThreatMgr().ResetAllThreat();
+ me->AddThreat(target, 30000.0f);
+ AttackStart(target);
+ }
+ break;
}
- };
+
+ DoMeleeAttackIfReady();
+ }
+private:
+ EventMap events;
+ InstanceScript* m_pInstance;
};
void AddSC_boss_volkhan()
{
- new boss_volkhan();
- new npc_molten_golem();
- new npc_hol_monument();
+ RegisterHallOfLightningCreatureAI(boss_volkhan);
+ RegisterHallOfLightningCreatureAI(npc_molten_golem);
}
diff --git a/src/server/scripts/Northrend/Ulduar/HallsOfLightning/halls_of_lightning.h b/src/server/scripts/Northrend/Ulduar/HallsOfLightning/halls_of_lightning.h
index dac5813097..8162291664 100644
--- a/src/server/scripts/Northrend/Ulduar/HallsOfLightning/halls_of_lightning.h
+++ b/src/server/scripts/Northrend/Ulduar/HallsOfLightning/halls_of_lightning.h
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
@@ -24,34 +24,41 @@
#define HallsOfLightningScriptName "instance_halls_of_lightning"
-enum HoLEvents
+enum HoLBossIds
{
- TYPE_BJARNGRIM = 0,
- TYPE_IONAR = 1,
- TYPE_LOKEN = 2,
- TYPE_VOLKHAN = 3,
- TYPE_LOKEN_INTRO = 4,
- MAX_ENCOUNTER = 5,
+ DATA_BJARNGRIM = 0,
+ DATA_IONAR = 1,
+ DATA_LOKEN = 2,
+ DATA_VOLKHAN = 3,
+ MAX_ENCOUNTERS
+};
+
+enum HoLDataTypes
+{
+ // GameObject data
+ DATA_LOKEN_THRONE = 0,
+ // Achievement data
DATA_BJARNGRIM_ACHIEVEMENT = 10,
DATA_VOLKHAN_ACHIEVEMENT = 11,
};
enum HoLNPCs
{
- NPC_BJARNGRIM = 28586,
- NPC_VOLKHAN = 28587,
- NPC_IONAR = 28546,
- NPC_LOKEN = 28923,
+ NPC_TITANIUM_THUNDERER = 28965,
+ NPC_TITANIUM_SIEGEBREAKER = 28961
};
enum HoLGOs
{
- GO_BJARNGRIM_DOOR = 191416, //_doors10
- GO_VOLKHAN_DOOR = 191325, //_doors07
- GO_IONAR_DOOR = 191326, //_doors05
- GO_LOKEN_DOOR = 191324, //_doors02
- GO_LOKEN_THRONE = 192654,
+ GO_VOLKHAN_DOOR = 191325,
+ GO_IONAR_DOOR = 191326,
+ GO_LOKEN_THRONE = 192654
+};
+
+enum HoLActions
+{
+ ACTION_ACTIVATE_TITANIUM_VRYKUL,
};
template <class AI, class T>
@@ -60,4 +67,6 @@ inline AI* GetHallsOfLightningAI(T* obj)
return GetInstanceAI<AI>(obj, HallsOfLightningScriptName);
}
+#define RegisterHallOfLightningCreatureAI(ai_name) RegisterCreatureAIWithFactory(ai_name, GetHallsOfLightningAI)
+
#endif
diff --git a/src/server/scripts/Northrend/Ulduar/HallsOfLightning/instance_halls_of_lightning.cpp b/src/server/scripts/Northrend/Ulduar/HallsOfLightning/instance_halls_of_lightning.cpp
index 75954ab046..6f733bd1c9 100644
--- a/src/server/scripts/Northrend/Ulduar/HallsOfLightning/instance_halls_of_lightning.cpp
+++ b/src/server/scripts/Northrend/Ulduar/HallsOfLightning/instance_halls_of_lightning.cpp
@@ -1,220 +1,135 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
* with this program. If not, see <http://www.gnu.org/licenses/>.
*/
+#include "AreaTriggerScript.h"
#include "CreatureScript.h"
#include "InstanceMapScript.h"
+#include "Player.h"
#include "ScriptedCreature.h"
#include "halls_of_lightning.h"
+DoorData const doorData[] =
+{
+ { GO_VOLKHAN_DOOR, DATA_VOLKHAN, DOOR_TYPE_PASSAGE },
+ { GO_IONAR_DOOR, DATA_IONAR, DOOR_TYPE_PASSAGE },
+ { 0, 0, DOOR_TYPE_ROOM }
+};
+
+ObjectData const gameObjectData[] =
+{
+ { GO_LOKEN_THRONE, DATA_LOKEN_THRONE },
+ { 0, 0 }
+};
+
class instance_halls_of_lightning : public InstanceMapScript
{
public:
instance_halls_of_lightning() : InstanceMapScript("instance_halls_of_lightning", MAP_HALLS_OF_LIGHTNING) { }
- InstanceScript* GetInstanceScript(InstanceMap* pMap) const override
- {
- return new instance_halls_of_lightning_InstanceMapScript(pMap);
- }
-
struct instance_halls_of_lightning_InstanceMapScript : public InstanceScript
{
- instance_halls_of_lightning_InstanceMapScript(Map* pMap) : InstanceScript(pMap) { Initialize(); };
-
- uint32 m_auiEncounter[MAX_ENCOUNTER];
-
- ObjectGuid m_uiGeneralBjarngrimGUID;
- ObjectGuid m_uiIonarGUID;
- ObjectGuid m_uiLokenGUID;
- ObjectGuid m_uiVolkhanGUID;
-
- ObjectGuid m_uiBjarngrimDoorGUID;
- ObjectGuid m_uiVolkhanDoorGUID;
- ObjectGuid m_uiIonarDoorGUID;
- ObjectGuid m_uiLokenDoorGUID;
- ObjectGuid m_uiLokenGlobeGUID;
-
- bool volkhanAchievement;
- bool bjarngrimAchievement;
-
- void Initialize() override
+ instance_halls_of_lightning_InstanceMapScript(Map* pMap) : InstanceScript(pMap)
{
SetHeaders(DataHeader);
- memset(&m_auiEncounter, 0, sizeof(m_auiEncounter));
-
- volkhanAchievement = false;
- bjarngrimAchievement = false;
- }
-
- bool IsEncounterInProgress() const override
- {
- for (uint8 i = 0; i < MAX_ENCOUNTER; ++i)
- {
- if (m_auiEncounter[i] == IN_PROGRESS && i != TYPE_LOKEN_INTRO)
- {
- return true;
- }
- }
- return false;
- }
-
- void OnCreatureCreate(Creature* pCreature) override
- {
- switch (pCreature->GetEntry())
- {
- case NPC_BJARNGRIM:
- m_uiGeneralBjarngrimGUID = pCreature->GetGUID();
- break;
- case NPC_VOLKHAN:
- m_uiVolkhanGUID = pCreature->GetGUID();
- break;
- case NPC_IONAR:
- m_uiIonarGUID = pCreature->GetGUID();
- break;
- case NPC_LOKEN:
- m_uiLokenGUID = pCreature->GetGUID();
- break;
- }
- }
-
- void OnGameObjectCreate(GameObject* pGo) override
- {
- switch (pGo->GetEntry())
- {
- case GO_BJARNGRIM_DOOR:
- m_uiBjarngrimDoorGUID = pGo->GetGUID();
- if (m_auiEncounter[TYPE_BJARNGRIM] == DONE)
- pGo->SetGoState(GO_STATE_ACTIVE);
-
- break;
- case GO_VOLKHAN_DOOR:
- m_uiVolkhanDoorGUID = pGo->GetGUID();
- if (m_auiEncounter[TYPE_VOLKHAN] == DONE)
- pGo->SetGoState(GO_STATE_ACTIVE);
-
- break;
- case GO_IONAR_DOOR:
- m_uiIonarDoorGUID = pGo->GetGUID();
- if (m_auiEncounter[TYPE_IONAR] == DONE)
- pGo->SetGoState(GO_STATE_ACTIVE);
-
- break;
- case GO_LOKEN_DOOR:
- m_uiLokenDoorGUID = pGo->GetGUID();
- if (m_auiEncounter[TYPE_LOKEN] == DONE)
- pGo->SetGoState(GO_STATE_ACTIVE);
-
- break;
- case GO_LOKEN_THRONE:
- m_uiLokenGlobeGUID = pGo->GetGUID();
- break;
- }
- }
+ SetBossNumber(MAX_ENCOUNTERS);
+ LoadDoorData(doorData);
+ LoadObjectData(nullptr, gameObjectData);
+ _volkhanAchievement = false;
+ _bjarngrimAchievement = false;
+ };
bool CheckAchievementCriteriaMeet(uint32 criteria_id, Player const* /*source*/, Unit const* /*target*/, uint32 /*miscvalue1*/) override
{
switch (criteria_id)
{
case 7321: //Shatter Resistant (2042)
- return volkhanAchievement;
+ return _volkhanAchievement;
case 6835: // Lightning Struck (1834)
- return bjarngrimAchievement;
+ return _bjarngrimAchievement;
}
return false;
}
void SetData(uint32 uiType, uint32 uiData) override
{
- m_auiEncounter[uiType] = uiData;
- if (uiType == TYPE_LOKEN_INTRO)
- SaveToDB();
-
// Achievements
if (uiType == DATA_BJARNGRIM_ACHIEVEMENT)
- bjarngrimAchievement = (bool)uiData;
+ _bjarngrimAchievement = (bool)uiData;
else if (uiType == DATA_VOLKHAN_ACHIEVEMENT)
- volkhanAchievement = (bool)uiData;
+ _volkhanAchievement = (bool)uiData;
+ }
- if (uiData != DONE)
- return;
+ private:
+ bool _volkhanAchievement;
+ bool _bjarngrimAchievement;
+ };
- switch (uiType)
- {
- case TYPE_BJARNGRIM:
- HandleGameObject(m_uiBjarngrimDoorGUID, true);
- break;
- case TYPE_VOLKHAN:
- HandleGameObject(m_uiVolkhanDoorGUID, true);
- break;
- case TYPE_IONAR:
- HandleGameObject(m_uiIonarDoorGUID, true);
- break;
- case TYPE_LOKEN:
- HandleGameObject(m_uiLokenDoorGUID, true);
- //Appears to be type 5 GO with animation. Need to figure out how this work, code below only placeholder
- if (GameObject* pGlobe = instance->GetGameObject(m_uiLokenGlobeGUID))
- pGlobe->SetGoState(GO_STATE_ACTIVE);
-
- break;
- }
+ InstanceScript* GetInstanceScript(InstanceMap* pMap) const override
+ {
+ return new instance_halls_of_lightning_InstanceMapScript(pMap);
+ }
+};
- SaveToDB();
- }
+enum TitaniumHallwaySpells
+{
+ SPELL_FREEZE_ANIM = 16245,
+ SPELL_AWAKEN = 52875,
+};
- void ReadSaveDataMore(std::istringstream& data) override
- {
- data >> m_auiEncounter[0];
- data >> m_auiEncounter[1];
- data >> m_auiEncounter[2];
- data >> m_auiEncounter[3];
- }
+class at_hol_hall_of_watchers : public OnlyOnceAreaTriggerScript
+{
+public:
+ at_hol_hall_of_watchers() : OnlyOnceAreaTriggerScript("at_hol_hall_of_watchers") {}
- void WriteSaveDataMore(std::ostringstream& data) override
+ bool _OnTrigger(Player* player, const AreaTrigger* /*at*/) override
+ {
+ std::list<Creature*> creatures;
+ player->GetCreatureListWithEntryInGrid(creatures, { NPC_TITANIUM_SIEGEBREAKER, NPC_TITANIUM_THUNDERER }, 50.0f);
+ creatures.remove_if([&](Creature const* creature) -> bool
{
- data << m_auiEncounter[0] << ' '
- << m_auiEncounter[1] << ' '
- << m_auiEncounter[2] << ' '
- << m_auiEncounter[3] << ' ';
- }
+ return !player->IsWithinLOSInMap(creature) || !creature->HasAura(SPELL_FREEZE_ANIM);
+ });
- uint32 GetData(uint32 uiType) const override
- {
- return m_auiEncounter[uiType];
- }
+ if (creatures.empty())
+ return false;
- ObjectGuid GetGuidData(uint32 uiData) const override
- {
- switch (uiData)
- {
- case TYPE_BJARNGRIM:
- return m_uiGeneralBjarngrimGUID;
- case TYPE_VOLKHAN:
- return m_uiVolkhanGUID;
- case TYPE_IONAR:
- return m_uiIonarGUID;
- case TYPE_LOKEN:
- return m_uiLokenGUID;
- }
+ Acore::Containers::RandomResize(creatures, urand(2, 4));
+
+ ObjectGuid target = player->GetGUID();
- return ObjectGuid::Empty;
+ for (Creature* creature : creatures)
+ {
+ creature->SetHomePosition(player->GetPosition());
+ creature->AI()->DoCastSelf(SPELL_AWAKEN);
+ creature->RemoveUnitFlag(UNIT_FLAG_NOT_SELECTABLE);
+
+ creature->m_Events.AddEventAtOffset([creature, target] {
+ creature->AI()->DoAction(ACTION_ACTIVATE_TITANIUM_VRYKUL);
+ if (Player* targetPlayer = ObjectAccessor::GetPlayer(*creature, target))
+ creature->AI()->AttackStart(targetPlayer);
+ }, 5s);
}
- };
+
+ return false;
+ }
};
void AddSC_instance_halls_of_lightning()
{
new instance_halls_of_lightning();
+ new at_hol_hall_of_watchers();
}
diff --git a/src/server/scripts/Northrend/Ulduar/HallsOfStone/boss_krystallus.cpp b/src/server/scripts/Northrend/Ulduar/HallsOfStone/boss_krystallus.cpp
index bc40837a70..53e26c25c2 100644
--- a/src/server/scripts/Northrend/Ulduar/HallsOfStone/boss_krystallus.cpp
+++ b/src/server/scripts/Northrend/Ulduar/HallsOfStone/boss_krystallus.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
@@ -24,16 +24,13 @@
enum spells
{
- GROUND_SPIKE_H = 59750,
- BOULDER_TOSS = 50843,
- BOULDER_TOSS_H = 59742,
- SHATTER = 50810,
- SHATTER_H = 61546,
- STOMP = 50868,
- STOMP_H = 59744,
- GROUND_SLAM = 50827,
- GROUND_SLAM_STONED_EFFECT = 50812,
- SPELL_SHATTER_EFFECT = 50811,
+ SPELL_GROUND_SPIKE = 59750,
+ SPELL_BOULDER_TOSS = 50843,
+ SPELL_SHATTER = 50810,
+ SPELL_STOMP = 50868,
+ SPELL_GROUND_SLAM = 50827,
+ SPELL_GROUND_SLAM_STONED_EFFECT = 50812,
+ SPELL_SHATTER_EFFECT = 50811,
};
enum events
@@ -105,7 +102,7 @@ public:
Map::PlayerList const& players = map->GetPlayers();
for(Map::PlayerList::const_iterator itr = players.begin(); itr != players.end(); ++itr)
if (itr->GetSource()->IsAlive())
- itr->GetSource()->RemoveAura(GROUND_SLAM_STONED_EFFECT);
+ itr->GetSource()->RemoveAura(SPELL_GROUND_SLAM_STONED_EFFECT);
}
}
@@ -123,37 +120,38 @@ public:
{
case EVENT_BOULDER:
{
- if (Unit* target = SelectTarget(SelectTargetMethod::Random, 0, 50.0f, true, 0))
- me->CastSpell(target, DUNGEON_MODE(BOULDER_TOSS, BOULDER_TOSS_H), false);
-
+ DoCastRandomTarget(SPELL_BOULDER_TOSS, 0, 50.0f);
events.Repeat(5s, 7s);
break;
}
case EVENT_GROUND_SPIKE:
{
- me->CastSpell(me->GetVictim(), GROUND_SPIKE_H, false); // current enemy target
+ DoCastRandomTarget(SPELL_GROUND_SPIKE, 0, 50.0f);
events.Repeat(8s, 11s);
break;
}
case EVENT_STOMP:
{
- me->CastSpell(me, DUNGEON_MODE(STOMP, STOMP_H), false);
+ me->CastSpell(me, SPELL_STOMP, false);
events.Repeat(13s, 18s);
break;
}
case EVENT_GROUND_SLAM:
{
events.Repeat(10s, 13s);
- me->CastSpell(me->GetVictim(), GROUND_SLAM, true);
+ me->CastSpell(me->GetVictim(), SPELL_GROUND_SLAM, true);
+ me->SetReactState(REACT_PASSIVE);
+ me->AttackStop();
events.DelayEvents(10s);
events.RescheduleEvent(EVENT_SHATTER, 8s);
break;
}
case EVENT_SHATTER:
{
- me->CastSpell((Unit*)nullptr, DUNGEON_MODE(SHATTER, SHATTER_H), false);
+ me->CastSpell((Unit*)nullptr, SPELL_SHATTER, false);
Talk(SAY_SHATTER);
events.RescheduleEvent(EVENT_REMOVE_STONED, 1500ms);
+ me->SetReactState(REACT_AGGRESSIVE);
break;
}
case EVENT_REMOVE_STONED:
@@ -193,7 +191,7 @@ class spell_krystallus_shatter : public SpellScript
{
if (Unit* target = GetHitUnit())
{
- target->RemoveAurasDueToSpell(GROUND_SLAM_STONED_EFFECT);
+ target->RemoveAurasDueToSpell(SPELL_GROUND_SLAM_STONED_EFFECT);
target->CastSpell((Unit*)nullptr, SPELL_SHATTER_EFFECT, true);
}
}
diff --git a/src/server/scripts/Northrend/Ulduar/HallsOfStone/boss_maiden_of_grief.cpp b/src/server/scripts/Northrend/Ulduar/HallsOfStone/boss_maiden_of_grief.cpp
index 814daf759a..a9d6a60e0a 100644
--- a/src/server/scripts/Northrend/Ulduar/HallsOfStone/boss_maiden_of_grief.cpp
+++ b/src/server/scripts/Northrend/Ulduar/HallsOfStone/boss_maiden_of_grief.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
@@ -21,13 +21,10 @@
enum spells
{
- PARTING_SORROW = 59723,
- PILLAR_OF_WOE = 50761,
- PILLAR_OF_WOE_H = 59727,
- SHOCK_OF_SORROW = 50760,
- SHOCK_OF_SORROW_H = 59726,
- STORM_OF_GRIEF = 50752,
- STORM_OF_GRIEF_H = 59772,
+ SPELL_PARTING_SORROW = 59723,
+ SPELL_PILLAR_OF_WOE = 50761,
+ SPELL_SHOCK_OF_SORROW = 50760,
+ SPELL_STORM_OF_GRIEF = 50752,
ACHIEVEMENT_GOOD_GRIEF = 20383,
};
@@ -80,10 +77,11 @@ public:
void JustEngagedWith(Unit* /*who*/) override
{
- events.ScheduleEvent(EVENT_STORM, 5s);
- events.ScheduleEvent(EVENT_SHOCK, 26s, 32s);
- events.ScheduleEvent(EVENT_PILLAR, 12s, 20s);
- events.ScheduleEvent(EVENT_PARTING, 8s);
+ events.ScheduleEvent(EVENT_STORM, 6s, 10s);
+ events.ScheduleEvent(EVENT_SHOCK, 14s, 29s);
+ events.ScheduleEvent(EVENT_PILLAR, 7s, 15s);
+ if (IsHeroic())
+ events.ScheduleEvent(EVENT_PARTING, 27s, 45s);
Talk(SAY_AGGRO);
if (pInstance)
@@ -107,32 +105,45 @@ public:
{
case EVENT_STORM:
{
- me->CastSpell(me->GetVictim(), DUNGEON_MODE(STORM_OF_GRIEF, STORM_OF_GRIEF_H), true);
- events.Repeat(10s);
+ me->CastSpell(me->GetVictim(), SPELL_STORM_OF_GRIEF, true);
+ events.Repeat(16s, 20s);
break;
}
case EVENT_SHOCK:
{
- me->CastSpell(me->GetVictim(), DUNGEON_MODE(SHOCK_OF_SORROW, SHOCK_OF_SORROW_H), false);
+ me->CastSpell(me->GetVictim(), SPELL_SHOCK_OF_SORROW, false);
Talk(SAY_STUN);
- events.Repeat(16s, 22s);
+ events.Repeat(19s, 33s);
break;
}
case EVENT_PILLAR:
{
if (Unit* target = SelectTarget(SelectTargetMethod::Random, 0, 50.0f, true, 0))
- me->CastSpell(target, DUNGEON_MODE(PILLAR_OF_WOE, PILLAR_OF_WOE_H), false);
+ me->CastSpell(target, SPELL_PILLAR_OF_WOE, false);
- events.Repeat(12s, 20s);
+ events.Repeat(8s, 31s);
break;
}
case EVENT_PARTING:
{
- if (Unit* target = SelectTarget(SelectTargetMethod::Random, 0, 50.0f, true, 0))
- me->CastSpell(target, PARTING_SORROW, false);
-
- events.Repeat(6s, 16s);
+ Unit* target = nullptr;
+ std::list<Unit*> targetList;
+
+ SelectTargetList(targetList, 10, SelectTargetMethod::Random, 0, 50.0f, true);
+ for (Unit* possibleTarget : targetList)
+ {
+ if (possibleTarget && possibleTarget->IsPlayer() && possibleTarget->getPowerType() == POWER_MANA)
+ {
+ target = possibleTarget;
+ break;
+ }
+ }
+
+ if (target)
+ me->CastSpell(target, SPELL_PARTING_SORROW, false);
+
+ events.Repeat(27s, 45s);
break;
}
}
diff --git a/src/server/scripts/Northrend/Ulduar/HallsOfStone/boss_sjonnir.cpp b/src/server/scripts/Northrend/Ulduar/HallsOfStone/boss_sjonnir.cpp
index d51461f6a6..d4b72fcb36 100644
--- a/src/server/scripts/Northrend/Ulduar/HallsOfStone/boss_sjonnir.cpp
+++ b/src/server/scripts/Northrend/Ulduar/HallsOfStone/boss_sjonnir.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
@@ -25,30 +25,23 @@ enum Spells
// SJONNIR
SPELL_FRENZY = 28747, //at 20% hp
SPELL_CHAIN_LIGHTNING = 50830,
- SPELL_CHAIN_LIGHTNING_H = 59844,
SPELL_LIGHTNING_SHIELD = 50831,
- SPELL_LIGHTNING_SHIELD_H = 59845,
SPELL_STATIC_CHARGE = 50834,
- SPELL_STATIC_CHARGE_H = 59846,
SPELL_LIGHTNING_RING = 50840,
- SPELL_LIGHTNING_RING_H = 59848,
+ SPELL_LIGHTNING_RING_5S = 51849,
// IRON SLUDGE
SPELL_TOXIC_VOLLEY = 50838,
- SPELL_TOXIC_VOLLEY_H = 59853,
// FORGED IRON DWARF
SPELL_LIGHTNING_TETHER = 50895,
- SPELL_LIGHTNING_TETHER_H = 59851,
// FORGED IRON TROGG
SPELL_LIGHTNING_SHOCK = 50900,
- SPELL_LIGHTNING_SHOCK_H = 59852,
};
enum Npc
{
- NPC_IRON_SLUDGE = 28165, // if 2 ooze then spawn 1 iron_sludge
NPC_DWARFES_FRIENDLY = 27980, //after fix the machine by Brann
NPC_OOZE = 27981, //spawn after killing dwarf
NPC_FORGED_IRON_DWARF = 27982,
@@ -64,15 +57,6 @@ enum Yells
enum Events
{
- // SJONNIR
- EVENT_SHIELD = 1,
- EVENT_CHAIN_LIGHTNING = 2,
- EVENT_STATIC_CHARGE = 3,
- EVENT_LIGHTNING_RING = 4,
- EVENT_CHECK_HEALTH = 5,
- EVENT_SUMMON = 6,
- EVENT_SUMMON_SPEACH = 7,
-
// TRASH
EVENT_MALFORMED_OOZE_CHECK = 10,
EVENT_TOXIC_VOLLEY = 11,
@@ -80,8 +64,11 @@ enum Events
EVENT_FORGED_LIGHTNING_TETHER = 13,
};
-enum Misc
+enum SjonnirMisc
{
+ GROUP_SUMMONS = 1,
+ GROUP_LIGHTNING_RING = 2,
+
POS_GEN_RIGHT = 0,
POS_GEN_LEFT = 1,
POS_ROOM_CENTER = 2,
@@ -90,13 +77,6 @@ enum Misc
ACTION_SLUG_KILLED = 1,
};
-enum SummonPhases
-{
- PHASE_SUMMON_UNFRIENDLY_DWARFES = 0,
- PHASE_SUMMON_OOZE = 1,
- PHASE_SUMMON_FRIENDLY_DWARFES = 2,
-};
-
static Position RoomPosition[] =
{
{1293.0f, 610.0f, 199.3f, 0.0f},
@@ -114,75 +94,135 @@ public:
return GetHallsOfStoneAI<boss_sjonnirAI>(pCreature);
}
- struct boss_sjonnirAI : public ScriptedAI
+ struct boss_sjonnirAI : public BossAI
{
- boss_sjonnirAI(Creature* c) : ScriptedAI(c), summons(me)
- {
- pInstance = c->GetInstanceScript();
- }
+ boss_sjonnirAI(Creature* c) : BossAI(c, BOSS_SJONNIR) { }
- InstanceScript* pInstance;
- EventMap events;
- SummonList summons;
-
- uint8 SummonPhase;
uint8 SlugeCount;
void Reset() override
{
- events.Reset();
- summons.DespawnAll();
-
+ _Reset();
+ scheduler.ClearValidator();
SlugeCount = 0;
- SummonPhase = PHASE_SUMMON_UNFRIENDLY_DWARFES;
+ instance->SetData(DATA_SJONNIR_ACHIEVEMENT, false);
- if (pInstance)
+ if (instance->GetData(BOSS_TRIBUNAL_OF_AGES) == DONE)
{
- pInstance->SetData(BOSS_SJONNIR, NOT_STARTED);
- pInstance->SetData(DATA_SJONNIR_ACHIEVEMENT, false);
+ if (GameObject* console = me->GetMap()->GetGameObject(instance->GetGuidData(GO_SJONNIR_CONSOLE)))
+ console->SetGoState(GO_STATE_READY);
- me->SetUnitFlag(UNIT_FLAG_NOT_SELECTABLE);
- if (pInstance->GetData(BOSS_TRIBUNAL_OF_AGES) == DONE)
+ if (Creature* brann = ObjectAccessor::GetCreature(*me, instance->GetGuidData(NPC_BRANN)))
{
- me->RemoveUnitFlag(UNIT_FLAG_NOT_SELECTABLE);
+ brann->setDeathState(DeathState::JustDied);
+ brann->Respawn();
+ brann->AI()->DoAction(ACTION_SJONNIR_WIPE_START);
+ }
+ }
+
+ ScheduleHealthCheckEvent(75, [&] {
+ scheduler.CancelGroup(GROUP_SUMMONS);
+ scheduler.Schedule(1s, GROUP_SUMMONS, [&](TaskContext context) {
+ uint8 Pos = urand(POS_GEN_RIGHT, POS_GEN_LEFT);
+ me->SummonCreature(NPC_FORGED_IRON_TROGG, RoomPosition[Pos].GetPositionX(), RoomPosition[Pos].GetPositionY(), RoomPosition[Pos].GetPositionZ(), 0, TEMPSUMMON_CORPSE_TIMED_DESPAWN, 20000);
+ ActivatePipe(Pos);
+ context.Repeat(5s, 7s);
+ });
+ });
+
+ ScheduleHealthCheckEvent(50, [&] {
+ if (Creature* brann = ObjectAccessor::GetCreature(*me, instance->GetGuidData(NPC_BRANN)))
+ brann->AI()->Talk(SAY_BRANN_SPAWN_OOZE);
+
+ scheduler.CancelGroup(GROUP_SUMMONS);
+ scheduler.Schedule(3s, GROUP_SUMMONS, [&](TaskContext context) {
+ uint8 pos = urand(POS_GEN_RIGHT, POS_GEN_LEFT);
+ if (Creature* ooze = me->SummonCreature(NPC_OOZE, RoomPosition[pos], TEMPSUMMON_CORPSE_TIMED_DESPAWN, 20000))
+ {
+ ActivatePipe(pos);
+ ooze->GetMotionMaster()->MovePoint(0, RoomPosition[POS_ROOM_CENTER].GetPositionX(), RoomPosition[POS_ROOM_CENTER].GetPositionY(), RoomPosition[POS_ROOM_CENTER].GetPositionZ());
+ ooze->SetReactState(REACT_PASSIVE);
+ ooze->SetWalk(true);
+ }
+
+ context.Repeat();
+ });
+ });
- if (GameObject* console = me->GetMap()->GetGameObject( pInstance->GetGuidData(GO_SJONNIR_CONSOLE)))
- console->SetGoState(GO_STATE_READY);
+ ScheduleHealthCheckEvent(25, [&] {
+ if (Creature* brann = ObjectAccessor::GetCreature(*me, instance->GetGuidData(NPC_BRANN)))
+ brann->AI()->Talk(SAY_BRANN_SPAWN_EARTHEN);
- if (Creature* brann = ObjectAccessor::GetCreature(*me, pInstance->GetGuidData(NPC_BRANN)))
+ scheduler.CancelGroup(GROUP_SUMMONS);
+ scheduler.Schedule(1s, GROUP_SUMMONS, [&](TaskContext context) {
+ for (int i = 0; i < 3; i++)
{
- brann->setDeathState(DeathState::JustDied);
- brann->Respawn();
- brann->AI()->DoAction(ACTION_SJONNIR_WIPE_START);
+ uint8 pos = urand(POS_GEN_RIGHT, POS_GEN_LEFT);
+ if (Creature* dwarf = me->SummonCreature(NPC_DWARFES_FRIENDLY, RoomPosition[pos], TEMPSUMMON_CORPSE_TIMED_DESPAWN, 20000))
+ {
+ if (Player* plr = SelectTargetFromPlayerList(100.0f))
+ dwarf->SetFaction(plr->GetFaction());
+
+ ActivatePipe(pos);
+ dwarf->AI()->AttackStart(me);
+ }
}
- }
- }
+
+ context.Repeat(10s, 20s);
+ });
+ });
+
+ ScheduleHealthCheckEvent(20, [&] {
+ scheduler.CancelGroup(GROUP_LIGHTNING_RING);
+ DoCastSelf(SPELL_FRENZY, true);
+
+ ScheduleTimedEvent(1s, [&] {
+ DoCastSelf(SPELL_LIGHTNING_RING_5S);
+ }, 11s);
+ });
+ }
+
+ void ScheduleTasks() override
+ {
+ ScheduleTimedEvent(14s, 19s, [&] {
+ DoCastSelf(SPELL_LIGHTNING_SHIELD);
+ }, 14s, 19s);
+
+ ScheduleTimedEvent(6s, 12s, [&] {
+ DoCastVictim(SPELL_CHAIN_LIGHTNING);
+ }, 6s, 12s);
+
+ ScheduleTimedEvent(24s, [&] {
+ DoCastRandomTarget(SPELL_STATIC_CHARGE, 0, 50.0f);
+ }, 20s);
+
+ scheduler.Schedule(30s, GROUP_LIGHTNING_RING, [&](TaskContext context) {
+ DoCastAOE(SPELL_LIGHTNING_RING);
+ context.Repeat(40s);
+ });
+
+ if (Creature* brann = ObjectAccessor::GetCreature(*me, instance->GetGuidData(NPC_BRANN)))
+ brann->AI()->Talk(SAY_BRANN_SPAWN_TROGG, 20s);
+
+ scheduler.Schedule(5s, GROUP_SUMMONS, [&](TaskContext context) {
+ uint8 pos = urand(POS_GEN_RIGHT, POS_GEN_LEFT);
+ me->SummonCreature(NPC_FORGED_IRON_DWARF, RoomPosition[pos], TEMPSUMMON_CORPSE_TIMED_DESPAWN, 20000);
+ ActivatePipe(pos);
+ context.Repeat(30s);
+ });
}
void JustEngagedWith(Unit* /*who*/) override
{
+ _JustEngagedWith();
Talk(SAY_AGGRO);
- events.ScheduleEvent(EVENT_CHECK_HEALTH, 1s);
- events.ScheduleEvent(EVENT_SHIELD, 14s, 19s);
- events.ScheduleEvent(EVENT_CHAIN_LIGHTNING, 6s, 12s);
- events.ScheduleEvent(EVENT_STATIC_CHARGE, 24s);
- events.ScheduleEvent(EVENT_LIGHTNING_RING, 25s, 31s);
- events.ScheduleEvent(EVENT_SUMMON, 20s);
- events.ScheduleEvent(EVENT_SUMMON, 21s + 500ms);
- events.ScheduleEvent(EVENT_SUMMON_SPEACH, 20s);
+ if (GameObject* doors = me->GetMap()->GetGameObject(instance->GetGuidData(GO_SJONNIR_DOOR)))
+ doors->SetGoState(GO_STATE_READY);
- if (pInstance)
- {
- pInstance->SetData(BOSS_SJONNIR, IN_PROGRESS);
-
- if (GameObject* doors = me->GetMap()->GetGameObject(pInstance->GetGuidData(GO_SJONNIR_DOOR)))
- doors->SetGoState(GO_STATE_READY);
-
- if (pInstance->GetData(BOSS_TRIBUNAL_OF_AGES) == DONE)
- if (Creature* brann = ObjectAccessor::GetCreature(*me, pInstance->GetGuidData(NPC_BRANN)))
- brann->AI()->DoAction(ACTION_START_SJONNIR_FIGHT);
- }
+ if (instance->GetData(BOSS_TRIBUNAL_OF_AGES) == DONE)
+ if (Creature* brann = ObjectAccessor::GetCreature(*me, instance->GetGuidData(NPC_BRANN)))
+ brann->AI()->DoAction(ACTION_START_SJONNIR_FIGHT);
}
void DoAction(int32 param) override
@@ -190,144 +230,20 @@ public:
if (param == ACTION_SLUG_KILLED)
{
SlugeCount++;
- if (SlugeCount >= 5 && pInstance)
- pInstance->SetData(DATA_SJONNIR_ACHIEVEMENT, true);
- }
- }
-
- void UpdateAI(uint32 diff) override
- {
- if (!UpdateVictim())
- return;
-
- events.Update(diff);
- if (me->HasUnitState(UNIT_STATE_CASTING))
- return;
-
- switch (events.ExecuteEvent())
- {
- case EVENT_CHECK_HEALTH:
- {
- if (SummonPhase == PHASE_SUMMON_UNFRIENDLY_DWARFES && HealthBelowPct(50))
- {
- SummonPhase = PHASE_SUMMON_OOZE;
- events.CancelEvent(EVENT_SUMMON);
- events.ScheduleEvent(EVENT_SUMMON, 0ms);
- events.ScheduleEvent(EVENT_SUMMON, 1500ms);
-
- if (pInstance)
- if (Creature* brann = ObjectAccessor::GetCreature(*me, pInstance->GetGuidData(NPC_BRANN)))
- {
- brann->AI()->Talk(SAY_BRANN_SPAWN_OOZE);
- }
- }
-
- if (HealthBelowPct(20))
- {
- if (Creature* brann = ObjectAccessor::GetCreature(*me, pInstance->GetGuidData(NPC_BRANN)))
- {
- brann->AI()->Talk(SAY_BRANN_SPAWN_EARTHEN);
- }
- SummonPhase = PHASE_SUMMON_FRIENDLY_DWARFES;
- me->CastSpell(me, SPELL_FRENZY, false);
-
- events.CancelEvent(EVENT_SUMMON);
- events.ScheduleEvent(EVENT_SUMMON, 0ms);
- break;
- }
-
- events.Repeat(1s);
- break;
- }
- case EVENT_SHIELD:
- {
- me->CastSpell(me, DUNGEON_MODE(SPELL_LIGHTNING_SHIELD, SPELL_LIGHTNING_SHIELD_H), false);
- events.Repeat(14s, 19s);
- break;
- }
- case EVENT_CHAIN_LIGHTNING:
- {
- if (Unit* target = SelectTarget(SelectTargetMethod::Random, 0, 50.0f, true, 0))
- me->CastSpell(target, DUNGEON_MODE(SPELL_CHAIN_LIGHTNING, SPELL_CHAIN_LIGHTNING_H), false);
-
- events.Repeat(6s, 12s);
- break;
- }
- case EVENT_STATIC_CHARGE:
- {
- if (Unit* target = SelectTarget(SelectTargetMethod::Random, 0, 50.0f, true, 0))
- me->CastSpell(target, DUNGEON_MODE(SPELL_STATIC_CHARGE, SPELL_STATIC_CHARGE_H), false);
-
- events.Repeat(20s);
- break;
- }
- case EVENT_LIGHTNING_RING:
- {
- me->CastSpell(me, DUNGEON_MODE(SPELL_LIGHTNING_RING, SPELL_LIGHTNING_RING_H), false);
- events.Repeat(25s, 31s);
- events.DelayEvents(10s); // Channel duration
- break;
- }
- case EVENT_SUMMON_SPEACH:
- {
- if (Creature* brann = ObjectAccessor::GetCreature(*me, pInstance->GetGuidData(NPC_BRANN)))
- {
- brann->AI()->Talk(SAY_BRANN_SPAWN_TROGG);
- }
-
- break;
- }
- case EVENT_SUMMON:
- {
- switch (SummonPhase)
- {
- case PHASE_SUMMON_UNFRIENDLY_DWARFES:
- {
- SummonDwarfes(false);
- events.Repeat(20s);
- break;
- }
- case PHASE_SUMMON_OOZE:
- {
- for (uint8 i = POS_GEN_RIGHT; i <= POS_GEN_LEFT; i++)
- {
- if (Creature* ooze = me->SummonCreature(NPC_OOZE, RoomPosition[i].GetPositionX(), RoomPosition[i].GetPositionY(), RoomPosition[i].GetPositionZ(), 0, TEMPSUMMON_CORPSE_TIMED_DESPAWN, 20000))
- {
- ActivatePipe(i);
- ooze->GetMotionMaster()->MovePoint(0, RoomPosition[POS_ROOM_CENTER].GetPositionX(), RoomPosition[POS_ROOM_CENTER].GetPositionY(), RoomPosition[POS_ROOM_CENTER].GetPositionZ());
- summons.Summon(ooze);
- }
- }
- events.Repeat(10s);
- break;
- }
- case PHASE_SUMMON_FRIENDLY_DWARFES:
- {
- SummonDwarfes(true);
- break;
- }
- }
- break;
- }
+ if (SlugeCount >= 5)
+ instance->SetData(DATA_SJONNIR_ACHIEVEMENT, true);
}
-
- DoMeleeAttackIfReady();
}
void JustDied(Unit* /*killer*/) override
{
Talk(SAY_DEATH);
+ _JustDied();
+ if (GameObject* sd = me->GetMap()->GetGameObject(instance->GetGuidData(GO_SJONNIR_DOOR)))
+ sd->SetGoState(GO_STATE_ACTIVE);
- summons.DespawnAll();
- if (pInstance)
- {
- pInstance->SetData(BOSS_SJONNIR, DONE);
- if (GameObject* sd = me->GetMap()->GetGameObject(pInstance->GetGuidData(GO_SJONNIR_DOOR)))
- sd->SetGoState(GO_STATE_ACTIVE);
-
- if (Creature* brann = ObjectAccessor::GetCreature(*me, pInstance->GetGuidData(NPC_BRANN)))
- brann->AI()->DoAction(ACTION_SJONNIR_DEAD);
- }
+ if (Creature* brann = ObjectAccessor::GetCreature(*me, instance->GetGuidData(NPC_BRANN)))
+ brann->AI()->DoAction(ACTION_SJONNIR_DEAD);
}
void KilledUnit(Unit* /*victim*/) override
@@ -340,42 +256,8 @@ public:
void ActivatePipe(uint8 side)
{
- if (pInstance)
- if (GameObject* pipe = me->GetMap()->GetGameObject(pInstance->GetGuidData(side == POS_GEN_RIGHT ? GO_RIGHT_PIPE : GO_LEFT_PIPE)))
- pipe->SendCustomAnim(0);
- }
-
- void SummonDwarfes(bool friendly)
- {
- if (friendly)
- {
- for (int i = 0; i < 3; i++)
- {
- uint8 Pos = urand(POS_GEN_RIGHT, POS_GEN_LEFT);
- if (Creature* dwarf = me->SummonCreature(NPC_DWARFES_FRIENDLY, RoomPosition[Pos].GetPositionX(), RoomPosition[Pos].GetPositionY(), RoomPosition[Pos].GetPositionZ(), 0, TEMPSUMMON_CORPSE_TIMED_DESPAWN, 20000))
- {
- if (Player* plr = SelectTargetFromPlayerList(100.0f))
- dwarf->SetFaction(plr->GetFaction());
-
- ActivatePipe(Pos);
- dwarf->AI()->AttackStart(me);
- summons.Summon(dwarf);
- }
- }
- }
- else
- {
- for (int i = 0; i < 2; i++)
- {
- uint8 Pos = urand(POS_GEN_RIGHT, POS_GEN_LEFT);
- if (Creature* dwarf = me->SummonCreature(urand(0, 1) ? NPC_FORGED_IRON_TROGG : NPC_FORGED_IRON_DWARF, RoomPosition[Pos].GetPositionX(), RoomPosition[Pos].GetPositionY(), RoomPosition[Pos].GetPositionZ(), 0, TEMPSUMMON_CORPSE_TIMED_DESPAWN, 20000))
- {
- ActivatePipe(Pos);
- dwarf->SetInCombatWithZone();
- summons.Summon(dwarf);
- }
- }
- }
+ if (GameObject* pipe = me->GetMap()->GetGameObject(instance->GetGuidData(side == POS_GEN_RIGHT ? GO_RIGHT_PIPE : GO_LEFT_PIPE)))
+ pipe->SendCustomAnim(0);
}
};
};
@@ -399,7 +281,7 @@ public:
if (!UpdateVictim())
return;
- DoSpellAttackIfReady((me->GetEntry() == NPC_FORGED_IRON_DWARF) ? DUNGEON_MODE(SPELL_LIGHTNING_TETHER, SPELL_LIGHTNING_TETHER_H) : DUNGEON_MODE(SPELL_LIGHTNING_SHOCK, SPELL_LIGHTNING_SHOCK_H));
+ DoSpellAttackIfReady((me->GetEntry() == NPC_FORGED_IRON_DWARF) ? SPELL_LIGHTNING_TETHER : SPELL_LIGHTNING_SHOCK);
}
};
};
@@ -426,12 +308,12 @@ public:
void JustEngagedWith(Unit*) override
{
- events.ScheduleEvent(EVENT_TOXIC_VOLLEY, 5000);
+ events.ScheduleEvent(EVENT_TOXIC_VOLLEY, 5s);
}
void JustDied(Unit* /*killer*/) override
{
- if (InstanceScript* pInstance = me->GetInstanceScript())
- if (Creature* sjonnir = ObjectAccessor::GetCreature(*me, pInstance->GetGuidData(NPC_SJONNIR)))
+ if (InstanceScript* instance = me->GetInstanceScript())
+ if (Creature* sjonnir = instance->GetCreature(BOSS_SJONNIR))
sjonnir->AI()->DoAction(ACTION_SLUG_KILLED);
}
void UpdateAI(uint32 diff) override
@@ -448,7 +330,7 @@ public:
// Every 5 seconds
case EVENT_TOXIC_VOLLEY:
{
- me->CastSpell(me, DUNGEON_MODE(SPELL_TOXIC_VOLLEY, SPELL_TOXIC_VOLLEY_H), false);
+ me->CastSpell(me, SPELL_TOXIC_VOLLEY, false);
events.Repeat(5s);
break;
}
diff --git a/src/server/scripts/Northrend/Ulduar/HallsOfStone/brann_bronzebeard.cpp b/src/server/scripts/Northrend/Ulduar/HallsOfStone/brann_bronzebeard.cpp
index 8202f673a7..933c006ce9 100644
--- a/src/server/scripts/Northrend/Ulduar/HallsOfStone/brann_bronzebeard.cpp
+++ b/src/server/scripts/Northrend/Ulduar/HallsOfStone/brann_bronzebeard.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
@@ -48,13 +48,10 @@ enum Misc
{
// BRANN EVENT
SPELL_GLARE_OF_THE_TRIBUNAL = 50988,
- SPELL_GLARE_OF_THE_TRIBUNAL_H = 59870,
SPELL_DARK_MATTER_VISUAL = 51000,
SPELL_DARK_MATTER_VISUAL_CHANNEL= 51001,
SPELL_DARK_MATTER = 51012,
- SPELL_DARK_MATTER_H = 59868,
SPELL_SEARING_GAZE = 51136,
- SPELL_SEARING_GAZE_H = 59867,
// DARK RUNE PROTECTOR
SPELL_DRP_CHARGE = 22120,
@@ -62,14 +59,11 @@ enum Misc
// DARK RUNE STORMCALLER
SPELL_DRS_LIGHTING_BOLT = 12167,
- SPELL_DRS_LIGHTING_BOLT_H = 59863,
SPELL_DRS_SHADOW_WORD_PAIN = 15654,
- SPELL_DRS_SHADOW_WORD_PAIN_H = 59864,
// IRON GOLEM CUSTODIAN
SPELL_IGC_CRUSH_ARMOR = 33661,
SPELL_IGC_GROUND_SMASH = 12734,
- SPELL_IGC_GROUND_SMASH_H = 59865,
// QUESTS
QUEST_HALLS_OF_STONE = 13207,
@@ -361,7 +355,6 @@ public:
SetDespawnAtEnd(false);
ResetEvent();
- me->SetFaction(FACTION_FRIENDLY);
me->SetReactState(REACT_PASSIVE);
me->ReplaceAllNpcFlags(UNIT_NPC_FLAG_GOSSIP | UNIT_NPC_FLAG_QUESTGIVER);
@@ -391,23 +384,14 @@ public:
switch (action)
{
case ACTION_START_ESCORT_EVENT:
- Start(false, true, ObjectGuid::Empty, 0, true, false);
+ Start(false, ObjectGuid::Empty, 0, true, false);
Talk(SAY_BRANN_ESCORT_START);
- me->SetFaction(FACTION_ESCORTEE_N_NEUTRAL_PASSIVE);
me->SetReactState(REACT_AGGRESSIVE);
- me->SetRegeneratingHealth(false);
+ me->SetRegeneratingHealth(true);
break;
case ACTION_START_TRIBUNAL:
{
me->SetReactState(REACT_PASSIVE);
- Map::PlayerList const& PlayerList = me->GetMap()->GetPlayers();
- if (!PlayerList.IsEmpty())
- for (Map::PlayerList::const_iterator i = PlayerList.begin(); i != PlayerList.end(); ++i)
- {
- me->SetFaction(i->GetSource()->GetFaction());
- break;
- }
-
SetEscortPaused(false);
InitializeEvent();
me->ReplaceAllNpcFlags(UNIT_NPC_FLAG_NONE);
@@ -421,7 +405,6 @@ public:
break;
case ACTION_GO_TO_SJONNIR:
Talk(SAY_BRANN_ENTRANCE_MEET);
- me->SetFaction(FACTION_FRIENDLY);
me->SetReactState(REACT_PASSIVE);
me->SetRegeneratingHealth(true);
SetEscortPaused(false);
@@ -430,9 +413,9 @@ public:
DoCast(me, 58506, false);
me->SetUInt32Value(UNIT_NPC_EMOTESTATE, EMOTE_STATE_READY_UNARMED);
me->SendMovementFlagUpdate();
+ me->SetImmuneToAll(true);
break;
case ACTION_START_SJONNIR_FIGHT:
- me->SetFaction(FACTION_FRIENDLY);
SetEscortPaused(false);
break;
case ACTION_SJONNIR_DEAD:
@@ -443,8 +426,8 @@ public:
me->ReplaceAllNpcFlags(UNIT_NPC_FLAG_GOSSIP | UNIT_NPC_FLAG_QUESTGIVER);
me->SetOrientation(3.132660f);
me->SendMovementFlagUpdate();
- events.ScheduleEvent(EVENT_SJONNIR_END_BRANN_YELL, 10000ms);
- events.ScheduleEvent(EVENT_SJONNIR_END_BRANN_LAST_YELL, 22000ms);
+ events.ScheduleEvent(EVENT_SJONNIR_END_BRANN_YELL, 10s);
+ events.ScheduleEvent(EVENT_SJONNIR_END_BRANN_LAST_YELL, 22s);
break;
case ACTION_SJONNIR_WIPE_START:
Reset();
@@ -456,7 +439,7 @@ public:
door->SetGoState(GO_STATE_READY);
break;
case ACTION_OPEN_DOOR:
- Start(false, true, ObjectGuid::Empty, 0, true, false);
+ Start(false, ObjectGuid::Empty, 0, true, false);
SetNextWaypoint(34, false);
SetEscortPaused(false);
me->RemoveAura(58506);
@@ -505,10 +488,10 @@ public:
if (Creature* kaddrak = GetKaddrak())
{
if (Player* plr = SelectTargetFromPlayerList(100.0f))
- kaddrak->CastSpell(plr, DUNGEON_MODE(SPELL_GLARE_OF_THE_TRIBUNAL, SPELL_GLARE_OF_THE_TRIBUNAL_H), true);
+ kaddrak->CastSpell(plr, SPELL_GLARE_OF_THE_TRIBUNAL, true);
}
- events.RescheduleEvent(EVENT_KADDRAK_SWITCH_EYE, 1000ms);
+ events.RescheduleEvent(EVENT_KADDRAK_SWITCH_EYE, 1s);
events.Repeat(1500ms);
break;
}
@@ -550,7 +533,7 @@ public:
darkMatterTargetGUID = cr->GetGUID();
- events.RescheduleEvent(EVENT_DARK_MATTER_START, 5000ms);
+ events.RescheduleEvent(EVENT_DARK_MATTER_START, 5s);
}
}
events.Repeat(30s);
@@ -566,16 +549,11 @@ public:
if (!plr)
return; //no target
- float speed = 10.0f;
- float tooFarAwaySpeed = me->GetDistance(plr->GetPositionX(), plr->GetPositionY(), plr->GetPositionZ()) / (5000.0f * 0.001f);
- if (speed < tooFarAwaySpeed)
- speed = tooFarAwaySpeed;
+ darkMatterTarget->GetMotionMaster()->MovePoint(0, plr->GetPositionX(), plr->GetPositionY(), plr->GetPositionZ());
- darkMatterTarget->MonsterMoveWithSpeed(plr->GetPositionX(), plr->GetPositionY(), plr->GetPositionZ(), speed);
-
- if (darkMatterTarget->GetDistance(plr) < 15.0f)
+ if (darkMatterTarget->GetDistance(plr) < 5.0f)
{
- events.RescheduleEvent(EVENT_DARK_MATTER_END, 3000ms);
+ events.RescheduleEvent(EVENT_DARK_MATTER_END, 3s);
}
else if (darkMatterTarget->GetDistance(plr) < 30.0f)
{
@@ -593,8 +571,8 @@ public:
{
if (Creature* darkMatterTarget = ObjectAccessor::GetCreature(*me, darkMatterTargetGUID))
{
- darkMatterTarget->CastSpell(darkMatterTarget, darkMatterTarget->GetMap()->IsHeroic() ? SPELL_DARK_MATTER_H : SPELL_DARK_MATTER, true);
- darkMatterTarget->DespawnOrUnsummon(500);
+ darkMatterTarget->CastSpell(darkMatterTarget, SPELL_DARK_MATTER, true);
+ darkMatterTarget->DespawnOrUnsummon(500ms);
}
break;
}
@@ -612,7 +590,7 @@ public:
{
// summon another abedneum to create double beam, despawn just after trigger despawn
me->SummonCreature(NPC_ABEDNEUM, 897.0f, 326.9f, 223.5f, 0.0f, TEMPSUMMON_TIMED_DESPAWN, 12000);
- cr->CastSpell(cr, DUNGEON_MODE(SPELL_SEARING_GAZE, SPELL_SEARING_GAZE_H), true);
+ cr->CastSpell(cr, SPELL_SEARING_GAZE, true);
}
}
events.Repeat(15s);
@@ -622,15 +600,8 @@ public:
{
if (!canExecuteEvents)
return;
- uint32 Time = 40000 - (2500 * WaveNum);
SummonCreatures(NPC_DARK_RUNE_PROTECTOR, 3, 0);
- if (WaveNum > 2)
- events.ScheduleEvent(EVENT_SUMMON_STORMCALLER, urand(10 - WaveNum, 15 - WaveNum) * 1000);
- if (WaveNum > 5)
- events.ScheduleEvent(EVENT_SUMMON_CUSTODIAN, urand(10 - WaveNum, 15 - WaveNum) * 1000);
-
- WaveNum++;
- events.RepeatEvent(Time);
+ events.Repeat(IsHeroic() ? 23500ms : 32500ms);
break;
}
case EVENT_SUMMON_STORMCALLER:
@@ -639,7 +610,7 @@ public:
return;
SummonCreatures(NPC_DARK_RUNE_STORMCALLER, 2, 1);
-
+ events.Repeat(IsHeroic() ? 32s : 41500ms);
break;
}
case EVENT_SUMMON_CUSTODIAN:
@@ -648,7 +619,7 @@ public:
return;
SummonCreatures(NPC_IRON_GOLEM_CUSTODIAN, 1, 1);
-
+ events.Repeat(IsHeroic() ? 32s : 45s);
break;
}
case EVENT_TRIBUNAL_END:
@@ -693,7 +664,6 @@ public:
me->CastSpell(me, 59046, true); // credit
}
- me->ReplaceAllNpcFlags(UNIT_NPC_FLAG_GOSSIP | UNIT_NPC_FLAG_QUESTGIVER);
me->SetUInt32Value(UNIT_NPC_EMOTESTATE, EMOTE_STATE_STAND);
me->SendMovementFlagUpdate();
@@ -842,17 +812,14 @@ void brann_bronzebeard::brann_bronzebeardAI::InitializeEvent()
Creature* cr = nullptr;
if ((cr = me->SummonCreature(NPC_KADDRAK, 923.7f, 326.9f, 219.5f, 2.1f, TEMPSUMMON_TIMED_DESPAWN, 580000)))
{
- cr->SetInCombatWithZone();
KaddrakGUID = cr->GetGUID();
}
if ((cr = me->SummonCreature(NPC_MARNAK, 895.974f, 363.571f, 219.337f, 5.5f, TEMPSUMMON_TIMED_DESPAWN, 580000)))
{
- cr->SetInCombatWithZone();
MarnakGUID = cr->GetGUID();
}
if ((cr = me->SummonCreature(NPC_ABEDNEUM, 892.25f, 331.25f, 223.86f, 0.6f, TEMPSUMMON_TIMED_DESPAWN, 580000)))
{
- cr->SetInCombatWithZone();
AbedneumGUID = cr->GetGUID();
}
@@ -865,8 +832,9 @@ void brann_bronzebeard::brann_bronzebeardAI::InitializeEvent()
events.ScheduleEvent(EVENT_MARNAK_VISUAL, 105s);
events.ScheduleEvent(EVENT_ABEDNEUM_VISUAL, 207s);
- // Fight
- events.ScheduleEvent(EVENT_SUMMON_MONSTERS, 47s);
+ events.ScheduleEvent(EVENT_SUMMON_MONSTERS, 52s);
+ events.ScheduleEvent(EVENT_SUMMON_STORMCALLER, 122s);
+ events.ScheduleEvent(EVENT_SUMMON_CUSTODIAN, 228s);
events.ScheduleEvent(EVENT_KADDRAK_HEAD, 47s);
events.ScheduleEvent(EVENT_MARNAK_HEAD, 115s);
events.ScheduleEvent(EVENT_ABEDNEUM_HEAD, 217s);
@@ -902,6 +870,7 @@ void brann_bronzebeard::brann_bronzebeardAI::WaypointReached(uint32 id)
//Tribunal end, stand in the middle of the sky room
case 17:
SetEscortPaused(true);
+ me->ReplaceAllNpcFlags(UNIT_NPC_FLAG_GOSSIP | UNIT_NPC_FLAG_QUESTGIVER);
me->SetOrientation(3.91672f);
me->SendMovementFlagUpdate();
break;
@@ -913,8 +882,6 @@ void brann_bronzebeard::brann_bronzebeardAI::WaypointReached(uint32 id)
{
pInstance->SetData(BRANN_BRONZEBEARD, 4);
me->ReplaceAllNpcFlags(UNIT_NPC_FLAG_GOSSIP | UNIT_NPC_FLAG_QUESTGIVER);
- if (Creature* cr = ObjectAccessor::GetCreature(*me, pInstance->GetGuidData(NPC_SJONNIR)))
- cr->RemoveUnitFlag(UNIT_FLAG_NOT_SELECTABLE);
me->SetOrientation(3.132660f);
DoCast(me, 58506, false);
me->SendMovementFlagUpdate();
@@ -931,10 +898,10 @@ void brann_bronzebeard::brann_bronzebeardAI::WaypointReached(uint32 id)
SetEscortPaused(true);
me->SetUInt32Value(UNIT_NPC_EMOTESTATE, EMOTE_STATE_USE_STANDING);
me->SendMovementFlagUpdate();
- events.ScheduleEvent(EVENT_DOOR_OPEN, 1500);
+ events.ScheduleEvent(EVENT_DOOR_OPEN, 1500ms);
me->SetWalk(false);
me->SetSpeed(MOVE_RUN, 1.0f, false);
- events.ScheduleEvent(EVENT_RESUME_ESCORT, 3500);
+ events.ScheduleEvent(EVENT_RESUME_ESCORT, 3500ms);
break;
//Brann stops in front of Sjonnir and awaits the start of the battle.
case 36:
@@ -987,7 +954,6 @@ public:
void JustEngagedWith(Unit*) override
{
- events.ScheduleEvent(EVENT_DRP_CHARGE, 10s);
events.ScheduleEvent(EVENT_DRP_CLEAVE, 7s);
}
@@ -1002,14 +968,6 @@ public:
switch (events.ExecuteEvent())
{
- case EVENT_DRP_CHARGE:
- {
- if (Unit* tgt = SelectTarget(SelectTargetMethod::Random, 0))
- me->CastSpell(tgt, SPELL_DRP_CHARGE, false);
-
- events.Repeat(10s);
- break;
- }
case EVENT_DRP_CLEAVE:
{
me->CastSpell(me->GetVictim(), SPELL_DRP_CLEAVE, false);
@@ -1018,6 +976,14 @@ public:
}
}
+ if (Unit* victim = me->GetVictim())
+ {
+ if (!me->IsWithinMeleeRange(victim) && !me->HasUnitState(UNIT_STATE_CHARGING))
+ {
+ me->CastSpell(victim, SPELL_DRP_CHARGE, false);
+ }
+ }
+
DoMeleeAttackIfReady();
}
};
@@ -1062,13 +1028,13 @@ public:
{
case EVENT_DRS_LIGHTNING_BOLD:
{
- me->CastSpell(me->GetVictim(), IsHeroic() ? SPELL_DRS_LIGHTING_BOLT_H : SPELL_DRS_LIGHTING_BOLT, false);
+ me->CastSpell(me->GetVictim(), SPELL_DRS_LIGHTING_BOLT, false);
events.Repeat(5s);
break;
}
case EVENT_DRS_SHADOW_WORD_PAIN:
{
- me->CastSpell(me->GetVictim(), IsHeroic() ? SPELL_DRS_SHADOW_WORD_PAIN_H : SPELL_DRS_SHADOW_WORD_PAIN, false);
+ me->CastSpell(me->GetVictim(), SPELL_DRS_SHADOW_WORD_PAIN, false);
events.Repeat(12s);
break;
}
@@ -1101,7 +1067,7 @@ public:
void JustEngagedWith(Unit*) override
{
events.ScheduleEvent(EVENT_IGC_CRUSH, 6s);
- events.ScheduleEvent(EVENT_IGC_GROUND_SMASH, 4s);
+ events.ScheduleEvent(EVENT_IGC_GROUND_SMASH, 20s);
}
void UpdateAI(uint32 diff) override
{
@@ -1122,8 +1088,8 @@ public:
}
case EVENT_IGC_GROUND_SMASH:
{
- me->CastSpell(me->GetVictim(), IsHeroic() ? SPELL_IGC_GROUND_SMASH_H : SPELL_IGC_GROUND_SMASH, false);
- events.Repeat(5s);
+ me->CastSpell(me->GetVictim(), SPELL_IGC_GROUND_SMASH, false);
+ events.Repeat(20s, 40s);
break;
}
}
@@ -1139,13 +1105,13 @@ class spell_hos_dark_matter : public AuraScript
bool Validate(SpellInfo const* /*spellInfo*/) override
{
- return ValidateSpellInfo({ SPELL_DARK_MATTER_H, SPELL_DARK_MATTER });
+ return ValidateSpellInfo({ SPELL_DARK_MATTER });
}
void HandleEffectRemove(AuraEffect const* /*aurEff*/, AuraEffectHandleModes /*mode*/)
{
if (Unit* caster = GetCaster())
- caster->CastSpell(caster, caster->GetMap()->IsHeroic() ? SPELL_DARK_MATTER_H : SPELL_DARK_MATTER, true);
+ caster->CastSpell(caster, SPELL_DARK_MATTER, true);
}
void Register() override
diff --git a/src/server/scripts/Northrend/Ulduar/HallsOfStone/halls_of_stone.h b/src/server/scripts/Northrend/Ulduar/HallsOfStone/halls_of_stone.h
index c9188b35e2..d45d3009bc 100644
--- a/src/server/scripts/Northrend/Ulduar/HallsOfStone/halls_of_stone.h
+++ b/src/server/scripts/Northrend/Ulduar/HallsOfStone/halls_of_stone.h
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
@@ -78,6 +78,7 @@ enum npcs
NPC_ABEDNEUM = 30899,
NPC_SJONNIR = 27978,
NPC_BRANN = 28070,
+ NPC_IRON_SLUDGE = 28165,
ACTION_START_ESCORT_EVENT = 0,
ACTION_START_TRIBUNAL = 1,
diff --git a/src/server/scripts/Northrend/Ulduar/HallsOfStone/instance_halls_of_stone.cpp b/src/server/scripts/Northrend/Ulduar/HallsOfStone/instance_halls_of_stone.cpp
index 4a9e61ff3e..c6c8b65ddd 100644
--- a/src/server/scripts/Northrend/Ulduar/HallsOfStone/instance_halls_of_stone.cpp
+++ b/src/server/scripts/Northrend/Ulduar/HallsOfStone/instance_halls_of_stone.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
@@ -20,6 +20,18 @@
#include "ScriptedCreature.h"
#include "halls_of_stone.h"
+ObjectData const summonData[] =
+{
+ { NPC_IRON_SLUDGE, BOSS_SJONNIR },
+ { 0, 0 }
+};
+
+ObjectData const creatureData[] =
+{
+ { NPC_SJONNIR, BOSS_SJONNIR },
+ { 0, 0 }
+};
+
class instance_halls_of_stone : public InstanceMapScript
{
public:
@@ -45,7 +57,6 @@ public:
ObjectGuid goSjonnirDoorGUID;
ObjectGuid goLeftPipeGUID;
ObjectGuid goRightPipeGUID;
- ObjectGuid goTribunalDoorGUID;
ObjectGuid SjonnirGUID;
ObjectGuid BrannGUID;
@@ -58,6 +69,9 @@ public:
void Initialize() override
{
SetHeaders(DataHeader);
+ SetBossNumber(MAX_ENCOUNTER);
+ LoadObjectData(creatureData, nullptr);
+ LoadSummonData(summonData);
memset(&Encounter, 0, sizeof(Encounter));
brannAchievement = false;
@@ -96,10 +110,6 @@ public:
case GO_TRIBUNAL_CONSOLE:
goTribunalConsoleGUID = go->GetGUID();
break;
- case GO_TRIBUNAL_ACCESS_DOOR:
- goTribunalDoorGUID = go->GetGUID();
- go->SetGoState(GO_STATE_READY);
- break;
case GO_SKY_FLOOR:
goSkyRoomFloorGUID = go->GetGUID();
if (Encounter[BOSS_TRIBUNAL_OF_AGES] == DONE)
@@ -126,13 +136,12 @@ public:
{
switch (creature->GetEntry())
{
- case NPC_SJONNIR:
- SjonnirGUID = creature->GetGUID();
- break;
case NPC_BRANN:
BrannGUID = creature->GetGUID();
break;
}
+
+ InstanceScript::OnCreatureCreate(creature);
}
ObjectGuid GetGuidData(uint32 id) const override
@@ -141,8 +150,6 @@ public:
{
case GO_TRIBUNAL_CONSOLE:
return goTribunalConsoleGUID;
- case GO_TRIBUNAL_ACCESS_DOOR:
- return goTribunalDoorGUID;
case GO_SJONNIR_CONSOLE:
return goSjonnirConsoleGUID;
case GO_SJONNIR_DOOR:
@@ -208,10 +215,6 @@ public:
isKrystalusDead = type == BOSS_KRYSTALLUS || isKrystalusDead;
}
- if (isMaidenOfGriefDead && isKrystalusDead)
- if (GameObject* tribunalDoor = instance->GetGameObject(goTribunalDoorGUID))
- tribunalDoor->SetGoState(GO_STATE_ACTIVE);
-
if (type == BOSS_TRIBUNAL_OF_AGES && data == SPECIAL)
{
if (GameObject* pSkyRoomFloor = instance->GetGameObject(goSkyRoomFloorGUID))
diff --git a/src/server/scripts/Northrend/Ulduar/Ulduar/boss_algalon_the_observer.cpp b/src/server/scripts/Northrend/Ulduar/Ulduar/boss_algalon_the_observer.cpp
index 9eec77e622..8a47bd3353 100644
--- a/src/server/scripts/Northrend/Ulduar/Ulduar/boss_algalon_the_observer.cpp
+++ b/src/server/scripts/Northrend/Ulduar/Ulduar/boss_algalon_the_observer.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
@@ -443,7 +443,7 @@ public:
if (me->IsInCombat())
events.ScheduleEvent(EVENT_DESPAWN_ALGALON_4, 26s);
events.ScheduleEvent(EVENT_DESPAWN_ALGALON_5, 32s);
- me->DespawnOrUnsummon(39000);
+ me->DespawnOrUnsummon(39s);
me->SetReactState(REACT_PASSIVE);
me->AttackStop();
@@ -484,7 +484,7 @@ public:
return;
}
- uint32 introDelay = 0;
+ Milliseconds introDelay = 0ms;
me->setActive(true);
me->SetInCombatWithZone();
me->SetUnitFlag(UNIT_FLAG_NOT_SELECTABLE);
@@ -495,27 +495,27 @@ public:
if (!_firstPull)
{
events.ScheduleEvent(EVENT_START_COMBAT, 0ms);
- introDelay = 8000;
+ introDelay = 8s;
}
else
{
summons.DespawnEntry(NPC_AZEROTH);
_firstPull = false;
Talk(SAY_ALGALON_START_TIMER);
- introDelay = 22000;
+ introDelay = 22s;
events.ScheduleEvent(EVENT_START_COMBAT, 14s);
m_pInstance->SetData(DATA_DESPAWN_ALGALON, 0);
}
- events.ScheduleEvent(EVENT_REMOVE_UNNATTACKABLE, introDelay - 500);
+ events.ScheduleEvent(EVENT_REMOVE_UNNATTACKABLE, introDelay - 500ms);
events.ScheduleEvent(EVENT_INTRO_TIMER_DONE, introDelay);
- events.ScheduleEvent(EVENT_QUANTUM_STRIKE, 3500 + introDelay);
- events.ScheduleEvent(EVENT_PHASE_PUNCH, 15500 + introDelay);
- events.ScheduleEvent(EVENT_SUMMON_COLLAPSING_STAR, 16500 + introDelay);
- events.ScheduleEvent(EVENT_COSMIC_SMASH, 25000 + introDelay);
- events.ScheduleEvent(EVENT_ACTIVATE_LIVING_CONSTELLATION, 50500 + introDelay);
- events.ScheduleEvent(EVENT_BIG_BANG, 90000 + introDelay);
- events.ScheduleEvent(EVENT_ASCEND_TO_THE_HEAVENS, 360000 + introDelay);
+ events.ScheduleEvent(EVENT_QUANTUM_STRIKE, 3500ms + introDelay);
+ events.ScheduleEvent(EVENT_PHASE_PUNCH, 15500ms + introDelay);
+ events.ScheduleEvent(EVENT_SUMMON_COLLAPSING_STAR, 16500ms + introDelay);
+ events.ScheduleEvent(EVENT_COSMIC_SMASH, 25s + introDelay);
+ events.ScheduleEvent(EVENT_ACTIVATE_LIVING_CONSTELLATION, 50500ms + introDelay);
+ events.ScheduleEvent(EVENT_BIG_BANG, 90s + introDelay);
+ events.ScheduleEvent(EVENT_ASCEND_TO_THE_HEAVENS, 360s + introDelay);
events.ScheduleEvent(EVENT_CHECK_HERALD_ITEMS, 5s);
DoCheckHeraldOfTheTitans();
@@ -574,7 +574,7 @@ public:
summon->SetHomePosition(x, y, z, o);
summon->UpdatePosition(x, y, z, o, true);
summon->StopMovingOnCurrentPos();
- summon->m_Events.AddEvent(new CosmicSmashDamageEvent(summon), summon->m_Events.CalculateTime(4000));
+ summon->m_Events.AddEventAtOffset(new CosmicSmashDamageEvent(summon), 4s);
break;
}
case NPC_UNLEASHED_DARK_MATTER:
@@ -688,7 +688,7 @@ public:
break;
case EVENT_QUANTUM_STRIKE:
me->CastSpell(me->GetVictim(), SPELL_QUANTUM_STRIKE, false);
- events.Repeat(3000ms, 4500ms);
+ events.Repeat(3s, 4500ms);
break;
case EVENT_PHASE_PUNCH:
me->CastSpell(me->GetVictim(), SPELL_PHASE_PUNCH, false);
@@ -795,7 +795,7 @@ public:
case EVENT_OUTRO_11:
me->SetStandState(UNIT_STAND_STATE_STAND);
me->CastSpell(me, SPELL_TELEPORT, false);
- me->DespawnOrUnsummon(3000);
+ me->DespawnOrUnsummon(3s);
break;
case EVENT_DESPAWN_ALGALON_1:
Talk(SAY_ALGALON_DESPAWN_1);
@@ -812,7 +812,7 @@ public:
case EVENT_DESPAWN_ALGALON_5:
me->SetStandState(UNIT_STAND_STATE_STAND);
me->CastSpell(me, SPELL_TELEPORT, false);
- me->DespawnOrUnsummon(3000);
+ me->DespawnOrUnsummon(3s);
break;
case EVENT_CHECK_HERALD_ITEMS:
if (!DoCheckHeraldOfTheTitans())
@@ -871,12 +871,12 @@ public:
if (movementType != POINT_MOTION_TYPE)
return;
- uint32 delay = 1;
+ Milliseconds delay = 1ms;
_currentPoint = pointId + 1;
switch (pointId)
{
case 2:
- delay = 8000;
+ delay = 8s;
me->SetWalk(true);
break;
case 6:
@@ -886,7 +886,7 @@ public:
events.ScheduleEvent(EVENT_SUMMON_ALGALON, 7500ms);
return;
case 10:
- me->DespawnOrUnsummon(1);
+ me->DespawnOrUnsummon(1ms);
return;
case POINT_BRANN_OUTRO:
case POINT_BRANN_OUTRO_END:
@@ -1010,7 +1010,7 @@ public:
break;
case ACTION_BIG_BANG:
events.SetPhase(PHASE_BIG_BANG);
- events.DelayEvents(9500);
+ events.DelayEvents(9500ms);
events.ScheduleEvent(EVENT_RESUME_UPDATING, 9500ms);
break;
}
@@ -1025,10 +1025,10 @@ public:
instance->DoStartTimedAchievement(ACHIEVEMENT_TIMED_TYPE_EVENT, EVENT_ID_SUPERMASSIVE_START);
caster->CastSpell((Unit*)nullptr, SPELL_BLACK_HOLE_CREDIT, TRIGGERED_FULL_MASK);
- caster->ToCreature()->DespawnOrUnsummon(1);
- me->DespawnOrUnsummon(1);
+ caster->ToCreature()->DespawnOrUnsummon(1ms);
+ me->DespawnOrUnsummon(1ms);
if (Creature* voidZone = caster->FindNearestCreature(NPC_ALGALON_VOID_ZONE_VISUAL_STALKER, 10.0f))
- voidZone->DespawnOrUnsummon(1);
+ voidZone->DespawnOrUnsummon(1ms);
}
void UpdateAI(uint32 diff) override
@@ -1146,7 +1146,7 @@ public:
_locked = true;
// Start Algalon event
me->SetGameObjectFlag(GO_FLAG_IN_USE);
- events.ScheduleEvent(EVENT_DESPAWN_CONSOLE, 5000ms);
+ events.ScheduleEvent(EVENT_DESPAWN_CONSOLE, 5s);
if (Creature* brann = me->SummonCreature(NPC_BRANN_BRONZBEARD_ALG, BrannIntroSpawnPos))
brann->AI()->DoAction(ACTION_START_INTRO);
diff --git a/src/server/scripts/Northrend/Ulduar/Ulduar/boss_assembly_of_iron.cpp b/src/server/scripts/Northrend/Ulduar/Ulduar/boss_assembly_of_iron.cpp
index c56188547b..8e423166ad 100644
--- a/src/server/scripts/Northrend/Ulduar/Ulduar/boss_assembly_of_iron.cpp
+++ b/src/server/scripts/Northrend/Ulduar/Ulduar/boss_assembly_of_iron.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
@@ -31,55 +31,35 @@ enum AssemblySpells
SPELL_BERSERK = 47008,
// Steelbreaker
- SPELL_HIGH_VOLTAGE_10 = 61890,
- SPELL_HIGH_VOLTAGE_25 = 63498,
- SPELL_FUSION_PUNCH_10 = 61903,
- SPELL_FUSION_PUNCH_25 = 63493,
- SPELL_STATIC_DISRUPTION_10 = 61911,
- SPELL_STATIC_DISRUPTION_25 = 63495,
- SPELL_OVERWHELMING_POWER_10 = 64637,
- SPELL_OVERWHELMING_POWER_25 = 61888,
+ SPELL_HIGH_VOLTAGE = 61890,
+ SPELL_FUSION_PUNCH = 61903,
+ SPELL_STATIC_DISRUPTION = 61911,
+ SPELL_OVERWHELMING_POWER = 64637,
SPELL_ELECTRICAL_CHARGE = 61902,
// Runemaster Molgeim
SPELL_SHIELD_OF_RUNES_BUFF = 62277,
- SPELL_SHIELD_OF_RUNES_10 = 62274,
- SPELL_SHIELD_OF_RUNES_25 = 63489,
+ SPELL_SHIELD_OF_RUNES = 62274,
SPELL_RUNE_OF_POWER = 61973,
- SPELL_RUNE_OF_DEATH_10 = 62269,
- SPELL_RUNE_OF_DEATH_25 = 63490,
+ SPELL_RUNE_OF_DEATH = 62269,
SPELL_RUNE_OF_SUMMONING = 62273,
SPELL_RUNE_OF_SUMMONING_SUMMON = 62020,
- SPELL_LIGHTNING_BLAST_10 = 62054,
- SPELL_LIGHTNING_BLAST_25 = 63491,
+ SPELL_LIGHTNING_BLAST = 62054,
CREATURE_LIGHTNING_ELEMENTAL = 32958,
CREATURE_RUNE_OF_SUMMONING = 33051,
SPELL_RUNE_OF_POWER_OOC_CHANNEL = 61975,
// Stormcaller Brundir
- SPELL_CHAIN_LIGHTNING_10 = 61879,
- SPELL_CHAIN_LIGHTNING_25 = 63479,
- SPELL_OVERLOAD_10 = 61869,
- SPELL_OVERLOAD_25 = 63481,
- SPELL_LIGHTNING_WHIRL_10 = 61915,
- SPELL_LIGHTNING_WHIRL_25 = 63483,
- SPELL_LIGHTNING_TENDRILS_10 = 61887,
- SPELL_LIGHTNING_TENDRILS_25 = 63486,
+ SPELL_CHAIN_LIGHTNING = 61879,
+ SPELL_OVERLOAD = 61869,
+ SPELL_LIGHTNING_WHIRL = 61915,
+ SPELL_LIGHTNING_WHIRL_TRIGG = 61916,
+ SPELL_LIGHTNING_TENDRILS = 61887,
+ SPELL_LIGHTNING_TENDRILS_2 = 61883,
SPELL_STORMSHIELD = 64187,
SPELL_LIGHTNING_CHANNEL_PRE = 61942,
-};
-#define SPELL_HIGH_VOLTAGE RAID_MODE(SPELL_HIGH_VOLTAGE_10, SPELL_HIGH_VOLTAGE_25)
-#define SPELL_FUSION_PUNCH RAID_MODE(SPELL_FUSION_PUNCH_10, SPELL_FUSION_PUNCH_25)
-#define SPELL_STATIC_DISRUPTION RAID_MODE(SPELL_STATIC_DISRUPTION_10, SPELL_STATIC_DISRUPTION_25)
-#define SPELL_OVERWHELMING_POWER RAID_MODE(SPELL_OVERWHELMING_POWER_10, SPELL_OVERWHELMING_POWER_25)
-#define SPELL_SHIELD_OF_RUNES RAID_MODE(SPELL_SHIELD_OF_RUNES_10, SPELL_SHIELD_OF_RUNES_25)
-#define SPELL_RUNE_OF_DEATH RAID_MODE(SPELL_RUNE_OF_DEATH_10, SPELL_RUNE_OF_DEATH_25)
-#define SPELL_LIGHTNING_BLAST RAID_MODE(SPELL_LIGHTNING_BLAST_10, SPELL_LIGHTNING_BLAST_25)
-#define SPELL_CHAIN_LIGHTNING RAID_MODE(SPELL_CHAIN_LIGHTNING_10, SPELL_CHAIN_LIGHTNING_25)
-#define SPELL_OVERLOAD RAID_MODE(SPELL_OVERLOAD_10, SPELL_OVERLOAD_25)
-#define SPELL_LIGHTNING_WHIRL RAID_MODE(SPELL_LIGHTNING_WHIRL_10, SPELL_LIGHTNING_WHIRL_25)
-#define SPELL_LIGHTNING_TENDRILS RAID_MODE(SPELL_LIGHTNING_TENDRILS_10, SPELL_LIGHTNING_TENDRILS_25)
+};
enum eEnums
{
@@ -355,7 +335,7 @@ public:
case EVENT_OVERWHELMING_POWER:
Talk(SAY_STEELBREAKER_POWER);
me->CastSpell(me->GetVictim(), SPELL_OVERWHELMING_POWER, true);
- events.RepeatEvent(RAID_MODE(61000, 36000));
+ events.Repeat(RAID_MODE(61s, 36s));
break;
case EVENT_ENRAGE:
Talk(SAY_STEELBREAKER_BERSERK);
@@ -418,7 +398,7 @@ public:
if (pInstance)
pInstance->SetData(TYPE_ASSEMBLY, NOT_STARTED);
- me->m_Events.AddEvent(new CastRunesEvent(*me), me->m_Events.CalculateTime(8000));
+ me->m_Events.AddEventAtOffset(new CastRunesEvent(*me), 8s);
}
void JustReachedHome() override
@@ -579,7 +559,7 @@ public:
if (Player* target = SelectTargetFromPlayerList(150))
me->GetMotionMaster()->MoveFollow(target, 0.0f, 0.0f);
else
- me->DespawnOrUnsummon(1);
+ me->DespawnOrUnsummon(1ms);
}
void MovementInform(uint32 type, uint32 /*id*/) override
@@ -588,7 +568,7 @@ public:
{
_boomed = true;
me->CastSpell(me, SPELL_LIGHTNING_BLAST, true);
- me->DespawnOrUnsummon(1000);
+ me->DespawnOrUnsummon(1s);
}
}
};
@@ -720,7 +700,7 @@ public:
void SpellHitTarget(Unit* /*target*/, SpellInfo const* spellInfo) override
{
- if (spellInfo->Id == SPELL_CHAIN_LIGHTNING || spellInfo->Id == uint32(RAID_MODE(61916, 63482))) // Lightning Whirl triggered
+ if (spellInfo->Id == sSpellMgr->GetSpellIdForDifficulty(SPELL_CHAIN_LIGHTNING, me) || spellInfo->Id == sSpellMgr->GetSpellIdForDifficulty(SPELL_LIGHTNING_WHIRL_TRIGG, me))
_stunnedAchievement = false;
}
@@ -797,7 +777,7 @@ public:
me->SetUnitFlag(UNIT_FLAG_STUNNED);
me->CastSpell(me, SPELL_LIGHTNING_TENDRILS, true);
- me->CastSpell(me, 61883, true);
+ me->CastSpell(me, SPELL_LIGHTNING_TENDRILS_2, true);
events.ScheduleEvent(EVENT_LIGHTNING_LAND, 16s);
events.ScheduleEvent(EVENT_LIGHTNING_FLIGHT, 1s);
break;
@@ -805,7 +785,7 @@ public:
case EVENT_LIGHTNING_LAND:
{
float speed = me->GetDistance(me->GetPositionX(), me->GetPositionY(), me->GetPositionZ()) / (1000.0f * 0.001f);
- me->MonsterMoveWithSpeed(me->GetPositionX(), me->GetPositionY(), me->GetPositionZ(), speed);
+ me->GetMotionMaster()->MovePoint(0, me->GetPositionX(), me->GetPositionY(), me->GetPositionZ(), FORCED_MOVEMENT_NONE, speed);
events.ScheduleEvent(EVENT_LAND_LAND, 1s);
break;
}
@@ -821,8 +801,8 @@ public:
me->SetRegeneratingHealth(true);
_flyTargetGUID.Clear();
- me->RemoveAura(SPELL_LIGHTNING_TENDRILS);
- me->RemoveAura(61883);
+ me->RemoveAura(sSpellMgr->GetSpellIdForDifficulty(SPELL_LIGHTNING_TENDRILS, me));
+ me->RemoveAura(SPELL_LIGHTNING_TENDRILS_2);
DoResetThreatList();
events.CancelEvent(EVENT_LIGHTNING_FLIGHT);
break;
@@ -902,7 +882,7 @@ class spell_assembly_rune_of_summoning_aura : public AuraScript
void OnRemove(AuraEffect const* /*aurEff*/, AuraEffectHandleModes /*mode*/)
{
if (TempSummon* summ = GetTarget()->ToTempSummon())
- summ->DespawnOrUnsummon(1);
+ summ->DespawnOrUnsummon(1ms);
}
void Register() override
diff --git a/src/server/scripts/Northrend/Ulduar/Ulduar/boss_auriaya.cpp b/src/server/scripts/Northrend/Ulduar/Ulduar/boss_auriaya.cpp
index 1011167987..f23da2ce32 100644
--- a/src/server/scripts/Northrend/Ulduar/Ulduar/boss_auriaya.cpp
+++ b/src/server/scripts/Northrend/Ulduar/Ulduar/boss_auriaya.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
@@ -28,40 +28,25 @@ enum AuriayaSpells
{
// BASIC
SPELL_TERRIFYING_SCREECH = 64386,
- SPELL_SENTINEL_BLAST_10 = 64389,
- SPELL_SENTINEL_BLAST_25 = 64678,
- SPELL_SONIC_SCREECH_10 = 64422,
- SPELL_SONIC_SCREECH_25 = 64688,
+ SPELL_SENTINEL_BLAST = 64389,
+ SPELL_SONIC_SCREECH = 64422,
SPELL_GUARDIAN_SWARM = 64396,
SPELL_ENRAGE = 47008,
SPELL_ACTIVATE_FERAL_DEFENDER = 64449,
// Sanctum Sentry
- SPELL_SAVAGE_POUNCE_10 = 64666,
- SPELL_SAVAGE_POUNCE_25 = 64374,
- SPELL_RIP_FLESH_10 = 64375,
- SPELL_RIP_FLESH_25 = 64667,
+ SPELL_SAVAGE_POUNCE = 64666,
+ SPELL_RIP_FLESH = 64375,
SPELL_STRENGTH_OF_THE_PACK = 64369,
// Feral Defender
SPELL_FERAL_ESSENCE = 64455,
- SPELL_FERAL_POUNCE_10 = 64478,
- SPELL_FERAL_POUNCE_25 = 64669,
- SPELL_FERAL_RUSH_10 = 64496,
- SPELL_FERAL_RUSH_25 = 64674,
+ SPELL_FERAL_POUNCE = 64478,
+ SPELL_FERAL_RUSH = 64496,
//SPELL_SEEPING_FERAL_ESSENCE_SUMMON = 64457,
- SPELL_SEEPING_FERAL_ESSENCE_10 = 64458,
- SPELL_SEEPING_FERAL_ESSENCE_25 = 64676,
+ SPELL_SEEPING_FERAL_ESSENCE = 64458,
};
-#define SPELL_SONIC_SCREECH RAID_MODE(SPELL_SONIC_SCREECH_10, SPELL_SONIC_SCREECH_25)
-#define SPELL_SENTINEL_BLAST RAID_MODE(SPELL_SENTINEL_BLAST_10, SPELL_SENTINEL_BLAST_25)
-#define SPELL_SAVAGE_POUNCE RAID_MODE(SPELL_SAVAGE_POUNCE_10, SPELL_SAVAGE_POUNCE_25)
-#define SPELL_RIP_FLESH RAID_MODE(SPELL_RIP_FLESH_10, SPELL_RIP_FLESH_25)
-#define SPELL_FERAL_POUNCE RAID_MODE(SPELL_FERAL_POUNCE_10, SPELL_FERAL_POUNCE_25)
-#define SPELL_FERAL_RUSH RAID_MODE(SPELL_FERAL_RUSH_10, SPELL_FERAL_RUSH_25)
-//#define SPELL_SEEPING_FERAL_ESSENCE RAID_MODE(SPELL_SEEPING_FERAL_ESSENCE_10, SPELL_SEEPING_FERAL_ESSENCE_25)
-
enum AuriayaNPC
{
NPC_FERAL_DEFENDER = 34035,
@@ -255,7 +240,7 @@ public:
case EVENT_SENTINEL_BLAST:
me->CastSpell(me, SPELL_SENTINEL_BLAST, false);
events.Repeat(35s);
- events.DelayEvents(5000, 0);
+ events.DelayEvents(5s, 0);
break;
case EVENT_RESPAWN_FERAL_DEFENDER:
{
@@ -393,7 +378,7 @@ public:
else
{
summons.DespawnAll();
- me->DespawnOrUnsummon(1);
+ me->DespawnOrUnsummon(1ms);
}
if (_feralEssenceStack)
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 77d1053fce..6946daa78a 100644
--- a/src/server/scripts/Northrend/Ulduar/Ulduar/boss_flame_leviathan.cpp
+++ b/src/server/scripts/Northrend/Ulduar/Ulduar/boss_flame_leviathan.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
@@ -381,8 +381,7 @@ public:
{
me->RemoveUnitFlag(UNIT_FLAG_NON_ATTACKABLE);
TurnGates(true, false);
- me->MonsterMoveWithSpeed(homePos.GetPositionX(), homePos.GetPositionY(), homePos.GetPositionZ(), 100.0f);
- me->UpdatePosition(homePos);
+ me->GetMotionMaster()->MovePoint(0, homePos.GetPositionX(), homePos.GetPositionY(), homePos.GetPositionZ(), FORCED_MOVEMENT_NONE, 100.0f);
_speakTimer = 60000;
}
else if (_speakTimer > 63500)
@@ -748,7 +747,7 @@ public:
_despawnTimer = 0;
if (Vehicle* veh = me->GetVehicle())
if (veh->GetPassenger(0) == me || veh->GetPassenger(1) == me)
- me->DespawnOrUnsummon(1);
+ me->DespawnOrUnsummon(1ms);
}
}
@@ -1090,7 +1089,8 @@ public:
{
summons.DespawnAll();
_spellTimer = 0;
- Start(false, false, ObjectGuid::Empty, nullptr, false, true);
+ me->SetWalk(true);
+ Start(false, ObjectGuid::Empty, nullptr, false, true);
if (Aura* aur = me->AddAura(SPELL_FREYA_DUMMY_YELLOW, me))
{
aur->SetMaxDuration(-1);
@@ -1157,7 +1157,7 @@ public:
_beamTimer = 0;
_removeTimer = 1;
- me->DespawnOrUnsummon(5 * IN_MILLISECONDS);
+ me->DespawnOrUnsummon(5s);
}
}
if (_removeTimer)
@@ -1364,7 +1364,7 @@ public:
liquid->CastSpell(liquid, SPELL_DUST_CLOUD_IMPACT, true);
}
- me->DespawnOrUnsummon(1);
+ me->DespawnOrUnsummon(1ms);
}
}
@@ -1416,7 +1416,7 @@ public:
_startTimer -= diff;
if (_startTimer <= 0)
{
- me->GetMotionMaster()->MovePath(3000000 + urand(0, 11), true);
+ me->GetMotionMaster()->MoveWaypoint(3000000 + urand(0, 11), true);
_startTimer = 0;
}
}
@@ -1750,7 +1750,7 @@ class spell_vehicle_grab_pyrite : public SpellScript
target->CastSpell(seat, GetEffectValue());
if (target->IsCreature())
- target->ToCreature()->DespawnOrUnsummon(1300);
+ target->ToCreature()->DespawnOrUnsummon(1300ms);
}
}
}
diff --git a/src/server/scripts/Northrend/Ulduar/Ulduar/boss_freya.cpp b/src/server/scripts/Northrend/Ulduar/Ulduar/boss_freya.cpp
index df194ce325..61841533ba 100644
--- a/src/server/scripts/Northrend/Ulduar/Ulduar/boss_freya.cpp
+++ b/src/server/scripts/Northrend/Ulduar/Ulduar/boss_freya.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
@@ -29,31 +29,23 @@ enum FreyaSpells
SPELL_AUTO_GROW = 62559,
SPELL_LIFEBINDER_PHERONOMES = 62619,
SPELL_LIFEBINDER_VISUAL = 62579,
- SPELL_LIFEBINDER_HEAL_10 = 62584,
- SPELL_LIFEBINDER_HEAL_25 = 64185,
+ SPELL_LIFEBINDER_HEAL = 62584,
// FREYA
- SPELL_TOUCH_OF_EONAR_10 = 62528,
- SPELL_TOUCH_OF_EONAR_25 = 62892,
+ SPELL_TOUCH_OF_EONAR = 62528,
SPELL_ATTUNED_TO_NATURE = 62519,
SPELL_SUMMON_LIFEBINDER = 62870,
- SPELL_SUNBEAM_10 = 62623,
- SPELL_SUNBEAM_25 = 62872,
+ SPELL_SUNBEAM = 62623,
SPELL_NATURE_BOMB_FLIGHT = 64648,
- SPELL_NATURE_BOMB_DAMAGE_10 = 64587,
- SPELL_NATURE_BOMB_DAMAGE_25 = 64650,
+ SPELL_NATURE_BOMB_DAMAGE = 64587,
SPELL_GREEN_BANISH_STATE = 32567,
SPELL_BERSERK = 47008,
// HARD MODE
- SPELL_GROUND_TREMOR_FREYA_10 = 62437,
- SPELL_GROUND_TREMOR_FREYA_25 = 62859,
- SPELL_IRON_ROOTS_FREYA_10 = 62862,
- SPELL_IRON_ROOTS_FREYA_25 = 62439,
- SPELL_IRON_ROOTS_FREYA_DAMAGE_10 = 62861,
- SPELL_IRON_ROOTS_FREYA_DAMAGE_25 = 62438,
- SPELL_UNSTABLE_SUN_FREYA_DAMAGE_10 = 62451,
- SPELL_UNSTABLE_SUN_FREYA_DAMAGE_25 = 62865,
+ SPELL_GROUND_TREMOR_FREYA = 62437,
+ SPELL_IRON_ROOTS_FREYA = 62862,
+ SPELL_IRON_ROOTS_FREYA_DAMAGE = 62861,
+ SPELL_UNSTABLE_SUN_FREYA_DAMAGE = 62451,
SPELL_UNSTABLE_SUN_VISUAL = 62216,
// ELDERS
@@ -64,86 +56,49 @@ enum FreyaSpells
// BRIGHTLEAF
SPELL_BRIGHTLEAF_FLUX = 62239,
- SPELL_SOLAR_FLARE_10 = 62240,
- SPELL_SOLAR_FLARE_25 = 64087,
+ SPELL_SOLAR_FLARE = 62240,
SPELL_UNSTABLE_SUN_BEAM_AURA = 62211,
SPELL_PHOTOSYNTHESIS = 62209,
- SPELL_UNSTABLE_SUN_DAMAGE_10 = 62217,
- SPELL_UNSTABLE_SUN_DAMAGE_25 = 62922,
+ SPELL_UNSTABLE_SUN_DAMAGE = 62217,
// IRONBRANCH
- SPELL_IMPALE_10 = 62310,
- SPELL_IMPALE_25 = 62928,
- SPELL_IRON_ROOTS_10 = 62275,
- SPELL_IRON_ROOTS_25 = 62929,
- SPELL_IRON_ROOTS_DAMAGE_10 = 62283,
- SPELL_IRON_ROOTS_DAMAGE_25 = 62930,
- SPELL_THORN_SWARM_10 = 62285,
- SPELL_THORN_SWARM_25 = 62931,
+ SPELL_IMPALE = 62310,
+ SPELL_IRON_ROOTS = 62275,
+ SPELL_IRON_ROOTS_DAMAGE = 62283,
+ SPELL_THORN_SWARM = 62285,
// STONEBARK
SPELL_FISTS_OF_STONE = 62344,
- SPELL_GROUND_TREMOR_10 = 62325,
- SPELL_GROUND_TREMOR_25 = 62932,
- SPELL_PETRIFIED_BARK_10 = 62337,
- SPELL_PETRIFIED_BARK_25 = 62933,
+ SPELL_GROUND_TREMOR = 62325,
+ SPELL_PETRIFIED_BARK = 62337,
// SNAPLASHER
- SPELL_HARDENED_BARK_10 = 62664,
- SPELL_HARDENED_BARK_25 = 64191,
+ SPELL_HARDENED_BARK = 62664,
// ANCIENT WATER SPIRIT
- SPELL_TIDAL_WAVE_10 = 62653,
- SPELL_TIDAL_WAVE_25 = 62935,
- SPELL_TIDAL_WAVE_DAMAGE_10 = 62654,
- SPELL_TIDAL_WAVE_DAMAGE_25 = 62936,
+ SPELL_TIDAL_WAVE = 62653,
+ SPELL_TIDAL_WAVE_DAMAGE = 62654,
SPELL_TIDAL_WAVE_AURA = 62655,
// STORM LASHER
- SPELL_LIGHTNING_LASH_10 = 62648,
- SPELL_LIGHTNING_LASH_25 = 62939,
- SPELL_STORMBOLT_10 = 62649,
- SPELL_STORMBOLT_25 = 62938,
+ SPELL_LIGHTNING_LASH = 62648,
+ SPELL_STORMBOLT = 62649,
// ANCIENT CONSERVATOR
SPELL_CONSERVATOR_GRIP = 62532,
- SPELL_NATURE_FURY_10 = 62589,
- SPELL_NATURE_FURY_25 = 63571,
+ SPELL_NATURE_FURY = 62589,
SPELL_POTENT_PHEROMONES = 62541,
SPELL_HEALTHY_SPORE_VISUAL = 62538,
SPELL_HEALTHY_SPORE_SUMMON = 62566,
// DETONATING LASHER
- SPELL_DETONATE_10 = 62598,
- SPELL_DETONATE_25 = 62937,
+ SPELL_DETONATE = 62598,
SPELL_FLAME_LASH = 62608,
// ACHIEVEMENT
SPELL_DEFORESTATION_CREDIT = 65015,
};
-#define SPELL_GROUND_TREMOR RAID_MODE(SPELL_GROUND_TREMOR_10, SPELL_GROUND_TREMOR_25)
-#define SPELL_PETRIFIED_BARK RAID_MODE(SPELL_PETRIFIED_BARK_10, SPELL_PETRIFIED_BARK_25)
-#define SPELL_IRON_ROOTS RAID_MODE(SPELL_IRON_ROOTS_10, SPELL_IRON_ROOTS_25)
-#define SPELL_IMPALE RAID_MODE(SPELL_IMPALE_10, SPELL_IMPALE_25)
-#define SPELL_THORN_SWARM RAID_MODE(SPELL_THORN_SWARM_10, SPELL_THORN_SWARM_25)
-#define SPELL_UNSTABLE_SUN_DAMAGE RAID_MODE(SPELL_UNSTABLE_SUN_DAMAGE_10, SPELL_UNSTABLE_SUN_DAMAGE_25)
-#define SPELL_SOLAR_FLARE RAID_MODE(SPELL_SOLAR_FLARE_10, SPELL_SOLAR_FLARE_25)
-#define SPELL_TOUCH_OF_EONAR RAID_MODE(SPELL_TOUCH_OF_EONAR_10, SPELL_TOUCH_OF_EONAR_25)
-#define SPELL_LIFEBINDER_HEAL RAID_MODE(SPELL_LIFEBINDER_HEAL_10, SPELL_LIFEBINDER_HEAL_25)
-#define SPELL_TIDAL_WAVE RAID_MODE(SPELL_TIDAL_WAVE_10, SPELL_TIDAL_WAVE_25)
-#define SPELL_TIDAL_WAVE_DAMAGE RAID_MODE(SPELL_TIDAL_WAVE_DAMAGE_10, SPELL_TIDAL_WAVE_DAMAGE_25)
-#define SPELL_NATURE_FURY RAID_MODE(SPELL_NATURE_FURY_10, SPELL_NATURE_FURY_25)
-#define SPELL_HARDENED_BARK RAID_MODE(SPELL_HARDENED_BARK_10, SPELL_HARDENED_BARK_25)
-#define SPELL_DETONATE RAID_MODE(SPELL_DETONATE_10, SPELL_DETONATE_25)
-//#define SPELL_NATURE_BOMB_DAMAGE RAID_MODE(SPELL_NATURE_BOMB_DAMAGE_10, SPELL_NATURE_BOMB_DAMAGE_25)
-#define SPELL_SUNBEAM RAID_MODE(SPELL_SUNBEAM_10, SPELL_SUNBEAM_25)
-#define SPELL_GROUND_TREMOR_FREYA RAID_MODE(SPELL_GROUND_TREMOR_FREYA_10, SPELL_GROUND_TREMOR_FREYA_25)
-#define SPELL_IRON_ROOTS_FREYA RAID_MODE(SPELL_IRON_ROOTS_FREYA_10, SPELL_IRON_ROOTS_FREYA_25)
-#define SPELL_UNSTABLE_SUN_FREYA_DAMAGE RAID_MODE(SPELL_UNSTABLE_SUN_FREYA_DAMAGE_10, SPELL_UNSTABLE_SUN_FREYA_DAMAGE_25)
-#define SPELL_LIGHTNING_LASH RAID_MODE(SPELL_LIGHTNING_LASH_10, SPELL_LIGHTNING_LASH_25)
-#define SPELL_STORMBOLT RAID_MODE(SPELL_STORMBOLT_10, SPELL_STORMBOLT_25)
-
enum FreyaEvents
{
// FREYA
@@ -983,9 +938,9 @@ public:
if (Unit* target = ObjectAccessor::GetUnit(*me, me->ToTempSummon()->GetSummonerGUID()))
{
if (me->GetEntry() == NPC_IRON_ROOT_TRIGGER) // Iron Branch spell
- target->RemoveAura(target->GetMap()->Is25ManRaid() ? SPELL_IRON_ROOTS_DAMAGE_25 : SPELL_IRON_ROOTS_DAMAGE_10);
+ target->RemoveAura(sSpellMgr->GetSpellIdForDifficulty(SPELL_IRON_ROOTS_DAMAGE, me));
else
- target->RemoveAura(target->GetMap()->Is25ManRaid() ? SPELL_IRON_ROOTS_FREYA_DAMAGE_25 : SPELL_IRON_ROOTS_FREYA_DAMAGE_10);
+ target->RemoveAura(sSpellMgr->GetSpellIdForDifficulty(SPELL_IRON_ROOTS_FREYA_DAMAGE, me));
}
}
};
@@ -1023,8 +978,8 @@ public:
if (_healTimer >= 12000)
{
me->RemoveAurasDueToSpell(SPELL_AUTO_GROW);
- me->CastSpell(me, me->GetMap()->Is25ManRaid() ? SPELL_LIFEBINDER_HEAL_25 : SPELL_LIFEBINDER_HEAL_10, true);
- me->DespawnOrUnsummon(2000);
+ me->CastSpell(me, SPELL_LIFEBINDER_HEAL, true);
+ me->DespawnOrUnsummon(2s);
_healTimer = 0;
}
}
@@ -1063,7 +1018,7 @@ public:
if (_despawnTimer >= 22000)
{
me->RemoveAurasDueToSpell(SPELL_AUTO_GROW);
- me->DespawnOrUnsummon(2200);
+ me->DespawnOrUnsummon(2200ms);
_despawnTimer = 0;
}
}
@@ -1203,7 +1158,7 @@ public:
if (Unit* target = SelectTargetFromPlayerList(80))
AttackStart(target);
else
- me->DespawnOrUnsummon(1);
+ me->DespawnOrUnsummon(1ms);
events.Repeat(10s);
break;
}
@@ -1249,8 +1204,8 @@ public:
_explodeTimer += diff;
if (_explodeTimer >= 11000)
{
- me->CastSpell(me, me->GetMap()->Is25ManRaid() ? SPELL_NATURE_BOMB_DAMAGE_25 : SPELL_NATURE_BOMB_DAMAGE_10, false);
- me->DespawnOrUnsummon(1000);
+ me->CastSpell(me, SPELL_NATURE_BOMB_DAMAGE, false);
+ me->DespawnOrUnsummon(1s);
_explodeTimer = 0;
}
diff --git a/src/server/scripts/Northrend/Ulduar/Ulduar/boss_general_vezax.cpp b/src/server/scripts/Northrend/Ulduar/Ulduar/boss_general_vezax.cpp
index a4351a818e..b71b583fef 100644
--- a/src/server/scripts/Northrend/Ulduar/Ulduar/boss_general_vezax.cpp
+++ b/src/server/scripts/Northrend/Ulduar/Ulduar/boss_general_vezax.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
@@ -266,7 +266,7 @@ public:
Talk(SAY_EMOTE_SURGE_OF_DARKNESS);
me->CastSpell(me, SPELL_SURGE_OF_DARKNESS, false);
events.Repeat(63s);
- events.DelayEvents(10000, 1);
+ events.DelayEvents(10s, 1);
break;
case EVENT_SPELL_MARK_OF_THE_FACELESS:
{
@@ -312,8 +312,8 @@ public:
sv->GetMotionMaster()->MoveCharge(1852.78f, 81.38f, 342.461f, 28.0f);
}
- events.DelayEvents(12000, 0);
- events.DelayEvents(12000, 1);
+ events.DelayEvents(12s, 0);
+ events.DelayEvents(12s, 1);
events.ScheduleEvent(EVENT_SARONITE_VAPORS_SWIRL, 6s);
}
}
@@ -450,7 +450,7 @@ public:
void JustDied(Unit* /*killer*/) override
{
- me->DespawnOrUnsummon(3000);
+ me->DespawnOrUnsummon(3s);
if (pInstance)
if (Creature* vezax = ObjectAccessor::GetCreature(*me, pInstance->GetGuidData(TYPE_VEZAX)))
diff --git a/src/server/scripts/Northrend/Ulduar/Ulduar/boss_hodir.cpp b/src/server/scripts/Northrend/Ulduar/Ulduar/boss_hodir.cpp
index b318a09207..ae301a541a 100644
--- a/src/server/scripts/Northrend/Ulduar/Ulduar/boss_hodir.cpp
+++ b/src/server/scripts/Northrend/Ulduar/Ulduar/boss_hodir.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
@@ -58,8 +58,7 @@ enum HodirSpellData
SPELL_ICE_SHARDS_BIG = 65370,
SPELL_SNOWDRIFT = 62463,
- SPELL_FROZEN_BLOWS_10 = 62478,
- SPELL_FROZEN_BLOWS_25 = 63512,
+ SPELL_FROZEN_BLOWS = 62478,
// Helpers:
SPELL_PRIEST_DISPELL_MAGIC = 63499,
@@ -70,9 +69,8 @@ enum HodirSpellData
SPELL_DRUID_STARLIGHT_AREA_AURA = 62807,
SPELL_SHAMAN_LAVA_BURST = 61924,
- SPELL_SHAMAN_STORM_CLOUD_10 = 65123,
- SPELL_SHAMAN_STORM_CLOUD_25 = 65133,
- SPELL_SHAMAN_STORM_POWER_10 = 63711,
+ SPELL_SHAMAN_STORM_CLOUD = 65123,
+ SPELL_SHAMAN_STORM_POWER = 63711,
SPELL_SHAMAN_STORM_POWER_25 = 65134,
SPELL_MAGE_FIREBALL = 61909,
@@ -153,9 +151,6 @@ enum HodirText
TEXT_EMOTE_BLOW = 8,
};
-#define SPELL_FROZEN_BLOWS RAID_MODE(SPELL_FROZEN_BLOWS_10, SPELL_FROZEN_BLOWS_25)
-#define SPELL_SHAMAN_STORM_CLOUD RAID_MODE(SPELL_SHAMAN_STORM_CLOUD_10, SPELL_SHAMAN_STORM_CLOUD_25)
-
enum HodirSounds
{
SOUND_HODIR_AGGRO = 15552,
@@ -483,7 +478,7 @@ public:
{
Talk(TEXT_EMOTE_BLOW);
Talk(TEXT_STALACTITE);
- me->CastSpell(me, Is25ManRaid()? SPELL_FROZEN_BLOWS_25 : SPELL_FROZEN_BLOWS_10, true);
+ me->CastSpell(me, SPELL_FROZEN_BLOWS, true);
}
break;
case EVENT_FREEZE:
@@ -704,18 +699,18 @@ public:
if (Unit* s = me->ToTempSummon()->GetSummonerUnit())
{
if ((s->IsPlayer() && !s->HasAura(SPELL_FLASH_FREEZE_TRAPPED_PLAYER)) || (s->IsCreature() && !s->HasAura(SPELL_FLASH_FREEZE_TRAPPED_NPC)))
- me->DespawnOrUnsummon(2000);
+ me->DespawnOrUnsummon(2s);
else if (s->IsPlayer())
if (InstanceScript* instanceScript = me->GetInstanceScript())
if (instanceScript->GetData(TYPE_HODIR) == NOT_STARTED)
{
s->CastSpell(s, SPELL_FLASH_FREEZE_INSTAKILL, true);
- me->DespawnOrUnsummon(2000);
+ me->DespawnOrUnsummon(2s);
}
}
else
{
- me->DespawnOrUnsummon(2000);
+ me->DespawnOrUnsummon(2s);
}
}
}
@@ -1008,8 +1003,9 @@ public:
void SpellHitTarget(Unit* target, SpellInfo const* spell) override
{
- if (target && spell->Id == SPELL_SHAMAN_STORM_CLOUD)
- if (Aura* a = target->GetAura(SPELL_SHAMAN_STORM_CLOUD, me->GetGUID()))
+ uint32 spellid = sSpellMgr->GetSpellIdForDifficulty(SPELL_SHAMAN_STORM_CLOUD, me);
+ if (target && spell->Id == spellid)
+ if (Aura* a = target->GetAura(spellid, me->GetGUID()))
a->SetStackAmount(spell->StackAmount);
}
@@ -1044,10 +1040,13 @@ public:
events.Repeat(2600ms);
break;
case EVENT_SHAMAN_STORM_CLOUD:
- if (Player* target = ScriptedAI::SelectTargetFromPlayerList(35.0f, SPELL_SHAMAN_STORM_CLOUD))
- me->CastSpell(target, SPELL_SHAMAN_STORM_CLOUD, false);
- events.Repeat(30s);
- break;
+ {
+ uint32 spellid = sSpellMgr->GetSpellIdForDifficulty(SPELL_SHAMAN_STORM_CLOUD, me);
+ if (Player* target = ScriptedAI::SelectTargetFromPlayerList(35.0f, spellid))
+ me->CastSpell(target, spellid, false);
+ events.Repeat(30s);
+ break;
+ }
}
}
@@ -1403,7 +1402,7 @@ class spell_hodir_storm_power_aura : public AuraScript
void OnApply(AuraEffect const* /*aurEff*/, AuraEffectHandleModes /*mode*/)
{
if (Unit* caster = GetCaster())
- if (Aura* a = caster->GetAura(GetId() == SPELL_SHAMAN_STORM_POWER_10 ? SPELL_SHAMAN_STORM_CLOUD_10 : SPELL_SHAMAN_STORM_CLOUD_25))
+ if (Aura* a = caster->GetAura(sSpellMgr->GetSpellIdForDifficulty(SPELL_SHAMAN_STORM_CLOUD, caster)))
a->ModStackAmount(-1);
}
@@ -1427,14 +1426,14 @@ class spell_hodir_storm_cloud_aura : public AuraScript
bool Validate(SpellInfo const* /*spellInfo*/) override
{
- return ValidateSpellInfo({ SPELL_SHAMAN_STORM_CLOUD_10, SPELL_SHAMAN_STORM_POWER_10, SPELL_SHAMAN_STORM_POWER_25 });
+ return ValidateSpellInfo({ SPELL_SHAMAN_STORM_POWER });
}
void HandleEffectPeriodic(AuraEffect const* /*aurEff*/)
{
PreventDefaultAction();
if (Unit* target = GetTarget())
- target->CastSpell((Unit*)nullptr, (GetId() == SPELL_SHAMAN_STORM_CLOUD_10 ? SPELL_SHAMAN_STORM_POWER_10 : SPELL_SHAMAN_STORM_POWER_25), true);
+ target->CastSpell((Unit*)nullptr, (sSpellMgr->GetSpellIdForDifficulty(SPELL_SHAMAN_STORM_POWER, GetCaster())), true);
}
void Register() override
@@ -1528,7 +1527,7 @@ public:
bool OnCheck(Player* player, Unit* /*target*/, uint32 /*criteria_id*/) override
{
- return player && player->HasAllAuras(SPELL_MAGE_TOASTY_FIRE_AURA, SPELL_DRUID_STARLIGHT_AREA_AURA, SPELL_SHAMAN_STORM_POWER_10);
+ return player && player->HasAllAuras(SPELL_MAGE_TOASTY_FIRE_AURA, SPELL_DRUID_STARLIGHT_AREA_AURA, SPELL_SHAMAN_STORM_POWER);
}
};
diff --git a/src/server/scripts/Northrend/Ulduar/Ulduar/boss_ignis.cpp b/src/server/scripts/Northrend/Ulduar/Ulduar/boss_ignis.cpp
index cda5a3629c..0b933628fa 100644
--- a/src/server/scripts/Northrend/Ulduar/Ulduar/boss_ignis.cpp
+++ b/src/server/scripts/Northrend/Ulduar/Ulduar/boss_ignis.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
@@ -26,37 +26,33 @@
#include "SpellScriptLoader.h"
#include "ulduar.h"
-#define SPELL_FLAME_JETS_10 62680
-#define SPELL_FLAME_JETS_25 63472
-#define S_FLAME_JETS RAID_MODE(SPELL_FLAME_JETS_10, SPELL_FLAME_JETS_25)
-#define SPELL_SCORCH_10 62546
-#define SPELL_SCORCH_25 63474
-#define S_SCORCH RAID_MODE(SPELL_SCORCH_10, SPELL_SCORCH_25)
-#define SPELL_ACTIVATE_CONSTRUCT 62488
-#define SPELL_STRENGTH_OF_THE_CREATOR 64473
-#define SPELL_SLAG_POT_10 62717
-#define SPELL_SLAG_POT_25 63477
-#define S_SLAG_POT RAID_MODE(SPELL_SLAG_POT_10, SPELL_SLAG_POT_25)
-#define SPELL_BERSERK 64238
-#define SPELL_GRAB 62707
-#define SPELL_GRAB_TRIGGERED 62708
-#define SPELL_GRAB_CONTROL_2 62711
-
-#define SPELL_SCORCHED_GROUND_10 62548
-#define SPELL_SCORCHED_GROUND_25 63476
-#define S_SCORCHED_GROUND RAID_MODE(SPELL_SCORCHED_GROUND_10, SPELL_SCORCHED_GROUND_25)
-#define SPELL_HEAT_AREA 62343
-#define SPELL_HEAT_BUFF 65667
-#define SPELL_MOLTEN 62373
-#define SPELL_BRITTLE_10 62382
-#define SPELL_BRITTLE_25 67114
-#define S_BRITTLE RAID_MODE(SPELL_BRITTLE_10, SPELL_BRITTLE_25)
-#define SPELL_SHATTER 62383
-
-#define BOSS_IGNIS 33118
-#define NPC_IRON_CONSTRUCT 33121
-#define NPC_SCORCHED_GROUND 33123
-#define NPC_WATER_TRIGGER 22515
+enum IgnisSpellData
+{
+ SPELL_FLAME_JETS = 62680,
+ SPELL_SCORCH = 62546,
+ SPELL_ACTIVATE_CONSTRUCT = 62488,
+ SPELL_STRENGTH_OF_THE_CREATOR = 64473,
+ SPELL_SLAG_POT = 62717,
+ SPELL_BERSERK = 64238,
+ SPELL_GRAB = 62707,
+ SPELL_GRAB_TRIGGERED = 62708,
+ SPELL_GRAB_CONTROL_2 = 62711,
+
+ SPELL_SCORCHED_GROUND = 62548,
+ SPELL_HEAT_AREA = 62343,
+ SPELL_HEAT_BUFF = 65667,
+ SPELL_MOLTEN = 62373,
+ SPELL_BRITTLE = 62382,
+ SPELL_SHATTER = 62383,
+};
+
+enum IgnisNPCs
+{
+ BOSS_IGNIS = 33118,
+ NPC_IRON_CONSTRUCT = 33121,
+ NPC_SCORCHED_GROUND = 33123,
+ NPC_WATER_TRIGGER = 22515,
+};
enum Texts
{
@@ -147,7 +143,7 @@ public:
void DamageTaken(Unit* attacker, uint32& damage, DamageEffectType, SpellSchoolMask) override
{
- if (damage >= RAID_MODE(3000U, 5000U) && me->GetAura(S_BRITTLE))
+ if (damage >= RAID_MODE(3000U, 5000U) && me->GetAura(sSpellMgr->GetSpellIdForDifficulty(SPELL_BRITTLE, me)))
{
me->CastSpell(me, SPELL_SHATTER, true);
Unit::Kill(attacker, me);
@@ -177,7 +173,7 @@ public:
if (me->FindNearestCreature(NPC_WATER_TRIGGER, 18.0f, true))
{
me->RemoveAura(a);
- me->CastSpell(me, S_BRITTLE, true);
+ me->CastSpell(me, SPELL_BRITTLE, true);
}
}
else
@@ -247,7 +243,7 @@ public:
bShattered = false;
lastShatterMSTime = 0;
events.Reset();
- events.ScheduleEvent(EVENT_ACTIVATE_CONSTRUCT, RAID_MODE(40000, 30000));
+ events.ScheduleEvent(EVENT_ACTIVATE_CONSTRUCT, RAID_MODE(40s, 30s));
events.ScheduleEvent(EVENT_SPELL_SCORCH, 10s);
events.ScheduleEvent(EVENT_SPELL_FLAME_JETS, 32s);
events.ScheduleEvent(EVENT_GRAB, 25s);
@@ -312,7 +308,7 @@ public:
if (caster && spell->Id == SPELL_GRAB_CONTROL_2)
{
//caster->ClearUnitState(UNIT_STATE_ONVEHICLE);
- me->CastSpell(caster, S_SLAG_POT, true);
+ me->CastSpell(caster, SPELL_SLAG_POT, true);
}
}
@@ -347,14 +343,14 @@ public:
me->CastSpell(me, SPELL_BERSERK, true);
break;
}
- events.RepeatEvent(RAID_MODE(40000, 30000));
+ events.Repeat(RAID_MODE(40s, 30s));
break;
case EVENT_SPELL_SCORCH:
Talk(SAY_SCORCH);
me->SetControlled(true, UNIT_STATE_ROOT);
me->DisableRotate(true);
me->SendMovementFlagUpdate();
- me->CastSpell(me->GetVictim(), S_SCORCH, false);
+ me->CastSpell(me->GetVictim(), SPELL_SCORCH, false);
events.Repeat(20s);
events.RescheduleEvent(EVENT_ENABLE_ROTATE, 3s);
break;
@@ -364,7 +360,7 @@ public:
break;
case EVENT_SPELL_FLAME_JETS:
Talk(EMOTE_JETS);
- me->CastSpell(me->GetVictim(), S_FLAME_JETS, false);
+ me->CastSpell(me->GetVictim(), SPELL_FLAME_JETS, false);
events.Repeat(25s);
break;
case EVENT_GRAB:
@@ -431,7 +427,7 @@ class spell_ignis_scorch_aura : public AuraScript
bool Validate(SpellInfo const* /*spellInfo*/) override
{
- return ValidateSpellInfo({ SPELL_SCORCHED_GROUND_10, SPELL_SCORCHED_GROUND_25 });
+ return ValidateSpellInfo({ SPELL_SCORCHED_GROUND });
}
void HandleEffectPeriodic(AuraEffect const* aurEff)
@@ -441,7 +437,7 @@ class spell_ignis_scorch_aura : public AuraScript
if (Creature* summon = caster->SummonCreature(NPC_SCORCHED_GROUND, caster->GetPositionX() + 20.0f * cos(caster->GetOrientation()), caster->GetPositionY() + 20.0f * std::sin(caster->GetOrientation()), 361.0f, 0.0f, TEMPSUMMON_TIMED_DESPAWN, 30000))
{
if (!summon->FindNearestCreature(NPC_WATER_TRIGGER, 25.0f, true)) // must be away from the water
- summon->CastSpell(summon, (aurEff->GetId() == SPELL_SCORCH_10 ? SPELL_SCORCHED_GROUND_10 : SPELL_SCORCHED_GROUND_25), true);
+ summon->CastSpell(summon, SPELL_SCORCHED_GROUND, true);
}
}
@@ -474,12 +470,10 @@ class spell_ignis_grab_initial : public SpellScript
enum SlagPot
{
- SPELL_SLAG_POT_DAMAGE_1 = 65722,
- SPELL_SLAG_POT_DAMAGE_2 = 65723,
+ SPELL_SLAG_POT_DAMAGE = 65722,
SPELL_SCORCH_DAMAGE_1 = 62549,
SPELL_SCORCH_DAMAGE_2 = 63475,
- SPELL_SLAG_IMBUED_1 = 62836,
- SPELL_SLAG_IMBUED_2 = 63536
+ SPELL_SLAG_IMBUED = 62836,
};
class spell_ignis_slag_pot_aura : public AuraScript
@@ -490,12 +484,10 @@ class spell_ignis_slag_pot_aura : public AuraScript
{
return ValidateSpellInfo(
{
- SPELL_SLAG_POT_DAMAGE_1,
- SPELL_SLAG_POT_DAMAGE_2,
+ SPELL_SLAG_POT_DAMAGE,
SPELL_SCORCH_DAMAGE_1,
SPELL_SCORCH_DAMAGE_2,
- SPELL_SLAG_IMBUED_1,
- SPELL_SLAG_IMBUED_2
+ SPELL_SLAG_IMBUED
});
}
@@ -503,7 +495,7 @@ class spell_ignis_slag_pot_aura : public AuraScript
{
if (Unit* caster = GetCaster())
if (Unit* target = GetTarget())
- caster->CastSpell(target, (GetId() == SPELL_SLAG_POT_10 ? SPELL_SLAG_POT_DAMAGE_1 : SPELL_SLAG_POT_DAMAGE_2), true);
+ caster->CastSpell(target, SPELL_SLAG_POT_DAMAGE, true);
}
void OnApply(AuraEffect const* /*aurEff*/, AuraEffectHandleModes /*mode*/)
@@ -522,7 +514,7 @@ class spell_ignis_slag_pot_aura : public AuraScript
target->ApplySpellImmune(GetId(), IMMUNITY_ID, SPELL_SCORCH_DAMAGE_1, false);
target->ApplySpellImmune(GetId(), IMMUNITY_ID, SPELL_SCORCH_DAMAGE_2, false);
if (target->IsAlive())
- target->CastSpell(target, (GetId() == SPELL_SLAG_POT_10 ? SPELL_SLAG_IMBUED_1 : SPELL_SLAG_IMBUED_2), true);
+ target->CastSpell(target, SPELL_SLAG_IMBUED, true);
}
}
diff --git a/src/server/scripts/Northrend/Ulduar/Ulduar/boss_kologarn.cpp b/src/server/scripts/Northrend/Ulduar/Ulduar/boss_kologarn.cpp
index 34f5cf1555..df8e2ea3e2 100644
--- a/src/server/scripts/Northrend/Ulduar/Ulduar/boss_kologarn.cpp
+++ b/src/server/scripts/Northrend/Ulduar/Ulduar/boss_kologarn.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
@@ -45,56 +45,33 @@ enum KologarnSpells
SPELL_KOLOGARN_REDUCE_PARRY = 64651,
// BASIC
- SPELL_OVERHEAD_SMASH_10 = 63356,
- SPELL_OVERHEAD_SMASH_25 = 64003,
- SPELL_ONEARMED_OVERHEAD_SMASH_10 = 63573,
- SPELL_ONEARMED_OVERHEAD_SMASH_25 = 64006,
- SPELL_PETRIFYING_BREATH_10 = 62030,
- SPELL_PETRIFYING_BREATH_25 = 63980,
- SPELL_STONE_SHOUT_10 = 63716,
- SPELL_STONE_SHOUT_25 = 64005,
+ SPELL_OVERHEAD_SMASH = 63356,
+ SPELL_ONEARMED_OVERHEAD_SMASH = 63573,
+ SPELL_PETRIFYING_BREATH = 62030,
+ SPELL_STONE_SHOUT = 63716,
// EYEBEAM
SPELL_FOCUSED_EYEBEAM_SUMMON = 63342,
- SPELL_FOCUSED_EYEBEAM_10 = 63347,
- SPELL_FOCUSED_EYEBEAM_25 = 63977,
+ SPELL_FOCUSED_EYEBEAM = 63347,
SPELL_FOCUSED_EYEBEAM_RIGHT = 63702,
SPELL_FOCUSED_EYEBEAM_LEFT = 63676,
// ARMS
- SPELL_ARM_DEAD_10 = 63629,
- SPELL_ARM_DEAD_25 = 63979,
- SPELL_RUBBLE_FALL_10 = 63821,
- SPELL_RUBBLE_FALL_25 = 64001,
+ SPELL_ARM_DEAD = 63629,
+ SPELL_RUBBLE_FALL = 63821,
SPELL_ARM_RESPAWN_VISUAL = 64753,
// LEFT ARM
- SPELL_ARM_SWEEP_10 = 63766,
- SPELL_ARM_SWEEP_25 = 63983,
+ SPELL_ARM_SWEEP = 63766,
// RIGHT ARM
- SPELL_STONE_GRIP_10 = 62166,
- SPELL_STONE_GRIP_25 = 63981,
- SPELL_RIDE_RIGHT_ARM_10 = 62056,
- SPELL_RIDE_RIGHT_ARM_25 = 63985,
+ SPELL_STONE_GRIP = 62166,
+ SPELL_RIDE_RIGHT_ARM = 62056,
// RUBBLE TRASH
- SPELL_RUBBLE_ATTACK_10 = 63818,
- SPELL_RUBBLE_ATTACK_25 = 63978,
+ SPELL_RUBBLE_ATTACK = 63818,
};
-#define SPELL_PETRIFYING_BREATH RAID_MODE(SPELL_PETRIFYING_BREATH_10, SPELL_PETRIFYING_BREATH_25)
-#define SPELL_OVERHEAD_SMASH RAID_MODE(SPELL_OVERHEAD_SMASH_10, SPELL_OVERHEAD_SMASH_25)
-#define SPELL_ONEARMED_OVERHEAD_SMASH RAID_MODE(SPELL_ONEARMED_OVERHEAD_SMASH_10, SPELL_ONEARMED_OVERHEAD_SMASH_25)
-#define SPELL_ARM_DEAD RAID_MODE(SPELL_ARM_DEAD_10, SPELL_ARM_DEAD_25)
-#define SPELL_ARM_SWEEP RAID_MODE(SPELL_ARM_SWEEP_10, SPELL_ARM_SWEEP_25)
-#define SPELL_STONE_GRIP RAID_MODE(SPELL_STONE_GRIP_10, SPELL_STONE_GRIP_25)
-#define SPELL_FOCUSED_EYEBEAM RAID_MODE(SPELL_FOCUSED_EYEBEAM_10, SPELL_FOCUSED_EYEBEAM_25)
-#define SPELL_RUBBLE_FALL RAID_MODE(SPELL_RUBBLE_FALL_10, SPELL_RUBBLE_FALL_25)
-#define SPELL_RUBBLE_ATTACK RAID_MODE(SPELL_RUBBLE_ATTACK_10, SPELL_RUBBLE_ATTACK_25)
-#define SPELL_RIDE_RIGHT_ARM RAID_MODE(SPELL_RIDE_RIGHT_ARM_10, SPELL_RIDE_RIGHT_ARM_25)
-#define SPELL_STONE_SHOUT RAID_MODE(SPELL_STONE_SHOUT_10, SPELL_STONE_SHOUT_25)
-
enum KologarnEvents
{
EVENT_SMASH = 1,
@@ -339,9 +316,9 @@ public:
go->SetLootRecipient(me);
}
if (Creature* arm = ObjectAccessor::GetCreature(*me, _left))
- arm->DespawnOrUnsummon(3000); // visual
+ arm->DespawnOrUnsummon(3s); // visual
if (Creature* arm = ObjectAccessor::GetCreature(*me, _right))
- arm->DespawnOrUnsummon(3000); // visual
+ arm->DespawnOrUnsummon(3s); // visual
me->SetUnitFlag(UNIT_FLAG_NOT_SELECTABLE);
me->SetDisableGravity(true);
}
@@ -796,9 +773,7 @@ class spell_ulduar_stone_grip_cast_target : public SpellScript
// Remove "main tank" and non-player targets
targets.remove_if(StoneGripTargetSelector(GetCaster()->ToCreature(), GetCaster()->GetVictim()));
// Maximum affected targets per difficulty mode
- uint32 maxTargets = 1;
- if (GetSpellInfo()->Id == SPELL_STONE_GRIP_25)
- maxTargets = 3;
+ uint32 maxTargets = GetSpellInfo()->Id == SPELL_STONE_GRIP ? 1 : 3;
// Return a random amount of targets based on maxTargets
while (maxTargets < targets.size())
@@ -850,6 +825,7 @@ class spell_ulduar_squeezed_lifeless : public SpellScript
}
};
+// 63720, 64004
class spell_kologarn_stone_shout : public SpellScript
{
PrepareSpellScript(spell_kologarn_stone_shout);
@@ -861,7 +837,6 @@ class spell_kologarn_stone_shout : public SpellScript
void Register() override
{
- if (m_scriptSpellId != SPELL_STONE_SHOUT_10 && m_scriptSpellId != SPELL_STONE_SHOUT_25)
OnObjectAreaTargetSelect += SpellObjectAreaTargetSelectFn(spell_kologarn_stone_shout::FilterTargets, EFFECT_0, TARGET_UNIT_SRC_AREA_ENEMY);
}
};
@@ -879,7 +854,6 @@ class spell_kologarn_stone_shout_aura : public AuraScript
void Register() override
{
- if (m_scriptSpellId == SPELL_STONE_SHOUT_10 || m_scriptSpellId == SPELL_STONE_SHOUT_25)
OnEffectPeriodic += AuraEffectPeriodicFn(spell_kologarn_stone_shout_aura::OnPeriodic, EFFECT_0, SPELL_AURA_PERIODIC_TRIGGER_SPELL);
}
};
@@ -945,7 +919,8 @@ void AddSC_boss_kologarn()
RegisterSpellScript(spell_ulduar_stone_grip_aura);
RegisterSpellScript(spell_ulduar_squeezed_lifeless);
RegisterSpellScript(spell_kologarn_focused_eyebeam);
- RegisterSpellAndAuraScriptPair(spell_kologarn_stone_shout, spell_kologarn_stone_shout_aura);
+ RegisterSpellScript(spell_kologarn_stone_shout);
+ RegisterSpellScript(spell_kologarn_stone_shout_aura);
// Achievements
new achievement_kologarn_looks_could_kill();
diff --git a/src/server/scripts/Northrend/Ulduar/Ulduar/boss_mimiron.cpp b/src/server/scripts/Northrend/Ulduar/Ulduar/boss_mimiron.cpp
index 9823a3d9ed..f09fc82526 100644
--- a/src/server/scripts/Northrend/Ulduar/Ulduar/boss_mimiron.cpp
+++ b/src/server/scripts/Northrend/Ulduar/Ulduar/boss_mimiron.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
@@ -23,6 +23,7 @@
#include "PassiveAI.h"
#include "Player.h"
#include "ScriptedCreature.h"
+#include "SharedDefines.h"
#include "Spell.h"
#include "SpellAuraEffects.h"
#include "SpellScript.h"
@@ -35,18 +36,15 @@ enum SpellData
SPELL_BERSERK = 64238,
// PHASE 1:
- SPELL_NAPALM_SHELL_25 = 65026,
- SPELL_NAPALM_SHELL_10 = 63666,
+ SPELL_NAPALM_SHELL = 63666,
- SPELL_PLASMA_BLAST_25 = 64529,
- SPELL_PLASMA_BLAST_10 = 62997,
+ SPELL_PLASMA_BLAST = 62997,
SPELL_SHOCK_BLAST = 63631,
SPELL_PROXIMITY_MINES = 63027,
NPC_PROXIMITY_MINE = 34362,
- SPELL_MINE_EXPLOSION_25 = 63009,
- SPELL_MINE_EXPLOSION_10 = 66351,
+ SPELL_MINE_EXPLOSION = 66351,
SPELL_SUMMON_PROXIMITY_MINE = 65347,
// PHASE 2:
@@ -57,17 +55,14 @@ enum SpellData
NPC_ROCKET_STRIKE_N = 34047,
SPELL_RAPID_BURST = 63382,
- SPELL_RAPID_BURST_DAMAGE_25_1 = 64531,
- SPELL_RAPID_BURST_DAMAGE_25_2 = 64532,
- SPELL_RAPID_BURST_DAMAGE_10_1 = 63387,
- SPELL_RAPID_BURST_DAMAGE_10_2 = 64019,
+ SPELL_RAPID_BURST_DAMAGE_1 = 63387,
+ SPELL_RAPID_BURST_DAMAGE_2 = 64019,
SPELL_SUMMON_BURST_TARGET = 64840,
SPELL_SPINNING_UP = 63414,
// PHASE 3:
- SPELL_PLASMA_BALL_25 = 64535,
- SPELL_PLASMA_BALL_10 = 63689,
+ SPELL_PLASMA_BALL = 63689,
SPELL_MAGNETIC_CORE = 64436,
SPELL_SPINNING = 64438,
@@ -80,10 +75,8 @@ enum SpellData
SPELL_BEAM_BLUE = 63294,
// PHASE 4:
- SPELL_HAND_PULSE_10_R = 64352,
- SPELL_HAND_PULSE_25_R = 64537,
- SPELL_HAND_PULSE_10_L = 64348,
- SPELL_HAND_PULSE_25_L = 64536,
+ SPELL_HAND_PULSE_R = 64352,
+ SPELL_HAND_PULSE_L = 64348,
SPELL_SELF_REPAIR = 64383,
SPELL_SLEEP_VISUAL_1 = 64393,
@@ -219,14 +212,6 @@ enum EVENTS
EVENT_EMERGENCY_BOT_ATTACK = 70,
};
-#define SPELL_NAPALM_SHELL RAID_MODE(SPELL_NAPALM_SHELL_10, SPELL_NAPALM_SHELL_25)
-#define SPELL_PLASMA_BLAST RAID_MODE(SPELL_PLASMA_BLAST_10, SPELL_PLASMA_BLAST_25)
-#define SPELL_MINE_EXPLOSION RAID_MODE(SPELL_MINE_EXPLOSION_10, SPELL_MINE_EXPLOSION_25)
-#define SPELL_PLASMA_BALL RAID_MODE(SPELL_PLASMA_BALL_10, SPELL_PLASMA_BALL_25)
-#define SPELL_HAND_PULSE_R RAID_MODE(SPELL_HAND_PULSE_10_R, SPELL_HAND_PULSE_25_R)
-#define SPELL_HAND_PULSE_L RAID_MODE(SPELL_HAND_PULSE_10_L, SPELL_HAND_PULSE_25_L)
-#define SPELL_FROST_BOMB_EXPLOSION RAID_MODE(SPELL_FROST_BOMB_EXPLOSION_10, SPELL_FROST_BOMB_EXPLOSION_25)
-
enum Texts
{
// Mimiron
@@ -378,8 +363,8 @@ public:
events.ScheduleEvent(EVENT_COMPUTER_SAY_MINUTES, 3s);
minutesTalkNum = Is25ManRaid() ? TALK_COMPUTER_TEN : TALK_COMPUTER_EIGHT;
for (uint32 i = 0; i < uint32(TALK_COMPUTER_ZERO - minutesTalkNum - 1); ++i)
- events.ScheduleEvent(EVENT_COMPUTER_SAY_MINUTES, (i + 1)*MINUTE * IN_MILLISECONDS);
- events.ScheduleEvent(EVENT_COMPUTER_SAY_MINUTES, (TALK_COMPUTER_ZERO - minutesTalkNum)*MINUTE * IN_MILLISECONDS + 6000);
+ events.ScheduleEvent(EVENT_COMPUTER_SAY_MINUTES, Milliseconds((i + 1) * 60000));
+ events.ScheduleEvent(EVENT_COMPUTER_SAY_MINUTES, Milliseconds((TALK_COMPUTER_ZERO - minutesTalkNum) * 60000));
}
// ensure LMK2 is at proper position
@@ -601,7 +586,7 @@ public:
{
me->EnterVehicle(VX001, 4);
float speed = ACU->GetDistance(2737.75f, 2574.22f, 381.34f) / 2.0f;
- ACU->MonsterMoveWithSpeed(2737.75f, 2574.22f, 381.34f, speed);
+ ACU->GetMotionMaster()->MovePoint(0, 2737.75f, 2574.22f, 381.34f, FORCED_MOVEMENT_NONE, speed);
ACU->SetPosition(2737.75f, 2574.22f, 381.34f, M_PI);
events.ScheduleEvent(EVENT_SAY_VX001_DEAD, 2s);
break;
@@ -740,17 +725,17 @@ public:
LMK2->InterruptNonMeleeSpells(false);
LMK2->AttackStop();
LMK2->AI()->SetData(1, 0);
- LMK2->DespawnOrUnsummon(7000);
+ LMK2->DespawnOrUnsummon(7s);
LMK2->SetReactState(REACT_PASSIVE);
VX001->InterruptNonMeleeSpells(false);
VX001->AttackStop();
VX001->AI()->SetData(1, 0);
- VX001->DespawnOrUnsummon(7000);
+ VX001->DespawnOrUnsummon(7s);
VX001->SetReactState(REACT_PASSIVE);
ACU->InterruptNonMeleeSpells(false);
ACU->AttackStop();
ACU->AI()->SetData(1, 0);
- ACU->DespawnOrUnsummon(7000);
+ ACU->DespawnOrUnsummon(7s);
ACU->SetReactState(REACT_PASSIVE);
Position exitPos = me->GetPosition();
@@ -1221,7 +1206,7 @@ public:
if (p->GetEntry() == NPC_LEVIATHAN_MKII_CANNON && !apply)
{
Unit::Kill(p, p);
- p->ToCreature()->DespawnOrUnsummon(6000);
+ p->ToCreature()->DespawnOrUnsummon(6s);
}
}
@@ -1343,7 +1328,7 @@ public:
for (uint8 i = 0; i < 2; ++i)
if (Unit* r = vk->GetPassenger(5 + i))
if (r->IsCreature())
- r->ToCreature()->DespawnOrUnsummon(1);
+ r->ToCreature()->DespawnOrUnsummon(1ms);
}
void DamageTaken(Unit*, uint32& damage, DamageEffectType, SpellSchoolMask) override
@@ -1555,7 +1540,7 @@ public:
void PassengerBoarded(Unit* p, int8 /*seat*/, bool apply) override
{
if (p->GetEntry() == NPC_ROCKET_VISUAL && !apply)
- p->ToCreature()->DespawnOrUnsummon(8000);
+ p->ToCreature()->DespawnOrUnsummon(8s);
}
void SpellHit(Unit* /*caster*/, SpellInfo const* spell) override
@@ -1681,8 +1666,7 @@ public:
me->InterruptNonMeleeSpells(false);
me->RemoveAllAurasExceptType(SPELL_AURA_CONTROL_VEHICLE);
- me->MonsterMoveWithSpeed(2744.65f, 2569.46f, 381.34f, me->GetDistance(2744.65f, 2569.46f, 381.34f));
- me->UpdatePosition(2744.65f, 2569.46f, 381.34f, M_PI, false);
+ me->GetMotionMaster()->MovePoint(0, 2744.65f, 2569.46f, 381.34f);
if (Creature* c = GetMimiron())
c->AI()->SetData(0, 3);
@@ -1740,8 +1724,7 @@ public:
}
float speed = me->GetExactDist(x, y, 381.34f);
- me->MonsterMoveWithSpeed(x, y, 381.34f, speed);
- me->UpdatePosition(x, y, 381.34f, me->GetAngle(victim), false);
+ me->GetMotionMaster()->MovePoint(0, x, y, 381.34f, FORCED_MOVEMENT_NONE, speed);
if (mc)
{
mc->AI()->SetData(0, 0);
@@ -1793,14 +1776,12 @@ public:
case EVENT_MAGNETIC_CORE_PULL_DOWN:
me->CastSpell(me, SPELL_MAGNETIC_CORE, true);
me->CastSpell(me, SPELL_SPINNING, true);
- me->MonsterMoveWithSpeed(me->GetPositionX(), me->GetPositionY(), 365.34f, me->GetExactDist(me->GetPositionX(), me->GetPositionY(), 365.34f));
- me->UpdatePosition(me->GetPositionX(), me->GetPositionY(), 365.34f, me->GetOrientation(), false);
+ me->GetMotionMaster()->MovePoint(0, me->GetPositionX(), me->GetPositionY(), 365.34f, FORCED_MOVEMENT_NONE, me->GetExactDist(me->GetPositionX(), me->GetPositionY(), 365.34f));
events.ScheduleEvent(EVENT_MAGNETIC_CORE_FREE, 20s);
break;
case EVENT_MAGNETIC_CORE_FREE:
me->RemoveAura(SPELL_SPINNING);
- me->MonsterMoveWithSpeed(me->GetPositionX(), me->GetPositionY(), 381.34f, me->GetDistance(me->GetPositionX(), me->GetPositionY(), 381.34f));
- me->UpdatePosition(me->GetPositionX(), me->GetPositionY(), 381.34f, me->GetOrientation(), false);
+ me->GetMotionMaster()->MovePoint(0, me->GetPositionX(), me->GetPositionY(), 381.34f, FORCED_MOVEMENT_NONE, me->GetDistance(me->GetPositionX(), me->GetPositionY(), 381.34f));
events.ScheduleEvent(EVENT_MAGNETIC_CORE_REMOVE_IMMOBILIZE, 1s);
break;
case EVENT_MAGNETIC_CORE_REMOVE_IMMOBILIZE:
@@ -1893,14 +1874,6 @@ public:
void MoveInLineOfSight(Unit* /*who*/) override {}
bool CanAIAttack(Unit const* /*target*/) const override { return false; }
- void SpellHitTarget(Unit* target, SpellInfo const* spell) override
- {
- if (target && spell && target->IsPlayer() && spell->Id == SPELL_MINE_EXPLOSION)
- if (InstanceScript* pInstance = me->GetInstanceScript())
- if (Creature* c = GetMimiron())
- c->AI()->SetData(0, 11);
- }
-
// MoveInLineOfSight is checked every few yards, can't use it
void UpdateAI(uint32 diff) override
{
@@ -1931,6 +1904,24 @@ public:
};
};
+class spell_ulduar_mimiron_mine_explosion : public SpellScript
+{
+ PrepareSpellScript(spell_ulduar_mimiron_mine_explosion);
+
+ void HandleDamage(SpellEffIndex /*effIndex*/)
+ {
+ if (GetHitPlayer())
+ if (InstanceScript* pInstance = GetCaster()->GetInstanceScript())
+ if (Creature* mimi = pInstance->GetCreature(TYPE_MIMIRON))
+ mimi->AI()->SetData(0, 11);
+ }
+
+ void Register() override
+ {
+ OnEffectHitTarget += SpellEffectFn(spell_ulduar_mimiron_mine_explosion::HandleDamage, EFFECT_0, SPELL_EFFECT_SCHOOL_DAMAGE);
+ }
+};
+
class npc_ulduar_mimiron_rocket : public CreatureScript
{
public:
@@ -1960,7 +1951,7 @@ public:
void SetData(uint32 /*id*/, uint32 /*value*/) override
{
- me->GetMotionMaster()->MovePoint(0, me->GetPositionX(), me->GetPositionY(), me->GetPositionZ() + 100.0f, false, true);
+ me->GetMotionMaster()->MovePoint(0, me->GetPositionX(), me->GetPositionY(), me->GetPositionZ() + 100.0f, FORCED_MOVEMENT_NONE, 0.f, false, true);
}
void UpdateAI(uint32 /*diff*/) override
@@ -2015,7 +2006,7 @@ public:
if (despawnTimer <= diff)
{
despawnTimer = 60000;
- me->DespawnOrUnsummon(1);
+ me->DespawnOrUnsummon(1ms);
}
else
despawnTimer -= diff;
@@ -2081,7 +2072,7 @@ public:
bot->CastSpell(bot, SPELL_EMERGENCY_MODE, true);
}
- me->DespawnOrUnsummon(500);
+ me->DespawnOrUnsummon(500ms);
timer = 99999;
}
else
@@ -2098,10 +2089,8 @@ class spell_mimiron_rapid_burst_aura : public AuraScript
{
return ValidateSpellInfo(
{
- SPELL_RAPID_BURST_DAMAGE_10_1,
- SPELL_RAPID_BURST_DAMAGE_10_2,
- SPELL_RAPID_BURST_DAMAGE_25_1,
- SPELL_RAPID_BURST_DAMAGE_25_2
+ SPELL_RAPID_BURST_DAMAGE_1,
+ SPELL_RAPID_BURST_DAMAGE_2,
});
}
@@ -2109,7 +2098,7 @@ class spell_mimiron_rapid_burst_aura : public AuraScript
{
if (Unit* caster = GetCaster())
{
- uint32 id = (caster->GetMap()->Is25ManRaid() ? ((aurEff->GetTickNumber() % 2) ? SPELL_RAPID_BURST_DAMAGE_25_2 : SPELL_RAPID_BURST_DAMAGE_25_1) : ((aurEff->GetTickNumber() % 2) ? SPELL_RAPID_BURST_DAMAGE_10_2 : SPELL_RAPID_BURST_DAMAGE_10_1));
+ uint32 id = (aurEff->GetTickNumber() % 2) ? SPELL_RAPID_BURST_DAMAGE_2 : SPELL_RAPID_BURST_DAMAGE_1;
caster->CastSpell((Unit*)nullptr, id, true);
}
}
@@ -2346,7 +2335,7 @@ public:
CAST_AI(npc_ulduar_flames_initial::npc_ulduar_flames_initialAI, c->AI())->RemoveFlame(me->GetGUID());
me->RemoveAllAuras();
- me->DespawnOrUnsummon(2500);
+ me->DespawnOrUnsummon(2500ms);
}
break;
case SPELL_VX001_FROST_BOMB:
@@ -2502,6 +2491,7 @@ void AddSC_boss_mimiron()
new npc_ulduar_bot_summon_trigger();
RegisterSpellScript(spell_mimiron_rapid_burst_aura);
RegisterSpellScript(spell_mimiron_p3wx2_laser_barrage_aura);
+ RegisterSpellScript(spell_ulduar_mimiron_mine_explosion);
new go_ulduar_do_not_push_this_button();
new npc_ulduar_flames_initial();
new npc_ulduar_flames_spread();
diff --git a/src/server/scripts/Northrend/Ulduar/Ulduar/boss_razorscale.cpp b/src/server/scripts/Northrend/Ulduar/Ulduar/boss_razorscale.cpp
index 8d9dae387f..6a3682d786 100644
--- a/src/server/scripts/Northrend/Ulduar/Ulduar/boss_razorscale.cpp
+++ b/src/server/scripts/Northrend/Ulduar/Ulduar/boss_razorscale.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
@@ -30,12 +30,10 @@
enum Spells
{
// Razorscale
- SPELL_FLAMEBUFFET_10 = 64016,
- SPELL_FLAMEBUFFET_25 = 64023,
+ SPELL_FLAMEBUFFET = 64016,
SPELL_FIREBALL = 63815,
SPELL_WINGBUFFET = 62666,
- SPELL_FLAMEBREATH_10 = 63317,
- SPELL_FLAMEBREATH_25 = 64021,
+ SPELL_FLAMEBREATH = 63317,
SPELL_FUSEARMOR = 64771,
SPELL_FUSED_ARMOR = 64774, // Applied on 5th stack of SPELL_FUSEARMOR
SPELL_DEVOURINGFLAME = 63236,
@@ -50,25 +48,17 @@ enum Spells
// Dark Rune Sentinel
SPELL_WHIRLWIND = 63808,
- SPELL_BATTLE_SHOUT_10 = 46763,
- SPELL_BATTLE_SHOUT_25 = 64062,
+ SPELL_BATTLE_SHOUT = 46763,
// Dark Rune Guardian
SPELL_STORMSTRIKE_DMG = 65971,
SPELL_STORMSTRIKE_DEBUFF = 64757,
// Dark Rune Watcher
- SPELL_LIGHTINGBOLT_10 = 63809,
- SPELL_LIGHTINGBOLT_25 = 64696,
- SPELL_CHAINLIGHTNING_10 = 64758,
- SPELL_CHAINLIGHTNING_25 = 64759,
+ SPELL_LIGHTINGBOLT = 63809,
+ SPELL_CHAINLIGHTNING = 64758,
};
-#define SPELL_FLAMEBUFFET RAID_MODE(SPELL_FLAMEBUFFET_10, SPELL_FLAMEBUFFET_25)
-#define SPELL_FLAMEBREATH RAID_MODE(SPELL_FLAMEBREATH_10, SPELL_FLAMEBREATH_25)
-#define SPELL_BATTLE_SHOUT RAID_MODE(SPELL_BATTLE_SHOUT_10, SPELL_BATTLE_SHOUT_25)
-#define SPELL_LIGHTINGBOLT RAID_MODE(SPELL_LIGHTINGBOLT_10, SPELL_LIGHTINGBOLT_25)
-#define SPELL_CHAINLIGHTNING RAID_MODE(SPELL_CHAINLIGHTNING_10, SPELL_CHAINLIGHTNING_25)
#define REQ_CHAIN_COUNT RAID_MODE(2, 4)
enum NPCs
@@ -354,17 +344,7 @@ public:
{
me->StopMoving();
startPath = false;
- if (WaypointPath const* i_path = sWaypointMgr->GetPath(me->GetWaypointPath()))
- {
- Movement::PointsArray pathPoints;
- pathPoints.push_back(G3D::Vector3(me->GetPositionX(), me->GetPositionY(), me->GetPositionZ()));
- for (uint8 i = 0; i < i_path->size(); ++i)
- {
- WaypointData const* node = i_path->at(i);
- pathPoints.push_back(G3D::Vector3(node->x, node->y, node->z));
- }
- me->GetMotionMaster()->MoveSplinePath(&pathPoints);
- }
+ me->GetMotionMaster()->MovePath(me->GetWaypointPath(), FORCED_MOVEMENT_NONE, PathSource::WAYPOINT_MGR);
}
if (!UpdateVictim())
@@ -683,7 +663,7 @@ public:
{
razorscale->AI()->AttackStart(player);
razorscale->GetMotionMaster()->MoveIdle();
- razorscale->GetMotionMaster()->MovePoint(POINT_RAZORSCALE_INIT, 588.0f, -178.0f, 490.0f, false, false);
+ razorscale->GetMotionMaster()->MovePoint(POINT_RAZORSCALE_INIT, 588.0f, -178.0f, 490.0f, FORCED_MOVEMENT_NONE, 0.f, 0.f, false, false);
}
}
}
diff --git a/src/server/scripts/Northrend/Ulduar/Ulduar/boss_thorim.cpp b/src/server/scripts/Northrend/Ulduar/Ulduar/boss_thorim.cpp
index d2b1aee4c4..b3e9a96338 100644
--- a/src/server/scripts/Northrend/Ulduar/Ulduar/boss_thorim.cpp
+++ b/src/server/scripts/Northrend/Ulduar/Ulduar/boss_thorim.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
@@ -23,6 +23,7 @@
#include "ScriptedCreature.h"
#include "ScriptedEscortAI.h"
#include "SpellAuraEffects.h"
+#include "SpellMgr.h"
#include "SpellScript.h"
#include "SpellScriptLoader.h"
#include "ulduar.h"
@@ -34,8 +35,7 @@ enum ThorimSpells
SPELL_SHEATH_OF_LIGHTNING = 62276,
SPELL_STORMHAMMER = 62042,
SPELL_BERSERK_FRIENDS = 62560,
- SPELL_CHAIN_LIGHTNING_10 = 62131,
- SPELL_CHAIN_LIGHTNING_25 = 64390,
+ SPELL_CHAIN_LIGHTNING = 62131,
SPELL_UNBALANCING_STRIKE = 62130,
SPELL_BERSERK = 26662,
@@ -54,17 +54,13 @@ enum ThorimSpells
SPELL_SIF_CHANNEL_HOLOGRAM = 64324,
SPELL_FROSTBOLT = 62601,
SPELL_FROSTBOLT_VALLEY = 62604,
- SPELL_BLIZZARD_10 = 62577,
- SPELL_BLIZZARD_25 = 62603,
+ SPELL_BLIZZARD = 62577,
SPELL_FROST_NOVA = 62605,
// DARK RUNE ACOLYTE
- SPELL_GREATER_HEAL_10 = 62334,
- SPELL_GREATER_HEAL_25 = 62442,
- SPELL_HOLY_SMITE_10 = 62335,
- SPELL_HOLY_SMITE_25 = 62443,
- SPELL_RENEW_10 = 62333,
- SPELL_RENEW_25 = 62441,
+ SPELL_GREATER_HEAL = 62334,
+ SPELL_HOLY_SMITE = 62335,
+ SPELL_RENEW = 62333,
// CAPTURED MERCENARY SOLDIER
SPELL_BARBED_SHOT = 62318,
@@ -76,19 +72,15 @@ enum ThorimSpells
SPELL_HEROIC_STRIKE = 62444,
// JORMUNGAR BEHEMOTH
- SPELL_ACID_BREATH_10 = 62315,
- SPELL_ACID_BREATH_25 = 62415,
- SPELL_SWEEP_10 = 62316,
- SPELL_SWEEP_25 = 62417,
+ SPELL_ACID_BREATH = 62315,
+ SPELL_SWEEP = 62316,
// IRON RING GUARD
- SPELL_IMPALE_10 = 62331,
- SPELL_IMPALE_25 = 62418,
+ SPELL_IMPALE = 62331,
SPELL_WHIRLING_TRIP = 64151,
// IRON HONOR GUARD
- SPELL_SHIELD_SMASH_10 = 62332,
- SPELL_SHIELD_SMASH_25 = 62420,
+ SPELL_SHIELD_SMASH = 62332,
SPELL_CLEAVE = 42724,
SPELL_HAMSTRING = 48639,
@@ -97,12 +89,9 @@ enum ThorimSpells
SPELL_RUNIC_STRIKE = 62322,
// DARK RUNE EVOKER
- SPELL_RUNIC_LIGHTNING_10 = 62327,
- SPELL_RUNIC_LIGHTNING_25 = 62445,
- SPELL_RUNIC_MENDING_10 = 62328,
- SPELL_RUNIC_MENDING_25 = 62446,
- SPELL_RUNIC_SHIELD_10 = 62321,
- SPELL_RUNIC_SHIELD_25 = 62529,
+ SPELL_RUNIC_LIGHTNING = 62327,
+ SPELL_RUNIC_MENDING = 62328,
+ SPELL_RUNIC_SHIELD = 62321,
// DARK RUNE CHAMPION
SPELL_CHARGE = 32323,
@@ -114,8 +103,7 @@ enum ThorimSpells
SPELL_PUMMEL = 38313,
// RUNIC COLOSSUS
- SPELL_COLOSSUS_CHARGE_10 = 62613,
- SPELL_COLOSSUS_CHARGE_25 = 62614,
+ SPELL_COLOSSUS_CHARGE = 62613,
SPELL_RUNIC_BARRIER = 62338,
SPELL_SMASH = 62339,
SPELL_RUNIC_SMASH_LEFT = 62057,
@@ -125,8 +113,7 @@ enum ThorimSpells
// ANCIENT RUNE GIANT
SPELL_RUNE_DETONATION = 62526,
SPELL_RUNIC_FORTIFICATION = 62942,
- SPELL_STOMP_10 = 62411,
- SPELL_STOMP_25 = 62413,
+ SPELL_STOMP = 62411,
// TRAPS
SPELL_LIGHTNING_FIELD = 64972,
@@ -134,20 +121,6 @@ enum ThorimSpells
SPELL_PARALYTIC_FIELD_SECOND = 63540,
};
-#define SPELL_GREATER_HEAL RAID_MODE(SPELL_GREATER_HEAL_10, SPELL_GREATER_HEAL_25)
-#define SPELL_HOLY_SMITE RAID_MODE(SPELL_HOLY_SMITE_10, SPELL_HOLY_SMITE_25)
-#define SPELL_RENEW RAID_MODE(SPELL_RENEW_10, SPELL_RENEW_25)
-#define SPELL_ACID_BREATH RAID_MODE(SPELL_ACID_BREATH_10, SPELL_ACID_BREATH_25)
-#define SPELL_SWEEP RAID_MODE(SPELL_SWEEP_10, SPELL_SWEEP_25)
-#define SPELL_IMPALE RAID_MODE(SPELL_IMPALE_10, SPELL_IMPALE_25)
-#define SPELL_COLOSSUS_CHARGE RAID_MODE(SPELL_COLOSSUS_CHARGE_10, SPELL_COLOSSUS_CHARGE_25)
-#define SPELL_STOMP RAID_MODE(SPELL_STOMP_10, SPELL_STOMP_25)
-#define SPELL_SHIELD_SMASH RAID_MODE(SPELL_SHIELD_SMASH_10, SPELL_SHIELD_SMASH_25)
-#define SPELL_RUNIC_LIGHTNING RAID_MODE(SPELL_RUNIC_LIGHTNING_10, SPELL_RUNIC_LIGHTNING_25)
-#define SPELL_RUNIC_MENDING RAID_MODE(SPELL_RUNIC_MENDING_10, SPELL_RUNIC_MENDING_25)
-#define SPELL_RUNIC_SHIELD RAID_MODE(SPELL_RUNIC_SHIELD_10, SPELL_RUNIC_SHIELD_25)
-#define SPELL_CHAIN_LIGHTNING RAID_MODE(SPELL_CHAIN_LIGHTNING_10, SPELL_CHAIN_LIGHTNING_25)
-
enum ThormNPCandGOs : uint32
{
// ARENA INIT
@@ -859,7 +832,7 @@ public:
else if (param == ACTION_SIF_TRANSFORM)
{
me->CastSpell(me, SPELL_SIF_TRANSFORM, true);
- me->DespawnOrUnsummon(5000);
+ me->DespawnOrUnsummon(5s);
events.Reset();
_allowCast = false;
}
@@ -875,7 +848,7 @@ public:
{
case EVENT_SIF_FINISH_DOMINION:
Talk(SAY_SIF_HM_MISSED);
- me->DespawnOrUnsummon(5000);
+ me->DespawnOrUnsummon(5s);
break;
case EVENT_SIF_START_TALK:
Talk(SAY_SIF_AGGRO);
@@ -934,7 +907,7 @@ public:
{
InitWaypoint();
Reset();
- Start(false, true);
+ Start(false);
}
uint32 Timer;
@@ -1020,7 +993,7 @@ public:
{
InitWaypoint();
Reset();
- Start(false, true);
+ Start(false);
SetDespawnAtEnd(false);
}
@@ -1044,7 +1017,7 @@ public:
{
me->SetSpeed(MOVE_RUN, 1);
me->SetSpeed(MOVE_WALK, 1);
- me->CastSpell(me, RAID_MODE(SPELL_BLIZZARD_10, SPELL_BLIZZARD_25), true);
+ me->CastSpell(me, SPELL_BLIZZARD, true);
}
void WaypointReached(uint32 /*point*/) override
@@ -1206,7 +1179,7 @@ public:
events.Repeat(1600ms);
break;
case EVENT_DR_ACOLYTE_R:
- if (HealthBelowPct(75) && !me->HasAura(SPELL_RENEW))
+ if (HealthBelowPct(75) && !me->HasAura(sSpellMgr->GetSpellIdForDifficulty(SPELL_RENEW, me)))
me->CastSpell(me, SPELL_GREATER_HEAL, false);
else if (Unit* target = DoSelectLowestHpFriendly(60.0f, 10))
me->CastSpell(target, SPELL_RENEW, false);
@@ -1331,7 +1304,7 @@ public:
events.Repeat(1600ms);
break;
case EVENT_DR_ACOLYTE_R:
- if (HealthBelowPct(75) && !me->HasAura(SPELL_RENEW))
+ if (HealthBelowPct(75) && !me->HasAura(sSpellMgr->GetSpellIdForDifficulty(SPELL_RENEW, me)))
me->CastSpell(me, SPELL_GREATER_HEAL, false);
else if (Unit* target = DoSelectLowestHpFriendly(60.0f, 10))
me->CastSpell(target, SPELL_RENEW, false);
diff --git a/src/server/scripts/Northrend/Ulduar/Ulduar/boss_xt002.cpp b/src/server/scripts/Northrend/Ulduar/Ulduar/boss_xt002.cpp
index 750df991f1..c4ce685978 100644
--- a/src/server/scripts/Northrend/Ulduar/Ulduar/boss_xt002.cpp
+++ b/src/server/scripts/Northrend/Ulduar/Ulduar/boss_xt002.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
@@ -30,10 +30,8 @@
enum XT002Spells
{
// BASIC
- SPELL_GRAVITY_BOMB_10 = 63024,
- SPELL_GRAVITY_BOMB_25 = 64234,
- SPELL_SEARING_LIGHT_10 = 63018,
- SPELL_SEARING_LIGHT_25 = 65121,
+ SPELL_GRAVITY_BOMB = 63024,
+ SPELL_SEARING_LIGHT = 63018,
SPELL_TYMPANIC_TANTARUM = 62776,
SPELL_XT002_ENRAGE = 26662,
@@ -48,27 +46,18 @@ enum XT002Spells
SPELL_EXPOSED_HEART = 63849,
SPELL_ENERGY_ORB = 62790,
SPELL_ENERGY_ORB_TRIGGER = 62826,
- SPELL_HEARTBREAK_10 = 65737,
- SPELL_HEARTBREAK_25 = 64193,
+ SPELL_HEARTBREAK = 65737,
// VOID ZONE
- SPELL_VOID_ZONE_SUMMON_10 = 64203,
- SPELL_VOID_ZONE_SUMMON_25 = 64235,
- //SPELL_VOID_ZONE_SUMMON = RAID_MODE(SPELL_VOID_ZONE_SUMMON_10, SPELL_VOID_ZONE_SUMMON_25, SPELL_VOID_ZONE_SUMMON_10, SPELL_VOID_ZONE_SUMMON_25),
+ SPELL_VOID_ZONE_SUMMON = 64203,
SPELL_VOID_ZONE_DAMAGE = 46262,
// SPARK
SPELL_SPARK_SUMMON = 64210,
- SPELL_SPARK_DAMAGE_10 = 64227,
- SPELL_SPARK_DAMAGE_25 = 64236,
+ SPELL_SPARK_DAMAGE = 64227,
SPELL_SPARK_MELEE = 64230,
};
-#define SPELL_GRAVITY_BOMB RAID_MODE(SPELL_GRAVITY_BOMB_10, SPELL_GRAVITY_BOMB_25)
-#define SPELL_SEARING_LIGHT RAID_MODE(SPELL_SEARING_LIGHT_10, SPELL_SEARING_LIGHT_25)
-#define SPELL_HEARTBREAK RAID_MODE(SPELL_HEARTBREAK_10, SPELL_HEARTBREAK_25)
-#define SPELL_SPARK_DAMAGE RAID_MODE(SPELL_SPARK_DAMAGE_10, SPELL_SPARK_DAMAGE_25)
-
enum XT002Events
{
EVENT_HEALTH_CHECK = 1,
@@ -611,7 +600,7 @@ public:
if (!urand(0, 2))
pXT002->AI()->Talk(EMOTE_SCRAPBOT);
- me->DespawnOrUnsummon(1);
+ me->DespawnOrUnsummon(1ms);
}
}
@@ -657,7 +646,7 @@ public:
if (Unit* target = SelectTargetFromPlayerList(200))
AttackStart(target);
else
- me->DespawnOrUnsummon(500);
+ me->DespawnOrUnsummon(500ms);
}
void UpdateAI(uint32 diff) override
@@ -769,12 +758,12 @@ public:
// so that can't be the issue
// See BoomEvent class
// Schedule 1s delayed
- me->m_Events.AddEvent(new BoomEvent(me), me->m_Events.CalculateTime(1 * IN_MILLISECONDS));
+ me->m_Events.AddEventAtOffset(new BoomEvent(me), 1s);
}
void JustDied(Unit* /*killer*/) override
{
- me->m_Events.AddEvent(new BoomEvent(me), me->m_Events.CalculateTime(1 * IN_MILLISECONDS));
+ me->m_Events.AddEventAtOffset(new BoomEvent(me), 1s);
}
void DamageTaken(Unit*, uint32& damage, DamageEffectType, SpellSchoolMask) override
diff --git a/src/server/scripts/Northrend/Ulduar/Ulduar/boss_yoggsaron.cpp b/src/server/scripts/Northrend/Ulduar/Ulduar/boss_yoggsaron.cpp
index e2c684870c..1fa645637e 100644
--- a/src/server/scripts/Northrend/Ulduar/Ulduar/boss_yoggsaron.cpp
+++ b/src/server/scripts/Northrend/Ulduar/Ulduar/boss_yoggsaron.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
@@ -24,6 +24,7 @@
#include "ScriptedCreature.h"
#include "ScriptedEscortAI.h"
#include "SpellAuras.h"
+#include "SpellMgr.h"
#include "SpellScript.h"
#include "SpellScriptLoader.h"
#include "ulduar.h"
@@ -102,8 +103,7 @@ enum YoggSpells
// CONSTRICTOR TENTACLE
SPELL_LUNGE = 64123,
- SPELL_SQUEEZE_10 = 64125,
- SPELL_SQUEEZE_25 = 64126,
+ SPELL_SQUEEZE = 64125,
// CORRUPTOR TENTACLE
SPELL_APATHY = 64156,
@@ -142,15 +142,10 @@ enum YoggSpells
SPELL_SIMPLE_TELEPORT = 64195,
SPELL_EMPOWERED = 65294,
SPELL_EMPOWERED_PASSIVE = 64161,
- SPELL_DRAIN_LIFE_10 = 64159,
- SPELL_DRAIN_LIFE_25 = 64160,
+ SPELL_DRAIN_LIFE = 64159,
SPELL_RECENTLY_SPAWNED = 64497,
};
-#define SPELL_PSYCHOSIS RAID_MODE(SPELL_SARA_PSYCHOSIS_10, SPELL_SARA_PSYCHOSIS_25)
-#define SPELL_SQUEEZE RAID_MODE(SPELL_SQUEEZE_10, SPELL_SQUEEZE_25)
-#define SPELL_DRAIN_LIFE RAID_MODE(SPELL_DRAIN_LIFE_10, SPELL_DRAIN_LIFE_25)
-
enum YoggEvents
{
EVENT_SARA_P1_DOORS_CLOSE = 1,
@@ -696,11 +691,11 @@ public:
yoggb->AI()->Talk(EMOTE_YOGG_SARON_BRAIN_SHATTERED);
}
- uint32 timer = events.GetNextEventTime(EVENT_SARA_P2_OPEN_PORTALS);
- uint32 portalTime = (timer > events.GetTimer() ? timer - events.GetTimer() : 0);
- events.DelayEvents(param + 100);
+ Milliseconds timer = events.GetTimeUntilEvent(EVENT_SARA_P2_OPEN_PORTALS);
+ Milliseconds portalTime = (timer > 0ms ? timer : 0ms);
+ events.DelayEvents(Milliseconds(param + 100));
events.RescheduleEvent(EVENT_SARA_P2_OPEN_PORTALS, portalTime, 0, EVENT_PHASE_TWO);
- events.ScheduleEvent(EVENT_SARA_P2_REMOVE_STUN, param, 0, EVENT_PHASE_TWO);
+ events.ScheduleEvent(EVENT_SARA_P2_REMOVE_STUN, Milliseconds(param), 0, EVENT_PHASE_TWO);
me->CastSpell(me, SPELL_SHATTERED_ILLUSION, true);
}
@@ -804,7 +799,7 @@ public:
events.ScheduleEvent(EVENT_SARA_P1_SPELLS, 0ms, 1, EVENT_PHASE_ONE);
break;
case EVENT_SARA_P1_SUMMON:
- events.RepeatEvent(20000 - (std::min(_summonedGuardiansCount, (uint8)5) * 2000));
+ events.Repeat(Milliseconds(20000 - (std::min(_summonedGuardiansCount, (uint8)5) * 2000)));
++_summonedGuardiansCount;
InformCloud();
break;
@@ -824,14 +819,14 @@ public:
}
me->CastCustomSpell(spell, SPELLVALUE_MAX_TARGETS, 1, nullptr, false);
- events.RepeatEvent(me->GetMap()->Is25ManRaid() ? urand(0, 3000) : 4000 + urand(0, 2000));
+ events.Repeat(me->GetMap()->Is25ManRaid() ? randtime(0ms, 3s) : randtime(4s, 6s));
break;
}
case EVENT_SARA_P2_START:
{
EntryCheckPredicate pred(NPC_YOGG_SARON);
summons.DoAction(ACTION_YOGG_SARON_APPEAR, pred);
- events.RescheduleEvent(EVENT_SARA_P2_SPAWN_START_TENTACLES, 500, 0, EVENT_PHASE_TWO);
+ events.RescheduleEvent(EVENT_SARA_P2_SPAWN_START_TENTACLES, 500ms, 0, EVENT_PHASE_TWO);
// Spawn Brain!
me->SummonCreature(NPC_BRAIN_OF_YOGG_SARON, 1981.3f, -25.43f, 265);
@@ -846,7 +841,7 @@ public:
{
Talk(SAY_SARA_PSYCHOSIS_HIT);
}
- me->CastCustomSpell(SPELL_PSYCHOSIS, SPELLVALUE_MAX_TARGETS, 1, me, false);
+ me->CastCustomSpell(SPELL_SARA_PSYCHOSIS_10, SPELLVALUE_MAX_TARGETS, 1, me, false);
events.Repeat(3500ms);
break;
case EVENT_SARA_P2_DEATH_RAY:
@@ -856,15 +851,15 @@ public:
break;
case EVENT_SARA_P2_SUMMON_T1: // CRUSHER
SpawnTentacle(NPC_CRUSHER_TENTACLE);
- events.RepeatEvent((50000 + urand(0, 10000)) * _summonSpeed);
+ events.Repeat(Milliseconds(uint32((50000 + urand(0, 10000)) * _summonSpeed)));
break;
case EVENT_SARA_P2_SUMMON_T2: // CONSTRICTOR
SpawnTentacle(NPC_CONSTRICTOR_TENTACLE);
- events.RepeatEvent((15000 + urand(0, 5000)) * _summonSpeed);
+ events.Repeat(Milliseconds(uint32((15000 + urand(0, 5000))* _summonSpeed)));
break;
case EVENT_SARA_P2_SUMMON_T3: // CORRUPTOR
SpawnTentacle(NPC_CORRUPTOR_TENTACLE);
- events.RepeatEvent((30000 + urand(0, 10000)) * _summonSpeed);
+ events.Repeat(Milliseconds(uint32((30000 + urand(0, 10000))* _summonSpeed)));
break;
case EVENT_SARA_P2_BRAIN_LINK:
me->CastCustomSpell(SPELL_BRAIN_LINK, SPELLVALUE_MAX_TARGETS, 1, me, false);
@@ -901,9 +896,9 @@ public:
events.ScheduleEvent(EVENT_SARA_P2_DEATH_RAY, 15s, 0, EVENT_PHASE_TWO);
events.ScheduleEvent(EVENT_SARA_P2_SUMMON_T1, 50s, 60s, 0, EVENT_PHASE_TWO);
events.ScheduleEvent(EVENT_SARA_P2_SUMMON_T2, 15s, 20s, 0, EVENT_PHASE_TWO);
- events.ScheduleEvent(EVENT_SARA_P2_SUMMON_T3, 30000 + urand(0, 10000), 0, EVENT_PHASE_TWO);
- events.ScheduleEvent(EVENT_SARA_P2_BRAIN_LINK, 0, 0, EVENT_PHASE_TWO);
- events.ScheduleEvent(EVENT_SARA_P2_OPEN_PORTALS, 60000, 0, EVENT_PHASE_TWO);
+ events.ScheduleEvent(EVENT_SARA_P2_SUMMON_T3, 30s + randtime(0ms, 10s), 0, EVENT_PHASE_TWO);
+ events.ScheduleEvent(EVENT_SARA_P2_BRAIN_LINK, 0ms, 0, EVENT_PHASE_TWO);
+ events.ScheduleEvent(EVENT_SARA_P2_OPEN_PORTALS, 60s, 0, EVENT_PHASE_TWO);
break;
case EVENT_SARA_P1_BERSERK:
if (me->GetInstanceScript())
@@ -937,7 +932,7 @@ public:
{
InitWaypoint();
Reset();
- Start(false, true, ObjectGuid::Empty, nullptr, false, true);
+ Start(false, ObjectGuid::Empty, nullptr, false, true);
}
uint32 _checkTimer;
@@ -1167,20 +1162,20 @@ public:
me->RemoveAura(SPELL_SHADOW_BARRIER);
- events.ScheduleEvent(EVENT_YS_LUNATIC_GAZE, 7000);
- events.ScheduleEvent(EVENT_YS_SHADOW_BEACON, 20000);
- events.ScheduleEvent(EVENT_YS_SUMMON_GUARDIAN, 0);
+ events.ScheduleEvent(EVENT_YS_LUNATIC_GAZE, 7s);
+ events.ScheduleEvent(EVENT_YS_SHADOW_BEACON, 20s);
+ events.ScheduleEvent(EVENT_YS_SUMMON_GUARDIAN, 0ms);
_thirdPhase = true;
Talk(SAY_YOGG_SARON_PHASE_3);
}
else if (param == ACTION_YOGG_SARON_HARD_MODE)
{
- events.ScheduleEvent(EVENT_YS_DEAFENING_ROAR, 50000);
+ events.ScheduleEvent(EVENT_YS_DEAFENING_ROAR, 50s);
}
else if (param == ACTION_YOGG_SARON_SHADOW_BEACON)
{
- events.RescheduleEvent(EVENT_YS_SHADOW_BEACON, 40000);
+ events.RescheduleEvent(EVENT_YS_SHADOW_BEACON, 40s);
}
else if (param == ACTION_REMOVE_STUN)
{
@@ -1677,7 +1672,7 @@ public:
{
if (me->GetDistance(itr->GetSource()) > 10 || !itr->GetSource()->IsAlive() || itr->GetSource()->IsGameMaster())
continue;
- if (itr->GetSource()->HasAura(SPELL_SQUEEZE) || itr->GetSource()->HasAura(SPELL_INSANE1))
+ if (itr->GetSource()->HasAura(sSpellMgr->GetSpellIdForDifficulty(SPELL_SQUEEZE, me)) || itr->GetSource()->HasAura(SPELL_INSANE1))
continue;
if (count <= num || !target)
@@ -1719,7 +1714,7 @@ public:
void JustDied(Unit*) override
{
if (Unit* player = ObjectAccessor::GetUnit(*me, _playerGUID))
- player->RemoveAura(SPELL_SQUEEZE);
+ player->RemoveAura(sSpellMgr->GetSpellIdForDifficulty(SPELL_SQUEEZE, me));
}
};
};
@@ -1807,7 +1802,7 @@ public:
}
me->ReplaceAllNpcFlags(UNIT_NPC_FLAG_NONE);
- me->DespawnOrUnsummon(1000);
+ me->DespawnOrUnsummon(1s);
}
private:
diff --git a/src/server/scripts/Northrend/Ulduar/Ulduar/instance_ulduar.cpp b/src/server/scripts/Northrend/Ulduar/Ulduar/instance_ulduar.cpp
index fe0026911f..0db04db306 100644
--- a/src/server/scripts/Northrend/Ulduar/Ulduar/instance_ulduar.cpp
+++ b/src/server/scripts/Northrend/Ulduar/Ulduar/instance_ulduar.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/scripts/Northrend/Ulduar/Ulduar/ulduar.cpp b/src/server/scripts/Northrend/Ulduar/Ulduar/ulduar.cpp
index be980bd557..f38f49e2b8 100644
--- a/src/server/scripts/Northrend/Ulduar/Ulduar/ulduar.cpp
+++ b/src/server/scripts/Northrend/Ulduar/Ulduar/ulduar.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
@@ -79,7 +79,11 @@ enum UldSpells
SPELL_SIMPLE_TELEPORT = 12980,
SPELL_KEEPER_TELEPORT = 62940,
SPELL_SNOW_MOUND_PARTICLES = 64615,
- SPELL_ENERGY_SAP_10 = 64740
+ SPELL_ENERGY_SAP_10 = 64740,
+
+ // Arachnopod Destroyer
+ SPELL_FLAME_SPRAY = 64717,
+ SPELL_MACHINE_GUN = 64776,
};
class npc_ulduar_keeper : public CreatureScript
@@ -473,11 +477,11 @@ public:
case 0:
break;
case 1:
- me->CastSpell(me->GetVictim(), RAID_MODE(64717, 65241), false);
+ me->CastSpell(me->GetVictim(), SPELL_FLAME_SPRAY, false);
events.Repeat(15s, 25s);
break;
case 2:
- me->CastSpell(me->GetVictim(), RAID_MODE(64776, 65240), false);
+ me->CastSpell(me->GetVictim(), SPELL_MACHINE_GUN, false);
events.Repeat(10s, 15s);
break;
case 3:
diff --git a/src/server/scripts/Northrend/Ulduar/Ulduar/ulduar.h b/src/server/scripts/Northrend/Ulduar/Ulduar/ulduar.h
index ce4a8c6acc..797f6b61f3 100644
--- a/src/server/scripts/Northrend/Ulduar/Ulduar/ulduar.h
+++ b/src/server/scripts/Northrend/Ulduar/Ulduar/ulduar.h
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/scripts/Northrend/UtgardeKeep/UtgardeKeep/boss_ingvar_the_plunderer.cpp b/src/server/scripts/Northrend/UtgardeKeep/UtgardeKeep/boss_ingvar_the_plunderer.cpp
index 868f8000f0..4e92ba786c 100644
--- a/src/server/scripts/Northrend/UtgardeKeep/UtgardeKeep/boss_ingvar_the_plunderer.cpp
+++ b/src/server/scripts/Northrend/UtgardeKeep/UtgardeKeep/boss_ingvar_the_plunderer.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
@@ -56,28 +56,17 @@ enum eSpells
SPELL_RESURRECTION_HEAL = 42704,
SPELL_INGVAR_TRANSFORM = 42796,
- SPELL_STAGGERING_ROAR_N = 42708,
- SPELL_STAGGERING_ROAR_H = 59708,
+ SPELL_STAGGERING_ROAR = 42708,
SPELL_CLEAVE = 42724,
- SPELL_SMASH_N = 42669,
- SPELL_SMASH_H = 59706,
- SPELL_ENRAGE_N = 42705,
- SPELL_ENRAGE_H = 59707,
-
- SPELL_DREADFUL_ROAR_N = 42729,
- SPELL_DREADFUL_ROAR_H = 59734,
- SPELL_WOE_STRIKE_N = 42730,
- SPELL_WOE_STRIKE_H = 59735,
+ SPELL_SMASH = 42669,
+ SPELL_ENRAGE = 42705,
+
+ SPELL_DREADFUL_ROAR = 42729,
+ SPELL_WOE_STRIKE = 42730,
SPELL_DARK_SMASH = 42723,
SPELL_SHADOW_AXE = 42749,
};
-#define SPELL_STAGGERING_ROAR DUNGEON_MODE(SPELL_STAGGERING_ROAR_N, SPELL_STAGGERING_ROAR_H)
-#define SPELL_DREADFUL_ROAR DUNGEON_MODE(SPELL_DREADFUL_ROAR_N, SPELL_DREADFUL_ROAR_H)
-#define SPELL_WOE_STRIKE DUNGEON_MODE(SPELL_WOE_STRIKE_N, SPELL_WOE_STRIKE_H)
-#define SPELL_SMASH DUNGEON_MODE(SPELL_SMASH_N, SPELL_SMASH_H)
-#define SPELL_ENRAGE DUNGEON_MODE(SPELL_ENRAGE_N, SPELL_ENRAGE_H)
-
enum eEvents
{
EVENT_START_RESURRECTION = 1,
@@ -307,9 +296,6 @@ struct boss_ingvar_the_plunderer : public ScriptedAI
case EVENT_SPELL_ROAR:
Talk(EMOTE_ROAR);
- me->_AddCreatureSpellCooldown(SPELL_STAGGERING_ROAR, 0, 0);
- me->_AddCreatureSpellCooldown(SPELL_DREADFUL_ROAR, 0, 0);
-
if (me->GetDisplayId() == DISPLAYID_DEFAULT)
me->CastSpell((Unit*)nullptr, SPELL_STAGGERING_ROAR, false);
else
diff --git a/src/server/scripts/Northrend/UtgardeKeep/UtgardeKeep/boss_keleseth.cpp b/src/server/scripts/Northrend/UtgardeKeep/UtgardeKeep/boss_keleseth.cpp
index a3d0626fa1..20d40e9bed 100644
--- a/src/server/scripts/Northrend/UtgardeKeep/UtgardeKeep/boss_keleseth.cpp
+++ b/src/server/scripts/Northrend/UtgardeKeep/UtgardeKeep/boss_keleseth.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
@@ -45,12 +45,9 @@ enum eSpells
SPELL_FROST_TOMB_SUMMON = 42714,
SPELL_FROST_TOMB_AURA = 48400,
- SPELL_SHADOWBOLT_N = 43667,
- SPELL_SHADOWBOLT_H = 59389,
+ SPELL_SHADOWBOLT = 43667,
};
-#define SPELL_SHADOWBOLT DUNGEON_MODE(SPELL_SHADOWBOLT_N, SPELL_SHADOWBOLT_H)
-
struct npc_frost_tomb : public NullCreatureAI
{
npc_frost_tomb(Creature* c) : NullCreatureAI(c)
@@ -80,7 +77,7 @@ struct npc_frost_tomb : public NullCreatureAI
if (PrisonerGUID)
if (Unit* p = ObjectAccessor::GetUnit(*me, PrisonerGUID))
p->RemoveAurasDueToSpell(SPELL_FROST_TOMB_AURA);
- me->DespawnOrUnsummon(5000);
+ me->DespawnOrUnsummon(5s);
}
void UpdateAI(uint32 /*diff*/) override
diff --git a/src/server/scripts/Northrend/UtgardeKeep/UtgardeKeep/boss_skarvald_dalronn.cpp b/src/server/scripts/Northrend/UtgardeKeep/UtgardeKeep/boss_skarvald_dalronn.cpp
index 6e3ea7f52f..669cd34ee0 100644
--- a/src/server/scripts/Northrend/UtgardeKeep/UtgardeKeep/boss_skarvald_dalronn.cpp
+++ b/src/server/scripts/Northrend/UtgardeKeep/UtgardeKeep/boss_skarvald_dalronn.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
@@ -44,8 +44,7 @@ enum eSpells
SPELL_ENRAGE = 48193,
SPELL_SUMMON_SKARVALD_GHOST = 48613,
// Dalronn
- SPELL_SHADOW_BOLT_N = 43649,
- SPELL_SHADOW_BOLT_H = 59575,
+ SPELL_SHADOW_BOLT = 43649,
SPELL_DEBILITATE = 43650,
SPELL_SUMMON_SKELETONS = 52611,
SPELL_SUMMON_DALRONN_GHOST = 48612
@@ -353,7 +352,7 @@ struct boss_dalronn_the_controller : public ScriptedAI
case EVENT_SHADOW_BOLT:
if (Unit* target = SelectTarget(SelectTargetMethod::Random, 0, 40.0f, true))
{
- me->CastSpell(target, DUNGEON_MODE(SPELL_SHADOW_BOLT_N, SPELL_SHADOW_BOLT_H), false);
+ me->CastSpell(target, SPELL_SHADOW_BOLT, false);
}
events.Repeat(2s);
break;
diff --git a/src/server/scripts/Northrend/UtgardeKeep/UtgardeKeep/instance_utgarde_keep.cpp b/src/server/scripts/Northrend/UtgardeKeep/UtgardeKeep/instance_utgarde_keep.cpp
index 60ecd789ca..9d909bdb49 100644
--- a/src/server/scripts/Northrend/UtgardeKeep/UtgardeKeep/instance_utgarde_keep.cpp
+++ b/src/server/scripts/Northrend/UtgardeKeep/UtgardeKeep/instance_utgarde_keep.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/scripts/Northrend/UtgardeKeep/UtgardeKeep/utgarde_keep.cpp b/src/server/scripts/Northrend/UtgardeKeep/UtgardeKeep/utgarde_keep.cpp
index 62263725b5..1a7cb30300 100644
--- a/src/server/scripts/Northrend/UtgardeKeep/UtgardeKeep/utgarde_keep.cpp
+++ b/src/server/scripts/Northrend/UtgardeKeep/UtgardeKeep/utgarde_keep.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
@@ -82,53 +82,69 @@ struct npc_dragonflayer_forge_master : public ScriptedAI
enum EnslavedProtoDrake
{
- TYPE_PROTODRAKE_AT = 28,
- DATA_PROTODRAKE_MOVE = 6,
-
- PATH_PROTODRAKE = 125946,
+ SPELL_REND = 43931,
+ SPELL_FLAME_BREATH = 50653,
+ SPELL_KNOCK_AWAY = 49722,
EVENT_REND = 1,
EVENT_FLAME_BREATH = 2,
EVENT_KNOCKAWAY = 3,
+ // Special
+ EVENT_PRE_LAND = 4,
+ EVENT_LAND = 5,
- SPELL_REND = 43931,
- SPELL_FLAME_BREATH = 50653,
- SPELL_KNOCK_AWAY = 49722,
-
- POINT_LAST = 5,
+ // Special
+ TYPE_PROTODRAKE_AT = 28,
+ DATA_PROTODRAKE_MOVE = 6,
+ POINT_TAKE_OFF = 1,
+ POINT_PRE_LAND = 2,
+ POINT_LAND = 3,
};
-const Position protodrakeCheckPos = {206.24f, -190.28f, 200.11f, 0.f};
+const Position protodrakeCheckPos{206.24f, -190.28f, 200.11f, 0.f};
+const Position protodrakeTakeOffPos{209.1206f, -187.86578f, 215.00346f};
+const Position protodrakePreLandPos{230.80234f, -164.99632f, 196.74878f};
+const Position protodrakeLandPos{241.2079f, -163.06265f, 193.47125f};
struct npc_enslaved_proto_drake : public ScriptedAI
{
- npc_enslaved_proto_drake(Creature* creature) : ScriptedAI(creature)
- {
- _setData = false;
- }
+ explicit npc_enslaved_proto_drake(Creature* creature) : ScriptedAI(creature) { }
void Reset() override
{
_events.Reset();
_events.ScheduleEvent(EVENT_REND, 2s, 3s);
- _events.ScheduleEvent(EVENT_FLAME_BREATH, 5500ms, 7000ms);
- _events.ScheduleEvent(EVENT_KNOCKAWAY, 3500ms, 6000ms);
+ _events.ScheduleEvent(EVENT_FLAME_BREATH, 5500ms, 7s);
+ _events.ScheduleEvent(EVENT_KNOCKAWAY, 3500ms, 6s);
+ scheduler.CancelAll();
}
void MovementInform(uint32 type, uint32 id) override
{
- if (type == WAYPOINT_MOTION_TYPE && id == POINT_LAST)
+ if (type == EFFECT_MOTION_TYPE && id == POINT_TAKE_OFF)
{
+ ScheduleUniqueTimedEvent(500ms, [&]
+ {
+ me->GetMotionMaster()->MovePoint(POINT_PRE_LAND, protodrakePreLandPos);
+ }, EVENT_PRE_LAND);
+ }
+
+ if (type == POINT_MOTION_TYPE && id == POINT_PRE_LAND)
+ {
+ ScheduleUniqueTimedEvent(0s, [&]
+ {
+ me->GetMotionMaster()->MovePoint(POINT_LAND, protodrakeLandPos);
+ }, EVENT_LAND);
+ }
+
+ if (type == POINT_MOTION_TYPE && id == POINT_LAND)
+ {
+ me->SetFacingTo(0.25f);
me->SetHomePosition(me->GetPositionX(), me->GetPositionY(), me->GetPositionZ(), 0.25f);
if (Vehicle* v = me->GetVehicleKit())
if (Unit* p = v->GetPassenger(0))
if (Creature* rider = p->ToCreature())
rider->SetHomePosition(me->GetPositionX(), me->GetPositionY(), me->GetPositionZ(), 0.25f);
-
- me->SetCanFly(false);
- me->SetDisableGravity(false);
- me->SetFacingTo(0.25f);
- me->SetImmuneToAll(false);
}
}
@@ -137,14 +153,14 @@ struct npc_enslaved_proto_drake : public ScriptedAI
if (type == TYPE_PROTODRAKE_AT && data == DATA_PROTODRAKE_MOVE && !_setData && me->IsAlive() && me->GetDistance(protodrakeCheckPos) < 10.0f)
{
_setData = true;
- me->SetCanFly(true);
- me->SetDisableGravity(true);
- me->GetMotionMaster()->MovePath(PATH_PROTODRAKE, false);
+ me->GetMotionMaster()->MoveTakeoff(POINT_TAKE_OFF, protodrakeTakeOffPos, 8.0f);
}
}
void UpdateAI(uint32 diff) override
{
+ scheduler.Update(diff);
+
if (!UpdateVictim())
return;
@@ -167,7 +183,7 @@ struct npc_enslaved_proto_drake : public ScriptedAI
break;
case EVENT_KNOCKAWAY:
DoCast(SPELL_KNOCK_AWAY);
- _events.ScheduleEvent(EVENT_KNOCKAWAY, 7000ms, 8500ms);
+ _events.ScheduleEvent(EVENT_KNOCKAWAY, 7s, 8500ms);
break;
default:
break;
@@ -178,7 +194,7 @@ struct npc_enslaved_proto_drake : public ScriptedAI
}
private:
- bool _setData;
+ bool _setData{false};
EventMap _events;
};
diff --git a/src/server/scripts/Northrend/UtgardeKeep/UtgardeKeep/utgarde_keep.h b/src/server/scripts/Northrend/UtgardeKeep/UtgardeKeep/utgarde_keep.h
index 9ba7627512..d06d237b4b 100644
--- a/src/server/scripts/Northrend/UtgardeKeep/UtgardeKeep/utgarde_keep.h
+++ b/src/server/scripts/Northrend/UtgardeKeep/UtgardeKeep/utgarde_keep.h
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/scripts/Northrend/UtgardeKeep/UtgardePinnacle/boss_palehoof.cpp b/src/server/scripts/Northrend/UtgardeKeep/UtgardePinnacle/boss_palehoof.cpp
index 3229d8c96c..5f6478e644 100644
--- a/src/server/scripts/Northrend/UtgardeKeep/UtgardePinnacle/boss_palehoof.cpp
+++ b/src/server/scripts/Northrend/UtgardeKeep/UtgardePinnacle/boss_palehoof.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
@@ -34,36 +34,28 @@ enum Misc
// PALEHOOF
SPELL_ARCING_SMASH = 48260,
- SPELL_IMPALE_N = 48261,
- SPELL_IMPALE_H = 59268,
- SPELL_WITHERING_ROAR_N = 48256,
- SPELL_WITHERING_ROAR_H = 59267,
+ SPELL_IMPALE = 48261,
+ SPELL_WITHERING_ROAR = 48256,
SPELL_FREEZE = 16245,
// Massive Jormungar
SPELL_ACID_SPIT = 48132,
- SPELL_ACID_SPLATTER_N = 48136,
- SPELL_ACID_SPLATTER_H = 59272,
- SPELL_POISON_BREATH_N = 48133,
- SPELL_POISON_BREATH_H = 59271,
+ SPELL_ACID_SPLATTER = 48136,
+ SPELL_POISON_BREATH = 48133,
NPC_JORMUNGAR_WORM = 27228,
// Ferocious Rhino
- SPELL_GORE_N = 48130,
- SPELL_GORE_H = 59264,
- SPELL_GRIEVOUS_WOUND_N = 48105,
- SPELL_GRIEVOUS_WOUND_H = 59263,
+ SPELL_GORE = 48130,
+ SPELL_GRIEVOUS_WOUND = 48105,
SPELL_STOMP = 48131,
// Ravenous Furbolg
- SPELL_CHAIN_LIGHTING_N = 48140,
- SPELL_CHAIN_LIGHTING_H = 59273,
+ SPELL_CHAIN_LIGHTNING = 48140,
SPELL_CRAZED = 48139,
SPELL_TERRIFYING_ROAR = 48144,
// Frenzied Worgen
- SPELL_MORTAL_WOUND_N = 48137,
- SPELL_MORTAL_WOUND_H = 59265,
+ SPELL_MORTAL_WOUND = 48137,
SPELL_ENRAGE_1 = 48138,
SPELL_ENRAGE_2 = 48142,
@@ -296,14 +288,14 @@ public:
}
case EVENT_PALEHOOF_WITHERING_ROAR:
{
- me->CastSpell(me, IsHeroic() ? SPELL_WITHERING_ROAR_H : SPELL_WITHERING_ROAR_N, false);
+ me->CastSpell(me, SPELL_WITHERING_ROAR, false);
events.Repeat(8s, 12s);
break;
}
case EVENT_PALEHOOF_IMPALE:
{
if (Unit* tgt = SelectTarget(SelectTargetMethod::Random, 0))
- me->CastSpell(tgt, IsHeroic() ? SPELL_IMPALE_H : SPELL_IMPALE_N, false);
+ me->CastSpell(tgt, SPELL_IMPALE, false);
events.Repeat(8s, 12s);
break;
@@ -424,7 +416,7 @@ public:
}
case EVENT_JORMUNGAR_ACID_SPLATTER:
{
- me->CastSpell(me, IsHeroic() ? SPELL_ACID_SPLATTER_H : SPELL_ACID_SPLATTER_N, false);
+ me->CastSpell(me, SPELL_ACID_SPLATTER, false);
// Aura summon wont work because of duration
float x, y, z;
@@ -443,7 +435,7 @@ public:
case EVENT_JORMUNGAR_POISON_BREATH:
{
if (Unit* tgt = SelectTarget(SelectTargetMethod::Random, 0))
- me->CastSpell(tgt, IsHeroic() ? SPELL_POISON_BREATH_H : SPELL_POISON_BREATH_N, false);
+ me->CastSpell(tgt, SPELL_POISON_BREATH, false);
events.Repeat(8s, 12s);
break;
@@ -546,14 +538,14 @@ public:
}
case EVENT_RHINO_GORE:
{
- me->CastSpell(me->GetVictim(), IsHeroic() ? SPELL_GORE_H : SPELL_GORE_N, false);
+ me->CastSpell(me->GetVictim(), SPELL_GORE, false);
events.Repeat(13s, 17s);
break;
}
case EVENT_RHINO_WOUND:
{
if (Unit* tgt = SelectTarget(SelectTargetMethod::Random, 0))
- me->CastSpell(tgt, IsHeroic() ? SPELL_GRIEVOUS_WOUND_H : SPELL_GRIEVOUS_WOUND_N, false);
+ me->CastSpell(tgt, SPELL_GRIEVOUS_WOUND, false);
events.Repeat(18s, 22s);
break;
@@ -650,7 +642,7 @@ public:
{
case EVENT_FURBOLG_CHAIN:
{
- me->CastSpell(me->GetVictim(), IsHeroic() ? SPELL_CHAIN_LIGHTING_H : SPELL_CHAIN_LIGHTING_N, false);
+ me->CastSpell(me->GetVictim(), SPELL_CHAIN_LIGHTNING, false);
events.Repeat(4s, 7s);
break;
}
@@ -758,7 +750,7 @@ public:
{
case EVENT_WORGEN_MORTAL:
{
- me->CastSpell(me->GetVictim(), IsHeroic() ? SPELL_MORTAL_WOUND_H : SPELL_MORTAL_WOUND_N, false);
+ me->CastSpell(me->GetVictim(), SPELL_MORTAL_WOUND, false);
events.Repeat(4s, 7s);
break;
}
diff --git a/src/server/scripts/Northrend/UtgardeKeep/UtgardePinnacle/boss_skadi.cpp b/src/server/scripts/Northrend/UtgardeKeep/UtgardePinnacle/boss_skadi.cpp
index cf6318747d..efa101f386 100644
--- a/src/server/scripts/Northrend/UtgardeKeep/UtgardePinnacle/boss_skadi.cpp
+++ b/src/server/scripts/Northrend/UtgardeKeep/UtgardePinnacle/boss_skadi.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
@@ -38,16 +38,12 @@ enum Misc
EMOTE_RANGE = 1,
// SPELLS
- SPELL_CRUSH_N = 50234,
- SPELL_CRUSH_H = 59330,
- SPELL_POISONED_SPEAR_N = 50255,
- SPELL_POISONED_SPEAR_H = 59331,
- SPELL_WHIRLWIND_N = 50228,
- SPELL_WHIRLWIND_H = 50228,
+ SPELL_CRUSH = 50234,
+ SPELL_POISONED_SPEAR = 50255,
+ SPELL_WHIRLWIND = 50228,
SPELL_FREEZING_CLOUD_VISUAL = 47592,
- SPELL_FREEZING_CLOUD_N = 47579,
- SPELL_FREEZING_CLOUD_H = 60020,
+ SPELL_FREEZING_CLOUD = 47579,
SPELL_LAUNCH_HARPOON = 48642,
@@ -181,6 +177,7 @@ public:
else if (param == ACTION_PHASE2)
{
SecondPhase = true;
+ me->RemoveUnitFlag(UNIT_FLAG_NOT_SELECTABLE);
events.ScheduleEvent(EVENT_SKADI_CRUSH, 8s);
events.ScheduleEvent(EVENT_SKADI_SPEAR, 10s);
events.ScheduleEvent(EVENT_SKADI_WHIRLWIND, 15s);
@@ -218,21 +215,21 @@ public:
}
case EVENT_SKADI_CRUSH:
{
- me->CastSpell(me->GetVictim(), IsHeroic() ? SPELL_CRUSH_H : SPELL_CRUSH_N, false);
+ me->CastSpell(me->GetVictim(), SPELL_CRUSH, false);
events.Repeat(8s);
break;
}
case EVENT_SKADI_SPEAR:
{
if (Unit* tgt = SelectTarget(SelectTargetMethod::Random, 0))
- me->CastSpell(tgt, IsHeroic() ? SPELL_POISONED_SPEAR_H : SPELL_POISONED_SPEAR_N, false);
+ me->CastSpell(tgt, SPELL_POISONED_SPEAR, false);
events.Repeat(10s);
break;
}
case EVENT_SKADI_WHIRLWIND:
{
- me->CastSpell(me, IsHeroic() ? SPELL_WHIRLWIND_H : SPELL_WHIRLWIND_N, false);
+ me->CastSpell(me, SPELL_WHIRLWIND, false);
events.Repeat(15s, 20s);
events.DelayEvents(10s);
break;
@@ -322,7 +319,7 @@ public:
void SpellHitTarget(Unit* target, SpellInfo const* spellInfo) override
{
if (spellInfo->Id == 47593) // SPELL_FREEZING_CLOUD_VISUAL trigger
- target->CastSpell(target, me->GetMap()->IsHeroic() ? SPELL_FREEZING_CLOUD_H : SPELL_FREEZING_CLOUD_N, true);
+ target->CastSpell(target, SPELL_FREEZING_CLOUD, true);
}
void SpawnFlameTriggers(uint8 point)
@@ -339,13 +336,13 @@ public:
{
Creature* cr;
if ((cr = me->SummonCreature(NPC_BREATH_TRIGGER, 483, -484.9f, 105, 0, TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN, 30000)))
- cr->CastSpell(cr, cr->GetMap()->IsHeroic() ? SPELL_FREEZING_CLOUD_H : SPELL_FREEZING_CLOUD_N, true);
+ cr->CastSpell(cr, SPELL_FREEZING_CLOUD, true);
if ((cr = me->SummonCreature(NPC_BREATH_TRIGGER, 471.0f, -484.7f, 105, 0, TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN, 30000)))
- cr->CastSpell(cr, cr->GetMap()->IsHeroic() ? SPELL_FREEZING_CLOUD_H : SPELL_FREEZING_CLOUD_N, true);
+ cr->CastSpell(cr, SPELL_FREEZING_CLOUD, true);
for (uint8 j = 0; j < 7; j++)
if ((cr = me->SummonCreature(NPC_BREATH_TRIGGER, 477.0f, -507.0f + (j * 3), 105.0f, 0, TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN, 30000)))
- cr->CastSpell(cr, cr->GetMap()->IsHeroic() ? SPELL_FREEZING_CLOUD_H : SPELL_FREEZING_CLOUD_N, true);
+ cr->CastSpell(cr, SPELL_FREEZING_CLOUD, true);
}
}
diff --git a/src/server/scripts/Northrend/UtgardeKeep/UtgardePinnacle/boss_svala.cpp b/src/server/scripts/Northrend/UtgardeKeep/UtgardePinnacle/boss_svala.cpp
index 92fc069d45..915bfb5801 100644
--- a/src/server/scripts/Northrend/UtgardeKeep/UtgardePinnacle/boss_svala.cpp
+++ b/src/server/scripts/Northrend/UtgardeKeep/UtgardePinnacle/boss_svala.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
@@ -47,8 +47,7 @@ enum Misc
SPELL_BALL_OF_FLAME = 48246,
SPELL_RITUAL_OF_THE_SWORD = 48276,
SPELL_RITUAL_STRIKE = 48331,
- SPELL_SINSTER_STRIKE_N = 15667,
- SPELL_SINSTER_STRIKE_H = 59409,
+ SPELL_SINISTER_STRIKE = 15667,
EQUIP_SWORD = 40343,
// CHANNELERS
@@ -157,7 +156,7 @@ public:
me->SetImmuneToAll(true);
Started = true;
me->setActive(true);
- events2.ScheduleEvent(EVENT_SVALA_START, 5000);
+ events2.ScheduleEvent(EVENT_SVALA_START, 5s);
if (Creature* pArthas = me->SummonCreature(NPC_ARTHAS, 295.81f, -366.16f, 92.57f, 1.58f, TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN, 59000))
ArthasGUID = pArthas->GetGUID();
@@ -303,7 +302,7 @@ public:
switch (events.ExecuteEvent())
{
case EVENT_SORROWGRAVE_SS:
- me->CastSpell(me->GetVictim(), IsHeroic() ? SPELL_SINSTER_STRIKE_H : SPELL_SINSTER_STRIKE_N, false);
+ me->CastSpell(me->GetVictim(), SPELL_SINISTER_STRIKE, false);
events.ScheduleEvent(EVENT_SORROWGRAVE_SS, 3s, 5s);
break;
case EVENT_SORROWGRAVE_FLAMES:
@@ -339,7 +338,7 @@ public:
me->SetControlled(true, UNIT_STATE_ROOT);
}
- events.DelayEvents(25001); // +1 just to be sure
+ events.DelayEvents(25001ms); // +1 just to be sure
events.ScheduleEvent(EVENT_SORROWGRAVE_RITUAL_SPELLS, 0ms);
events.ScheduleEvent(EVENT_SORROWGRAVE_FINISH_RITUAL, 25s);
return;
diff --git a/src/server/scripts/Northrend/UtgardeKeep/UtgardePinnacle/boss_ymiron.cpp b/src/server/scripts/Northrend/UtgardeKeep/UtgardePinnacle/boss_ymiron.cpp
index 0a1487f159..6aeb0ebd12 100644
--- a/src/server/scripts/Northrend/UtgardeKeep/UtgardePinnacle/boss_ymiron.cpp
+++ b/src/server/scripts/Northrend/UtgardeKeep/UtgardePinnacle/boss_ymiron.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
@@ -32,16 +32,12 @@ enum Misc
SAY_SUMMON_TORGYN = 6,
// SPELLS
- SPELL_BANE_N = 48294,
- SPELL_BANE_H = 59301,
+ SPELL_BANE = 48294,
SPELL_DARK_SLASH = 48292,
- SPELL_FETID_ROT_N = 48291,
- SPELL_FETID_ROT_H = 59300,
+ SPELL_FETID_ROT = 48291,
SPELL_SCREAMS_OF_THE_DEAD = 51750,
- SPELL_SPIRIT_BURST_N = 48529, // when Ranulf
- SPELL_SPIRIT_BURST_H = 59305, // when Ranulf
- SPELL_SPIRIT_STRIKE_N = 48423, // when Haldor
- SPELL_SPIRIT_STRIKE_H = 59304, // when Haldor
+ SPELL_SPIRIT_BURST = 48529, // when Ranulf
+ SPELL_SPIRIT_STRIKE = 48423, // when Haldor
SPELL_SUMMON_AVENGING_SPIRIT = 48592,
SPELL_SUMMON_SPIRIT_FOUNT = 48386,
@@ -49,8 +45,7 @@ enum Misc
SPELL_CHANNEL_SPIRIT_TO_YMIRON = 48316,
SPELL_CHANNEL_YMIRON_TO_SPIRIT = 48307,
- SPELL_SPIRIT_FOUNT_N = 48380,
- SPELL_SPIRIT_FOUNT_H = 59320,
+ SPELL_SPIRIT_FOUNT = 48380,
SPELL_FLAMES = 39199,
@@ -217,7 +212,7 @@ public:
{
if (me->GetHealth() < std::max(0.0f, float(me->GetMaxHealth() * (1.0f - (IsHeroic() ? 0.2f : 0.334f)*float(BoatNum + 1)))))
{
- events.DelayEvents(12000);
+ events.DelayEvents(12s);
me->SetUnitFlag(UNIT_FLAG_NON_ATTACKABLE);
me->InterruptNonMeleeSpells(true);
me->CastSpell(me, SPELL_SCREAMS_OF_THE_DEAD, true);
@@ -242,13 +237,13 @@ public:
}
case EVENT_YMIRON_BANE:
{
- me->CastSpell(me, IsHeroic() ? SPELL_BANE_H : SPELL_BANE_N, false);
+ me->CastSpell(me, SPELL_BANE, false);
events.Repeat(20s, 25s);
break;
}
case EVENT_YMIRON_FETID_ROT:
{
- me->CastSpell(me->GetVictim(), IsHeroic() ? SPELL_FETID_ROT_H : SPELL_FETID_ROT_N, false);
+ me->CastSpell(me->GetVictim(), SPELL_FETID_ROT, false);
events.Repeat(10s, 13s);
break;
}
@@ -297,7 +292,7 @@ public:
{
summons.Summon(sf);
sf->SetSpeed(MOVE_RUN, 0.4f);
- sf->AddAura(IsHeroic() ? SPELL_SPIRIT_FOUNT_H : SPELL_SPIRIT_FOUNT_N, sf);
+ sf->AddAura(SPELL_SPIRIT_FOUNT, sf);
sf->SetUnitFlag(UNIT_FLAG_NOT_SELECTABLE);
sf->GetMotionMaster()->MoveFollow(me->GetVictim(), 0, rand_norm()*M_PI * 2, MOTION_SLOT_ACTIVE, false, false);
}
@@ -305,13 +300,13 @@ public:
}
case EVENT_YMIRON_HALDOR_ABILITY:
{
- me->CastSpell(me->GetVictim(), IsHeroic() ? SPELL_SPIRIT_STRIKE_H : SPELL_SPIRIT_STRIKE_N, false);
+ me->CastSpell(me->GetVictim(), SPELL_SPIRIT_STRIKE, false);
events.Repeat(5s);
break;
}
case EVENT_YMIRON_RANULF_ABILITY:
{
- me->CastSpell(me, IsHeroic() ? SPELL_SPIRIT_BURST_H : SPELL_SPIRIT_BURST_N, false);
+ me->CastSpell(me, SPELL_SPIRIT_BURST, false);
events.Repeat(10s);
break;
}
diff --git a/src/server/scripts/Northrend/UtgardeKeep/UtgardePinnacle/instance_utgarde_pinnacle.cpp b/src/server/scripts/Northrend/UtgardeKeep/UtgardePinnacle/instance_utgarde_pinnacle.cpp
index 47588a7bf8..cddc964aee 100644
--- a/src/server/scripts/Northrend/UtgardeKeep/UtgardePinnacle/instance_utgarde_pinnacle.cpp
+++ b/src/server/scripts/Northrend/UtgardeKeep/UtgardePinnacle/instance_utgarde_pinnacle.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/scripts/Northrend/UtgardeKeep/UtgardePinnacle/utgarde_pinnacle.cpp b/src/server/scripts/Northrend/UtgardeKeep/UtgardePinnacle/utgarde_pinnacle.cpp
index f1640e844a..93ee37f9a9 100644
--- a/src/server/scripts/Northrend/UtgardeKeep/UtgardePinnacle/utgarde_pinnacle.cpp
+++ b/src/server/scripts/Northrend/UtgardeKeep/UtgardePinnacle/utgarde_pinnacle.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/scripts/Northrend/UtgardeKeep/UtgardePinnacle/utgarde_pinnacle.h b/src/server/scripts/Northrend/UtgardeKeep/UtgardePinnacle/utgarde_pinnacle.h
index 21f5eadd51..f05387598e 100644
--- a/src/server/scripts/Northrend/UtgardeKeep/UtgardePinnacle/utgarde_pinnacle.h
+++ b/src/server/scripts/Northrend/UtgardeKeep/UtgardePinnacle/utgarde_pinnacle.h
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/scripts/Northrend/VaultOfArchavon/boss_archavon.cpp b/src/server/scripts/Northrend/VaultOfArchavon/boss_archavon.cpp
index 8e3d5372ed..c37b20eb70 100644
--- a/src/server/scripts/Northrend/VaultOfArchavon/boss_archavon.cpp
+++ b/src/server/scripts/Northrend/VaultOfArchavon/boss_archavon.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
@@ -27,14 +27,10 @@ enum Archavon
SPELL_ROCK_SHARDS = 58678,
SPELL_ROCK_SHARDS_LEFT_HAND_VISUAL = 58689,
SPELL_ROCK_SHARDS_RIGHT_HAND_VISUAL = 58692,
- SPELL_ROCK_SHARDS_DAMAGE_10 = 58695,
- SPELL_ROCK_SHARDS_DAMAGE_25 = 60883,
- SPELL_CRUSHING_LEAP_10 = 58960,
- SPELL_CRUSHING_LEAP_25 = 60894, // Instant (10-80yr range) -- Leaps at an enemy, inflicting 8000 Physical damage, knocking all nearby enemies away, and creating a cloud of choking debris.
- SPELL_STOMP_10 = 58663,
- SPELL_STOMP_25 = 60880,
- SPELL_IMPALE_10 = 58666,
- SPELL_IMPALE_25 = 60882, // Lifts an enemy off the ground with a spiked fist, inflicting 47125 to 52875 Physical damage and 9425 to 10575 additional damage each second for 8 sec.
+ SPELL_ROCK_SHARDS_DAMAGE = 58695,
+ SPELL_CRUSHING_LEAP = 58960,
+ SPELL_STOMP = 58663,
+ SPELL_IMPALE = 58666,
SPELL_BERSERK = 47008
};
@@ -145,7 +141,7 @@ class boss_archavon : public CreatureScript
case EVENT_CHOKING_CLOUD:
if (Unit* target = SelectTarget(SelectTargetMethod::Random, 0, 0.0f, false, false))
{
- DoCast(target, RAID_MODE(SPELL_CRUSHING_LEAP_10, SPELL_CRUSHING_LEAP_25), true); //10y ~ 80y, ignore range
+ DoCast(target, SPELL_CRUSHING_LEAP, true); //10y ~ 80y, ignore range
}
events.Repeat(30s);
@@ -156,14 +152,14 @@ class boss_archavon : public CreatureScript
snprintf(buffer, sizeof(buffer), "Archavon the Stone Watcher lunges for %s!", me->GetVictim()->GetName().c_str());
me->TextEmote(buffer);
- DoCastVictim(RAID_MODE(SPELL_STOMP_10, SPELL_STOMP_25));
+ DoCastVictim(SPELL_STOMP);
events.Repeat(45s);
events.ScheduleEvent(EVENT_IMPALE, 3s);
break;
}
case EVENT_IMPALE:
- DoCastVictim(RAID_MODE(SPELL_IMPALE_10, SPELL_IMPALE_25));
+ DoCastVictim(SPELL_IMPALE);
break;
case EVENT_BERSERK:
DoCast(me, SPELL_BERSERK, true);
@@ -205,17 +201,10 @@ class spell_archavon_rock_shards : public SpellScript
return;
}
- Map* map = caster->GetMap();
- if (!map)
- {
- return;
- }
-
caster->CastSpell(target, SPELL_ROCK_SHARDS_LEFT_HAND_VISUAL, true);
caster->CastSpell(target, SPELL_ROCK_SHARDS_RIGHT_HAND_VISUAL, true);
- uint32 spellId = map->Is25ManRaid() ? SPELL_ROCK_SHARDS_DAMAGE_25 : SPELL_ROCK_SHARDS_DAMAGE_10;
- caster->CastSpell(target, spellId, true);
+ caster->CastSpell(target, SPELL_ROCK_SHARDS_DAMAGE, true);
}
void Register() override
diff --git a/src/server/scripts/Northrend/VaultOfArchavon/boss_emalon.cpp b/src/server/scripts/Northrend/VaultOfArchavon/boss_emalon.cpp
index bf8da40c88..1957ceacf3 100644
--- a/src/server/scripts/Northrend/VaultOfArchavon/boss_emalon.cpp
+++ b/src/server/scripts/Northrend/VaultOfArchavon/boss_emalon.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
@@ -29,10 +29,8 @@ enum Spells
SPELL_OVERCHARGE = 64218,
SPELL_BERSERK = 26662,
- SPELL_CHAIN_LIGHTNING_10 = 64213,
- SPELL_CHAIN_LIGHTNING_25 = 64215,
- SPELL_LIGHTNING_NOVA_10 = 64216,
- SPELL_LIGHTNING_NOVA_25 = 65279,
+ SPELL_CHAIN_LIGHTNING = 64213,
+ SPELL_LIGHTNING_NOVA = 64216,
};
enum Events
@@ -171,11 +169,11 @@ public:
{
case EVENT_CHAIN_LIGHTNING:
if (Unit* target = SelectTarget(SelectTargetMethod::Random, 0))
- me->CastSpell(target, RAID_MODE(SPELL_CHAIN_LIGHTNING_10, SPELL_CHAIN_LIGHTNING_25), false);
+ me->CastSpell(target, SPELL_CHAIN_LIGHTNING, false);
events.Repeat(25s);
break;
case EVENT_LIGHTNING_NOVA:
- me->CastSpell(me, RAID_MODE(SPELL_LIGHTNING_NOVA_10, SPELL_LIGHTNING_NOVA_25), false);
+ me->CastSpell(me, SPELL_LIGHTNING_NOVA, false);
events.Repeat(40s);
break;
case EVENT_OVERCHARGE:
diff --git a/src/server/scripts/Northrend/VaultOfArchavon/boss_koralon.cpp b/src/server/scripts/Northrend/VaultOfArchavon/boss_koralon.cpp
index 6068ab5e2b..2f516c5ec8 100644
--- a/src/server/scripts/Northrend/VaultOfArchavon/boss_koralon.cpp
+++ b/src/server/scripts/Northrend/VaultOfArchavon/boss_koralon.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/scripts/Northrend/VaultOfArchavon/boss_toravon.cpp b/src/server/scripts/Northrend/VaultOfArchavon/boss_toravon.cpp
index b5a749b324..06858142f0 100644
--- a/src/server/scripts/Northrend/VaultOfArchavon/boss_toravon.cpp
+++ b/src/server/scripts/Northrend/VaultOfArchavon/boss_toravon.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/scripts/Northrend/VaultOfArchavon/instance_vault_of_archavon.cpp b/src/server/scripts/Northrend/VaultOfArchavon/instance_vault_of_archavon.cpp
index a0227350d6..1dce8ce96e 100644
--- a/src/server/scripts/Northrend/VaultOfArchavon/instance_vault_of_archavon.cpp
+++ b/src/server/scripts/Northrend/VaultOfArchavon/instance_vault_of_archavon.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/scripts/Northrend/VaultOfArchavon/vault_of_archavon.h b/src/server/scripts/Northrend/VaultOfArchavon/vault_of_archavon.h
index a8e8a047c2..efdea80ac7 100644
--- a/src/server/scripts/Northrend/VaultOfArchavon/vault_of_archavon.h
+++ b/src/server/scripts/Northrend/VaultOfArchavon/vault_of_archavon.h
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/scripts/Northrend/VioletHold/boss_cyanigosa.cpp b/src/server/scripts/Northrend/VioletHold/boss_cyanigosa.cpp
index c7c9a01ad8..34e07f1b53 100644
--- a/src/server/scripts/Northrend/VioletHold/boss_cyanigosa.cpp
+++ b/src/server/scripts/Northrend/VioletHold/boss_cyanigosa.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/scripts/Northrend/VioletHold/boss_erekem.cpp b/src/server/scripts/Northrend/VioletHold/boss_erekem.cpp
index 24b352a9a9..79e90041e1 100644
--- a/src/server/scripts/Northrend/VioletHold/boss_erekem.cpp
+++ b/src/server/scripts/Northrend/VioletHold/boss_erekem.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/scripts/Northrend/VioletHold/boss_ichoron.cpp b/src/server/scripts/Northrend/VioletHold/boss_ichoron.cpp
index 6ac9bdbf37..1c21394b4a 100644
--- a/src/server/scripts/Northrend/VioletHold/boss_ichoron.cpp
+++ b/src/server/scripts/Northrend/VioletHold/boss_ichoron.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
@@ -344,7 +344,7 @@ public:
if (Creature* pIchoron = pInstance->instance->GetCreature(pInstance->GetGuidData(DATA_ICHORON_GUID)))
if (pIchoron->AI())
pIchoron->AI()->DoAction(ACTION_WATER_ELEMENT_KILLED);
- me->DespawnOrUnsummon(2500);
+ me->DespawnOrUnsummon(2500ms);
}
void AttackStart(Unit* /*who*/) override {}
diff --git a/src/server/scripts/Northrend/VioletHold/boss_lavanthor.cpp b/src/server/scripts/Northrend/VioletHold/boss_lavanthor.cpp
index d3082aa82e..cbd8b3f625 100644
--- a/src/server/scripts/Northrend/VioletHold/boss_lavanthor.cpp
+++ b/src/server/scripts/Northrend/VioletHold/boss_lavanthor.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/scripts/Northrend/VioletHold/boss_moragg.cpp b/src/server/scripts/Northrend/VioletHold/boss_moragg.cpp
index 0fc29dab34..abfbc167c0 100644
--- a/src/server/scripts/Northrend/VioletHold/boss_moragg.cpp
+++ b/src/server/scripts/Northrend/VioletHold/boss_moragg.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/scripts/Northrend/VioletHold/boss_xevozz.cpp b/src/server/scripts/Northrend/VioletHold/boss_xevozz.cpp
index 27b354bee4..86bd871c02 100644
--- a/src/server/scripts/Northrend/VioletHold/boss_xevozz.cpp
+++ b/src/server/scripts/Northrend/VioletHold/boss_xevozz.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
@@ -121,7 +121,7 @@ public:
while (entry1 == entry2);
me->CastSpell((Unit*)nullptr, entry2, true);
}
- events.RepeatEvent(45000);
+ events.Repeat(45s);
events.RescheduleEvent(EVENT_SPELL_ARCANE_BUFFET, 5s);
events.RescheduleEvent(EVENT_CHECK_DISTANCE, 6s);
}
@@ -135,7 +135,7 @@ public:
if (me->GetDistance(c) < 3.0f)
{
c->CastSpell(me, SPELL_ARCANE_POWER, false);
- c->DespawnOrUnsummon(8000);
+ c->DespawnOrUnsummon(8s);
found = true;
}
if (found)
diff --git a/src/server/scripts/Northrend/VioletHold/boss_zuramat.cpp b/src/server/scripts/Northrend/VioletHold/boss_zuramat.cpp
index f7ec86e1b8..78a273076b 100644
--- a/src/server/scripts/Northrend/VioletHold/boss_zuramat.cpp
+++ b/src/server/scripts/Northrend/VioletHold/boss_zuramat.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
@@ -222,7 +222,7 @@ public:
if (Creature* c = pInstance->instance->GetCreature(SummonedGUID))
c->DespawnOrUnsummon();
}
- me->DespawnOrUnsummon(5000);
+ me->DespawnOrUnsummon(5s);
}
void SummonedCreatureDespawn(Creature* pSummoned) override
diff --git a/src/server/scripts/Northrend/VioletHold/instance_violet_hold.cpp b/src/server/scripts/Northrend/VioletHold/instance_violet_hold.cpp
index 8406b3527c..021210d817 100644
--- a/src/server/scripts/Northrend/VioletHold/instance_violet_hold.cpp
+++ b/src/server/scripts/Northrend/VioletHold/instance_violet_hold.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
@@ -92,7 +92,7 @@ public:
uiFirstBoss = 0;
uiSecondBoss = 0;
events.Reset();
- events.RescheduleEvent(EVENT_CHECK_PLAYERS, 0);
+ events.RescheduleEvent(EVENT_CHECK_PLAYERS, 0ms);
GateHealth = 100;
WaveCount = 0;
PortalLocation = 0;
@@ -666,7 +666,7 @@ public:
EncounterStatus = NOT_STARTED;
CLEANED = false;
events.Reset();
- events.RescheduleEvent(EVENT_CHECK_PLAYERS, 0);
+ events.RescheduleEvent(EVENT_CHECK_PLAYERS, 0ms);
data >> m_auiEncounter[0];
data >> m_auiEncounter[1];
diff --git a/src/server/scripts/Northrend/VioletHold/violet_hold.cpp b/src/server/scripts/Northrend/VioletHold/violet_hold.cpp
index 1332cf6723..4d1bc0924f 100644
--- a/src/server/scripts/Northrend/VioletHold/violet_hold.cpp
+++ b/src/server/scripts/Northrend/VioletHold/violet_hold.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
@@ -182,7 +182,7 @@ public:
case EVENT_SUMMON_KEEPER_OR_GUARDIAN:
bKorG = true;
spawned = true;
- if (Creature* c = DoSummon(RAND(NPC_PORTAL_GUARDIAN, NPC_PORTAL_KEEPER), me, 2.0f, 0, TEMPSUMMON_DEAD_DESPAWN))
+ if (Creature* c = DoSummon(RAND(NPC_PORTAL_GUARDIAN, NPC_PORTAL_KEEPER_1, NPC_PORTAL_KEEPER_2), me, 2.0f, 0, TEMPSUMMON_DEAD_DESPAWN))
me->CastSpell(c, SPELL_PORTAL_CHANNEL, false);
events.RescheduleEvent(EVENT_SUMMON_KEEPER_TRASH, 20s);
break;
@@ -205,7 +205,7 @@ public:
break;
case EVENT_SUMMON_SABOTEOUR:
DoSummon(NPC_SABOTEOUR, me, 2.0f, 0, TEMPSUMMON_CORPSE_DESPAWN);
- me->DespawnOrUnsummon(3000);
+ me->DespawnOrUnsummon(3s);
break;
}
@@ -220,11 +220,12 @@ public:
if (pInstance)
for (SummonList::iterator itr = listOfMobs.begin(); itr != listOfMobs.end(); ++itr)
if (Creature* c = pInstance->instance->GetCreature(*itr))
- if (c->IsAlive() && (c->GetEntry() == NPC_PORTAL_GUARDIAN || c->GetEntry() == NPC_PORTAL_KEEPER))
+ if (c->IsAlive() && c->EntryEquals(NPC_PORTAL_GUARDIAN, NPC_PORTAL_KEEPER_1, NPC_PORTAL_KEEPER_2))
{
me->CastSpell(c, SPELL_PORTAL_CHANNEL, false);
return;
}
+
Unit::Kill(me, me, false);
}
}
@@ -372,7 +373,7 @@ struct violet_hold_trashAI : public npc_escortAI
break;
}
SetDespawnAtEnd(false);
- Start(true, true);
+ Start(true);
}
npc_escortAI::UpdateAI(diff);
@@ -422,73 +423,55 @@ struct violet_hold_trashAI : public npc_escortAI
enum AzureInvaderSpells
{
- SPELL_CLEAVE = 15496,
- SPELL_IMPALE_N = 58459,
- SPELL_IMPALE_H = 59256,
+ SPELL_CLEAVE = 15496,
+ SPELL_IMPALE = 58459,
SPELL_BRUTAL_STRIKE = 58460,
- SPELL_SUNDER_ARMOR = 58461,
+ SPELL_SUNDER_ARMOR = 58461,
};
-#define SPELL_IMPALE DUNGEON_MODE(SPELL_IMPALE_N, SPELL_IMPALE_H)
enum AzureSpellbreakerSpells
{
- SPELL_ARCANE_BLAST_N = 58462,
- SPELL_ARCANE_BLAST_H = 59257,
- SPELL_SLOW = 25603,
+ SPELL_ARCANE_BLAST = 58462,
+ SPELL_SLOW = 25603,
SPELL_CHAINS_OF_ICE = 58464,
- SPELL_CONE_OF_COLD_N = 58463,
- SPELL_CONE_OF_COLD_H = 59258
+ SPELL_CONE_OF_COLD = 58463,
};
-#define SPELL_ARCANE_BLAST DUNGEON_MODE(SPELL_ARCANE_BLAST_N, SPELL_ARCANE_BLAST_H)
-#define SPELL_CONE_OF_COLD DUNGEON_MODE(SPELL_CONE_OF_COLD_N, SPELL_CONE_OF_COLD_H)
enum AzureBinderSpells
{
- SPELL_ARCANE_BARRAGE_N = 58456,
- SPELL_ARCANE_BARRAGE_H = 59248,
- SPELL_ARCANE_EXPLOSION_N = 58455,
- SPELL_ARCANE_EXPLOSION_H = 59245,
- SPELL_FROST_NOVA_N = 58458,
- SPELL_FROST_NOVA_H = 59253,
- SPELL_FROSTBOLT_N = 58457,
- SPELL_FROSTBOLT_H = 59251,
+ SPELL_ARCANE_BARRAGE = 58456,
+ SPELL_ARCANE_EXPLOSION = 58455,
+ SPELL_FROST_NOVA = 58458,
+ SPELL_FROSTBOLT = 58457,
};
-#define SPELL_ARCANE_BARRAGE DUNGEON_MODE(SPELL_ARCANE_BARRAGE_N, SPELL_ARCANE_BARRAGE_H)
-#define SPELL_ARCANE_EXPLOSION DUNGEON_MODE(SPELL_ARCANE_EXPLOSION_N, SPELL_ARCANE_EXPLOSION_H)
-#define SPELL_FROST_NOVA DUNGEON_MODE(SPELL_FROST_NOVA_N, SPELL_FROST_NOVA_H)
-#define SPELL_FROSTBOLT DUNGEON_MODE(SPELL_FROSTBOLT_N, SPELL_FROSTBOLT_H)
enum AzureMageSlayerSpells
{
SPELL_ARCANE_EMPOWERMENT = 58469,
- SPELL_SPELL_LOCK = 30849
+ SPELL_SPELL_LOCK = 30849
};
enum AzureCaptainSpells
{
- SPELL_MORTAL_STRIKE = 32736,
+ SPELL_MORTAL_STRIKE = 32736,
SPELL_WHIRLWIND_OF_STEEL = 41056
};
enum AzureSorcerorSpells
{
- SPELL_ARCANE_STREAM_N = 60181,
- SPELL_ARCANE_STREAM_H = 60204,
- SPELL_MANA_DETONATION_N = 60182,
- SPELL_MANA_DETONATION_H = 60205
+ SPELL_ARCANE_STREAM = 60181,
+ SPELL_MANA_DETONATION = 60182,
};
-#define SPELL_ARCANE_STREAM DUNGEON_MODE(SPELL_ARCANE_STREAM_N, SPELL_ARCANE_STREAM_H)
-#define SPELL_MANA_DETONATION DUNGEON_MODE(SPELL_MANA_DETONATION_N, SPELL_MANA_DETONATION_H)
enum AzureRaiderSpells
{
- SPELL_CONCUSSION_BLOW = 52719,
+ SPELL_CONCUSSION_BLOW = 52719,
SPELL_MAGIC_REFLECTION = 60158
};
enum AzureStalkerSpells
{
- SPELL_BACKSTAB = 58471,
+ SPELL_BACKSTAB = 58471,
SPELL_TACTICAL_BLINK = 58470
};
@@ -1111,7 +1094,7 @@ public:
break;
}
SetDespawnAtEnd(false);
- Start(true, true);
+ Start(true);
}
if (bOpening)
@@ -1136,7 +1119,7 @@ public:
me->SetUnitFlag(UNIT_FLAG_NOT_SELECTABLE);
me->SetDisplayId(11686);
me->CastSpell(me, SPELL_TELEPORT_VISUAL, true);
- me->DespawnOrUnsummon(1000);
+ me->DespawnOrUnsummon(1s);
}
++count;
}
@@ -1198,11 +1181,11 @@ struct npc_violet_hold_defense_system : public ScriptedAI
{
case EVENT_ARCANE_LIGHTNING:
DoCastAOE(RAND(SPELL_ARCANE_LIGHTNING, SPELL_ARCANE_LIGHTNING_VISUAL));
- events.RepeatEvent(2000);
+ events.Repeat(2s);
break;
case EVENT_ARCANE_LIGHTNING_INSTAKILL:
DoCastAOE(SPELL_ARCANE_LIGHTNING_INSTAKILL);
- events.RepeatEvent(1000);
+ events.Repeat(1s);
break;
}
}
diff --git a/src/server/scripts/Northrend/VioletHold/violet_hold.h b/src/server/scripts/Northrend/VioletHold/violet_hold.h
index 4a3614089b..a21142afd7 100644
--- a/src/server/scripts/Northrend/VioletHold/violet_hold.h
+++ b/src/server/scripts/Northrend/VioletHold/violet_hold.h
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
@@ -47,7 +47,8 @@ enum Creatures
NPC_CYANIGOSA = 31134,
NPC_PORTAL_GUARDIAN = 30660,
- NPC_PORTAL_KEEPER = 30695,
+ NPC_PORTAL_KEEPER_1 = 30695,
+ NPC_PORTAL_KEEPER_2 = 30893,
NPC_AZURE_INVADER_1 = 30661,
NPC_AZURE_INVADER_2 = 30961,
NPC_AZURE_SPELLBREAKER_1 = 30662,
diff --git a/src/server/scripts/Northrend/isle_of_conquest.cpp b/src/server/scripts/Northrend/isle_of_conquest.cpp
index 9555f7c81e..41a5b36ae4 100644
--- a/src/server/scripts/Northrend/isle_of_conquest.cpp
+++ b/src/server/scripts/Northrend/isle_of_conquest.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
@@ -209,14 +209,14 @@ public:
enum BossIoCEvents
{
EVENT_CHECK_RAGE = 1,
- EVENT_BRUTAL_STRIKE = 2,
+ EVENT_MORTAL_STRIKE = 2,
EVENT_CRUSHING_LEAP = 3,
EVENT_DAGGER_THROW = 4,
};
enum BossIoCSpells
{
- SPELL_IOCBOSS_BRUTAL_STRIKE = 58460,
+ SPELL_IOCBOSS_MORTAL_STRIKE = 39171,
SPELL_IOCBOSS_CRUSHING_LEAP = 68506,
SPELL_IOCBOSS_DAGGER_THROW = 67280,
SPELL_IOCBOSS_RAGE = 66776,
@@ -262,7 +262,7 @@ public:
void JustEngagedWith(Unit* /*who*/) override
{
events.ScheduleEvent(EVENT_CHECK_RAGE, 2s);
- events.ScheduleEvent(EVENT_BRUTAL_STRIKE, 6s);
+ events.ScheduleEvent(EVENT_MORTAL_STRIKE, 6s);
events.ScheduleEvent(EVENT_CRUSHING_LEAP, 22s);
events.ScheduleEvent(EVENT_DAGGER_THROW, 10s);
}
@@ -282,8 +282,8 @@ public:
CheckRageBuff();
events.Repeat(2s);
break;
- case EVENT_BRUTAL_STRIKE:
- me->CastSpell(me->GetVictim(), SPELL_IOCBOSS_BRUTAL_STRIKE, false);
+ case EVENT_MORTAL_STRIKE:
+ DoCastVictim(SPELL_IOCBOSS_MORTAL_STRIKE);
events.Repeat(6s);
break;
case EVENT_CRUSHING_LEAP:
diff --git a/src/server/scripts/Northrend/northrend_script_loader.cpp b/src/server/scripts/Northrend/northrend_script_loader.cpp
index 0a505a1df6..8db96fc1a7 100644
--- a/src/server/scripts/Northrend/northrend_script_loader.cpp
+++ b/src/server/scripts/Northrend/northrend_script_loader.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/scripts/Northrend/zone_borean_tundra.cpp b/src/server/scripts/Northrend/zone_borean_tundra.cpp
index 8f352e8936..ec6a55f172 100644
--- a/src/server/scripts/Northrend/zone_borean_tundra.cpp
+++ b/src/server/scripts/Northrend/zone_borean_tundra.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
@@ -63,7 +63,7 @@ class spell_q11919_q11940_drake_hunt_aura : public AuraScript
GetCaster()->CastSpell(GetCaster(), SPELL_DRAKE_HATCHLING_SUBDUED, true);
owner->SetFaction(FACTION_FRIENDLY);
owner->SetImmuneToAll(true);
- owner->DespawnOrUnsummon(3 * MINUTE * IN_MILLISECONDS);
+ owner->DespawnOrUnsummon(180s);
}
void Register() override
@@ -464,7 +464,10 @@ public:
go->UseDoorOrButton();
if (npc_escortAI* pEscortAI = CAST_AI(npc_lurgglbr::npc_lurgglbrAI, creature->AI()))
- pEscortAI->Start(true, false, player->GetGUID());
+ {
+ creature->SetWalk(true);
+ pEscortAI->Start(true, player->GetGUID());
+ }
creature->SetFaction(player->GetTeamId() == TEAM_ALLIANCE ? FACTION_ESCORTEE_A_PASSIVE : FACTION_ESCORTEE_H_PASSIVE);
return true;
@@ -559,200 +562,13 @@ private:
Position _fezzix;
};
-/*######
-## Quest 11590: Abduction
-######*/
-
-// NPC 25316: Beryl Sorcerer
-enum BerylSorcerer
+// Spell 45625: - Arcane Chains: Character Force Cast
+enum ArcaneChains
{
- EVENT_FROSTBOLT = 1,
- EVENT_ARCANE_CHAINS = 2,
- NPC_LIBRARIAN_DONATHAN = 25262,
- NPC_CAPTURED_BERLY_SORCERER = 25474,
- SPELL_FROSTBOLT = 9672,
- SPELL_ARCANE_CHAINS = 45611,
SPELL_ARCANE_CHAINS_CHARACTER_FORCE_CAST = 45625,
- SPELL_ARCANE_CHAINS_SUMMON_CHAINED_MAGE_HUNTER = 45626,
- SPELL_COSMETIC_ENSLAVE_CHAINS_SELF = 45631,
- SPELL_ARCANE_CHAINS_CHANNEL_II = 45735
+ SPELL_ARCANE_CHAINS_SUMMON_CHAINED_MAGE_HUNTER = 45626
};
-class npc_beryl_sorcerer : public CreatureScript
-{
-public:
- npc_beryl_sorcerer() : CreatureScript("npc_beryl_sorcerer") { }
-
-struct npc_beryl_sorcererAI : public CreatureAI
- {
- npc_beryl_sorcererAI(Creature* creature) : CreatureAI(creature)
- {
- Initialize();
- }
-
- void Initialize()
- {
- _playerGUID.Clear();
- _chainsCast = false;
- }
-
- void Reset() override
- {
- me->SetReactState(REACT_AGGRESSIVE);
- Initialize();
- }
-
- void JustEngagedWith(Unit* who) override
- {
- if (me->IsValidAttackTarget(who))
- {
- AttackStart(who);
- }
-
- _events.ScheduleEvent(EVENT_FROSTBOLT, 3000, 4000);
- }
-
- void SpellHit(Unit* unit, SpellInfo const* spell) override
- {
- if (spell->Id == SPELL_ARCANE_CHAINS && !_chainsCast)
- {
- if (Player* player = unit->ToPlayer())
- {
- _playerGUID = player->GetGUID();
- _chainsCast = true;
- _events.ScheduleEvent(EVENT_ARCANE_CHAINS, 4s);
- }
- }
- }
-
- void UpdateAI(uint32 diff) override
- {
- if (!UpdateVictim())
- {
- return;
- }
-
- _events.Update(diff);
-
- if (uint32 eventId = _events.ExecuteEvent())
- {
- switch (eventId)
- {
- case EVENT_FROSTBOLT:
- DoCastVictim(SPELL_FROSTBOLT);
- _events.ScheduleEvent(EVENT_FROSTBOLT, 3s, 4s);
- break;
- case EVENT_ARCANE_CHAINS:
- if (me->HasAura(SPELL_ARCANE_CHAINS))
- {
- if (Player* player = ObjectAccessor::GetPlayer(*me, _playerGUID))
- {
- me->CastSpell(player, SPELL_ARCANE_CHAINS_CHARACTER_FORCE_CAST, TriggerCastFlags(TRIGGERED_FULL_MASK & ~TRIGGERED_IGNORE_AURA_INTERRUPT_FLAGS & ~TRIGGERED_IGNORE_CAST_ITEM));
- player->KilledMonsterCredit(NPC_CAPTURED_BERLY_SORCERER);
- me->DisappearAndDie();
- }
- }
- break;
- }
- }
- DoMeleeAttackIfReady();
- }
-
- private:
- EventMap _events;
- ObjectGuid _playerGUID;
- bool _chainsCast;
- };
-
- CreatureAI* GetAI(Creature* creature) const override
- {
- return new npc_beryl_sorcererAI(creature);
- }
-};
-
-// NPC 25474: Captured Beryl Sorcerer
-enum CapturedBerylSorcerer
-{
- EVENT_ADD_ARCANE_CHAINS = 1,
- EVENT_FOLLOW_PLAYER = 2
-};
-
-class npc_captured_beryl_sorcerer : public CreatureScript
-{
-public:
- npc_captured_beryl_sorcerer() : CreatureScript("npc_captured_beryl_sorcerer") {}
-
- struct npc_captured_beryl_sorcererAI : public FollowerAI
- {
- npc_captured_beryl_sorcererAI(Creature* creature) : FollowerAI(creature)
- {
- Initialize();
- }
-
- void Initialize()
- {
- me->SetUnitFlag(UNIT_FLAG_NON_ATTACKABLE);
- _events.ScheduleEvent(EVENT_ADD_ARCANE_CHAINS, 0ms);
- }
-
- void Reset() override
- {
- Initialize();
- }
-
- void UpdateAI(uint32 diff) override
- {
- _events.Update(diff);
-
- if (uint32 eventId = _events.ExecuteEvent())
- {
- switch (eventId)
- {
- case EVENT_ADD_ARCANE_CHAINS:
- if (TempSummon* tempSummon = me->ToTempSummon())
- {
- if (Unit* summoner = tempSummon->GetSummonerUnit())
- {
- summoner->CastSpell(summoner, SPELL_ARCANE_CHAINS_CHANNEL_II, TriggerCastFlags(TRIGGERED_FULL_MASK & ~TRIGGERED_IGNORE_AURA_INTERRUPT_FLAGS & ~TRIGGERED_IGNORE_CAST_ITEM & ~TRIGGERED_IGNORE_POWER_AND_REAGENT_COST & ~TRIGGERED_IGNORE_GCD));
- _events.ScheduleEvent(EVENT_FOLLOW_PLAYER, 1s);
- }
- }
- break;
-
- case EVENT_FOLLOW_PLAYER:
- if (TempSummon* tempSummon = me->ToTempSummon())
- {
- if (Player* summoner = tempSummon->GetSummonerUnit()->ToPlayer())
- {
- StartFollow(summoner);
- }
- }
- break;
- }
- }
- }
-
- void MoveInLineOfSight(Unit* who) override
- {
- FollowerAI::MoveInLineOfSight(who);
-
- if (who->GetEntry() == NPC_LIBRARIAN_DONATHAN && me->IsWithinDistInMap(who, INTERACTION_DISTANCE))
- {
- SetFollowComplete();
- me->DespawnOrUnsummon();
- }
- }
- private:
- EventMap _events;
- };
-
- CreatureAI* GetAI(Creature* creature) const override
- {
- return new npc_captured_beryl_sorcererAI(creature);
- }
-};
-
-// Spell 45625: - Arcane Chains: Character Force Cast
class spell_arcane_chains_character_force_cast : public SpellScript
{
PrepareSpellScript(spell_arcane_chains_character_force_cast);
@@ -778,7 +594,8 @@ class spell_arcane_chains_character_force_cast : public SpellScript
######*/
enum ImprisionedBerylSorcerer
{
- SPELL_NEURAL_NEEDLE = 45634,
+ SPELL_NEURAL_NEEDLE = 45634,
+ SPELL_COSMETIC_ENSLAVE_CHAINS_SELF = 45631,
NPC_IMPRISONED_BERYL_SORCERER = 25478,
@@ -914,7 +731,8 @@ 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);
- CAST_AI(npc_escortAI, (creature->AI()))->Start(true, false, player->GetGUID());
+ creature->SetWalk(true);
+ CAST_AI(npc_escortAI, (creature->AI()))->Start(true, player->GetGUID());
}
return true;
}
@@ -959,7 +777,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 +813,7 @@ public:
{
creature->SetStandState(UNIT_STAND_STATE_STAND);
creature->AI()->Talk(SAY_BONKER_2, player);
- CAST_AI(npc_escortAI, (creature->AI()))->Start(true, true, player->GetGUID());
+ CAST_AI(npc_escortAI, (creature->AI()))->Start(true, player->GetGUID());
}
return true;
}
@@ -1421,7 +1239,7 @@ public:
_playerGUID.Clear();
}
- void SetGUID(ObjectGuid guid, int32 /*action*/) override
+ void SetGUID(ObjectGuid const& guid, int32 /*action*/) override
{
if (_playerGUID)
return;
@@ -1431,7 +1249,7 @@ public:
if (Player* player = ObjectAccessor::GetPlayer(*me, _playerGUID))
me->SetFacingToObject(player);
- _events.ScheduleEvent(EVENT_TALK, 1000);
+ _events.ScheduleEvent(EVENT_TALK, 1s);
}
void UpdateAI(uint32 diff) override
@@ -1557,7 +1375,7 @@ public:
void Reset() override
{
me->SetImmuneToAll(true);
- _events.ScheduleEvent(EVENT_THASSARIAN_CAST, 1000);
+ _events.ScheduleEvent(EVENT_THASSARIAN_CAST, 1s);
}
void UpdateAI(uint32 diff) override
@@ -1648,7 +1466,7 @@ public:
void MovementInform(uint32 type, uint32 param) override
{
- if (type == WAYPOINT_MOTION_TYPE && param == 2)
+ if (type == WAYPOINT_MOTION_TYPE && param == 3)
{
me->SetWalk(false);
me->SetUInt32Value(UNIT_NPC_EMOTESTATE, EMOTE_STATE_READY1H);
@@ -1684,7 +1502,7 @@ public:
// Arthas load path
if (Creature* arthas = ObjectAccessor::GetCreature(*me, _arthasGUID))
{
- arthas->GetMotionMaster()->MovePath(PATH_ARTHAS, false);
+ arthas->GetMotionMaster()->MoveWaypoint(PATH_ARTHAS, false);
}
_events.ScheduleEvent(EVENT_THASSARIAN_SCRIPT_3, 1s);
break;
@@ -1692,7 +1510,7 @@ public:
// Talbot load path
if (Creature* talbot = ObjectAccessor::GetCreature(*me, _talbotGUID))
{
- talbot->GetMotionMaster()->MovePath(PATH_TALBOT, false);
+ talbot->GetMotionMaster()->MoveWaypoint(PATH_TALBOT, false);
}
_events.ScheduleEvent(EVENT_THASSARIAN_SCRIPT_4, 20s);
break;
@@ -1726,7 +1544,7 @@ public:
arlos->SetWalk(true);
arlos->SetImmuneToAll(true);
arlos->RemoveNpcFlag(UNIT_NPC_FLAG_QUESTGIVER);
- arlos->GetMotionMaster()->MovePath(PATH_ARLOS, false);
+ arlos->GetMotionMaster()->MoveWaypoint(PATH_ARLOS, false);
}
if (Creature* leryssa = me->SummonCreature(NPC_LERYSSA, 3751.0986f, 3614.9219f, 473.4048f, 4.5029f, TEMPSUMMON_CORPSE_TIMED_DESPAWN))
{
@@ -1734,7 +1552,7 @@ public:
leryssa->SetWalk(true);
leryssa->SetImmuneToAll(true);
leryssa->RemoveNpcFlag(UNIT_NPC_FLAG_GOSSIP | UNIT_NPC_FLAG_QUESTGIVER);
- leryssa->GetMotionMaster()->MovePath(PATH_LERYSSA, false);
+ leryssa->GetMotionMaster()->MoveWaypoint(PATH_LERYSSA, false);
}
_events.ScheduleEvent(EVENT_THASSARIAN_SCRIPT_7, 7s);
break;
@@ -1884,7 +1702,7 @@ public:
if (Creature* leryssa = ObjectAccessor::GetCreature(*me, _leryssaGUID))
{
leryssa->SetWalk(false);
- leryssa->MonsterMoveWithSpeed(3726.751f, 3568.1633f, 477.44086f, leryssa->GetSpeed(MOVE_RUN));
+ leryssa->GetMotionMaster()->MovePoint(0, 3726.751f, 3568.1633f, 477.44086f, FORCED_MOVEMENT_RUN);
}
_events.ScheduleEvent(EVENT_THASSARIAN_SCRIPT_23, 2s);
break;
@@ -1989,7 +1807,7 @@ public:
_playerGUID = player->GetGUID();
CloseGossipMenuFor(player);
me->RemoveNpcFlag(UNIT_NPC_FLAG_GOSSIP);
- me->GetMotionMaster()->MovePath(PATH_THASSARIAN, false);
+ me->GetMotionMaster()->MoveWaypoint(PATH_THASSARIAN, false);
}
}
@@ -2020,7 +1838,7 @@ public:
void MovementInform(uint32 type, uint32 param) override
{
- if (type == WAYPOINT_MOTION_TYPE && param == 2)
+ if (type == WAYPOINT_MOTION_TYPE && param == 3)
{
if (me->IsSummon())
{
@@ -2171,6 +1989,40 @@ class spell_soul_deflection : public AuraScript
}
};
+enum SpellBloodHaze
+{
+ SPELL_BLOODSPORE_HAZE = 50380,
+ SPELL_PSYCHOSIS = 50396
+};
+
+// 50380 - Bloodspore Haze
+class spell_bloodspore_haze : public SpellScript
+{
+ PrepareSpellScript(spell_bloodspore_haze);
+
+ bool Validate(SpellInfo const* /*spellInfo*/) override
+ {
+ return ValidateSpellInfo({ SPELL_PSYCHOSIS });
+ }
+
+ void HandleEffectHit(SpellEffIndex /*effIndex*/)
+ {
+ if (!GetHitUnit())
+ return;
+
+ if (GetHitUnit()->GetAuraCount(SPELL_BLOODSPORE_HAZE) >= 5)
+ {
+ GetHitUnit()->CastSpell(GetHitUnit(), SPELL_PSYCHOSIS, true);
+ GetHitUnit()->RemoveAura(SPELL_BLOODSPORE_HAZE);
+ }
+ }
+
+ void Register() override
+ {
+ OnEffectHitTarget += SpellEffectFn(spell_bloodspore_haze::HandleEffectHit, EFFECT_2, SPELL_EFFECT_SCRIPT_EFFECT);
+ }
+};
+
void AddSC_borean_tundra()
{
RegisterSpellScript(spell_q11919_q11940_drake_hunt_aura);
@@ -2183,8 +2035,6 @@ void AddSC_borean_tundra()
new npc_iruk();
new npc_nerubar_victim();
new npc_lurgglbr();
- new npc_beryl_sorcerer();
- new npc_captured_beryl_sorcerer();
RegisterSpellScript(spell_arcane_chains_character_force_cast);
new npc_imprisoned_beryl_sorcerer();
new npc_mootoo_the_younger();
@@ -2197,4 +2047,5 @@ void AddSC_borean_tundra()
RegisterCreatureAI(npc_jenny);
RegisterSpellScript(spell_necropolis_beam);
RegisterSpellScript(spell_soul_deflection);
+ RegisterSpellScript(spell_bloodspore_haze);
}
diff --git a/src/server/scripts/Northrend/zone_crystalsong_forest.cpp b/src/server/scripts/Northrend/zone_crystalsong_forest.cpp
index a211b22028..645d3c0224 100644
--- a/src/server/scripts/Northrend/zone_crystalsong_forest.cpp
+++ b/src/server/scripts/Northrend/zone_crystalsong_forest.cpp
@@ -1,84 +1,114 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
* with this program. If not, see <http://www.gnu.org/licenses/>.
*/
+#include "CombatAI.h"
#include "CreatureScript.h"
-#include "PassiveAI.h"
#include "Player.h"
#include "ScriptedCreature.h"
-#include "SmartScriptMgr.h"
+#include "SpellAuras.h"
+#include "SpellScript.h"
#include "Transport.h"
#include "Vehicle.h"
enum ePreparationsForWar
{
- NPC_HAMMERHEAD = 30585,
- NPC_CLOUDBUSTER = 30470,
- TRANSPORT_ORGRIMS_HAMMER = 192241,
- TRANSPORT_THE_SKYBREAKER = 192242
+ NPC_CLOUDBUSTER = 30470,
+ NPC_HAMMERHEAD = 30585,
+ TRANSPORT_ORGRIMS_HAMMER = 192241,
+ TRANSPORT_THE_SKYBREAKER = 192242,
+ SEAT_PLAYER = 0,
+ SPELL_FLIGHT = 48602,
+ SPELL_TO_ICECROWN_PLAYER_AURA_DISMOUNT_A = 56904,
+ SPELL_TO_ICECROWN_PLAYER_AURA_DISMOUNT_H = 57419,
+ SPELL_TO_ICECROWN_AIRSHIP_PLAYER_AURA_TELEPORT_TO_DALARAN = 57460,
+ SPELL_TO_ICECROWN_AIRSHIP_FROST_WYRM_WAITING_TO_SUMMON_AURA = 57498,
+ POINT_END = 16,
+ SPELL_TO_ICECROWN_AIRSHIP_AURA_DISMOUNT_RESPONSE = 56921, // unhandled - vehicle casts 50630 on self
+ SPELL_EJECT_ALL_PASSENGERS = 50630,
+ SPELL_TO_ICECROWN_AIRSHIP_TELEPORT_TO_AIRSHIP_A_FORCE_PLAYER_TO_CAST = 57554,
+ SPELL_TO_ICECROWN_AIRSHIP_TELEPORT_TO_AIRSHIP_H_FORCE_PLAYER_TO_CAST = 57556,
+ SPELL_TO_ICECROWN_AIRSHIP_TELEPORT_TO_AIRSHIP_A = 56917,
+ SPELL_TO_ICECROWN_AIRSHIP_TELEPORT_TO_AIRSHIP_H = 57417,
};
-struct npc_preparations_for_war_vehicle : public NullCreatureAI
+struct npc_preparations_for_war_vehicle : public VehicleAI
{
- npc_preparations_for_war_vehicle(Creature* creature) : NullCreatureAI(creature) { }
-
- uint8 pointId;
- uint32 searchForShipTimer;
- uint32 transportEntry;
-
- void InitializeAI() override
+ explicit npc_preparations_for_war_vehicle(Creature* creature) : VehicleAI(creature), searchForShipTimer(0), transportEntry(me->GetEntry() == NPC_CLOUDBUSTER ? TRANSPORT_THE_SKYBREAKER : TRANSPORT_ORGRIMS_HAMMER)
{
- WPPath* path = sSmartWaypointMgr->GetPath(me->GetEntry());
- if (!path || path->empty())
+ if (transportEntry == TRANSPORT_THE_SKYBREAKER)
{
- me->DespawnOrUnsummon(1);
- return;
+ // 30476 - [DND] Icecrown Flight To Airship Bunny (A)
+ passenger_x = 31.41805;
+ passenger_y = 0.126893;
+ passenger_z = 41.69821;
}
-
- Movement::PointsArray pathPoints;
- pathPoints.push_back(G3D::Vector3(me->GetPositionX(), me->GetPositionY(), me->GetPositionZ()));
-
- uint32 wpCounter = 1;
- WPPath::const_iterator itr;
- while ((itr = path->find(wpCounter++)) != path->end())
+ else // TRANSPORT_ORGRIMS_HAMMER
{
- WayPoint* wp = itr->second;
- pathPoints.push_back(G3D::Vector3(wp->x, wp->y, wp->z));
+ // 30588 - [DND] Icecrown Flight To Airship Bunny (H)
+ passenger_x = -18.10283;
+ passenger_y = -0.042108;
+ passenger_z = 45.31725;
}
+ }
- me->GetMotionMaster()->MoveSplinePath(&pathPoints);
+ void PassengerBoarded(Unit* who, int8 /*seatId*/, bool apply) override
+ {
+ if (apply)
+ {
+ DoCastSelf(SPELL_TO_ICECROWN_AIRSHIP_PLAYER_AURA_TELEPORT_TO_DALARAN, true);
+ DoCastSelf(SPELL_FLIGHT, true);
+ DoCastSelf(me->GetEntry() == NPC_CLOUDBUSTER ? SPELL_TO_ICECROWN_PLAYER_AURA_DISMOUNT_A : SPELL_TO_ICECROWN_PLAYER_AURA_DISMOUNT_H , true);
+ DoCastSelf(SPELL_TO_ICECROWN_AIRSHIP_FROST_WYRM_WAITING_TO_SUMMON_AURA, true);
+ me->GetMotionMaster()->MovePath(me->GetEntry(), FORCED_MOVEMENT_NONE, PathSource::SMART_WAYPOINT_MGR);
+ }
+ else
+ who->RemoveAurasDueToSpell(VEHICLE_SPELL_PARACHUTE); // maybe vehicle / seat flag should be responsible for parachute gain?
+ }
- NullCreatureAI::InitializeAI();
- pointId = 0;
- searchForShipTimer = 0;
- transportEntry = (me->GetEntry() == NPC_HAMMERHEAD ? TRANSPORT_ORGRIMS_HAMMER : TRANSPORT_THE_SKYBREAKER);
+ void MovementInform(uint32 type, uint32 id) override
+ {
+ if (type == ESCORT_MOTION_TYPE && id == POINT_END)
+ searchForShipTimer = 3000;
}
- void MovementInform(uint32 type, uint32 /*id*/) override
+ void SpellHit(Unit* /*caster*/, SpellInfo const* spell) override
{
- if (type == ESCORT_MOTION_TYPE)
- if (++pointId == 17) // path size
- searchForShipTimer = 3000;
+ switch (spell->Id)
+ {
+ case SPELL_TO_ICECROWN_AIRSHIP_AURA_DISMOUNT_RESPONSE:
+ break;
+ case SPELL_TO_ICECROWN_AIRSHIP_TELEPORT_TO_AIRSHIP_A_FORCE_PLAYER_TO_CAST:
+ case SPELL_TO_ICECROWN_AIRSHIP_TELEPORT_TO_AIRSHIP_H_FORCE_PLAYER_TO_CAST:
+ {
+ uint32 teleportSpell = (spell->Id == SPELL_TO_ICECROWN_AIRSHIP_TELEPORT_TO_AIRSHIP_A_FORCE_PLAYER_TO_CAST)
+ ? SPELL_TO_ICECROWN_AIRSHIP_TELEPORT_TO_AIRSHIP_A
+ : SPELL_TO_ICECROWN_AIRSHIP_TELEPORT_TO_AIRSHIP_H;
+ DoCastSelf(teleportSpell, true); // hack: cast on self to avoid visual glitch on player when ejecting and teleporting on transport
+ DoCastSelf(SPELL_EJECT_ALL_PASSENGERS, true);
+ me->DespawnOrUnsummon(0s);
+ break;
+ }
+ default:
+ break;
+ }
}
void UpdateAI(uint32 diff) override
{
- // horde 7.55f, -0.09, 34.44, 3.13, +20
- // ally 45.18f, 0.03, 40.09, 3.14 +5
-
if (searchForShipTimer)
{
searchForShipTimer += diff;
@@ -86,44 +116,25 @@ struct npc_preparations_for_war_vehicle : public NullCreatureAI
{
searchForShipTimer = 1;
TransportsContainer const& transports = me->GetMap()->GetAllTransports();
- for (TransportsContainer::const_iterator itr = transports.begin(); itr != transports.end(); ++itr)
+ for (auto const transport : transports)
{
- if ((*itr)->GetEntry() == transportEntry)
+ if (transport->GetEntry() == transportEntry)
{
- float x, y, z;
- if (transportEntry == TRANSPORT_ORGRIMS_HAMMER)
- {
- x = 7.55f;
- y = -0.09f;
- z = 54.44f;
- }
- else
- {
- x = 45.18f;
- y = 0.03f;
- z = 45.09f;
- }
+ float x = passenger_x, y = passenger_y, z = passenger_z;
+ transport->CalculatePassengerPosition(x, y, z);
- (*itr)->CalculatePassengerPosition(x, y, z);
-
- if (me->GetDistance2d(x, y) < 10.0f)
- {
- me->DespawnOrUnsummon(1000);
- if (Vehicle* vehicle = me->GetVehicleKit())
- if (Unit* passenger = vehicle->GetPassenger(0))
- {
- passenger->NearTeleportTo(x, y, z - (transportEntry == TRANSPORT_ORGRIMS_HAMMER ? 19.0f : 4.0f), M_PI);
- passenger->RemoveAurasDueToSpell(VEHICLE_SPELL_PARACHUTE); // maybe vehicle / seat flag should be responsible for parachute gain?
- }
- }
- else
- me->GetMotionMaster()->MovePoint(0, x, y, z, false, false);
+ if (me->GetDistance2d(x, y) > 20.0f) // dismount trigger (56905, 57420) range is 30
+ me->GetMotionMaster()->MovePoint(0, x, y, z, FORCED_MOVEMENT_NONE, 0.f, 0.f, false, false);
break;
}
}
}
}
}
+private:
+ float passenger_x, passenger_y, passenger_z;
+ uint32 searchForShipTimer;
+ uint32 transportEntry;
};
/*******************************************************
diff --git a/src/server/scripts/Northrend/zone_dalaran.cpp b/src/server/scripts/Northrend/zone_dalaran.cpp
index d34530709d..7c5b9fba41 100644
--- a/src/server/scripts/Northrend/zone_dalaran.cpp
+++ b/src/server/scripts/Northrend/zone_dalaran.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
@@ -428,7 +428,7 @@ public:
struct npc_mageguard_dalaranAI : public ScriptedAI
{
- npc_mageguard_dalaranAI(Creature* creature) : ScriptedAI(creature)
+ explicit npc_mageguard_dalaranAI(Creature* creature) : ScriptedAI(creature)
{
creature->SetUnitFlag(UNIT_FLAG_NON_ATTACKABLE);
creature->ApplySpellImmune(0, IMMUNITY_DAMAGE, SPELL_SCHOOL_NORMAL, true);
@@ -449,6 +449,9 @@ public:
if (!me->IsWithinDist(who, 5.0f, false))
return;
+ if (who->IsCreature() && who->GetCreatureType() == CREATURE_TYPE_NON_COMBAT_PET)
+ return;
+
Player* player = who->GetCharmerOrOwnerPlayerOrPlayerItself();
if (!player || player->IsGameMaster() || player->IsBeingTeleported() || (player->GetPositionZ() > 670 && player->GetVehicle()) ||
@@ -484,7 +487,6 @@ public:
break;
}
me->SetOrientation(me->GetHomePosition().GetOrientation());
- return;
}
void UpdateAI(uint32 /*diff*/) override {}
@@ -592,7 +594,7 @@ struct npc_minigob_manabonk : public ScriptedAI
case EVENT_MOVE:
{
Position pos = me->GetRandomNearPosition((urand(15, 40)));
- me->GetMotionMaster()->MovePoint(0, pos.GetPositionX(), pos.GetPositionY(), pos.GetPositionZ(), true);
+ me->GetMotionMaster()->MovePoint(0, pos.GetPositionX(), pos.GetPositionY(), pos.GetPositionZ());
}
events.ScheduleEvent(EVENT_DESPAWN_VISUAL, 3s);
events.ScheduleEvent(EVENT_DESPAWN, 4s);
diff --git a/src/server/scripts/Northrend/zone_dragonblight.cpp b/src/server/scripts/Northrend/zone_dragonblight.cpp
index 52aac2193b..4b0238f3d7 100644
--- a/src/server/scripts/Northrend/zone_dragonblight.cpp
+++ b/src/server/scripts/Northrend/zone_dragonblight.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
@@ -491,9 +491,9 @@ public:
HideNozdormu();
if (Creature* cr = GetCopy())
cr->AI()->Talk(SAY_HOURGLASS_END_2, GetPlayer());
- me->DespawnOrUnsummon(500);
+ me->DespawnOrUnsummon(500ms);
if (GetCopy())
- GetCopy()->DespawnOrUnsummon(500);
+ GetCopy()->DespawnOrUnsummon(500ms);
break;
}
}
@@ -614,7 +614,7 @@ public:
uint32 path = me->GetEntry() * 10 + urand(0, 4);
if (me->GetPositionY() > -1150.0f)
path += 5;
- me->GetMotionMaster()->MovePath(path, false);
+ me->GetMotionMaster()->MoveWaypoint(path, false);
}
void MovementInform(uint32 type, uint32 point) override
@@ -622,11 +622,11 @@ public:
if (type != WAYPOINT_MOTION_TYPE)
return;
- if (point == 8) // max-1
+ if (point == 9)
{
Talk(0);
me->RemoveAllAuras();
- me->DespawnOrUnsummon(1000);
+ me->DespawnOrUnsummon(1s);
if (TempSummon* summon = me->ToTempSummon())
if (Unit* owner = summon->GetSummonerUnit())
if (Player* player = owner->ToPlayer())
@@ -726,7 +726,7 @@ public:
}
case EVENT_TAKE_OFF:
{
- me->DespawnOrUnsummon(4050);
+ me->DespawnOrUnsummon(4050ms);
me->SetOrientation(2.5f);
me->SetSpeedRate(MOVE_FLIGHT, 1.0f);
Position pos = me->GetPosition();
@@ -789,7 +789,11 @@ class spell_q12237_rescue_villager : public SpellScript
result = SPELL_FAILED_CUSTOM_ERROR;
}
- if (!GetCaster()->FindNearestCreature(NPC_HELPLESS_VILLAGER_A, 5.0f) && !GetCaster()->FindNearestCreature(NPC_HELPLESS_VILLAGER_B, 5.0f))
+ std::list<Creature*> villagers;
+ GetCaster()->GetCreatureListWithEntryInGrid(villagers, { NPC_HELPLESS_VILLAGER_A, NPC_HELPLESS_VILLAGER_B }, 5.0f);
+ villagers.remove_if([](Creature* c) { return !c->IsAlive() || c->HasAura(SPELL_RIDE_VEHICLE); });
+
+ if (villagers.empty())
{
extension = SPELL_CUSTOM_ERROR_MUST_BE_NEAR_HELPLESS_VILLAGER;
result = SPELL_FAILED_CUSTOM_ERROR;
@@ -1055,12 +1059,12 @@ public:
if (fromReset)
{
if (Creature* c = me->FindNearestCreature(NPC_SAC_LIGHTS_VENGEANCE, 150.0f, true))
- c->DespawnOrUnsummon(1);
+ c->DespawnOrUnsummon(1ms);
if (Creature* c = me->FindNearestCreature(NPC_SAC_LIGHTS_VENGEANCE_VEH_1, 150.0f, true))
c->RemoveAllAuras();
}
if (Creature* c = me->FindNearestCreature(NPC_SAC_LIGHTS_VENGEANCE_VEH_2, 150.0f, true))
- c->DespawnOrUnsummon(1);
+ c->DespawnOrUnsummon(1ms);
if (GameObject* go = me->FindNearestGameObject(GO_SAC_LIGHTS_VENGEANCE_1, 150.0f))
go->Delete();
if (GameObject* go = me->FindNearestGameObject(GO_SAC_LIGHTS_VENGEANCE_2, 150.0f))
@@ -1093,9 +1097,9 @@ public:
me->GetMotionMaster()->Clear();
}
- void SetGUID(ObjectGuid guid, int32 /*id*/) override
+ void SetGUID(ObjectGuid const& guid, int32 /*id*/) override
{
- if (playerGUID || events.GetNextEventTime(998) || events.GetNextEventTime(2))
+ if (playerGUID || events.HasTimeUntilEvent(998) || events.HasTimeUntilEvent(2))
return;
me->setActive(true);
@@ -1289,18 +1293,18 @@ public:
{
c->CastSpell(v, SPELL_SAC_KILL_VEGARD, true);
v->SetDisplayId(11686);
- v->DespawnOrUnsummon(1000);
+ v->DespawnOrUnsummon(1s);
b->CastSpell(b, SPELL_SAC_HOLY_BOMB_EXPLOSION, true);
b->CastSpell(b, SPELL_SAC_SUMMON_GO_2, true);
if (Unit* vb = c->GetVehicleBase())
{
if (Unit* pass = vb->GetVehicleKit()->GetPassenger(0))
if (pass->IsCreature())
- pass->ToCreature()->DespawnOrUnsummon(1);
+ pass->ToCreature()->DespawnOrUnsummon(1ms);
vb->RemoveAllAuras();
- vb->ToCreature()->DespawnOrUnsummon(1);
+ vb->ToCreature()->DespawnOrUnsummon(1ms);
}
- c->ToCreature()->DespawnOrUnsummon(1);
+ c->ToCreature()->DespawnOrUnsummon(1ms);
}
}
break;
@@ -1325,7 +1329,7 @@ public:
if (spell->Id == SPELL_SAC_REPEL_HAMMER && target->IsCreature())
{
target->CastSpell((Unit*)nullptr, SPELL_SAC_THROW_HAMMER, true);
- target->ToCreature()->DespawnOrUnsummon(1);
+ target->ToCreature()->DespawnOrUnsummon(1ms);
if (Unit* c = target->GetVehicleBase())
c->RemoveAurasDueToSpell(SPELL_SAC_HOLY_ZONE_AURA);
}
@@ -1439,7 +1443,7 @@ public:
{
me->SetDisplayId(me->GetNativeDisplayId());
me->CastSpell(me, SPELL_SAC_EMERGE, true);
- me->m_Events.AddEvent(new SACActivateEvent(me), me->m_Events.CalculateTime(4000));
+ me->m_Events.AddEventAtOffset(new SACActivateEvent(me), 4s);
}
void Deactivate()
@@ -1452,7 +1456,7 @@ public:
void JustDied(Unit* /*killer*/) override
{
me->RemoveAurasDueToSpell(SPELL_SAC_GHOUL_AREA_AURA);
- me->m_Events.AddEvent(new SACDeactivateEvent(me), me->m_Events.CalculateTime(4000));
+ me->m_Events.AddEventAtOffset(new SACDeactivateEvent(me), 4s);
}
void JustRespawned() override
@@ -1559,7 +1563,7 @@ public:
void JustDied(Unit* /*killer*/) override
{
Talk(1);
- me->DespawnOrUnsummon(10000);
+ me->DespawnOrUnsummon(10s);
if (Creature* c = me->FindNearestCreature(NPC_SAC_LICH_KING, 200.0f, true))
c->AI()->SetData(3, 3);
}
@@ -2062,7 +2066,7 @@ class spell_q12096_q12092_dummy : public SpellScript
{
tree->CastSpell(player, SPELL_CREATE_ITEM_BARK);
tree->AI()->Talk(SAY_WALKER_FRIENDLY, player);
- tree->DespawnOrUnsummon(1000);
+ tree->DespawnOrUnsummon(1s);
}
else if (roll == 0) // enemy version
{
@@ -2114,8 +2118,8 @@ public:
void JustEngagedWith(Unit* who) override
{
- _events.ScheduleEvent(EVENT_HEMORRHAGE, urand(5000, 8000));
- _events.ScheduleEvent(EVENT_KIDNEY_SHOT, urand(12000, 15000));
+ _events.ScheduleEvent(EVENT_HEMORRHAGE, 5s, 8s);
+ _events.ScheduleEvent(EVENT_KIDNEY_SHOT, 12s, 15s);
if (Player* player = who->ToPlayer())
Talk (SAY_AGGRO, player);
@@ -2321,7 +2325,7 @@ class spell_dragonblight_devour_ghoul_periodic : public AuraScript
if (GetUnitOwner() && GetUnitOwner()->ToCreature())
{
GetUnitOwner()->ExitVehicle();
- GetUnitOwner()->ToCreature()->DespawnOrUnsummon(2000);
+ GetUnitOwner()->ToCreature()->DespawnOrUnsummon(2s);
}
}
diff --git a/src/server/scripts/Northrend/zone_grizzly_hills.cpp b/src/server/scripts/Northrend/zone_grizzly_hills.cpp
index 1084acac01..bccd217ad0 100644
--- a/src/server/scripts/Northrend/zone_grizzly_hills.cpp
+++ b/src/server/scripts/Northrend/zone_grizzly_hills.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
@@ -207,7 +207,7 @@ public:
Mrfloppy->GetMotionMaster()->MoveFollow(creature, PET_FOLLOW_DIST, PET_FOLLOW_ANGLE);
if (npc_escortAI* pEscortAI = CAST_AI(npc_emily::npc_emilyAI, (creature->AI())))
- pEscortAI->Start(true, false, player->GetGUID());
+ pEscortAI->Start(true, player->GetGUID());
}
return true;
}
@@ -390,116 +390,6 @@ class spell_q12227_camera_shake : public SpellScript
OnEffectHitTarget += SpellEffectFn(spell_q12227_camera_shake::HandleScriptEffect, EFFECT_0, SPELL_EFFECT_DUMMY);
}
};
-// Tallhorn Stage
-
-enum TallhornStage
-{
- //Gameobject
- OBJECT_HAUNCH = 188665
-};
-
-class npc_tallhorn_stag : public CreatureScript
-{
-public:
- npc_tallhorn_stag() : CreatureScript("npc_tallhorn_stag") { }
-
- struct npc_tallhorn_stagAI : public ScriptedAI
- {
- npc_tallhorn_stagAI(Creature* creature) : ScriptedAI(creature) { }
-
- void Reset() override
- {
- _phase = 1;
- }
-
- void UpdateAI(uint32 /*diff*/) override
- {
- if (_phase == 1)
- {
- if (me->FindNearestGameObject(OBJECT_HAUNCH, 2.0f))
- {
- me->SetStandState(UNIT_STAND_STATE_DEAD);
- me->SetImmuneToPC(true);
- me->ReplaceAllDynamicFlags(UNIT_DYNFLAG_DEAD);
- }
- _phase = 0;
- }
- DoMeleeAttackIfReady();
- }
- private:
- uint8 _phase;
- };
-
- CreatureAI* GetAI(Creature* creature) const override
- {
- return new npc_tallhorn_stagAI(creature);
- }
-};
-
-// Amberpine Woodsman
-
-enum AmberpineWoodsman
-{
- // Creature
- NPC_TALLHORN_STAG = 26363
-};
-
-enum AmberpineWoodsmanEvents
-{
- EVENT_WOODSMAN_1 = 1,
- EVENT_WOODSMAN_2 = 2
-};
-
-class npc_amberpine_woodsman : public CreatureScript
-{
-public:
- npc_amberpine_woodsman() : CreatureScript("npc_amberpine_woodsman") { }
-
- struct npc_amberpine_woodsmanAI : public ScriptedAI
- {
- npc_amberpine_woodsmanAI(Creature* creature) : ScriptedAI(creature) { }
-
- void Reset() override
- {
- if (me->FindNearestCreature(NPC_TALLHORN_STAG, 0.2f))
- {
- me->SetUInt32Value(UNIT_NPC_EMOTESTATE, EMOTE_STATE_USE_STANDING);
- }
- else
- _events.ScheduleEvent(EVENT_WOODSMAN_1, 0ms);
- }
-
- void UpdateAI(uint32 diff) override
- {
- _events.Update(diff);
-
- while (uint32 eventId = _events.ExecuteEvent())
- {
- switch (eventId)
- {
- case EVENT_WOODSMAN_1:
- me->SetUInt32Value(UNIT_NPC_EMOTESTATE, EMOTE_STATE_LOOT);
- _events.ScheduleEvent(EVENT_WOODSMAN_2, 3s);
- break;
- case EVENT_WOODSMAN_2:
- me->SetUInt32Value(UNIT_NPC_EMOTESTATE, EMOTE_ONESHOT_ATTACK1H);
- _events.ScheduleEvent(EVENT_WOODSMAN_1, 4s);
- break;
- default:
- break;
- }
- }
- UpdateVictim();
- }
- private:
- EventMap _events;
- };
-
- CreatureAI* GetAI(Creature* creature) const override
- {
- return new npc_amberpine_woodsmanAI(creature);
- }
-};
/*######
## Quest 12288: Overwhelmed!
@@ -589,78 +479,78 @@ public:
case EVENT_WOUNDED_MOVE:
if (me->GetPositionY() == -2835.11f)
{
- me->GetMotionMaster()->MovePath(WOUNDED_MOVE_1, false);
- me->DespawnOrUnsummon(20000);
+ me->GetMotionMaster()->MoveWaypoint(WOUNDED_MOVE_1, false);
+ me->DespawnOrUnsummon(20s);
}
if (me->GetPositionY() == -2981.89f)
{
- me->GetMotionMaster()->MovePath(WOUNDED_MOVE_3, false);
- me->DespawnOrUnsummon(18000);
+ me->GetMotionMaster()->MoveWaypoint(WOUNDED_MOVE_3, false);
+ me->DespawnOrUnsummon(18s);
}
if (me->GetPositionY() == -2934.44f)
{
- me->GetMotionMaster()->MovePath(WOUNDED_MOVE_3, false);
- me->DespawnOrUnsummon(9000);
+ me->GetMotionMaster()->MoveWaypoint(WOUNDED_MOVE_3, false);
+ me->DespawnOrUnsummon(9s);
}
if (me->GetPositionY() == -3020.99f)
{
- me->GetMotionMaster()->MovePath(WOUNDED_MOVE_1, false);
- me->DespawnOrUnsummon(22000);
+ me->GetMotionMaster()->MoveWaypoint(WOUNDED_MOVE_1, false);
+ me->DespawnOrUnsummon(22s);
}
if (me->GetPositionY() == -2964.73f)
{
- me->GetMotionMaster()->MovePath(WOUNDED_MOVE_2, false);
- me->DespawnOrUnsummon(15000);
+ me->GetMotionMaster()->MoveWaypoint(WOUNDED_MOVE_2, false);
+ me->DespawnOrUnsummon(15s);
}
if (me->GetPositionY() == -2940.50f)
{
- me->GetMotionMaster()->MovePath(WOUNDED_MOVE_1, false);
- me->DespawnOrUnsummon(20000);
+ me->GetMotionMaster()->MoveWaypoint(WOUNDED_MOVE_1, false);
+ me->DespawnOrUnsummon(20s);
}
if (me->GetPositionY() == -2847.93f)
{
- me->GetMotionMaster()->MovePath(WOUNDED_MOVE_1, false);
- me->DespawnOrUnsummon(30000);
+ me->GetMotionMaster()->MoveWaypoint(WOUNDED_MOVE_1, false);
+ me->DespawnOrUnsummon(30s);
}
if (me->GetPositionY() == -2835.31f)
{
- me->GetMotionMaster()->MovePath(WOUNDED_MOVE_1, false);
- me->DespawnOrUnsummon(27000);
+ me->GetMotionMaster()->MoveWaypoint(WOUNDED_MOVE_1, false);
+ me->DespawnOrUnsummon(27s);
}
if (me->GetPositionY() == -2822.20f)
{
- me->GetMotionMaster()->MovePath(WOUNDED_MOVE_1, false);
- me->DespawnOrUnsummon(25000);
+ me->GetMotionMaster()->MoveWaypoint(WOUNDED_MOVE_1, false);
+ me->DespawnOrUnsummon(25s);
}
if (me->GetPositionY() == -2846.31f)
{
- me->GetMotionMaster()->MovePath(WOUNDED_MOVE_1, false);
- me->DespawnOrUnsummon(21000);
+ me->GetMotionMaster()->MoveWaypoint(WOUNDED_MOVE_1, false);
+ me->DespawnOrUnsummon(21s);
}
if (me->GetPositionY() == -2897.23f)
{
- me->GetMotionMaster()->MovePath(WOUNDED_MOVE_3, false);
- me->DespawnOrUnsummon(15000);
+ me->GetMotionMaster()->MoveWaypoint(WOUNDED_MOVE_3, false);
+ me->DespawnOrUnsummon(15s);
}
if (me->GetPositionY() == -2886.01f)
{
- me->GetMotionMaster()->MovePath(WOUNDED_MOVE_3, false);
- me->DespawnOrUnsummon(25000);
+ me->GetMotionMaster()->MoveWaypoint(WOUNDED_MOVE_3, false);
+ me->DespawnOrUnsummon(25s);
}
if (me->GetPositionY() == -2906.89f)
{
- me->GetMotionMaster()->MovePath(WOUNDED_MOVE_3, false);
- me->DespawnOrUnsummon(25000);
+ me->GetMotionMaster()->MoveWaypoint(WOUNDED_MOVE_3, false);
+ me->DespawnOrUnsummon(25s);
}
if (me->GetPositionY() == -3048.94f)
{
- me->GetMotionMaster()->MovePath(WOUNDED_MOVE_2, false);
- me->DespawnOrUnsummon(30000);
+ me->GetMotionMaster()->MoveWaypoint(WOUNDED_MOVE_2, false);
+ me->DespawnOrUnsummon(30s);
}
if (me->GetPositionY() == -2961.08f)
{
- me->GetMotionMaster()->MovePath(WOUNDED_MOVE_2, false);
- me->DespawnOrUnsummon(25000);
+ me->GetMotionMaster()->MoveWaypoint(WOUNDED_MOVE_2, false);
+ me->DespawnOrUnsummon(25s);
}
break;
case EVENT_CLEAVE:
@@ -871,7 +761,7 @@ public:
{
if (_following)
if (!me->HasAura(SPELL_FROG_LOVE))
- me->DespawnOrUnsummon(1000);
+ me->DespawnOrUnsummon(1s);
_events.Update(diff);
@@ -898,7 +788,7 @@ public:
break;
case EVENT_LAKEFROG_5:
Talk(SAY_MAIDEN_1);
- me->DespawnOrUnsummon(4000);
+ me->DespawnOrUnsummon(4s);
break;
default:
break;
@@ -1178,8 +1068,6 @@ void AddSC_grizzly_hills()
new npc_emily();
new npc_mrfloppy();
new npc_ravenous_worg();
- new npc_tallhorn_stag();
- new npc_amberpine_woodsman();
RegisterCreatureAI(npc_wounded_skirmisher);
RegisterSpellScript(spell_renew_skirmisher);
new npc_venture_co_straggler();
diff --git a/src/server/scripts/Northrend/zone_howling_fjord.cpp b/src/server/scripts/Northrend/zone_howling_fjord.cpp
index 6022af4bca..928a0a71e8 100644
--- a/src/server/scripts/Northrend/zone_howling_fjord.cpp
+++ b/src/server/scripts/Northrend/zone_howling_fjord.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
@@ -44,9 +44,9 @@ public:
if (Creature* cow = me->FindNearestCreature(24797, 5.0f, true))
{
me->CastSpell(me, 44460, true);
- me->DespawnOrUnsummon(10000);
+ me->DespawnOrUnsummon(10s);
cow->CastSpell(cow, 44460, true);
- cow->DespawnOrUnsummon(10000);
+ cow->DespawnOrUnsummon(10s);
if (me->IsSummon())
if (Unit* owner = me->ToTempSummon()->GetSummonerUnit())
owner->CastSpell(owner, 44463, true);
@@ -66,109 +66,6 @@ public:
}
};
-// The cleansing
-enum TurmoilTexts
-{
- SAY_TURMOIL_0 = 0,
- SAY_TURMOIL_1 = 1,
- SAY_TURMOIL_HALF_HP = 2,
- SAY_TURMOIL_DEATH = 3,
-};
-
-class npc_your_inner_turmoil : public CreatureScript
-{
-public:
- npc_your_inner_turmoil() : CreatureScript("npc_your_inner_turmoil") { }
-
- struct npc_your_inner_turmoilAI : public ScriptedAI
- {
- npc_your_inner_turmoilAI(Creature* creature) : ScriptedAI(creature) {}
-
- uint32 timer;
- short phase;
- bool health50;
-
- void Reset() override
- {
- timer = 0;
- phase = 0;
- health50 = false;
- }
-
- void UpdateAI(uint32 diff) override
- {
- if (timer >= 6000 && phase < 2)
- {
- phase++;
- setphase(phase);
- timer = 0;
- }
-
- timer += diff;
-
- DoMeleeAttackIfReady();
- }
-
- void DamageTaken(Unit*, uint32& /*damage*/, DamageEffectType /*damagetype*/, SpellSchoolMask /*damageSchoolMask*/) override
- {
- if (HealthBelowPct(50) && !health50)
- {
- if (TempSummon const* tempSummon = me->ToTempSummon())
- {
- if (WorldObject* summoner = tempSummon->GetSummonerUnit())
- {
- Talk(SAY_TURMOIL_HALF_HP, summoner);
- }
- }
-
- health50 = true;
- }
- }
-
- void JustDied(Unit* /*killer*/) override
- {
- if (TempSummon const* tempSummon = me->ToTempSummon())
- {
- if (WorldObject* summoner = tempSummon->GetSummonerUnit())
- {
- Talk(SAY_TURMOIL_DEATH, summoner);
- }
- }
- }
-
- void setphase(short newPhase)
- {
- Unit* summoner = me->ToTempSummon() ? me->ToTempSummon()->GetSummonerUnit() : nullptr;
- if (!summoner || !summoner->IsPlayer())
- return;
-
- switch (newPhase)
- {
- case 1:
- Talk(SAY_TURMOIL_0, summoner->ToPlayer());
- return;
- case 2:
- {
- Talk(SAY_TURMOIL_1, summoner->ToPlayer());
- me->SetLevel(summoner->GetLevel());
- me->SetFaction(FACTION_MONSTER);
- if (me->GetExactDist(summoner) < 50.0f)
- {
- me->UpdatePosition(summoner->GetPositionX(), summoner->GetPositionY(), summoner->GetPositionZ(), 0.0f, true);
- summoner->CastSpell(me, 50218, true); // clone caster
- AttackStart(summoner);
- }
- }
- }
- }
- };
-
- CreatureAI* GetAI(Creature* creature) const override
- {
- return new npc_your_inner_turmoilAI(creature);
- }
-};
-
/*######
## npc_apothecary_hanes
######*/
@@ -191,7 +88,8 @@ public:
if (quest->GetQuestId() == QUEST_TRAIL_OF_FIRE)
{
creature->SetFaction(player->GetTeamId() == TEAM_ALLIANCE ? FACTION_ESCORTEE_A_PASSIVE : FACTION_ESCORTEE_H_PASSIVE);
- CAST_AI(npc_escortAI, (creature->AI()))->Start(true, false, player->GetGUID());
+ creature->SetWalk(true);
+ CAST_AI(npc_escortAI, (creature->AI()))->Start(true, player->GetGUID());
}
return true;
}
@@ -238,7 +136,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 +145,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;
}
}
@@ -309,7 +207,7 @@ public:
return;
me->SetWalk(true);
- Start(false, false, summonerGUID);
+ Start(false, summonerGUID);
}
void WaypointReached(uint32 waypointId) override
@@ -456,13 +354,145 @@ class spell_hawk_hunting : public SpellScript
}
};
+/*######
+## Quest 11317, 11322: The Cleansing
+######*/
+
+enum TheCleansing
+{
+ SPELL_CLEANSING_SOUL = 43351,
+ SPELL_SUMMON_INNER_TURMOIL = 50167,
+ SPELL_RECENT_MEDITATION = 61720,
+ SPELL_MIRROR_IMAGE_AURA = 50218,
+
+ QUEST_THE_CLEANSING_H = 11317,
+ QUEST_THE_CLEANSING_A = 11322
+};
+
+// 43365 - The Cleansing: Shrine Cast
+class spell_the_cleansing_shrine_cast : public SpellScript
+{
+ PrepareSpellScript(spell_the_cleansing_shrine_cast);
+
+ bool Validate(SpellInfo const* /*spellInfo*/) override
+ {
+ return ValidateSpellInfo({ SPELL_RECENT_MEDITATION, SPELL_CLEANSING_SOUL }) &&
+ sObjectMgr->GetQuestTemplate(QUEST_THE_CLEANSING_H) &&
+ sObjectMgr->GetQuestTemplate(QUEST_THE_CLEANSING_A);
+ }
+
+ SpellCastResult CheckCast()
+ {
+ // Error is correct for quest check but may be not correct for aura and this may be a wrong place to send error
+ if (Player* target = GetExplTargetUnit()->ToPlayer())
+ {
+ if (target->HasAura(SPELL_RECENT_MEDITATION) || (!(target->GetQuestStatus(QUEST_THE_CLEANSING_H) == QUEST_STATUS_INCOMPLETE ||
+ target->GetQuestStatus(QUEST_THE_CLEANSING_A) == QUEST_STATUS_INCOMPLETE)))
+ {
+ Spell::SendCastResult(target, GetSpellInfo(), 0, SPELL_FAILED_FIZZLE);
+ return SPELL_FAILED_FIZZLE;
+ }
+ }
+ return SPELL_CAST_OK;
+ }
+
+ void HandleScript(SpellEffIndex /*effIndex*/)
+ {
+ GetHitUnit()->CastSpell(GetHitUnit(), SPELL_CLEANSING_SOUL, true);
+ }
+
+ void Register() override
+ {
+ OnCheckCast += SpellCheckCastFn(spell_the_cleansing_shrine_cast::CheckCast);
+ OnEffectHitTarget += SpellEffectFn(spell_the_cleansing_shrine_cast::HandleScript, EFFECT_0, SPELL_EFFECT_SCRIPT_EFFECT);
+ }
+};
+
+// 43351 - Cleansing Soul
+class spell_the_cleansing_cleansing_soul : public AuraScript
+{
+ PrepareAuraScript(spell_the_cleansing_cleansing_soul);
+
+ bool Validate(SpellInfo const* /*spellInfo*/) override
+ {
+ return ValidateSpellInfo({ SPELL_SUMMON_INNER_TURMOIL, SPELL_RECENT_MEDITATION });
+ }
+
+ void AfterApply(AuraEffect const* /*aurEff*/, AuraEffectHandleModes /*mode*/)
+ {
+ GetTarget()->SetStandState(UNIT_STAND_STATE_SIT);
+ }
+
+ void AfterRemove(AuraEffect const* /*aurEff*/, AuraEffectHandleModes /*mode*/)
+ {
+ Unit* target = GetTarget();
+ target->SetStandState(UNIT_STAND_STATE_STAND);
+ target->CastSpell(target, SPELL_SUMMON_INNER_TURMOIL, true);
+ target->CastSpell(target, SPELL_RECENT_MEDITATION, true);
+ }
+
+ void Register() override
+ {
+ AfterEffectApply += AuraEffectApplyFn(spell_the_cleansing_cleansing_soul::AfterApply, EFFECT_0, SPELL_AURA_DUMMY, AURA_EFFECT_HANDLE_REAL);
+ AfterEffectRemove += AuraEffectRemoveFn(spell_the_cleansing_cleansing_soul::AfterRemove, EFFECT_0, SPELL_AURA_DUMMY, AURA_EFFECT_HANDLE_REAL);
+ }
+};
+
+// 50217 - The Cleansing: Script Effect Player Cast Mirror Image
+class spell_the_cleansing_mirror_image_script_effect : public SpellScript
+{
+ PrepareSpellScript(spell_the_cleansing_mirror_image_script_effect);
+
+ bool Validate(SpellInfo const* /*spellInfo*/) override
+ {
+ return ValidateSpellInfo({ SPELL_MIRROR_IMAGE_AURA });
+ }
+
+ void HandleScript(SpellEffIndex /*effIndex*/)
+ {
+ GetHitUnit()->CastSpell(GetHitUnit(), SPELL_MIRROR_IMAGE_AURA, true);
+ }
+
+ void Register() override
+ {
+ OnEffectHitTarget += SpellEffectFn(spell_the_cleansing_mirror_image_script_effect::HandleScript, EFFECT_0, SPELL_EFFECT_SCRIPT_EFFECT);
+ }
+};
+
+// 50238 - The Cleansing: Your Inner Turmoil's On Death Cast on Master
+class spell_the_cleansing_on_death_cast_on_master : public SpellScript
+{
+ PrepareSpellScript(spell_the_cleansing_on_death_cast_on_master);
+
+ bool Validate(SpellInfo const* spellInfo) override
+ {
+ return ValidateSpellInfo({ uint32(spellInfo->GetEffect(EFFECT_0).CalcValue()) });
+ }
+
+ void HandleScript(SpellEffIndex /*effIndex*/)
+ {
+ if (Unit* caster = GetCaster())
+ if (TempSummon* casterSummon = caster->ToTempSummon())
+ if (Unit* summoner = casterSummon->GetSummonerUnit())
+ summoner->CastSpell(summoner, GetSpellInfo()->Effects[EFFECT_0].CalcValue(), true);
+ }
+
+ void Register() override
+ {
+ OnEffectHit += SpellEffectFn(spell_the_cleansing_on_death_cast_on_master::HandleScript, EFFECT_0, SPELL_EFFECT_SCRIPT_EFFECT);
+ }
+};
+
void AddSC_howling_fjord()
{
new npc_attracted_reef_bull();
- new npc_your_inner_turmoil();
new npc_apothecary_hanes();
new npc_plaguehound_tracker();
new npc_razael_and_lyana();
RegisterCreatureAI(npc_rodin_lightning_enabler);
RegisterSpellScript(spell_hawk_hunting);
+ RegisterSpellScript(spell_the_cleansing_shrine_cast);
+ RegisterSpellScript(spell_the_cleansing_cleansing_soul);
+ RegisterSpellScript(spell_the_cleansing_mirror_image_script_effect);
+ RegisterSpellScript(spell_the_cleansing_on_death_cast_on_master);
}
diff --git a/src/server/scripts/Northrend/zone_icecrown.cpp b/src/server/scripts/Northrend/zone_icecrown.cpp
index 7db4f389ce..6d1b804b98 100644
--- a/src/server/scripts/Northrend/zone_icecrown.cpp
+++ b/src/server/scripts/Northrend/zone_icecrown.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
@@ -501,7 +501,7 @@ public:
events.RescheduleEvent(EVENT_SOUL_COAX, 5s);
}
else
- me->DespawnOrUnsummon(1);
+ me->DespawnOrUnsummon(1ms);
break;
case EVENT_SOUL_COAX:
Talk(SAY_ARETE_1);
@@ -523,11 +523,8 @@ public:
{
soul->SetCanFly(true);
soul->SetVisible(true);
- Movement::MoveSplineInit init(soul);
- init.MoveTo(soul->GetPositionX(), soul->GetPositionY(), soul->GetPositionZ() + 5.0f);
- init.SetVelocity(1.0f);
- init.Launch();
soul->CastSpell(soul, 64462, true); // Drown
+ soul->GetMotionMaster()->MovePoint(0, soul->GetPositionX(), soul->GetPositionY(), soul->GetPositionZ() + 5.0f, FORCED_MOVEMENT_NONE, 1.f);
}
events.ScheduleEvent(EVENT_SCENE_1, 6s);
break;
@@ -580,14 +577,14 @@ public:
if (Creature* soul = ObjectAccessor::GetCreature(*me, _landgrenSoulGUID))
{
soul->AI()->Talk(SAY_SOUL_4);
- soul->DespawnOrUnsummon(2000);
+ soul->DespawnOrUnsummon(2s);
}
events.ScheduleEvent(EVENT_SCENE_10, 3s);
break;
case EVENT_SCENE_10:
me->ReplaceAllNpcFlags(UNIT_NPC_FLAG_QUESTGIVER);
Talk(SAY_ARETE_6);
- me->DespawnOrUnsummon(60000);
+ me->DespawnOrUnsummon(60s);
break;
}
}
@@ -718,7 +715,8 @@ public:
Talk(0);
events.Reset();
summons.DespawnAll();
- Start(false, false);
+ me->SetWalk(true);
+ Start(false);
int8 i = -1;
std::list<Creature*> cList;
@@ -796,7 +794,7 @@ public:
summon->SetUInt32Value(UNIT_NPC_EMOTESTATE, param);
break;
case ACTION_SUMMON_DESPAWN:
- summon->DespawnOrUnsummon(param);
+ summon->DespawnOrUnsummon(Milliseconds(param));
break;
case ACTION_SUMMON_ORIENTATION:
summon->SetFacingTo(param / 100.0f);
@@ -1022,9 +1020,9 @@ public:
{
if (summon->GetEntry() == NPC_TIRION_LICH_KING)
summon->CastSpell(summon, SPELL_LICH_KINGS_FURY, false);
- summon->DespawnOrUnsummon(summon->GetEntry() == NPC_TIRION_LICH_KING ? 10000 : 4000);
+ summon->DespawnOrUnsummon(summon->GetEntry() == NPC_TIRION_LICH_KING ? 10s : 4s);
}
- me->DespawnOrUnsummon(10000);
+ me->DespawnOrUnsummon(10s);
break;
}
}
@@ -1257,8 +1255,8 @@ public:
player->CastSpell(player, SPELL_WAITING_FOR_A_BOMBER, true);
player->CastSpell(player, SPELL_FLIGHT_ORDERS, true);
- events.ScheduleEvent(EVENT_START_FLIGHT, 0);
- events.ScheduleEvent(EVENT_TAKE_PASSENGER, 3000);
+ events.ScheduleEvent(EVENT_START_FLIGHT, 0ms);
+ events.ScheduleEvent(EVENT_TAKE_PASSENGER, 3s);
me->SetCanFly(true);
me->AddUnitMovementFlag(MOVEMENTFLAG_FLYING);
me->SetSpeed(MOVE_FLIGHT, 0.1f);
@@ -1310,29 +1308,11 @@ public:
turret->HandleSpellClick(owner, 0);
return;
}
- me->DespawnOrUnsummon(1);
+ me->DespawnOrUnsummon(1ms);
break;
case EVENT_START_FLIGHT:
{
- WPPath* path = sSmartWaypointMgr->GetPath(me->GetEntry());
- if (!path || path->empty())
- {
- me->DespawnOrUnsummon(1);
- return;
- }
-
- Movement::PointsArray pathPoints;
- pathPoints.push_back(G3D::Vector3(me->GetPositionX(), me->GetPositionY(), me->GetPositionZ()));
-
- uint32 wpCounter = 1;
- WPPath::const_iterator itr;
- while ((itr = path->find(wpCounter++)) != path->end())
- {
- WayPoint* wp = itr->second;
- pathPoints.push_back(G3D::Vector3(wp->x, wp->y, wp->z));
- }
-
- me->GetMotionMaster()->MoveSplinePath(&pathPoints);
+ me->GetMotionMaster()->MovePath(me->GetEntry(), FORCED_MOVEMENT_NONE, PathSource::SMART_WAYPOINT_MGR);
events.ScheduleEvent(EVENT_CHECK_PATH_REGEN_HEALTH_BURN_DAMAGE, 1min);
events.ScheduleEvent(EVENT_SYNCHRONIZE_SHIELDS, 5s);
break;
@@ -1342,7 +1322,7 @@ public:
// Check if path is finished
if (me->GetMotionMaster()->GetCurrentMovementGeneratorType() != ESCORT_MOTION_TYPE)
{
- me->DespawnOrUnsummon(1);
+ me->DespawnOrUnsummon(1ms);
return;
}
@@ -1381,7 +1361,7 @@ public:
station->RemoveAurasDueToSpell(SPELL_INFRA_GREEN_SHIELD);
}
if (!playerPresent)
- me->DespawnOrUnsummon(1);
+ me->DespawnOrUnsummon(1ms);
}
events.ScheduleEvent(EVENT_SYNCHRONIZE_SHIELDS, 1s);
break;
diff --git a/src/server/scripts/Northrend/zone_sholazar_basin.cpp b/src/server/scripts/Northrend/zone_sholazar_basin.cpp
index 100a90a869..4af05b4b9c 100644
--- a/src/server/scripts/Northrend/zone_sholazar_basin.cpp
+++ b/src/server/scripts/Northrend/zone_sholazar_basin.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
@@ -49,7 +49,6 @@ class spell_q12726_song_of_wind_and_water : public SpellScript
cr->SetDisplayId(cr->GetDisplayId() == NPC_SOWAW_WATER_MODEL ? NPC_SOWAW_WIND_MODEL : NPC_SOWAW_WATER_MODEL);
if (Player* player = cr->GetCharmerOrOwnerPlayerOrPlayerItself())
{
- player->KilledMonsterCredit(cr->GetDisplayId() == NPC_SOWAW_WATER_MODEL ? 29008 : 29009);
CreatureTemplate const* ct = sObjectMgr->GetCreatureTemplate(cr->GetDisplayId() == NPC_SOWAW_WIND_MODEL ? NPC_SOWAW_WIND_ELEMENTAL : NPC_SOWAW_WATER_ELEMENTAL);
for (uint8 i = 0; i < MAX_CREATURE_SPELLS; ++i)
cr->m_spells[i] = ct->spells[i];
@@ -605,7 +604,8 @@ public:
creature->GetMotionMaster()->MoveJumpTo(0, 0.4f, 0.4f);
creature->SetFaction(FACTION_ESCORTEE_N_NEUTRAL_PASSIVE);
- pEscortAI->Start(false, false, player->GetGUID());
+ creature->SetWalk(true);
+ pEscortAI->Start(false, player->GetGUID());
creature->AI()->Talk(SAY_WP_1);
}
}
@@ -1107,118 +1107,6 @@ class spell_q12589_shoot_rjr : public SpellScript
};
/*######
-## Quest: Reconnaissance Flight (12671)
-######*/
-enum ReconnaissanceFlight
-{
- NPC_PLANE = 28710, // Vic's Flying Machine
- NPC_PILOT = 28646,
-
- VIC_SAY_0 = 0,
- VIC_SAY_1 = 1,
- VIC_SAY_2 = 2,
- VIC_SAY_3 = 3,
- VIC_SAY_4 = 4,
- VIC_SAY_5 = 5,
- VIC_SAY_6 = 6,
- PLANE_EMOTE = 0,
-
- AURA_ENGINE = 52255, // Engine on Fire
-
- SPELL_LAND = 52226, // Land Flying Machine
- SPELL_CREDIT = 53328 // Land Flying Machine Credit
-};
-
-class npc_vics_flying_machine : public CreatureScript
-{
-public:
- npc_vics_flying_machine() : CreatureScript("npc_vics_flying_machine") { }
-
- struct npc_vics_flying_machineAI : public VehicleAI
- {
- npc_vics_flying_machineAI(Creature* creature) : VehicleAI(creature)
- {
- pointId = 0;
- }
-
- uint8 pointId;
-
- void PassengerBoarded(Unit* passenger, int8 /*seatId*/, bool apply) override
- {
- if (apply && passenger->IsPlayer())
- {
- Movement::PointsArray pathPoints;
- pathPoints.push_back(G3D::Vector3(me->GetPositionX(), me->GetPositionY(), me->GetPositionZ()));
-
- WaypointPath const* i_path = sWaypointMgr->GetPath(NPC_PLANE);
- for (uint8 i = 0; i < i_path->size(); ++i)
- {
- WaypointData const* node = i_path->at(i);
- pathPoints.push_back(G3D::Vector3(node->x, node->y, node->z));
- }
-
- me->GetMotionMaster()->MoveSplinePath(&pathPoints);
- }
- }
-
- void MovementInform(uint32 type, uint32 /*id*/) override
- {
- if (type != ESCORT_MOTION_TYPE)
- return;
-
- if (Vehicle* veh = me->GetVehicleKit())
- if (Unit* pilot = veh->GetPassenger(0))
- switch (pointId)
- {
- case 5:
- pilot->ToCreature()->AI()->Talk(VIC_SAY_0);
- break;
- case 11:
- pilot->ToCreature()->AI()->Talk(VIC_SAY_1);
- break;
- case 12:
- pilot->ToCreature()->AI()->Talk(VIC_SAY_2);
- break;
- case 14:
- pilot->ToCreature()->AI()->Talk(VIC_SAY_3);
- break;
- case 15:
- pilot->ToCreature()->ToCreature()->AI()->Talk(VIC_SAY_4);
- break;
- case 17:
- pilot->ToCreature()->AI()->Talk(VIC_SAY_5);
- break;
- case 21:
- pilot->ToCreature()->AI()->Talk(VIC_SAY_6);
- break;
- case 25:
- Talk(PLANE_EMOTE);
- DoCastSelf(AURA_ENGINE);
- break;
- }
- pointId++;
- }
-
- void SpellHit(Unit* /*caster*/, SpellInfo const* spell) override
- {
- if (spell->Id == SPELL_LAND)
- {
- Unit* passenger = me->GetVehicleKit()->GetPassenger(1); // player should be on seat 1
- if (passenger && passenger->IsPlayer())
- passenger->CastSpell(passenger, SPELL_CREDIT, true);
-
- me->DespawnOrUnsummon();
- }
- }
- };
-
- CreatureAI* GetAI(Creature* creature) const override
- {
- return new npc_vics_flying_machineAI(creature);
- }
-};
-
-/*######
## Quest Dreadsaber Mastery: Stalking the Prey (12550)
######*/
@@ -1305,7 +1193,6 @@ void AddSC_sholazar_basin()
new npc_jungle_punch_target();
RegisterSpellScript(spell_q12620_the_lifewarden_wrath);
RegisterSpellScript(spell_q12589_shoot_rjr);
- new npc_vics_flying_machine();
RegisterSpellScript(spell_shango_tracks);
RegisterSpellScript(spell_q12611_deathbolt);
diff --git a/src/server/scripts/Northrend/zone_storm_peaks.cpp b/src/server/scripts/Northrend/zone_storm_peaks.cpp
index 35fd65e310..836469a3e8 100644
--- a/src/server/scripts/Northrend/zone_storm_peaks.cpp
+++ b/src/server/scripts/Northrend/zone_storm_peaks.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
@@ -28,88 +28,87 @@
#include "Vehicle.h"
#include "WaypointMgr.h"
-enum qSniffing
+enum qSniffingOutThePerpetrator
{
+ NPC_FROSTHOUND = 29677,
+ NPC_FROSTBITE = 29903,
SPELL_SUMMON_PURSUERS_PERIODIC = 54993,
SPELL_SNIFFING_CREDIT = 55477,
+ TALK_EMOTE_FROSTHOUND_SNIFF = 0,
+ TALK_SEEN = 1,
+ TALK_CONFRONT = 2,
+ TALK_EMOTE_TRACKED_COMPLETE = 3,
};
-class npc_frosthound : public CreatureScript
+struct npc_frosthound : public npc_escortAI
{
-public:
- npc_frosthound() : CreatureScript("npc_frosthound") { }
-
- struct npc_frosthoundAI : public npc_escortAI
- {
- npc_frosthoundAI(Creature* creature) : npc_escortAI(creature) {}
+ explicit npc_frosthound(Creature* creature) : npc_escortAI(creature), _summons(creature), _completionWaypoint((creature->GetEntry() == NPC_FROSTBITE) ? 19 : 34) { }
- void AttackStart(Unit* /*who*/) override {}
- void JustEngagedWith(Unit* /*who*/) override {}
- void EnterEvadeMode(EvadeReason /* why */) override {}
+ void AttackStart(Unit* /*who*/) override {}
+ void JustEngagedWith(Unit* /*who*/) override {}
+ void EnterEvadeMode(EvadeReason /* why */) override {}
+ void JustDied(Unit* /*killer*/) override { }
+ void OnCharmed(bool /*apply*/) override { }
- void PassengerBoarded(Unit* who, int8 /*seatId*/, bool apply) override
+ void PassengerBoarded(Unit* who, int8 /*seatId*/, bool apply) override
+ {
+ if (who->IsPlayer())
{
- if (who->IsPlayer())
+ if (apply)
{
- if (apply)
- {
- me->SetFaction(who->GetFaction());
- me->CastSpell(me, SPELL_SUMMON_PURSUERS_PERIODIC, true);
- Start(false, true, who->GetGUID());
- }
+ me->SetFaction(who->GetFaction());
+ me->CastSpell(me, SPELL_SUMMON_PURSUERS_PERIODIC, true);
+ Start(false, who->GetGUID());
+ Talk(TALK_EMOTE_FROSTHOUND_SNIFF, me);
}
}
+ }
- void JustDied(Unit* /*killer*/) override
- {
- }
-
- void OnCharmed(bool /*apply*/) override
- {
- }
+ void UpdateAI(uint32 diff) override
+ {
+ npc_escortAI::UpdateAI(diff);
- void UpdateAI(uint32 diff) override
- {
- npc_escortAI::UpdateAI(diff);
+ if (!UpdateVictim())
+ return;
+ }
- if (!UpdateVictim())
- return;
- }
+ void WaypointReached(uint32 waypointId) override
+ {
+ Player* player = GetPlayerForEscort();
+ if (!player)
+ return;
- void WaypointReached(uint32 waypointId) override
+ if (waypointId == 0)
+ Talk(TALK_SEEN, player);
+ else if (waypointId == _completionWaypoint)
{
- Player* player = GetPlayerForEscort();
- if (!player)
- return;
-
- switch (waypointId)
- {
- case 0:
- me->TextEmote("You've been seen! Use the net and Freezing elixir to keep the dwarves away!", nullptr, true);
- break;
- case 19:
- me->TextEmote("The frosthound has located the thief's hiding place. Confront him!", 0, true);
- if (Unit* summoner = me->ToTempSummon()->GetSummonerUnit())
- summoner->ToPlayer()->KilledMonsterCredit(29677);
- break;
- }
+ Talk(TALK_EMOTE_TRACKED_COMPLETE, me);
+ Talk(TALK_CONFRONT, player);
+ if (Unit* summoner = me->ToTempSummon()->GetSummonerUnit())
+ summoner->ToPlayer()->KilledMonsterCredit(NPC_FROSTHOUND); // same credit for Alliance and Horde
+ _summons.DespawnAll();
}
+ }
- void JustSummoned(Creature* cr) override
- {
- cr->ToTempSummon()->SetTempSummonType(TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT);
- cr->ToTempSummon()->InitStats(20000);
- if (urand(0, 1))
- cr->GetMotionMaster()->MoveFollow(me, 0.0f, 0.0f);
- else if (cr->AI())
- cr->AI()->AttackStart(me);
- }
- };
+ void JustSummoned(Creature* cr) override
+ {
+ _summons.Summon(cr);
+ cr->ToTempSummon()->SetTempSummonType(TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT);
+ cr->ToTempSummon()->InitStats(20000);
+ if (urand(0, 1))
+ cr->GetMotionMaster()->MoveFollow(me, 0.0f, 0.0f);
+ else if (cr->AI())
+ cr->AI()->AttackStart(me);
+ }
- CreatureAI* GetAI(Creature* creature) const override
+ void Reset() override
{
- return new npc_frosthoundAI(creature);
+ _summons.DespawnAll();
}
+
+private:
+ SummonList _summons;
+ uint32 _completionWaypoint;
};
enum eIronWatcher
@@ -157,7 +156,7 @@ public:
me->RemoveAllAurasExceptType(SPELL_AURA_MECHANIC_IMMUNITY);
Talk(1);
caster->ToPlayer()->KilledMonsterCredit(me->GetEntry());
- me->DespawnOrUnsummon(8000);
+ me->DespawnOrUnsummon(8s);
me->GetMotionMaster()->MoveJump(8721.94f, -1955, 963, 70.0f, 30.0f);
}
}
@@ -244,7 +243,7 @@ public:
void RollPath()
{
me->SetEntry(NPC_TIME_LOST_PROTO_DRAKE);
- Start(true, true, ObjectGuid::Empty, 0, false, true, true);
+ 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);
}
@@ -465,17 +464,7 @@ public:
if (startPath)
{
startPath = false;
- Movement::PointsArray pathPoints;
- pathPoints.push_back(G3D::Vector3(me->GetPositionX(), me->GetPositionY(), me->GetPositionZ()));
-
- WaypointPath const* i_path = sWaypointMgr->GetPath(me->GetWaypointPath());
- for (uint8 i = 0; i < i_path->size(); ++i)
- {
- WaypointData const* node = i_path->at(i);
- pathPoints.push_back(G3D::Vector3(node->x, node->y, node->z));
- }
-
- me->GetMotionMaster()->MoveSplinePath(&pathPoints);
+ me->GetMotionMaster()->MovePath(me->GetWaypointPath(), FORCED_MOVEMENT_NONE, PathSource::WAYPOINT_MGR);
}
if (setCharm)
{
@@ -847,17 +836,7 @@ public:
{
Talk(TEXT_EMOTE, passenger);
- Movement::PointsArray pathPoints;
- pathPoints.push_back(G3D::Vector3(me->GetPositionX(), me->GetPositionY(), me->GetPositionZ()));
-
- WaypointPath const* i_path = sWaypointMgr->GetPath(NPC_DRAKE);
- for (uint8 i = 0; i < i_path->size(); ++i)
- {
- WaypointData const* node = i_path->at(i);
- pathPoints.push_back(G3D::Vector3(node->x, node->y, node->z));
- }
-
- me->GetMotionMaster()->MoveSplinePath(&pathPoints);
+ me->GetMotionMaster()->MovePath(NPC_DRAKE, FORCED_MOVEMENT_NONE, PathSource::WAYPOINT_MGR);
}
}
else
@@ -910,7 +889,10 @@ public:
if (who->IsPlayer())
{
if (apply)
- Start(false, true, who->GetGUID());
+ {
+ me->SetWalk(false);
+ Start(false, who->GetGUID());
+ }
}
}
@@ -933,72 +915,40 @@ public:
}
};
-class npc_hyldsmeet_protodrake : public CreatureScript
+enum HyldsmeetProtoDrake
{
- enum NPCs
- {
- NPC_HYLDSMEET_DRAKERIDER = 29694
- };
+ NPC_HYLDSMEET_DRAKERIDER = 29694
+};
-public:
- npc_hyldsmeet_protodrake() : CreatureScript("npc_hyldsmeet_protodrake") { }
+struct npc_hyldsmeet_protodrake : public CreatureAI
+{
+ explicit npc_hyldsmeet_protodrake(Creature* creature) : CreatureAI(creature), _accessoryRespawnTimer(0) { }
- class npc_hyldsmeet_protodrakeAI : public CreatureAI
+ void PassengerBoarded(Unit* who, int8 /*seat*/, bool apply) override
{
- public:
- npc_hyldsmeet_protodrakeAI(Creature* creature) : CreatureAI(creature), _accessoryRespawnTimer(0), _vehicleKit(creature->GetVehicleKit()) { }
-
- void PassengerBoarded(Unit* who, int8 /*seat*/, bool apply) override
- {
- if (apply)
- {
- class DelayedTransportPositionOffsets : public BasicEvent
- {
- public:
- DelayedTransportPositionOffsets(Unit* owner) : _owner(owner) { }
-
- bool Execute(uint64 /*eventTime*/, uint32 /*updateTime*/) override
- {
- _owner->m_movementInfo.transport.pos.Relocate(-3.5f, 0.f, -0.2f, 0.f);
- return true;
- }
-
- private:
- Unit* _owner;
- };
-
- if (who->IsPlayer())
- who->m_Events.AddEvent(new DelayedTransportPositionOffsets(who), who->m_Events.CalculateTime(500));
-
- return;
- }
+ if (apply)
+ return;
- if (who->GetEntry() == NPC_HYLDSMEET_DRAKERIDER)
- _accessoryRespawnTimer = 5 * MINUTE * IN_MILLISECONDS;
- }
+ if (who->GetEntry() == NPC_HYLDSMEET_DRAKERIDER)
+ _accessoryRespawnTimer = 5 * MINUTE * IN_MILLISECONDS;
+ }
- void UpdateAI(uint32 diff) override
+ void UpdateAI(uint32 diff) override
+ {
+ //! We need to manually reinstall accessories because the vehicle itself is friendly to players,
+ //! so EnterEvadeMode is never triggered. The accessory on the other hand is hostile and killable.
+ Vehicle* vehicleKit = me->GetVehicleKit();
+ if (_accessoryRespawnTimer && _accessoryRespawnTimer <= diff && vehicleKit)
{
- //! We need to manually reinstall accessories because the vehicle itself is friendly to players,
- //! so EnterEvadeMode is never triggered. The accessory on the other hand is hostile and killable.
- if (_accessoryRespawnTimer && _accessoryRespawnTimer <= diff && _vehicleKit)
- {
- _vehicleKit->InstallAllAccessories(true);
- _accessoryRespawnTimer = 0;
- }
- else
- _accessoryRespawnTimer -= diff;
+ vehicleKit->InstallAllAccessories(true);
+ _accessoryRespawnTimer = 0;
}
-
- private:
- uint32 _accessoryRespawnTimer;
- Vehicle* _vehicleKit;
- };
-
- CreatureAI* GetAI(Creature* creature) const override
- {
- return new npc_hyldsmeet_protodrakeAI(creature);
+ else
+ _accessoryRespawnTimer -= diff;
}
+
+private:
+ uint32 _accessoryRespawnTimer;
};
enum CloseRift
@@ -1082,15 +1032,7 @@ public:
{
if (apply)
{
- Movement::PointsArray pathPoints;
- pathPoints.push_back(G3D::Vector3(me->GetPositionX(), me->GetPositionY(), me->GetPositionZ()));
- WaypointPath const* i_path = sWaypointMgr->GetPath(me->GetEntry() * 100);
- for (uint8 i = 0; i < i_path->size(); ++i)
- {
- WaypointData const* node = i_path->at(i);
- pathPoints.push_back(G3D::Vector3(node->x, node->y, node->z));
- }
- me->GetMotionMaster()->MoveSplinePath(&pathPoints);
+ me->GetMotionMaster()->MovePath(me->GetEntry() * 100, FORCED_MOVEMENT_NONE, PathSource::WAYPOINT_MGR);
me->SetCanFly(true);
me->SetDisableGravity(true);
me->SetSpeed(MOVE_RUN, 6.0f);
@@ -1147,13 +1089,13 @@ public:
}
else
{
- me->DespawnOrUnsummon(100);
+ me->DespawnOrUnsummon(100ms);
}
break;
case 24:
if (me->GetEntry() == NPC_PROPELLED_DEVICE_1)
{
- me->DespawnOrUnsummon(100);
+ me->DespawnOrUnsummon(100ms);
}
break;
default:
@@ -1192,9 +1134,46 @@ class spell_feed_stormcrest_eagle : public SpellScript
}
};
+enum MammothExplosion
+{
+ SPELL_MAMMOTH_EXPL_1 = 54627,
+ SPELL_MAMMOTH_EXPL_2 = 54628,
+ SPELL_MAMMOTH_EXPL_3 = 54623,
+ SPELL_MAIN_MAMMOTH_MEAT = 57444
+};
+
+// 54581 - Mammoth Explosion Spell Spawner
+class spell_mammoth_explosion : public SpellScript
+{
+ PrepareSpellScript(spell_mammoth_explosion);
+
+ bool Validate(SpellInfo const* /*spellInfo*/) override
+ {
+ return ValidateSpellInfo({ SPELL_MAMMOTH_EXPL_1, SPELL_MAMMOTH_EXPL_2, SPELL_MAMMOTH_EXPL_3, SPELL_MAIN_MAMMOTH_MEAT });
+ }
+
+ void HandleOnEffectHit(SpellEffIndex /*effIndex*/)
+ {
+ if (Unit* target = GetHitUnit())
+ {
+ for (uint32 spellId : { SPELL_MAMMOTH_EXPL_1, SPELL_MAMMOTH_EXPL_2, SPELL_MAMMOTH_EXPL_3 })
+ target->CastSpell(GetHitUnit(), spellId, true);
+
+ target->CastSpell(GetHitUnit(), SPELL_MAIN_MAMMOTH_MEAT, true);
+
+ target->SetVisible(false);
+ }
+ }
+
+ void Register() override
+ {
+ OnEffectHitTarget += SpellEffectFn(spell_mammoth_explosion::HandleOnEffectHit, EFFECT_0, SPELL_EFFECT_SCRIPT_EFFECT);
+ }
+};
+
void AddSC_storm_peaks()
{
- new npc_frosthound();
+ RegisterCreatureAI(npc_frosthound);
new npc_iron_watcher();
new npc_time_lost_proto_drake();
new npc_wild_wyrm();
@@ -1204,9 +1183,10 @@ void AddSC_storm_peaks()
new npc_brunnhildar_prisoner();
new npc_freed_protodrake();
new npc_icefang();
- new npc_hyldsmeet_protodrake();
+ RegisterCreatureAI(npc_hyldsmeet_protodrake);
RegisterSpellScript(spell_close_rift_aura);
new npc_vehicle_d16_propelled_delivery();
RegisterSpellScript(spell_q12823_remove_collapsing_cave_aura);
RegisterSpellScript(spell_feed_stormcrest_eagle);
+ RegisterSpellScript(spell_mammoth_explosion);
}
diff --git a/src/server/scripts/Northrend/zone_wintergrasp.cpp b/src/server/scripts/Northrend/zone_wintergrasp.cpp
index cc42869104..0c8aae0027 100644
--- a/src/server/scripts/Northrend/zone_wintergrasp.cpp
+++ b/src/server/scripts/Northrend/zone_wintergrasp.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
@@ -184,7 +184,7 @@ public:
data << spellId;
data << uint8(SPELL_FAILED_CUSTOM_ERROR);
data << uint32(SPELL_CUSTOM_ERROR_CANT_BUILD_MORE_VEHICLES);
- player->GetSession()->SendPacket(&data);
+ player->SendDirectMessage(&data);
}
return true;
}
diff --git a/src/server/scripts/Northrend/zone_zuldrak.cpp b/src/server/scripts/Northrend/zone_zuldrak.cpp
index 8b36a31062..230678a4eb 100644
--- a/src/server/scripts/Northrend/zone_zuldrak.cpp
+++ b/src/server/scripts/Northrend/zone_zuldrak.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
@@ -17,6 +17,7 @@
#include "CreatureScript.h"
#include "GameObjectScript.h"
+#include "GridNotifiers.h"
#include "PassiveAI.h"
#include "Player.h"
#include "ScriptedCreature.h"
@@ -26,6 +27,7 @@
#include "SpellScript.h"
#include "SpellScriptLoader.h"
#include "Vehicle.h"
+#include <algorithm>
enum AlchemistItemRequirements
{
@@ -234,297 +236,378 @@ public:
}
};
-enum overlordDrakuru
+enum OverlordDrakuru
{
- SPELL_SHADOW_BOLT = 54113,
- SPELL_SCOURGE_DISGUISE_EXPIRING = 52010,
- SPELL_THROW_BRIGHT_CRYSTAL = 54087,
- SPELL_TELEPORT_EFFECT = 52096,
- SPELL_SCOURGE_DISGUISE = 51966,
- SPELL_SCOURGE_DISGUISE_INSTANT_CAST = 52192,
- SPELL_BLIGHT_FOG = 54104,
- SPELL_THROW_PORTAL_CRYSTAL = 54209,
- SPELL_ARTHAS_PORTAL = 51807,
- SPELL_TOUCH_OF_DEATH = 54236,
- SPELL_DRAKURU_DEATH = 54248,
- SPELL_SUMMON_SKULL = 54253,
-
- QUEST_BETRAYAL = 12713,
-
- NPC_BLIGHTBLOOD_TROLL = 28931,
- NPC_LICH_KING = 28498,
-
- EVENT_BETRAYAL_1 = 1,
- EVENT_BETRAYAL_2 = 2,
- EVENT_BETRAYAL_3 = 3,
- EVENT_BETRAYAL_4 = 4,
- EVENT_BETRAYAL_5 = 5,
- EVENT_BETRAYAL_6 = 6,
- EVENT_BETRAYAL_7 = 7,
- EVENT_BETRAYAL_8 = 8,
- EVENT_BETRAYAL_9 = 9,
- EVENT_BETRAYAL_10 = 10,
- EVENT_BETRAYAL_11 = 11,
- EVENT_BETRAYAL_12 = 12,
- EVENT_BETRAYAL_13 = 13,
- EVENT_BETRAYAL_14 = 14,
- EVENT_BETRAYAL_SHADOW_BOLT = 20,
- EVENT_BETRAYAL_CRYSTAL = 21,
- EVENT_BETRAYAL_COMBAT_TALK = 22,
-
- SAY_DRAKURU_0 = 0,
- SAY_DRAKURU_1 = 1,
- SAY_DRAKURU_2 = 2,
- SAY_DRAKURU_3 = 3,
- SAY_DRAKURU_4 = 4,
- SAY_DRAKURU_5 = 5,
- SAY_DRAKURU_6 = 6,
- SAY_DRAKURU_7 = 7,
- SAY_LICH_7 = 7,
- SAY_LICH_8 = 8,
- SAY_LICH_9 = 9,
- SAY_LICH_10 = 10,
- SAY_LICH_11 = 11,
- SAY_LICH_12 = 12,
+ SPELL_SHADOW_BOLT = 54113,
+ SPELL_SCOURGE_DISGUISE_EXPIRING = 52010,
+ SPELL_DROP_DISGUISE = 54089,
+ SPELL_THROW_BRIGHT_CRYSTAL = 54087,
+ SPELL_TELEPORT_EFFECT = 52096,
+ SPELL_SCOURGE_SPOTLIGHT = 53104,
+ SPELL_SCOURGE_DISGUISE = 51966,
+ SPELL_SCOURGE_DISGUISE_INSTANT_CAST = 52192,
+ SPELL_BLIGHT_FOG = 54104,
+ SPELL_THROW_PORTAL_CRYSTAL = 54209,
+ SPELL_ARTHAS_PORTAL = 51807,
+ SPELL_TOUCH_OF_DEATH = 54236,
+ SPELL_DRAKURU_DEATH = 54248,
+ SPELL_SUMMON_SKULL = 54253,
+ SPELL_BLOATED_ABOMINATION_FEIGN_DEATH = 52593,
+ SPELL_EXPLODE_ABOMINATION_BLOODY_MEAT = 52523,
+ SPELL_EXPLODE_ABOMINATION_MEAT = 52520,
+ SPELL_DRAKURUS_SKULL_MISSILE = 54250,
+ SPELL_BURST_AT_THE_SEAMS_BONE = 52516,
+
+ QUEST_BETRAYAL = 12713,
+
+ NPC_BLIGHTBLOOD_TROLL = 28931,
+ NPC_LICH_KING = 28498,
+ NPC_TOTALLY_GENERIC_BUNNY = 29100,
+ NPC_TOTALLY_GENERIC_BUNNY_JSB = 28960,
+ GO_DRAKURUS_LAST_WISH = 202357,
+ GO_DRAKURUS_BONE = 191458,
+
+ ACTION_SUMMON_DRAKURU_LAST_WISH = 1,
+ ACTION_DESTROY_DRAKURU_LAST_WISH = 2,
+ ACTION_REMOVE_SPOTLIGHTS = 3,
+
+ SUMMON_GROUP_BLIGHTBLOOD_TROLL = 1,
+
+ EVENT_BETRAYAL_INTRO_1 = 1,
+ EVENT_BETRAYAL_INTRO_2 = 2,
+ EVENT_BETRAYAL_INTRO_3 = 3,
+ EVENT_BETRAYAL_INTRO_4 = 4,
+ EVENT_BETRAYAL_EVADE_CHECK = 5,
+ EVENT_BETRAYAL_EPILOGUE_1 = 6,
+ EVENT_BETRAYAL_EPILOGUE_2 = 7,
+ EVENT_BETRAYAL_EPILOGUE_3 = 8,
+ EVENT_BETRAYAL_EPILOGUE_4 = 9,
+ EVENT_BETRAYAL_EPILOGUE_5 = 10,
+ EVENT_BETRAYAL_EPILOGUE_6 = 11,
+ EVENT_BETRAYAL_EPILOGUE_7 = 12,
+ EVENT_BETRAYAL_EPILOGUE_8 = 13,
+ EVENT_BETRAYAL_EPILOGUE_9 = 14,
+ EVENT_BETRAYAL_EPILOGUE_10 = 15,
+
+ SAY_DRAKURU_0 = 0,
+ SAY_DRAKURU_1 = 1,
+ SAY_DRAKURU_2 = 2,
+ SAY_DRAKURU_3 = 3,
+ SAY_DRAKURU_4 = 4,
+ SAY_DRAKURU_5 = 5,
+ SAY_DRAKURU_6 = 6,
+ SAY_DRAKURU_7 = 7,
+ SAY_LICH_7 = 7,
+ SAY_LICH_8 = 8,
+ SAY_LICH_9 = 9,
+ SAY_LICH_10 = 10,
+ SAY_LICH_11 = 11,
+ SAY_LICH_12 = 12,
};
-class npc_overlord_drakuru_betrayal : public CreatureScript
+enum BetrayalState
{
-public:
- npc_overlord_drakuru_betrayal() : CreatureScript("npc_overlord_drakuru_betrayal") { }
+ BETRAYAL_NOT_STARTED,
+ BETRAYAL_IN_PROGRESS,
+ BETRAYAL_EPILOGUE,
+ BETRAYAL_EVADE,
+};
- CreatureAI* GetAI(Creature* creature) const override
+struct npc_overlord_drakuru_betrayal : public ScriptedAI
+{
+ npc_overlord_drakuru_betrayal(Creature* creature) : ScriptedAI(creature), _summons(me), _state(BETRAYAL_NOT_STARTED)
{
- return new npc_overlord_drakuru_betrayalAI(creature);
+ me->SetControlled(true, UNIT_STATE_ROOT);
}
- struct npc_overlord_drakuru_betrayalAI : public ScriptedAI
+ void EnterEvadeMode(EvadeReason why) override
{
- npc_overlord_drakuru_betrayalAI(Creature* creature) : ScriptedAI(creature), summons(me)
- {
- }
+ if (_state != BETRAYAL_EVADE)
+ return;
+ me->SetFaction(FACTION_UNDEAD_SCOURGE);
+ me->RemoveUnitFlag(UNIT_FLAG_NON_ATTACKABLE);
+ ScriptedAI::EnterEvadeMode(why);
+ }
- EventMap events;
- SummonList summons;
- ObjectGuid playerGUID;
- ObjectGuid lichGUID;
+ void Reset() override
+ {
+ events.Reset();
+ scheduler.CancelAll();
+ _summons.DespawnAll();
+ _playerGUID.Clear();
+ _lichGUID.Clear();
+ me->SetFaction(FACTION_UNDEAD_SCOURGE);
+ me->SetVisible(false);
+ DoAction(ACTION_SUMMON_DRAKURU_LAST_WISH);
+ me->RemoveUnitFlag(UNIT_FLAG_NON_ATTACKABLE);
+ me->SetImmuneToPC(true);
+ _state = BETRAYAL_NOT_STARTED;
+ DoAction(ACTION_REMOVE_SPOTLIGHTS);
+ }
- void EnterEvadeMode(EvadeReason why) override
+ void DoAction(int32 action) override
+ {
+ switch (action)
{
- if (playerGUID)
- if (Player* player = ObjectAccessor::GetPlayer(*me, playerGUID))
- if (player->IsWithinDistInMap(me, 80))
- return;
- me->SetFaction(FACTION_UNDEAD_SCOURGE);
- me->RemoveUnitFlag(UNIT_FLAG_NON_ATTACKABLE);
- ScriptedAI::EnterEvadeMode(why);
+ case ACTION_SUMMON_DRAKURU_LAST_WISH:
+ if (!me->FindNearestGameObject(GO_DRAKURUS_LAST_WISH, 80.0f))
+ me->SummonGameObject(GO_DRAKURUS_LAST_WISH, 6185.989, -2029.6979, 590.87787, 0, 0, 0, 0, 0, 0, true, GO_SUMMON_TIMED_DESPAWN);
+ break;
+ case ACTION_DESTROY_DRAKURU_LAST_WISH:
+ if (GameObject* go = me->FindNearestGameObject(GO_DRAKURUS_LAST_WISH, 80.0f))
+ go->Delete();
+ break;
+ case ACTION_REMOVE_SPOTLIGHTS:
+ {
+ std::list<Creature*> creatures;
+ me->GetCreatureListWithEntryInGrid(creatures, NPC_TOTALLY_GENERIC_BUNNY, 55.0f);
+ for (Creature* creature : creatures)
+ creature->RemoveAurasDueToSpell(SPELL_SCOURGE_SPOTLIGHT);
+ }
}
+ }
- void Reset() override
- {
- events.Reset();
- summons.DespawnAll();
- playerGUID.Clear();
- lichGUID.Clear();
- me->SetFaction(FACTION_UNDEAD_SCOURGE);
- me->SetVisible(false);
- me->RemoveUnitFlag(UNIT_FLAG_NON_ATTACKABLE);
- }
+ bool IsPlayerOnQuest(Player* player)
+ {
+ return player->GetQuestStatus(QUEST_BETRAYAL) == QUEST_STATUS_INCOMPLETE;
+ }
- void MoveInLineOfSight(Unit* who) override
+ void MoveInLineOfSight(Unit* who) override
+ {
+ if (Player* player = who->ToPlayer())
{
- if (who->IsPlayer())
+ bool shouldStartEvent = (_state == BETRAYAL_NOT_STARTED) && IsPlayerOnQuest(player) && player->HasAura(SPELL_SCOURGE_DISGUISE) && player->IsWithinDistInMap(me, 80.0f) && !me->FindNearestGameObject(GO_DRAKURUS_BONE, 80.0f);
+ if (shouldStartEvent)
{
- if (playerGUID)
- {
- if (who->GetGUID() != playerGUID)
- {
- Player* player = ObjectAccessor::GetPlayer(*me, playerGUID);
- if (player && player->IsWithinDistInMap(me, 80))
- who->ToPlayer()->NearTeleportTo(6143.76f, -1969.7f, 417.57f, 2.08f);
- else
- {
- EnterEvadeMode(EVADE_REASON_OTHER);
- return;
- }
- }
- else
- ScriptedAI::MoveInLineOfSight(who);
- }
- else if (who->ToPlayer()->GetQuestStatus(QUEST_BETRAYAL) == QUEST_STATUS_INCOMPLETE && who->HasAura(SPELL_SCOURGE_DISGUISE))
- {
- me->SetVisible(true);
- playerGUID = who->GetGUID();
- events.ScheduleEvent(EVENT_BETRAYAL_1, 5s);
- }
+ me->SetVisible(true);
+ _state = BETRAYAL_IN_PROGRESS;
+ DoAction(ACTION_DESTROY_DRAKURU_LAST_WISH);
+ _playerGUID = who->GetGUID();
+ events.ScheduleEvent(EVENT_BETRAYAL_INTRO_1, 6s);
+ events.ScheduleEvent(EVENT_BETRAYAL_EVADE_CHECK, 10s);
}
- else
- ScriptedAI::MoveInLineOfSight(who);
}
+ else
+ ScriptedAI::MoveInLineOfSight(who);
+ }
- void JustSummoned(Creature* cr) override
+ void JustSummoned(Creature* summon) override
+ {
+ _summons.Summon(summon);
+ switch (summon->GetEntry())
{
- summons.Summon(cr);
- if (cr->GetEntry() == NPC_BLIGHTBLOOD_TROLL)
- cr->CastSpell(cr, SPELL_TELEPORT_EFFECT, true);
- else
- {
- me->SetFacingToObject(cr);
- lichGUID = cr->GetGUID();
- float o = me->GetAngle(cr);
- cr->GetMotionMaster()->MovePoint(0, me->GetPositionX() + cos(o) * 6.0f, me->GetPositionY() + std::sin(o) * 6.0f, me->GetPositionZ());
- }
+ case NPC_BLIGHTBLOOD_TROLL:
+ if (Creature* target = summon->FindNearestCreature(NPC_TOTALLY_GENERIC_BUNNY, 10.0f, true))
+ target->CastSpell(target, SPELL_TELEPORT_EFFECT, true);
+ break;
+ case NPC_LICH_KING:
+ me->SetFacingToObject(summon);
+ _lichGUID = summon->GetGUID();
+ summon->GetMotionMaster()->MovePoint(0, 6164.2695, -2016.8978, 590.8636);
+ break;
+ default:
+ break;
}
+ }
- void JustEngagedWith(Unit*) override
+ void JustEngagedWith(Unit* /*who*/) override
+ {
+ scheduler.Schedule(0s, [this](TaskContext context)
{
- Talk(SAY_DRAKURU_3);
- events.ScheduleEvent(EVENT_BETRAYAL_SHADOW_BOLT, 2s);
- events.ScheduleEvent(EVENT_BETRAYAL_CRYSTAL, 5s);
- events.ScheduleEvent(EVENT_BETRAYAL_COMBAT_TALK, 20s);
- }
+ if (!me->IsWithinMeleeRange(me->GetVictim()))
+ DoCastVictim(SPELL_SHADOW_BOLT);
+ context.Repeat(2s);
+ }).Schedule(5s, [this](TaskContext context)
+ {
+ if (Unit* target = SelectTarget(SelectTargetMethod::Random, 0, 0.0f, true))
+ DoCast(target, SPELL_THROW_BRIGHT_CRYSTAL);
+ context.Repeat(6s, 15s);
+ }).Schedule(20s, [this](TaskContext context)
+ {
+ Talk(SAY_DRAKURU_4);
+ context.Repeat(10s, 20s);
+ });
+ }
- void DamageTaken(Unit*, uint32& damage, DamageEffectType, SpellSchoolMask) override
+ void DamageTaken(Unit* /*attacker*/, uint32& damage, DamageEffectType /*dmgType*/, SpellSchoolMask /*school*/) override
+ {
+ if (damage >= me->GetHealth() && !me->HasUnitFlag(UNIT_FLAG_NON_ATTACKABLE))
{
- if (damage >= me->GetHealth() && !me->HasUnitFlag(UNIT_FLAG_NON_ATTACKABLE))
- {
- damage = 0;
- me->RemoveAllAuras();
- me->CombatStop();
- me->SetUnitFlag(UNIT_FLAG_NON_ATTACKABLE);
- me->SetFaction(FACTION_FRIENDLY);
- events.Reset();
- events.ScheduleEvent(EVENT_BETRAYAL_4, 1s);
- }
+ damage = 0;
+ me->RemoveAllAuras();
+ me->CombatStop();
+ me->SetUnitFlag(UNIT_FLAG_NON_ATTACKABLE);
+ me->SetFaction(2082);
+ me->SetImmuneToPC(true);
+ events.Reset();
+ scheduler.CancelAll();
+ events.ScheduleEvent(EVENT_BETRAYAL_EPILOGUE_1, 4200ms);
+ _state = BETRAYAL_EPILOGUE;
}
+ }
- void SpellHitTarget(Unit* target, SpellInfo const* spellInfo) override
+ void SpellHitTarget(Unit* target, SpellInfo const* spellInfo) override
+ {
+ switch (spellInfo->Id)
{
- if (spellInfo->Id == SPELL_THROW_PORTAL_CRYSTAL)
+ case SPELL_THROW_PORTAL_CRYSTAL:
if (Aura* aura = target->AddAura(SPELL_ARTHAS_PORTAL, target))
- aura->SetDuration(48000);
+ aura->SetDuration(77'000);
+ break;
+ case SPELL_DRAKURUS_SKULL_MISSILE:
+ target->CastSpell(target, SPELL_SUMMON_SKULL, true);
+ break;
+ case SPELL_DROP_DISGUISE:
+ target->CastSpell(target, SPELL_SCOURGE_DISGUISE_EXPIRING, true);
+ break;
}
+ }
- void SpellHit(Unit* /*caster*/, SpellInfo const* spellInfo) override
+ void SpellHit(Unit* /*caster*/, SpellInfo const* spellInfo) override
+ {
+ if (spellInfo->Id == SPELL_TOUCH_OF_DEATH)
{
- if (spellInfo->Id == SPELL_TOUCH_OF_DEATH)
- {
- me->CastSpell(me, SPELL_DRAKURU_DEATH, true);
- me->CastSpell(me, SPELL_SUMMON_SKULL, true);
- }
+ DoCastAOE(SPELL_DRAKURUS_SKULL_MISSILE, true);
+ DoCastSelf(SPELL_BLOATED_ABOMINATION_FEIGN_DEATH, true);
+ DoCastSelf(SPELL_BURST_AT_THE_SEAMS_BONE, true);
+ DoCastSelf(SPELL_BURST_AT_THE_SEAMS_BONE, true);
+ DoCastSelf(SPELL_BURST_AT_THE_SEAMS_BONE, true);
+ DoCastSelf(SPELL_EXPLODE_ABOMINATION_MEAT, true);
+ DoCastSelf(SPELL_EXPLODE_ABOMINATION_BLOODY_MEAT, true);
+ DoCastSelf(SPELL_EXPLODE_ABOMINATION_BLOODY_MEAT, true);
+ DoCastSelf(SPELL_EXPLODE_ABOMINATION_BLOODY_MEAT, true);
+ DoCastSelf(SPELL_DRAKURU_DEATH, true);
+ DoAction(ACTION_SUMMON_DRAKURU_LAST_WISH);
+ me->SetImmuneToPC(true);
}
+ }
- void UpdateAI(uint32 diff) override
+ void UpdateAI(uint32 diff) override
+ {
+ events.Update(diff);
+ switch (events.ExecuteEvent())
{
- events.Update(diff);
- switch (events.ExecuteEvent())
+ case EVENT_BETRAYAL_EVADE_CHECK:
{
- case EVENT_BETRAYAL_1:
- Talk(SAY_DRAKURU_0);
- events.ScheduleEvent(EVENT_BETRAYAL_2, 5s);
- break;
- case EVENT_BETRAYAL_2:
- me->SummonCreature(NPC_BLIGHTBLOOD_TROLL, 6184.1f, -1969.9f, 586.76f, 4.5f);
- me->SummonCreature(NPC_BLIGHTBLOOD_TROLL, 6222.9f, -2026.5f, 586.76f, 2.9f);
- me->SummonCreature(NPC_BLIGHTBLOOD_TROLL, 6166.2f, -2065.4f, 586.76f, 1.4f);
- me->SummonCreature(NPC_BLIGHTBLOOD_TROLL, 6127.5f, -2008.7f, 586.76f, 0.0f);
- events.ScheduleEvent(EVENT_BETRAYAL_3, 5s);
- break;
- case EVENT_BETRAYAL_3:
- Talk(SAY_DRAKURU_1);
- Talk(SAY_DRAKURU_2);
- if (Player* player = ObjectAccessor::GetPlayer(*me, playerGUID))
- player->CastSpell(player, SPELL_SCOURGE_DISGUISE_EXPIRING, true);
- if (Aura* aur = me->AddAura(SPELL_BLIGHT_FOG, me))
- aur->SetDuration(22000);
- break;
- case EVENT_BETRAYAL_4:
- Talk(SAY_DRAKURU_5);
- events.ScheduleEvent(EVENT_BETRAYAL_5, 6s);
- break;
- case EVENT_BETRAYAL_5:
- Talk(SAY_DRAKURU_6);
- me->CastSpell(me, SPELL_THROW_PORTAL_CRYSTAL, true);
- events.ScheduleEvent(EVENT_BETRAYAL_6, 8s);
- break;
- case EVENT_BETRAYAL_6:
- me->SummonCreature(NPC_LICH_KING, 6142.9f, -2011.6f, 590.86f, 0.0f, TEMPSUMMON_TIMED_DESPAWN, 41000);
- events.ScheduleEvent(EVENT_BETRAYAL_7, 8s);
- break;
- case EVENT_BETRAYAL_7:
- Talk(SAY_DRAKURU_7);
- events.ScheduleEvent(EVENT_BETRAYAL_8, 5s);
- break;
- case EVENT_BETRAYAL_8:
- if (Creature* lich = ObjectAccessor::GetCreature(*me, lichGUID))
- lich->AI()->Talk(SAY_LICH_7);
- events.ScheduleEvent(EVENT_BETRAYAL_9, 6s);
- break;
- case EVENT_BETRAYAL_9:
- if (Creature* lich = ObjectAccessor::GetCreature(*me, lichGUID))
+ if (_state == BETRAYAL_IN_PROGRESS)
+ {
+ float radius = 80.0f;
+ std::list<Player*> players;
+ Acore::AnyPlayerInObjectRangeCheck checker(me, radius, true, true);
+ Acore::PlayerListSearcher<Acore::AnyPlayerInObjectRangeCheck> searcher(me, players, checker);
+ Cell::VisitObjects(me, searcher, radius);
+ if (std::ranges::any_of(players, [this](Player* player)
{
- lich->AI()->Talk(SAY_LICH_8);
- lich->CastSpell(me, SPELL_TOUCH_OF_DEATH, false);
+ return IsPlayerOnQuest(player);
+ }))
+ {
+ events.Repeat(10s);
}
- events.ScheduleEvent(EVENT_BETRAYAL_10, 4s);
- break;
- case EVENT_BETRAYAL_10:
- me->SetVisible(false);
- if (Creature* lich = ObjectAccessor::GetCreature(*me, lichGUID))
- lich->AI()->Talk(SAY_LICH_9);
- events.ScheduleEvent(EVENT_BETRAYAL_11, 4s);
- break;
- case EVENT_BETRAYAL_11:
- if (Creature* lich = ObjectAccessor::GetCreature(*me, lichGUID))
- lich->AI()->Talk(SAY_LICH_10);
- events.ScheduleEvent(EVENT_BETRAYAL_12, 6s);
- break;
- case EVENT_BETRAYAL_12:
- if (Creature* lich = ObjectAccessor::GetCreature(*me, lichGUID))
- lich->AI()->Talk(SAY_LICH_11);
- events.ScheduleEvent(EVENT_BETRAYAL_13, 3s);
- break;
- case EVENT_BETRAYAL_13:
- if (Creature* lich = ObjectAccessor::GetCreature(*me, lichGUID))
+ else
{
- lich->AI()->Talk(SAY_LICH_12);
- lich->GetMotionMaster()->MovePoint(0, 6143.8f, -2011.5f, 590.9f);
+ _state = BETRAYAL_EVADE;
+ EnterEvadeMode(EVADE_REASON_OTHER);
}
- events.ScheduleEvent(EVENT_BETRAYAL_14, 7s);
- break;
- case EVENT_BETRAYAL_14:
- playerGUID.Clear();
- EnterEvadeMode(EVADE_REASON_OTHER);
- break;
+ }
+ break;
}
+ case EVENT_BETRAYAL_INTRO_1:
+ Talk(SAY_DRAKURU_0);
+ events.ScheduleEvent(EVENT_BETRAYAL_INTRO_2, 4s);
+ events.ScheduleEvent(EVENT_BETRAYAL_INTRO_3, 6600ms);
+ break;
+ case EVENT_BETRAYAL_INTRO_2:
+ me->SummonCreatureGroup(SUMMON_GROUP_BLIGHTBLOOD_TROLL);
+ break;
+ case EVENT_BETRAYAL_INTRO_3:
+ Talk(SAY_DRAKURU_1);
+ DoCastAOE(SPELL_DROP_DISGUISE);
+ events.ScheduleEvent(EVENT_BETRAYAL_INTRO_4, 9600ms);
+ break;
+ case EVENT_BETRAYAL_INTRO_4:
+ {
+ Talk(SAY_DRAKURU_2);
+ Talk(SAY_DRAKURU_3);
+ me->SetImmuneToPC(false);
+ std::list<Creature*> creatures;
+ me->GetCreatureListWithEntryInGrid(creatures, NPC_TOTALLY_GENERIC_BUNNY, 55.0f);
+ for (Creature* creature : creatures)
+ creature->CastSpell(creature, SPELL_SCOURGE_SPOTLIGHT, true);
+ break;
+ }
+ case EVENT_BETRAYAL_EPILOGUE_1:
+ {
+ Talk(SAY_DRAKURU_5);
+ events.ScheduleEvent(EVENT_BETRAYAL_EPILOGUE_2, 4800ms);
+ DoAction(ACTION_REMOVE_SPOTLIGHTS);
+ break;
+ }
+ case EVENT_BETRAYAL_EPILOGUE_2:
+ Talk(SAY_DRAKURU_6);
+ events.ScheduleEvent(EVENT_BETRAYAL_EPILOGUE_3, 1800ms);
+ break;
+ case EVENT_BETRAYAL_EPILOGUE_3:
+ DoCastSelf(SPELL_THROW_PORTAL_CRYSTAL, true);
+ events.ScheduleEvent(EVENT_BETRAYAL_EPILOGUE_4, 3600ms);
+ break;
+ case EVENT_BETRAYAL_EPILOGUE_4:
+ me->SummonCreature(NPC_LICH_KING, 6140.4233, -2010.9938, 589.1911, 6.126106, TEMPSUMMON_TIMED_DESPAWN, 77'000);
+ events.ScheduleEvent(EVENT_BETRAYAL_EPILOGUE_5, 8400ms);
+ break;
+ case EVENT_BETRAYAL_EPILOGUE_5:
+ Talk(SAY_DRAKURU_7);
+ events.ScheduleEvent(EVENT_BETRAYAL_EPILOGUE_6, 9600ms);
+ break;
+ case EVENT_BETRAYAL_EPILOGUE_6:
+ if (Creature* lich = ObjectAccessor::GetCreature(*me, _lichGUID))
+ {
+ lich->AI()->Talk(SAY_LICH_7);
+ lich->AI()->Talk(SAY_LICH_8, 5400ms);
+ }
+ events.ScheduleEvent(EVENT_BETRAYAL_EPILOGUE_7, 7800ms);
+ break;
+ case EVENT_BETRAYAL_EPILOGUE_7:
+ if (Creature* lich = ObjectAccessor::GetCreature(*me, _lichGUID))
+ lich->CastSpell(me, SPELL_TOUCH_OF_DEATH, false);
+ events.ScheduleEvent(EVENT_BETRAYAL_EPILOGUE_8, 4200ms);
+ break;
+ case EVENT_BETRAYAL_EPILOGUE_8:
+ me->SetVisible(false);
+ if (Creature* lich = ObjectAccessor::GetCreature(*me, _lichGUID))
+ {
+ lich->AI()->Talk(SAY_LICH_9, 3600ms);
+ lich->AI()->Talk(SAY_LICH_10, 8400ms);
+ lich->AI()->Talk(SAY_LICH_11, 22800ms);
+ lich->AI()->Talk(SAY_LICH_12, 27600ms);
+ }
+ events.ScheduleEvent(EVENT_BETRAYAL_EPILOGUE_9, 32600ms);
+ events.ScheduleEvent(EVENT_BETRAYAL_EPILOGUE_10, 37200ms);
+ break;
+ case EVENT_BETRAYAL_EPILOGUE_9:
+ if (Creature* lich = ObjectAccessor::GetCreature(*me, _lichGUID))
+ lich->GetMotionMaster()->MovePoint(0, 6141.2393, -2011.2728, 589.8653);
+ break;
+ case EVENT_BETRAYAL_EPILOGUE_10:
+ _state = BETRAYAL_EVADE;
+ EnterEvadeMode(EVADE_REASON_OTHER);
+ break;
+ }
- if (me->GetFaction() == FACTION_FRIENDLY || me->HasUnitState(UNIT_STATE_CASTING | UNIT_STATE_STUNNED))
- return;
+ if (me->GetFaction() == 2082 || me->HasUnitState(UNIT_STATE_CASTING | UNIT_STATE_STUNNED))
+ return;
- if (!UpdateVictim())
- return;
+ if (!UpdateVictim())
+ return;
- switch (events.ExecuteEvent())
- {
- case EVENT_BETRAYAL_SHADOW_BOLT:
- if (!me->IsWithinMeleeRange(me->GetVictim()))
- me->CastSpell(me->GetVictim(), SPELL_SHADOW_BOLT, false);
- events.Repeat(2s);
- break;
- case EVENT_BETRAYAL_CRYSTAL:
- if (Player* player = ObjectAccessor::GetPlayer(*me, playerGUID))
- me->CastSpell(player, SPELL_THROW_BRIGHT_CRYSTAL, true);
- events.Repeat(6s, 15s);
- break;
- case EVENT_BETRAYAL_COMBAT_TALK:
- Talk(SAY_DRAKURU_4);
- events.Repeat(20s);
- break;
- }
+ scheduler.Update(diff);
+ DoMeleeAttackIfReady();
+ }
- DoMeleeAttackIfReady();
- }
- };
+private:
+ SummonList _summons;
+ ObjectGuid _playerGUID;
+ ObjectGuid _lichGUID;
+ BetrayalState _state;
};
/*####
@@ -591,7 +674,7 @@ public:
// pointer check not needed
DoCast(rageclaw, SPELL_FREE_RAGECLAW, true);
_rageclawGUID.Clear();
- me->DespawnOrUnsummon(1);
+ me->DespawnOrUnsummon(1ms);
}
void SpellHit(Unit* caster, SpellInfo const* spell) override
@@ -660,7 +743,7 @@ public:
DoCast(me, SPELL_UNSHACKLED, true);
Talk(SAY_RAGECLAW);
me->GetMotionMaster()->MoveRandom(10);
- me->DespawnOrUnsummon(10000);
+ me->DespawnOrUnsummon(10s);
}
}
};
@@ -755,7 +838,7 @@ public:
case EVENT_RECRUIT_2:
me->SetWalk(true);
me->GetMotionMaster()->MovePoint(0, me->GetPositionX() + (cos(_heading) * 10), me->GetPositionY() + (std::sin(_heading) * 10), me->GetPositionZ());
- me->DespawnOrUnsummon(5000);
+ me->DespawnOrUnsummon(5s);
break;
default:
break;
@@ -864,11 +947,32 @@ class spell_scourge_disguise_instability : public AuraScript
}
};
+// 54105 - Blight Fog
+class spell_blight_fog : public SpellScript
+{
+ PrepareSpellScript(spell_blight_fog);
+
+ void FilterTargets(std::list<WorldObject*>& targets)
+ {
+ targets.remove_if([](WorldObject* target) -> bool
+ {
+ float z = target->GetPositionZ();
+ bool isInBlightFog = (582.0f <= z && z <= 583.0f) || (586.0f <= z && z <= 587.0f);
+ return !isInBlightFog;
+ });
+ }
+
+ void Register() override
+ {
+ OnObjectAreaTargetSelect += SpellObjectAreaTargetSelectFn(spell_blight_fog::FilterTargets, EFFECT_ALL, TARGET_UNIT_SRC_AREA_ENEMY);
+ }
+};
+
void AddSC_zuldrak()
{
new npc_finklestein();
new go_finklestein_cauldron();
- new npc_overlord_drakuru_betrayal();
+ RegisterCreatureAI(npc_overlord_drakuru_betrayal);
new npc_drakuru_shackles();
new npc_captured_rageclaw();
new npc_released_offspring_harkoa();
@@ -876,4 +980,5 @@ void AddSC_zuldrak()
new go_scourge_enclosure();
RegisterSpellScript(spell_scourge_disguise_instability);
+ RegisterSpellScript(spell_blight_fog);
}
diff --git a/src/server/scripts/OutdoorPvP/OutdoorPvPEP.cpp b/src/server/scripts/OutdoorPvP/OutdoorPvPEP.cpp
index 57feefa55c..ff4fe37dd9 100644
--- a/src/server/scripts/OutdoorPvP/OutdoorPvPEP.cpp
+++ b/src/server/scripts/OutdoorPvP/OutdoorPvPEP.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
@@ -43,12 +43,12 @@ void OPvPCapturePointEP_EWT::ChangeState()
// if changing from controlling alliance to horde or vice versa
if (_oldState == OBJECTIVESTATE_ALLIANCE && _oldState != _state)
{
- sWorldSessionMgr->SendZoneText(EP_GraveyardZone, sObjectMgr->GetAcoreStringForDBCLocale(LANG_OPVP_EP_LOSE_EWT_A));
+ _pvp->GetMap()->SendZoneText(EP_GraveyardZone, sObjectMgr->GetAcoreStringForDBCLocale(LANG_OPVP_EP_LOSE_EWT_A).c_str());
((OutdoorPvPEP*)_pvp)->SetControlledState(EP_EWT, TEAM_NEUTRAL);
}
else if (_oldState == OBJECTIVESTATE_HORDE && _oldState != _state)
{
- sWorldSessionMgr->SendZoneText(EP_GraveyardZone, sObjectMgr->GetAcoreStringForDBCLocale(LANG_OPVP_EP_LOSE_EWT_H));
+ _pvp->GetMap()->SendZoneText(EP_GraveyardZone, sObjectMgr->GetAcoreStringForDBCLocale(LANG_OPVP_EP_LOSE_EWT_H).c_str());
((OutdoorPvPEP*)_pvp)->SetControlledState(EP_EWT, TEAM_NEUTRAL);
}
@@ -61,14 +61,16 @@ void OPvPCapturePointEP_EWT::ChangeState()
artkit = 2;
SummonSupportUnitAtNorthpassTower(TEAM_ALLIANCE);
((OutdoorPvPEP*)_pvp)->SetControlledState(EP_EWT, TEAM_ALLIANCE);
- if (_oldState != _state) sWorldSessionMgr->SendZoneText(EP_GraveyardZone, sObjectMgr->GetAcoreStringForDBCLocale(LANG_OPVP_EP_CAPTURE_EWT_A));
+ if (_oldState != _state)
+ _pvp->GetMap()->SendZoneText(EP_GraveyardZone, sObjectMgr->GetAcoreStringForDBCLocale(LANG_OPVP_EP_CAPTURE_EWT_A).c_str());
break;
case OBJECTIVESTATE_HORDE:
m_TowerState = EP_TS_H;
artkit = 1;
SummonSupportUnitAtNorthpassTower(TEAM_HORDE);
((OutdoorPvPEP*)_pvp)->SetControlledState(EP_EWT, TEAM_HORDE);
- if (_oldState != _state) sWorldSessionMgr->SendZoneText(EP_GraveyardZone, sObjectMgr->GetAcoreStringForDBCLocale(LANG_OPVP_EP_CAPTURE_EWT_H));
+ if (_oldState != _state)
+ _pvp->GetMap()->SendZoneText(EP_GraveyardZone, sObjectMgr->GetAcoreStringForDBCLocale(LANG_OPVP_EP_CAPTURE_EWT_H).c_str());
break;
case OBJECTIVESTATE_NEUTRAL:
m_TowerState = EP_TS_N;
@@ -176,12 +178,12 @@ void OPvPCapturePointEP_NPT::ChangeState()
// if changing from controlling alliance to horde or vice versa
if (_oldState == OBJECTIVESTATE_ALLIANCE && _oldState != _state)
{
- sWorldSessionMgr->SendZoneText(EP_GraveyardZone, sObjectMgr->GetAcoreStringForDBCLocale(LANG_OPVP_EP_LOSE_NPT_A));
+ _pvp->GetMap()->SendZoneText(EP_GraveyardZone, sObjectMgr->GetAcoreStringForDBCLocale(LANG_OPVP_EP_LOSE_NPT_A).c_str());
((OutdoorPvPEP*)_pvp)->SetControlledState(EP_NPT, TEAM_NEUTRAL);
}
else if (_oldState == OBJECTIVESTATE_HORDE && _oldState != _state)
{
- sWorldSessionMgr->SendZoneText(EP_GraveyardZone, sObjectMgr->GetAcoreStringForDBCLocale(LANG_OPVP_EP_LOSE_NPT_H));
+ _pvp->GetMap()->SendZoneText(EP_GraveyardZone, sObjectMgr->GetAcoreStringForDBCLocale(LANG_OPVP_EP_LOSE_NPT_H).c_str());
((OutdoorPvPEP*)_pvp)->SetControlledState(EP_NPT, TEAM_NEUTRAL);
}
@@ -194,14 +196,16 @@ void OPvPCapturePointEP_NPT::ChangeState()
artkit = 2;
SummonGO(TEAM_ALLIANCE);
((OutdoorPvPEP*)_pvp)->SetControlledState(EP_NPT, TEAM_ALLIANCE);
- if (_oldState != _state) sWorldSessionMgr->SendZoneText(EP_GraveyardZone, sObjectMgr->GetAcoreStringForDBCLocale(LANG_OPVP_EP_CAPTURE_NPT_A));
+ if (_oldState != _state)
+ _pvp->GetMap()->SendZoneText(EP_GraveyardZone, sObjectMgr->GetAcoreStringForDBCLocale(LANG_OPVP_EP_CAPTURE_NPT_A).c_str());
break;
case OBJECTIVESTATE_HORDE:
m_TowerState = EP_TS_H;
artkit = 1;
SummonGO(TEAM_HORDE);
((OutdoorPvPEP*)_pvp)->SetControlledState(EP_NPT, TEAM_HORDE);
- if (_oldState != _state) sWorldSessionMgr->SendZoneText(EP_GraveyardZone, sObjectMgr->GetAcoreStringForDBCLocale(LANG_OPVP_EP_CAPTURE_NPT_H));
+ if (_oldState != _state)
+ _pvp->GetMap()->SendZoneText(EP_GraveyardZone, sObjectMgr->GetAcoreStringForDBCLocale(LANG_OPVP_EP_CAPTURE_NPT_H).c_str());
break;
case OBJECTIVESTATE_NEUTRAL:
m_TowerState = EP_TS_N;
@@ -319,12 +323,12 @@ void OPvPCapturePointEP_CGT::ChangeState()
// if changing from controlling alliance to horde or vice versa
if (_oldState == OBJECTIVESTATE_ALLIANCE && _oldState != _state)
{
- sWorldSessionMgr->SendZoneText(EP_GraveyardZone, sObjectMgr->GetAcoreStringForDBCLocale(LANG_OPVP_EP_LOSE_CGT_A));
+ _pvp->GetMap()->SendZoneText(EP_GraveyardZone, sObjectMgr->GetAcoreStringForDBCLocale(LANG_OPVP_EP_LOSE_CGT_A).c_str());
((OutdoorPvPEP*)_pvp)->SetControlledState(EP_CGT, TEAM_NEUTRAL);
}
else if (_oldState == OBJECTIVESTATE_HORDE && _oldState != _state)
{
- sWorldSessionMgr->SendZoneText(EP_GraveyardZone, sObjectMgr->GetAcoreStringForDBCLocale(LANG_OPVP_EP_LOSE_CGT_H));
+ _pvp->GetMap()->SendZoneText(EP_GraveyardZone, sObjectMgr->GetAcoreStringForDBCLocale(LANG_OPVP_EP_LOSE_CGT_H).c_str());
((OutdoorPvPEP*)_pvp)->SetControlledState(EP_CGT, TEAM_NEUTRAL);
}
@@ -337,14 +341,16 @@ void OPvPCapturePointEP_CGT::ChangeState()
artkit = 2;
LinkGraveyard(TEAM_ALLIANCE);
((OutdoorPvPEP*)_pvp)->SetControlledState(EP_CGT, TEAM_ALLIANCE);
- if (_oldState != _state) sWorldSessionMgr->SendZoneText(EP_GraveyardZone, sObjectMgr->GetAcoreStringForDBCLocale(LANG_OPVP_EP_CAPTURE_CGT_A));
+ if (_oldState != _state)
+ _pvp->GetMap()->SendZoneText(EP_GraveyardZone, sObjectMgr->GetAcoreStringForDBCLocale(LANG_OPVP_EP_CAPTURE_CGT_A).c_str());
break;
case OBJECTIVESTATE_HORDE:
m_TowerState = EP_TS_H;
artkit = 1;
LinkGraveyard(TEAM_HORDE);
((OutdoorPvPEP*)_pvp)->SetControlledState(EP_CGT, TEAM_HORDE);
- if (_oldState != _state) sWorldSessionMgr->SendZoneText(EP_GraveyardZone, sObjectMgr->GetAcoreStringForDBCLocale(LANG_OPVP_EP_CAPTURE_CGT_H));
+ if (_oldState != _state)
+ _pvp->GetMap()->SendZoneText(EP_GraveyardZone, sObjectMgr->GetAcoreStringForDBCLocale(LANG_OPVP_EP_CAPTURE_CGT_H).c_str());
break;
case OBJECTIVESTATE_NEUTRAL:
m_TowerState = EP_TS_N;
@@ -447,12 +453,12 @@ void OPvPCapturePointEP_PWT::ChangeState()
// if changing from controlling alliance to horde or vice versa
if (_oldState == OBJECTIVESTATE_ALLIANCE && _oldState != _state)
{
- sWorldSessionMgr->SendZoneText(EP_GraveyardZone, sObjectMgr->GetAcoreStringForDBCLocale(LANG_OPVP_EP_LOSE_PWT_A));
+ _pvp->GetMap()->SendZoneText(EP_GraveyardZone, sObjectMgr->GetAcoreStringForDBCLocale(LANG_OPVP_EP_LOSE_PWT_A).c_str());
((OutdoorPvPEP*)_pvp)->SetControlledState(EP_PWT, TEAM_NEUTRAL);
}
else if (_oldState == OBJECTIVESTATE_HORDE && _oldState != _state)
{
- sWorldSessionMgr->SendZoneText(EP_GraveyardZone, sObjectMgr->GetAcoreStringForDBCLocale(LANG_OPVP_EP_LOSE_PWT_H));
+ _pvp->GetMap()->SendZoneText(EP_GraveyardZone, sObjectMgr->GetAcoreStringForDBCLocale(LANG_OPVP_EP_LOSE_PWT_H).c_str());
((OutdoorPvPEP*)_pvp)->SetControlledState(EP_PWT, TEAM_NEUTRAL);
}
@@ -465,14 +471,16 @@ void OPvPCapturePointEP_PWT::ChangeState()
SummonFlightMaster(TEAM_ALLIANCE);
artkit = 2;
((OutdoorPvPEP*)_pvp)->SetControlledState(EP_PWT, TEAM_ALLIANCE);
- if (_oldState != _state) sWorldSessionMgr->SendZoneText(EP_GraveyardZone, sObjectMgr->GetAcoreStringForDBCLocale(LANG_OPVP_EP_CAPTURE_PWT_A));
+ if (_oldState != _state)
+ _pvp->GetMap()->SendZoneText(EP_GraveyardZone, sObjectMgr->GetAcoreStringForDBCLocale(LANG_OPVP_EP_CAPTURE_PWT_A).c_str());
break;
case OBJECTIVESTATE_HORDE:
m_TowerState = EP_TS_H;
SummonFlightMaster(TEAM_HORDE);
artkit = 1;
((OutdoorPvPEP*)_pvp)->SetControlledState(EP_PWT, TEAM_HORDE);
- if (_oldState != _state) sWorldSessionMgr->SendZoneText(EP_GraveyardZone, sObjectMgr->GetAcoreStringForDBCLocale(LANG_OPVP_EP_CAPTURE_PWT_H));
+ if (_oldState != _state)
+ _pvp->GetMap()->SendZoneText(EP_GraveyardZone, sObjectMgr->GetAcoreStringForDBCLocale(LANG_OPVP_EP_CAPTURE_PWT_H).c_str());
break;
case OBJECTIVESTATE_NEUTRAL:
m_TowerState = EP_TS_N;
diff --git a/src/server/scripts/OutdoorPvP/OutdoorPvPEP.h b/src/server/scripts/OutdoorPvP/OutdoorPvPEP.h
index 33903f8efa..976f9f9eac 100644
--- a/src/server/scripts/OutdoorPvP/OutdoorPvPEP.h
+++ b/src/server/scripts/OutdoorPvP/OutdoorPvPEP.h
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/scripts/OutdoorPvP/OutdoorPvPGH.cpp b/src/server/scripts/OutdoorPvP/OutdoorPvPGH.cpp
index a13bdd0fa1..d3e56186bb 100644
--- a/src/server/scripts/OutdoorPvP/OutdoorPvPGH.cpp
+++ b/src/server/scripts/OutdoorPvP/OutdoorPvPGH.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/scripts/OutdoorPvP/OutdoorPvPGH.h b/src/server/scripts/OutdoorPvP/OutdoorPvPGH.h
index 66ce2481df..6b74f97b47 100644
--- a/src/server/scripts/OutdoorPvP/OutdoorPvPGH.h
+++ b/src/server/scripts/OutdoorPvP/OutdoorPvPGH.h
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/scripts/OutdoorPvP/OutdoorPvPHP.cpp b/src/server/scripts/OutdoorPvP/OutdoorPvPHP.cpp
index c7c4f22976..66ac94100c 100644
--- a/src/server/scripts/OutdoorPvP/OutdoorPvPHP.cpp
+++ b/src/server/scripts/OutdoorPvP/OutdoorPvPHP.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
@@ -184,13 +184,13 @@ void OPvPCapturePointHP::ChangeState()
field = HP_MAP_A[m_TowerType];
if (uint32 alliance_towers = ((OutdoorPvPHP*)_pvp)->GetAllianceTowersControlled())
((OutdoorPvPHP*)_pvp)->SetAllianceTowersControlled(--alliance_towers);
- sWorldSessionMgr->SendZoneText(OutdoorPvPHPBuffZones[0], sObjectMgr->GetAcoreStringForDBCLocale(HP_LANG_LOSE_A[m_TowerType]));
+ _pvp->GetMap()->SendZoneText(OutdoorPvPHPBuffZones[0], sObjectMgr->GetAcoreStringForDBCLocale(HP_LANG_LOSE_A[m_TowerType]).c_str());
break;
case OBJECTIVESTATE_HORDE:
field = HP_MAP_H[m_TowerType];
if (uint32 horde_towers = ((OutdoorPvPHP*)_pvp)->GetHordeTowersControlled())
((OutdoorPvPHP*)_pvp)->SetHordeTowersControlled(--horde_towers);
- sWorldSessionMgr->SendZoneText(OutdoorPvPHPBuffZones[0], sObjectMgr->GetAcoreStringForDBCLocale(HP_LANG_LOSE_H[m_TowerType]));
+ _pvp->GetMap()->SendZoneText(OutdoorPvPHPBuffZones[0], sObjectMgr->GetAcoreStringForDBCLocale(HP_LANG_LOSE_H[m_TowerType]).c_str());
break;
case OBJECTIVESTATE_NEUTRAL_ALLIANCE_CHALLENGE:
field = HP_MAP_N[m_TowerType];
@@ -227,7 +227,7 @@ void OPvPCapturePointHP::ChangeState()
uint32 alliance_towers = ((OutdoorPvPHP*)_pvp)->GetAllianceTowersControlled();
if (alliance_towers < 3)
((OutdoorPvPHP*)_pvp)->SetAllianceTowersControlled(++alliance_towers);
- sWorldSessionMgr->SendZoneText(OutdoorPvPHPBuffZones[0], sObjectMgr->GetAcoreStringForDBCLocale(HP_LANG_CAPTURE_A[m_TowerType]));
+ _pvp->GetMap()->SendZoneText(OutdoorPvPHPBuffZones[0], sObjectMgr->GetAcoreStringForDBCLocale(HP_LANG_CAPTURE_A[m_TowerType]).c_str());
break;
}
case OBJECTIVESTATE_HORDE:
@@ -238,7 +238,7 @@ void OPvPCapturePointHP::ChangeState()
uint32 horde_towers = ((OutdoorPvPHP*)_pvp)->GetHordeTowersControlled();
if (horde_towers < 3)
((OutdoorPvPHP*)_pvp)->SetHordeTowersControlled(++horde_towers);
- sWorldSessionMgr->SendZoneText(OutdoorPvPHPBuffZones[0], sObjectMgr->GetAcoreStringForDBCLocale(HP_LANG_CAPTURE_H[m_TowerType]));
+ _pvp->GetMap()->SendZoneText(OutdoorPvPHPBuffZones[0], sObjectMgr->GetAcoreStringForDBCLocale(HP_LANG_CAPTURE_H[m_TowerType]).c_str());
break;
}
case OBJECTIVESTATE_NEUTRAL_ALLIANCE_CHALLENGE:
diff --git a/src/server/scripts/OutdoorPvP/OutdoorPvPHP.h b/src/server/scripts/OutdoorPvP/OutdoorPvPHP.h
index 9ea88659f1..959dc83c98 100644
--- a/src/server/scripts/OutdoorPvP/OutdoorPvPHP.h
+++ b/src/server/scripts/OutdoorPvP/OutdoorPvPHP.h
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/scripts/OutdoorPvP/OutdoorPvPNA.cpp b/src/server/scripts/OutdoorPvP/OutdoorPvPNA.cpp
index 712b8ad57b..e5d69d84b7 100644
--- a/src/server/scripts/OutdoorPvP/OutdoorPvPNA.cpp
+++ b/src/server/scripts/OutdoorPvP/OutdoorPvPNA.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
@@ -197,9 +197,9 @@ void OPvPCapturePointNA::FactionTakeOver(TeamId teamId)
if (m_ControllingFaction != TEAM_NEUTRAL)
sGraveyard->RemoveGraveyardLink(NA_HALAA_GRAVEYARD, NA_HALAA_GRAVEYARD_ZONE, m_ControllingFaction, false);
if (m_ControllingFaction == TEAM_ALLIANCE)
- sWorldSessionMgr->SendZoneText(NA_HALAA_GRAVEYARD_ZONE, sObjectMgr->GetAcoreStringForDBCLocale(LANG_OPVP_NA_LOSE_A));
+ _pvp->GetMap()->SendZoneText(NA_HALAA_GRAVEYARD_ZONE, sObjectMgr->GetAcoreStringForDBCLocale(LANG_OPVP_NA_LOSE_A).c_str());
else if (m_ControllingFaction == TEAM_HORDE)
- sWorldSessionMgr->SendZoneText(NA_HALAA_GRAVEYARD_ZONE, sObjectMgr->GetAcoreStringForDBCLocale(LANG_OPVP_NA_LOSE_H));
+ _pvp->GetMap()->SendZoneText(NA_HALAA_GRAVEYARD_ZONE, sObjectMgr->GetAcoreStringForDBCLocale(LANG_OPVP_NA_LOSE_H).c_str());
DespawnCreatures(GetControllingFaction() == TEAM_HORDE ? halaaNPCHorde : halaaNPCAlly);
m_ControllingFaction = teamId;
if (m_ControllingFaction != TEAM_NEUTRAL)
@@ -221,7 +221,7 @@ void OPvPCapturePointNA::FactionTakeOver(TeamId teamId)
_pvp->SendUpdateWorldState(WORLD_STATE_OPVP_NA_UI_HORDE_GUARDS_SHOW, 0);
_pvp->SendUpdateWorldState(WORLD_STATE_OPVP_NA_UI_ALLIANCE_GUARDS_SHOW, 1);
_pvp->SendUpdateWorldState(WORLD_STATE_OPVP_NA_UI_GUARDS_LEFT, m_GuardsAlive);
- sWorldSessionMgr->SendZoneText(NA_HALAA_GRAVEYARD_ZONE, sObjectMgr->GetAcoreStringForDBCLocale(LANG_OPVP_NA_CAPTURE_A));
+ _pvp->GetMap()->SendZoneText(NA_HALAA_GRAVEYARD_ZONE, sObjectMgr->GetAcoreStringForDBCLocale(LANG_OPVP_NA_CAPTURE_A).c_str());
}
else
{
@@ -233,7 +233,7 @@ void OPvPCapturePointNA::FactionTakeOver(TeamId teamId)
_pvp->SendUpdateWorldState(WORLD_STATE_OPVP_NA_UI_HORDE_GUARDS_SHOW, 1);
_pvp->SendUpdateWorldState(WORLD_STATE_OPVP_NA_UI_ALLIANCE_GUARDS_SHOW, 0);
_pvp->SendUpdateWorldState(WORLD_STATE_OPVP_NA_UI_GUARDS_LEFT, m_GuardsAlive);
- sWorldSessionMgr->SendZoneText(NA_HALAA_GRAVEYARD_ZONE, sObjectMgr->GetAcoreStringForDBCLocale(LANG_OPVP_NA_CAPTURE_H));
+ _pvp->GetMap()->SendZoneText(NA_HALAA_GRAVEYARD_ZONE, sObjectMgr->GetAcoreStringForDBCLocale(LANG_OPVP_NA_CAPTURE_H).c_str());
}
UpdateWyvernRoostWorldState(NA_ROOST_S);
UpdateWyvernRoostWorldState(NA_ROOST_N);
@@ -637,7 +637,7 @@ bool OPvPCapturePointNA::Update(uint32 diff)
{
m_capturable = true;
m_RespawnTimer = NA_RESPAWN_TIME;
- sWorldSessionMgr->SendZoneText(NA_HALAA_GRAVEYARD_ZONE, sObjectMgr->GetAcoreStringForDBCLocale(LANG_OPVP_NA_DEFENSELESS));
+ _pvp->GetMap()->SendZoneText(NA_HALAA_GRAVEYARD_ZONE, sObjectMgr->GetAcoreStringForDBCLocale(LANG_OPVP_NA_DEFENSELESS).c_str());
}
else
m_capturable = false;
diff --git a/src/server/scripts/OutdoorPvP/OutdoorPvPNA.h b/src/server/scripts/OutdoorPvP/OutdoorPvPNA.h
index 8f5f10c9fa..91a6af3bfb 100644
--- a/src/server/scripts/OutdoorPvP/OutdoorPvPNA.h
+++ b/src/server/scripts/OutdoorPvP/OutdoorPvPNA.h
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/scripts/OutdoorPvP/OutdoorPvPSI.cpp b/src/server/scripts/OutdoorPvP/OutdoorPvPSI.cpp
index 56449ef3e4..6221ee83b0 100644
--- a/src/server/scripts/OutdoorPvP/OutdoorPvPSI.cpp
+++ b/src/server/scripts/OutdoorPvP/OutdoorPvPSI.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
@@ -106,7 +106,7 @@ bool OutdoorPvPSI::HandleAreaTrigger(Player* player, uint32 trigger)
if (m_Gathered_A >= SI_MAX_RESOURCES)
{
TeamApplyBuff(TEAM_ALLIANCE, SI_CENARION_FAVOR, 0, player);
- sWorldSessionMgr->SendZoneText(OutdoorPvPSIBuffZones[0], sObjectMgr->GetAcoreStringForDBCLocale(LANG_OPVP_SI_CAPTURE_A));
+ GetMap()->SendZoneText(OutdoorPvPSIBuffZones[0], sObjectMgr->GetAcoreStringForDBCLocale(LANG_OPVP_SI_CAPTURE_A).c_str());
m_LastController = TEAM_ALLIANCE;
m_Gathered_A = 0;
m_Gathered_H = 0;
@@ -132,7 +132,7 @@ bool OutdoorPvPSI::HandleAreaTrigger(Player* player, uint32 trigger)
if (m_Gathered_H >= SI_MAX_RESOURCES)
{
TeamApplyBuff(TEAM_HORDE, SI_CENARION_FAVOR, 0, player);
- sWorldSessionMgr->SendZoneText(OutdoorPvPSIBuffZones[0], sObjectMgr->GetAcoreStringForDBCLocale(LANG_OPVP_SI_CAPTURE_H));
+ GetMap()->SendZoneText(OutdoorPvPSIBuffZones[0], sObjectMgr->GetAcoreStringForDBCLocale(LANG_OPVP_SI_CAPTURE_H).c_str());
m_LastController = TEAM_HORDE;
m_Gathered_A = 0;
m_Gathered_H = 0;
diff --git a/src/server/scripts/OutdoorPvP/OutdoorPvPSI.h b/src/server/scripts/OutdoorPvP/OutdoorPvPSI.h
index c7bc654e1b..495d369efe 100644
--- a/src/server/scripts/OutdoorPvP/OutdoorPvPSI.h
+++ b/src/server/scripts/OutdoorPvP/OutdoorPvPSI.h
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/scripts/OutdoorPvP/OutdoorPvPTF.cpp b/src/server/scripts/OutdoorPvP/OutdoorPvPTF.cpp
index 595f3530da..57bdb8d5d4 100644
--- a/src/server/scripts/OutdoorPvP/OutdoorPvPTF.cpp
+++ b/src/server/scripts/OutdoorPvP/OutdoorPvPTF.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
@@ -400,14 +400,14 @@ void OPvPCapturePointTF::ChangeState()
{
if (uint32 alliance_towers = ((OutdoorPvPTF*)_pvp)->GetAllianceTowersControlled())
((OutdoorPvPTF*)_pvp)->SetAllianceTowersControlled(--alliance_towers);
- sWorldSessionMgr->SendZoneText(OutdoorPvPTFBuffZones[0], sObjectMgr->GetAcoreStringForDBCLocale(LANG_OPVP_TF_LOSE_A));
+ _pvp->GetMap()->SendZoneText(OutdoorPvPTFBuffZones[0], sObjectMgr->GetAcoreStringForDBCLocale(LANG_OPVP_TF_LOSE_A).c_str());
}
// if changing from controlling horde to alliance
else if (_oldState == OBJECTIVESTATE_HORDE)
{
if (uint32 horde_towers = ((OutdoorPvPTF*)_pvp)->GetHordeTowersControlled())
((OutdoorPvPTF*)_pvp)->SetHordeTowersControlled(--horde_towers);
- sWorldSessionMgr->SendZoneText(OutdoorPvPTFBuffZones[0], sObjectMgr->GetAcoreStringForDBCLocale(LANG_OPVP_TF_LOSE_H));
+ _pvp->GetMap()->SendZoneText(OutdoorPvPTFBuffZones[0], sObjectMgr->GetAcoreStringForDBCLocale(LANG_OPVP_TF_LOSE_H).c_str());
}
uint32 artkit = 21;
@@ -422,7 +422,7 @@ void OPvPCapturePointTF::ChangeState()
if (alliance_towers < TF_TOWER_NUM)
((OutdoorPvPTF*)_pvp)->SetAllianceTowersControlled(++alliance_towers);
- sWorldSessionMgr->SendZoneText(OutdoorPvPTFBuffZones[0], sObjectMgr->GetAcoreStringForDBCLocale(LANG_OPVP_TF_CAPTURE_A));
+ _pvp->GetMap()->SendZoneText(OutdoorPvPTFBuffZones[0], sObjectMgr->GetAcoreStringForDBCLocale(LANG_OPVP_TF_CAPTURE_A).c_str());
for (PlayerSet::iterator itr = _activePlayers[0].begin(); itr != _activePlayers[0].end(); ++itr)
if (Player* player = ObjectAccessor::FindPlayer(*itr))
@@ -437,7 +437,7 @@ void OPvPCapturePointTF::ChangeState()
if (horde_towers < TF_TOWER_NUM)
((OutdoorPvPTF*)_pvp)->SetHordeTowersControlled(++horde_towers);
- sWorldSessionMgr->SendZoneText(OutdoorPvPTFBuffZones[0], sObjectMgr->GetAcoreStringForDBCLocale(LANG_OPVP_TF_CAPTURE_H));
+ _pvp->GetMap()->SendZoneText(OutdoorPvPTFBuffZones[0], sObjectMgr->GetAcoreStringForDBCLocale(LANG_OPVP_TF_CAPTURE_H).c_str());
for (PlayerSet::iterator itr = _activePlayers[1].begin(); itr != _activePlayers[1].end(); ++itr)
if (Player* player = ObjectAccessor::FindPlayer(*itr))
diff --git a/src/server/scripts/OutdoorPvP/OutdoorPvPTF.h b/src/server/scripts/OutdoorPvP/OutdoorPvPTF.h
index 6184e20ba2..6d14a11c31 100644
--- a/src/server/scripts/OutdoorPvP/OutdoorPvPTF.h
+++ b/src/server/scripts/OutdoorPvP/OutdoorPvPTF.h
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/scripts/OutdoorPvP/OutdoorPvPZM.cpp b/src/server/scripts/OutdoorPvP/OutdoorPvPZM.cpp
index 9dfd2876fb..60b7a5bbc3 100644
--- a/src/server/scripts/OutdoorPvP/OutdoorPvPZM.cpp
+++ b/src/server/scripts/OutdoorPvP/OutdoorPvPZM.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
@@ -82,14 +82,14 @@ void OPvPCapturePointZM_Beacon::ChangeState()
{
if (uint32 alliance_towers = ((OutdoorPvPZM*)_pvp)->GetAllianceTowersControlled())
((OutdoorPvPZM*)_pvp)->SetAllianceTowersControlled(--alliance_towers);
- sWorldSessionMgr->SendZoneText(ZM_GRAVEYARD_ZONE, sObjectMgr->GetAcoreStringForDBCLocale(ZMBeaconLoseA[m_TowerType]));
+ _pvp->GetMap()->SendZoneText(ZM_GRAVEYARD_ZONE, sObjectMgr->GetAcoreStringForDBCLocale(ZMBeaconLoseA[m_TowerType]).c_str());
}
// if changing from controlling horde to alliance
else if (_oldState == OBJECTIVESTATE_HORDE)
{
if (uint32 horde_towers = ((OutdoorPvPZM*)_pvp)->GetHordeTowersControlled())
((OutdoorPvPZM*)_pvp)->SetHordeTowersControlled(--horde_towers);
- sWorldSessionMgr->SendZoneText(ZM_GRAVEYARD_ZONE, sObjectMgr->GetAcoreStringForDBCLocale(ZMBeaconLoseH[m_TowerType]));
+ _pvp->GetMap()->SendZoneText(ZM_GRAVEYARD_ZONE, sObjectMgr->GetAcoreStringForDBCLocale(ZMBeaconLoseH[m_TowerType]).c_str());
}
switch (_state)
@@ -100,7 +100,7 @@ void OPvPCapturePointZM_Beacon::ChangeState()
uint32 alliance_towers = ((OutdoorPvPZM*)_pvp)->GetAllianceTowersControlled();
if (alliance_towers < ZM_NUM_BEACONS)
((OutdoorPvPZM*)_pvp)->SetAllianceTowersControlled(++alliance_towers);
- sWorldSessionMgr->SendZoneText(ZM_GRAVEYARD_ZONE, sObjectMgr->GetAcoreStringForDBCLocale(ZMBeaconCaptureA[m_TowerType]));
+ _pvp->GetMap()->SendZoneText(ZM_GRAVEYARD_ZONE, sObjectMgr->GetAcoreStringForDBCLocale(ZMBeaconCaptureA[m_TowerType]).c_str());
break;
}
case OBJECTIVESTATE_HORDE:
@@ -109,7 +109,7 @@ void OPvPCapturePointZM_Beacon::ChangeState()
uint32 horde_towers = ((OutdoorPvPZM*)_pvp)->GetHordeTowersControlled();
if (horde_towers < ZM_NUM_BEACONS)
((OutdoorPvPZM*)_pvp)->SetHordeTowersControlled(++horde_towers);
- sWorldSessionMgr->SendZoneText(ZM_GRAVEYARD_ZONE, sObjectMgr->GetAcoreStringForDBCLocale(ZMBeaconCaptureH[m_TowerType]));
+ _pvp->GetMap()->SendZoneText(ZM_GRAVEYARD_ZONE, sObjectMgr->GetAcoreStringForDBCLocale(ZMBeaconCaptureH[m_TowerType]).c_str());
break;
}
case OBJECTIVESTATE_NEUTRAL:
@@ -227,7 +227,7 @@ int32 OPvPCapturePointZM_Graveyard::HandleOpenGo(Player* player, GameObject* go)
if (player->HasAura(ZM_BATTLE_STANDARD_A) && m_GraveyardState != ZM_GRAVEYARD_A)
{
if (m_GraveyardState == ZM_GRAVEYARD_H)
- sWorldSessionMgr->SendZoneText(ZM_GRAVEYARD_ZONE, sObjectMgr->GetAcoreStringForDBCLocale(LANG_OPVP_ZM_LOSE_GY_H));
+ _pvp->GetMap()->SendZoneText(ZM_GRAVEYARD_ZONE, sObjectMgr->GetAcoreStringForDBCLocale(LANG_OPVP_ZM_LOSE_GY_H).c_str());
m_GraveyardState = ZM_GRAVEYARD_A;
DelObject(0); // only one gotype is used in the whole outdoor pvp, no need to call it a constant
AddObject(0, ZM_Banner_A.entry, ZM_Banner_A.map, ZM_Banner_A.x, ZM_Banner_A.y, ZM_Banner_A.z, ZM_Banner_A.o, ZM_Banner_A.rot0, ZM_Banner_A.rot1, ZM_Banner_A.rot2, ZM_Banner_A.rot3);
@@ -235,12 +235,12 @@ int32 OPvPCapturePointZM_Graveyard::HandleOpenGo(Player* player, GameObject* go)
sGraveyard->AddGraveyardLink(ZM_GRAVEYARD_ID, ZM_GRAVEYARD_ZONE, TEAM_ALLIANCE, false); // add gy
_pvp->TeamApplyBuff(TEAM_ALLIANCE, ZM_CAPTURE_BUFF, 0, player);
player->RemoveAurasDueToSpell(ZM_BATTLE_STANDARD_A);
- sWorldSessionMgr->SendZoneText(ZM_GRAVEYARD_ZONE, sObjectMgr->GetAcoreStringForDBCLocale(LANG_OPVP_ZM_CAPTURE_GY_A));
+ _pvp->GetMap()->SendZoneText(ZM_GRAVEYARD_ZONE, sObjectMgr->GetAcoreStringForDBCLocale(LANG_OPVP_ZM_CAPTURE_GY_A).c_str());
}
else if (player->HasAura(ZM_BATTLE_STANDARD_H) && m_GraveyardState != ZM_GRAVEYARD_H)
{
if (m_GraveyardState == ZM_GRAVEYARD_A)
- sWorldSessionMgr->SendZoneText(ZM_GRAVEYARD_ZONE, sObjectMgr->GetAcoreStringForDBCLocale(LANG_OPVP_ZM_LOSE_GY_A));
+ _pvp->GetMap()->SendZoneText(ZM_GRAVEYARD_ZONE, sObjectMgr->GetAcoreStringForDBCLocale(LANG_OPVP_ZM_LOSE_GY_A).c_str());
m_GraveyardState = ZM_GRAVEYARD_H;
DelObject(0); // only one gotype is used in the whole outdoor pvp, no need to call it a constant
AddObject(0, ZM_Banner_H.entry, ZM_Banner_H.map, ZM_Banner_H.x, ZM_Banner_H.y, ZM_Banner_H.z, ZM_Banner_H.o, ZM_Banner_H.rot0, ZM_Banner_H.rot1, ZM_Banner_H.rot2, ZM_Banner_H.rot3);
@@ -248,7 +248,7 @@ int32 OPvPCapturePointZM_Graveyard::HandleOpenGo(Player* player, GameObject* go)
sGraveyard->AddGraveyardLink(ZM_GRAVEYARD_ID, ZM_GRAVEYARD_ZONE, TEAM_HORDE, false); // add gy
_pvp->TeamApplyBuff(TEAM_HORDE, ZM_CAPTURE_BUFF, 0, player);
player->RemoveAurasDueToSpell(ZM_BATTLE_STANDARD_H);
- sWorldSessionMgr->SendZoneText(ZM_GRAVEYARD_ZONE, sObjectMgr->GetAcoreStringForDBCLocale(LANG_OPVP_ZM_CAPTURE_GY_H));
+ _pvp->GetMap()->SendZoneText(ZM_GRAVEYARD_ZONE, sObjectMgr->GetAcoreStringForDBCLocale(LANG_OPVP_ZM_CAPTURE_GY_H).c_str());
}
UpdateTowerState();
}
diff --git a/src/server/scripts/OutdoorPvP/OutdoorPvPZM.h b/src/server/scripts/OutdoorPvP/OutdoorPvPZM.h
index 13a15f63b0..38cee15bff 100644
--- a/src/server/scripts/OutdoorPvP/OutdoorPvPZM.h
+++ b/src/server/scripts/OutdoorPvP/OutdoorPvPZM.h
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/scripts/OutdoorPvP/outdoorpvp_script_loader.cpp b/src/server/scripts/OutdoorPvP/outdoorpvp_script_loader.cpp
index f2a110823f..b46454eb49 100644
--- a/src/server/scripts/OutdoorPvP/outdoorpvp_script_loader.cpp
+++ b/src/server/scripts/OutdoorPvP/outdoorpvp_script_loader.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/scripts/Outland/Auchindoun/AuchenaiCrypts/auchenai_crypts.h b/src/server/scripts/Outland/Auchindoun/AuchenaiCrypts/auchenai_crypts.h
index 750b1e14a9..eb87a1950c 100644
--- a/src/server/scripts/Outland/Auchindoun/AuchenaiCrypts/auchenai_crypts.h
+++ b/src/server/scripts/Outland/Auchindoun/AuchenaiCrypts/auchenai_crypts.h
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/scripts/Outland/Auchindoun/AuchenaiCrypts/boss_exarch_maladaar.cpp b/src/server/scripts/Outland/Auchindoun/AuchenaiCrypts/boss_exarch_maladaar.cpp
index 3b7a60e266..67679c091e 100644
--- a/src/server/scripts/Outland/Auchindoun/AuchenaiCrypts/boss_exarch_maladaar.cpp
+++ b/src/server/scripts/Outland/Auchindoun/AuchenaiCrypts/boss_exarch_maladaar.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
@@ -241,7 +241,7 @@ struct npc_stolen_soul : public ScriptedAI
});
}
- void SetGUID(ObjectGuid guid, int32 /*id*/) override
+ void SetGUID(ObjectGuid const& guid, int32 /*id*/) override
{
_targetGuid = guid;
}
diff --git a/src/server/scripts/Outland/Auchindoun/AuchenaiCrypts/boss_shirrak_the_dead_watcher.cpp b/src/server/scripts/Outland/Auchindoun/AuchenaiCrypts/boss_shirrak_the_dead_watcher.cpp
index 484ea87ab9..03918e5e1a 100644
--- a/src/server/scripts/Outland/Auchindoun/AuchenaiCrypts/boss_shirrak_the_dead_watcher.cpp
+++ b/src/server/scripts/Outland/Auchindoun/AuchenaiCrypts/boss_shirrak_the_dead_watcher.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/scripts/Outland/Auchindoun/AuchenaiCrypts/instance_auchenai_crypts.cpp b/src/server/scripts/Outland/Auchindoun/AuchenaiCrypts/instance_auchenai_crypts.cpp
index c548227952..2aabb0f6aa 100644
--- a/src/server/scripts/Outland/Auchindoun/AuchenaiCrypts/instance_auchenai_crypts.cpp
+++ b/src/server/scripts/Outland/Auchindoun/AuchenaiCrypts/instance_auchenai_crypts.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/scripts/Outland/Auchindoun/ManaTombs/boss_nexusprince_shaffar.cpp b/src/server/scripts/Outland/Auchindoun/ManaTombs/boss_nexusprince_shaffar.cpp
index dee4e5c7dd..0986ba9c66 100644
--- a/src/server/scripts/Outland/Auchindoun/ManaTombs/boss_nexusprince_shaffar.cpp
+++ b/src/server/scripts/Outland/Auchindoun/ManaTombs/boss_nexusprince_shaffar.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/scripts/Outland/Auchindoun/ManaTombs/boss_pandemonius.cpp b/src/server/scripts/Outland/Auchindoun/ManaTombs/boss_pandemonius.cpp
index 76ec3b329b..2612c690e7 100644
--- a/src/server/scripts/Outland/Auchindoun/ManaTombs/boss_pandemonius.cpp
+++ b/src/server/scripts/Outland/Auchindoun/ManaTombs/boss_pandemonius.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/scripts/Outland/Auchindoun/ManaTombs/boss_tavarok.cpp b/src/server/scripts/Outland/Auchindoun/ManaTombs/boss_tavarok.cpp
index 4adf08be09..2bacc2b4dc 100644
--- a/src/server/scripts/Outland/Auchindoun/ManaTombs/boss_tavarok.cpp
+++ b/src/server/scripts/Outland/Auchindoun/ManaTombs/boss_tavarok.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/scripts/Outland/Auchindoun/ManaTombs/instance_mana_tombs.cpp b/src/server/scripts/Outland/Auchindoun/ManaTombs/instance_mana_tombs.cpp
index 3774fa7ff3..29aea24bd4 100644
--- a/src/server/scripts/Outland/Auchindoun/ManaTombs/instance_mana_tombs.cpp
+++ b/src/server/scripts/Outland/Auchindoun/ManaTombs/instance_mana_tombs.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/scripts/Outland/Auchindoun/ManaTombs/mana_tombs.h b/src/server/scripts/Outland/Auchindoun/ManaTombs/mana_tombs.h
index 5db1dc75d3..484ffa9c12 100644
--- a/src/server/scripts/Outland/Auchindoun/ManaTombs/mana_tombs.h
+++ b/src/server/scripts/Outland/Auchindoun/ManaTombs/mana_tombs.h
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/scripts/Outland/Auchindoun/SethekkHalls/boss_anzu.cpp b/src/server/scripts/Outland/Auchindoun/SethekkHalls/boss_anzu.cpp
index 828dba7322..e557b9eb8f 100644
--- a/src/server/scripts/Outland/Auchindoun/SethekkHalls/boss_anzu.cpp
+++ b/src/server/scripts/Outland/Auchindoun/SethekkHalls/boss_anzu.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/scripts/Outland/Auchindoun/SethekkHalls/boss_darkweaver_syth.cpp b/src/server/scripts/Outland/Auchindoun/SethekkHalls/boss_darkweaver_syth.cpp
index 1b249d31b1..fb36004586 100644
--- a/src/server/scripts/Outland/Auchindoun/SethekkHalls/boss_darkweaver_syth.cpp
+++ b/src/server/scripts/Outland/Auchindoun/SethekkHalls/boss_darkweaver_syth.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/scripts/Outland/Auchindoun/SethekkHalls/boss_talon_king_ikiss.cpp b/src/server/scripts/Outland/Auchindoun/SethekkHalls/boss_talon_king_ikiss.cpp
index 1b00bf7c4e..6ba67f7297 100644
--- a/src/server/scripts/Outland/Auchindoun/SethekkHalls/boss_talon_king_ikiss.cpp
+++ b/src/server/scripts/Outland/Auchindoun/SethekkHalls/boss_talon_king_ikiss.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/scripts/Outland/Auchindoun/SethekkHalls/instance_sethekk_halls.cpp b/src/server/scripts/Outland/Auchindoun/SethekkHalls/instance_sethekk_halls.cpp
index 98cb3dcaad..5c8bbac97c 100644
--- a/src/server/scripts/Outland/Auchindoun/SethekkHalls/instance_sethekk_halls.cpp
+++ b/src/server/scripts/Outland/Auchindoun/SethekkHalls/instance_sethekk_halls.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/scripts/Outland/Auchindoun/SethekkHalls/sethekk_halls.h b/src/server/scripts/Outland/Auchindoun/SethekkHalls/sethekk_halls.h
index 2d559bacfc..cf8a9da135 100644
--- a/src/server/scripts/Outland/Auchindoun/SethekkHalls/sethekk_halls.h
+++ b/src/server/scripts/Outland/Auchindoun/SethekkHalls/sethekk_halls.h
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/scripts/Outland/Auchindoun/ShadowLabyrinth/boss_ambassador_hellmaw.cpp b/src/server/scripts/Outland/Auchindoun/ShadowLabyrinth/boss_ambassador_hellmaw.cpp
index a9afd481c0..df5449babb 100644
--- a/src/server/scripts/Outland/Auchindoun/ShadowLabyrinth/boss_ambassador_hellmaw.cpp
+++ b/src/server/scripts/Outland/Auchindoun/ShadowLabyrinth/boss_ambassador_hellmaw.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
@@ -66,7 +66,7 @@ struct boss_ambassador_hellmaw : public BossAI
}
else
{
- me->GetMotionMaster()->MovePath(PATH_ID_START, false);
+ me->GetMotionMaster()->MoveWaypoint(PATH_ID_START, false);
}
}
@@ -88,7 +88,7 @@ struct boss_ambassador_hellmaw : public BossAI
DoPlaySoundToSet(me, SOUND_INTRO);
isBanished = false;
me->SetImmuneToAll(false);
- me->GetMotionMaster()->MovePath(PATH_ID_START, false);
+ me->GetMotionMaster()->MoveWaypoint(PATH_ID_START, false);
}
void JustEngagedWith(Unit*) override
@@ -142,7 +142,7 @@ struct boss_ambassador_hellmaw : public BossAI
{
me->m_Events.AddEventAtOffset([this]()
{
- me->GetMotionMaster()->MovePath(PATH_ID_PATHING, true);
+ me->GetMotionMaster()->MoveWaypoint(PATH_ID_PATHING, true);
}, 20s);
}
}
diff --git a/src/server/scripts/Outland/Auchindoun/ShadowLabyrinth/boss_blackheart_the_inciter.cpp b/src/server/scripts/Outland/Auchindoun/ShadowLabyrinth/boss_blackheart_the_inciter.cpp
index 76717e97a3..6634e15f01 100644
--- a/src/server/scripts/Outland/Auchindoun/ShadowLabyrinth/boss_blackheart_the_inciter.cpp
+++ b/src/server/scripts/Outland/Auchindoun/ShadowLabyrinth/boss_blackheart_the_inciter.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/scripts/Outland/Auchindoun/ShadowLabyrinth/boss_grandmaster_vorpil.cpp b/src/server/scripts/Outland/Auchindoun/ShadowLabyrinth/boss_grandmaster_vorpil.cpp
index 1717a518d0..48288894ca 100644
--- a/src/server/scripts/Outland/Auchindoun/ShadowLabyrinth/boss_grandmaster_vorpil.cpp
+++ b/src/server/scripts/Outland/Auchindoun/ShadowLabyrinth/boss_grandmaster_vorpil.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
@@ -111,7 +111,7 @@ struct boss_grandmaster_vorpil : public BossAI
case 8:
return 7200ms;
case 9:
- return 6000ms;
+ return 6s;
default:
return 4800ms;
}
diff --git a/src/server/scripts/Outland/Auchindoun/ShadowLabyrinth/boss_murmur.cpp b/src/server/scripts/Outland/Auchindoun/ShadowLabyrinth/boss_murmur.cpp
index fcf8f38c5c..649b5e5791 100644
--- a/src/server/scripts/Outland/Auchindoun/ShadowLabyrinth/boss_murmur.cpp
+++ b/src/server/scripts/Outland/Auchindoun/ShadowLabyrinth/boss_murmur.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
@@ -114,7 +114,7 @@ struct boss_murmur : public BossAI
return true;
}
- void SetGUID(ObjectGuid guid, int32 index) override
+ void SetGUID(ObjectGuid const& guid, int32 index) override
{
if (index == GUID_MURMUR_NPCS)
{
diff --git a/src/server/scripts/Outland/Auchindoun/ShadowLabyrinth/instance_shadow_labyrinth.cpp b/src/server/scripts/Outland/Auchindoun/ShadowLabyrinth/instance_shadow_labyrinth.cpp
index 71909d2e46..3c11c2f1df 100644
--- a/src/server/scripts/Outland/Auchindoun/ShadowLabyrinth/instance_shadow_labyrinth.cpp
+++ b/src/server/scripts/Outland/Auchindoun/ShadowLabyrinth/instance_shadow_labyrinth.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/scripts/Outland/Auchindoun/ShadowLabyrinth/shadow_labyrinth.h b/src/server/scripts/Outland/Auchindoun/ShadowLabyrinth/shadow_labyrinth.h
index 4a6d94af5a..ba26da27ae 100644
--- a/src/server/scripts/Outland/Auchindoun/ShadowLabyrinth/shadow_labyrinth.h
+++ b/src/server/scripts/Outland/Auchindoun/ShadowLabyrinth/shadow_labyrinth.h
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/scripts/Outland/BlackTemple/black_temple.h b/src/server/scripts/Outland/BlackTemple/black_temple.h
index ac876e1c79..f956c312a3 100644
--- a/src/server/scripts/Outland/BlackTemple/black_temple.h
+++ b/src/server/scripts/Outland/BlackTemple/black_temple.h
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/scripts/Outland/BlackTemple/boss_bloodboil.cpp b/src/server/scripts/Outland/BlackTemple/boss_bloodboil.cpp
index 3d281f5016..6e667c6b90 100644
--- a/src/server/scripts/Outland/BlackTemple/boss_bloodboil.cpp
+++ b/src/server/scripts/Outland/BlackTemple/boss_bloodboil.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/scripts/Outland/BlackTemple/boss_illidan.cpp b/src/server/scripts/Outland/BlackTemple/boss_illidan.cpp
index da92628e0f..5e6dfac6e4 100644
--- a/src/server/scripts/Outland/BlackTemple/boss_illidan.cpp
+++ b/src/server/scripts/Outland/BlackTemple/boss_illidan.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
@@ -507,7 +507,7 @@ struct boss_illidan_stormrage : public BossAI
Talk(SAY_ILLIDAN_EYE_BLAST);
me->SummonCreature(NPC_ILLIDAN_DB_TARGET, eyeBeamPos[beamPosId], TEMPSUMMON_TIMED_DESPAWN, 30000);
if (Creature* trigger = summons.GetCreatureWithEntry(NPC_ILLIDAN_DB_TARGET))
- trigger->GetMotionMaster()->MovePoint(0, eyeBeamPos[beamPosId + MAX_EYE_BEAM_POS], false, true);
+ trigger->GetMotionMaster()->MovePoint(0, eyeBeamPos[beamPosId + MAX_EYE_BEAM_POS], FORCED_MOVEMENT_NONE, 0.f, false, true);
// Reposition
me->m_Events.AddEventAtOffset([&] {
@@ -515,7 +515,7 @@ struct boss_illidan_stormrage : public BossAI
me->InterruptNonMeleeSpells(false);
me->SetControlled(false, UNIT_STATE_ROOT);
CycleBeamPos(beamPosId);
- me->GetMotionMaster()->MovePoint(POINT_ILLIDAN_HOVER, airHoverPos[beamPosId], false, true);
+ me->GetMotionMaster()->MovePoint(POINT_ILLIDAN_HOVER, airHoverPos[beamPosId], FORCED_MOVEMENT_NONE, 0.f, false, true);
}, 20s, GROUP_PHASE_FLYING);
});
// Check for Phase Transition
@@ -794,7 +794,7 @@ struct npc_akama_illidan : public ScriptedAI
if (instance->GetBossState(DATA_AKAMA_ILLIDAN) != DONE)
{
- me->GetMotionMaster()->MovePath(PATH_AKAMA_ILLIDARI_COUNCIL_2, false);
+ me->GetMotionMaster()->MoveWaypoint(PATH_AKAMA_ILLIDARI_COUNCIL_2, false);
}
else
{
@@ -811,7 +811,7 @@ struct npc_akama_illidan : public ScriptedAI
{
me->NearTeleportTo(AkamaIllidariCouncilTeleport);
me->RemoveNpcFlag(UNIT_NPC_FLAG_GOSSIP);
- me->GetMotionMaster()->MovePath(PATH_AKAMA_ILLIDARI_COUNCIL_1, false);
+ me->GetMotionMaster()->MoveWaypoint(PATH_AKAMA_ILLIDARI_COUNCIL_1, false);
}
break;
case ACTION_AKAMA_MINIONS:
@@ -904,7 +904,7 @@ struct npc_akama_illidan : public ScriptedAI
else if (type == WAYPOINT_MOTION_TYPE)
{
if (me->GetCurrentWaypointID() == PATH_AKAMA_MINIONS)
- if (id == 2)
+ if (id == 3)
DoCastSelf(SPELL_AKAMA_TELEPORT);
}
}
@@ -923,7 +923,7 @@ struct npc_akama_illidan : public ScriptedAI
me->m_Events.AddEventAtOffset([&] {
Talk(SAY_AKAMA_COUNCIL_2);
me->SetNpcFlag(UNIT_NPC_FLAG_GOSSIP);
- }, 8000ms); // 7800ms
+ }, 8s); // 7800ms
}
break;
// Reached Door
@@ -974,7 +974,7 @@ struct npc_akama_illidan : public ScriptedAI
Talk(SAY_AKAMA_SALUTE);
}, 56955ms); // 6275ms
me->m_Events.AddEventAtOffset([&] {
- me->GetMotionMaster()->MovePath(PATH_AKAMA_ILLIDARI_COUNCIL_3, false);
+ me->GetMotionMaster()->MoveWaypoint(PATH_AKAMA_ILLIDARI_COUNCIL_3, false);
}, 64030ms); // 7075ms
}
break;
@@ -1013,7 +1013,7 @@ struct npc_akama_illidan : public ScriptedAI
me->HandleEmoteCommand(EMOTE_ONESHOT_EXCLAMATION);
}, 9530ms); // 2830ms
me->m_Events.AddEventAtOffset([&] {
- me->GetMotionMaster()->MovePath(PATH_AKAMA_MINIONS, false);
+ me->GetMotionMaster()->MoveWaypoint(PATH_AKAMA_MINIONS, false);
}, 14400ms); // 4870ms
}
}
@@ -1436,7 +1436,7 @@ class spell_illidan_parasitic_shadowfiend_trigger : public SpellScript
{
PreventHitDefaultEffect(effIndex);
if (Creature* target = GetHitCreature())
- target->DespawnOrUnsummon(1);
+ target->DespawnOrUnsummon(1ms);
}
void Register() override
@@ -1692,7 +1692,7 @@ class spell_illidan_cage_trap : public SpellScript
if (GetCaster()->GetExactDist2d(target) < 4.0f)
{
target->AI()->DoAction(ACTION_ILLIDAN_CAGED);
- GetCaster()->ToCreature()->DespawnOrUnsummon(1);
+ GetCaster()->ToCreature()->DespawnOrUnsummon(1ms);
if (GameObject* gobject = GetCaster()->FindNearestGameObject(GO_CAGE_TRAP, 10.0f))
gobject->SetLootState(GO_JUST_DEACTIVATED);
}
diff --git a/src/server/scripts/Outland/BlackTemple/boss_illidari_council.cpp b/src/server/scripts/Outland/BlackTemple/boss_illidari_council.cpp
index 8c22b8d04e..31c16831a6 100644
--- a/src/server/scripts/Outland/BlackTemple/boss_illidari_council.cpp
+++ b/src/server/scripts/Outland/BlackTemple/boss_illidari_council.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
@@ -262,7 +262,7 @@ struct boss_illidari_council_memberAI : public ScriptedAI
void KilledUnit(Unit*) override
{
- if (events.GetNextEventTime(EVENT_KILL_TALK) == 0)
+ if (!events.HasTimeUntilEvent(EVENT_KILL_TALK))
{
Talk(SAY_COUNCIL_SLAY);
events.ScheduleEvent(EVENT_KILL_TALK, 6s);
@@ -582,7 +582,7 @@ struct boss_veras_darkshadow : public boss_illidari_council_memberAI
break;
}
- if (events.GetNextEventTime(EVENT_SPELL_VANISH_OUT) == 0)
+ if (!events.HasTimeUntilEvent(EVENT_SPELL_VANISH_OUT))
DoMeleeAttackIfReady();
}
};
@@ -771,7 +771,7 @@ class spell_illidari_council_deadly_strike_aura : public AuraScript
if (Unit* target = GetUnitOwner()->GetAI()->SelectTarget(SelectTargetMethod::Random, 0, 100.0f, true))
{
GetUnitOwner()->CastSpell(target, GetSpellInfo()->Effects[effect->GetEffIndex()].TriggerSpell, true);
- GetUnitOwner()->m_Events.AddEvent(new VerasEnvenom(*GetUnitOwner(), target->GetGUID()), GetUnitOwner()->m_Events.CalculateTime(urand(1500, 3500)));
+ GetUnitOwner()->m_Events.AddEventAtOffset(new VerasEnvenom(*GetUnitOwner(), target->GetGUID()), randtime(1500ms, 3500ms));
}
}
diff --git a/src/server/scripts/Outland/BlackTemple/boss_mother_shahraz.cpp b/src/server/scripts/Outland/BlackTemple/boss_mother_shahraz.cpp
index 980e9db829..5cfb86a648 100644
--- a/src/server/scripts/Outland/BlackTemple/boss_mother_shahraz.cpp
+++ b/src/server/scripts/Outland/BlackTemple/boss_mother_shahraz.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/scripts/Outland/BlackTemple/boss_reliquary_of_souls.cpp b/src/server/scripts/Outland/BlackTemple/boss_reliquary_of_souls.cpp
index 79d68ebfa0..0827a0e63d 100644
--- a/src/server/scripts/Outland/BlackTemple/boss_reliquary_of_souls.cpp
+++ b/src/server/scripts/Outland/BlackTemple/boss_reliquary_of_souls.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
@@ -107,7 +107,7 @@ public:
{
summoner->GetAI()->DoAction(_action);
_owner.SetStandState(UNIT_STAND_STATE_SUBMERGED);
- _owner.DespawnOrUnsummon(200);
+ _owner.DespawnOrUnsummon(200ms);
}
return true;
}
@@ -141,13 +141,15 @@ public:
void MoveInLineOfSight(Unit* who) override
{
- if (!who || me->getStandState() != UNIT_STAND_STATE_SLEEP || !who->IsPlayer() || me->GetDistance2d(who) > 90.0f || who->ToPlayer()->IsGameMaster())
+ if (!who || me->getStandState() != UNIT_STAND_STATE_SLEEP || !who->IsPlayer() ||
+ who->ToPlayer()->IsGameMaster() || me->GetDistance2d(who) > 90.0f ||
+ !me->isInFront(who, M_PI / 4.0f) || !me->IsWithinLOSInMap(who))
return;
me->SetInCombatWithZone();
me->SetStandState(UNIT_STAND_STATE_STAND);
- ScheduleUniqueTimedEvent(5s, [&] { // 15s
+ ScheduleUniqueTimedEvent(5s, [&] {
me->SetStandState(UNIT_STAND_STATE_SUBMERGED);
DoCastSelf(SPELL_SUMMON_ESSENCE_OF_SUFFERING);
}, EVENT_ESSENCE_OF_SUFFERING);
@@ -284,7 +286,7 @@ public:
if (type != POINT_MOTION_TYPE || id != POINT_GO_BACK)
return;
- me->m_Events.AddEvent(new SuckBackEvent(*me, ACTION_ESSENCE_OF_SUFFERING), me->m_Events.CalculateTime(1500));
+ me->m_Events.AddEventAtOffset(new SuckBackEvent(*me, ACTION_ESSENCE_OF_SUFFERING), 1500ms);
me->SetTarget();
me->SetFacingTo(M_PI / 2.0f);
}
@@ -301,7 +303,7 @@ public:
Talk(SUFF_SAY_RECAP);
me->SetReactState(REACT_PASSIVE);
me->GetMotionMaster()->Clear();
- me->GetMotionMaster()->MovePoint(POINT_GO_BACK, me->GetHomePosition(), false);
+ me->GetMotionMaster()->MovePoint(POINT_GO_BACK, me->GetHomePosition(), FORCED_MOVEMENT_NONE, 0.f, false);
scheduler.CancelAll();
}
}
@@ -392,7 +394,7 @@ public:
if (type != POINT_MOTION_TYPE || id != POINT_GO_BACK)
return;
- me->m_Events.AddEvent(new SuckBackEvent(*me, ACTION_ESSENCE_OF_DESIRE), me->m_Events.CalculateTime(1500));
+ me->m_Events.AddEventAtOffset(new SuckBackEvent(*me, ACTION_ESSENCE_OF_DESIRE), 1500ms);
me->SetTarget();
me->SetFacingTo(M_PI / 2.0f);
}
@@ -408,7 +410,7 @@ public:
Talk(DESI_SAY_RECAP);
me->SetReactState(REACT_PASSIVE);
me->GetMotionMaster()->Clear();
- me->GetMotionMaster()->MovePoint(POINT_GO_BACK, me->GetHomePosition(), false);
+ me->GetMotionMaster()->MovePoint(POINT_GO_BACK, me->GetHomePosition(), FORCED_MOVEMENT_NONE, 0.f, false);
scheduler.CancelAll();
}
}
diff --git a/src/server/scripts/Outland/BlackTemple/boss_shade_of_akama.cpp b/src/server/scripts/Outland/BlackTemple/boss_shade_of_akama.cpp
index 1cc778b25a..f339915d0b 100644
--- a/src/server/scripts/Outland/BlackTemple/boss_shade_of_akama.cpp
+++ b/src/server/scripts/Outland/BlackTemple/boss_shade_of_akama.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
@@ -251,7 +251,7 @@ struct npc_akama_shade : public ScriptedAI
{
Talk(SAY_BROKEN_FREE_2);
}, 3);
- ScheduleUniqueTimedEvent(52000ms, [&]
+ ScheduleUniqueTimedEvent(52s, [&]
{
std::list<Creature*> brokens;
me->GetCreatureListWithEntryInGrid(brokens, NPC_ASHTONGUE_BROKEN, 40.0f);
@@ -391,7 +391,7 @@ struct npc_creature_generator_akama : public ScriptedAI
void SummonedCreatureDies(Creature* summon, Unit*) override
{
spawnCounter--;
- summon->DespawnOrUnsummon(10000);
+ summon->DespawnOrUnsummon(10s);
summons.Despawn(summon);
}
diff --git a/src/server/scripts/Outland/BlackTemple/boss_supremus.cpp b/src/server/scripts/Outland/BlackTemple/boss_supremus.cpp
index de43704042..c1d916de0b 100644
--- a/src/server/scripts/Outland/BlackTemple/boss_supremus.cpp
+++ b/src/server/scripts/Outland/BlackTemple/boss_supremus.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/scripts/Outland/BlackTemple/boss_teron_gorefiend.cpp b/src/server/scripts/Outland/BlackTemple/boss_teron_gorefiend.cpp
index 773382d8e1..2cd31e17e7 100644
--- a/src/server/scripts/Outland/BlackTemple/boss_teron_gorefiend.cpp
+++ b/src/server/scripts/Outland/BlackTemple/boss_teron_gorefiend.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/scripts/Outland/BlackTemple/boss_warlord_najentus.cpp b/src/server/scripts/Outland/BlackTemple/boss_warlord_najentus.cpp
index 7b91fec7ea..2791c7f047 100644
--- a/src/server/scripts/Outland/BlackTemple/boss_warlord_najentus.cpp
+++ b/src/server/scripts/Outland/BlackTemple/boss_warlord_najentus.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/scripts/Outland/BlackTemple/instance_black_temple.cpp b/src/server/scripts/Outland/BlackTemple/instance_black_temple.cpp
index 0c68527765..bbf157a1f4 100644
--- a/src/server/scripts/Outland/BlackTemple/instance_black_temple.cpp
+++ b/src/server/scripts/Outland/BlackTemple/instance_black_temple.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/scripts/Outland/CoilfangReservoir/SerpentShrine/boss_fathomlord_karathress.cpp b/src/server/scripts/Outland/CoilfangReservoir/SerpentShrine/boss_fathomlord_karathress.cpp
index 8ec98b72fb..2e73787fa4 100644
--- a/src/server/scripts/Outland/CoilfangReservoir/SerpentShrine/boss_fathomlord_karathress.cpp
+++ b/src/server/scripts/Outland/CoilfangReservoir/SerpentShrine/boss_fathomlord_karathress.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
@@ -139,7 +139,7 @@ struct boss_fathomlord_karathress : public BossAI
if (Creature* olum = instance->GetCreature(DATA_SEER_OLUM))
{
olum->SetWalk(true);
- olum->GetMotionMaster()->MovePoint(0, olumWalk, false);
+ olum->GetMotionMaster()->MovePoint(0, olumWalk, FORCED_MOVEMENT_NONE, 0.f, false);
olum->SetNpcFlag(UNIT_NPC_FLAG_GOSSIP);
olum->SetNpcFlag(UNIT_NPC_FLAG_QUESTGIVER);
}
@@ -269,7 +269,7 @@ struct boss_fathomguard_sharkkis : public ScriptedAI
{
me->CastSpell(karathress, SPELL_POWER_OF_SHARKKIS, true);
karathress->AI()->Talk(SAY_GAIN_ABILITY2);
- me->DespawnOrUnsummon(1000);
+ me->DespawnOrUnsummon(1s);
}
}
@@ -452,7 +452,7 @@ struct boss_fathomguard_tidalvess : public ScriptedAI
{
me->CastSpell(karathress, SPELL_POWER_OF_TIDALVESS, true);
karathress->AI()->Talk(SAY_GAIN_ABILITY1);
- me->DespawnOrUnsummon(1000);
+ me->DespawnOrUnsummon(1s);
}
}
@@ -546,7 +546,7 @@ struct boss_fathomguard_caribdis : public ScriptedAI
{
me->CastSpell(karathress, SPELL_POWER_OF_CARIBDIS, true);
karathress->AI()->Talk(SAY_GAIN_ABILITY3);
- me->DespawnOrUnsummon(1000);
+ me->DespawnOrUnsummon(1s);
}
}
diff --git a/src/server/scripts/Outland/CoilfangReservoir/SerpentShrine/boss_hydross_the_unstable.cpp b/src/server/scripts/Outland/CoilfangReservoir/SerpentShrine/boss_hydross_the_unstable.cpp
index 060c627ee5..d24ca089c7 100644
--- a/src/server/scripts/Outland/CoilfangReservoir/SerpentShrine/boss_hydross_the_unstable.cpp
+++ b/src/server/scripts/Outland/CoilfangReservoir/SerpentShrine/boss_hydross_the_unstable.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
@@ -81,8 +81,8 @@ enum Misc
enum WaterElementalPathIds
{
- PATH_CENTER = 5,
- PATH_END = 12
+ PATH_CENTER = 6,
+ PATH_END = 13
};
struct boss_hydross_the_unstable : public BossAI
@@ -273,7 +273,7 @@ struct boss_hydross_the_unstable : public BossAI
else if (summon->GetEntry() == NPC_TAINTED_HYDROSS_ELEMENTAL)
{
summon->setActive(true);
- summon->GetMotionMaster()->MovePath(summon->GetEntry() * 10, false);
+ summon->GetMotionMaster()->MoveWaypoint(summon->GetEntry() * 10, false);
}
else
{
diff --git a/src/server/scripts/Outland/CoilfangReservoir/SerpentShrine/boss_lady_vashj.cpp b/src/server/scripts/Outland/CoilfangReservoir/SerpentShrine/boss_lady_vashj.cpp
index d631825a7f..9aa7697533 100644
--- a/src/server/scripts/Outland/CoilfangReservoir/SerpentShrine/boss_lady_vashj.cpp
+++ b/src/server/scripts/Outland/CoilfangReservoir/SerpentShrine/boss_lady_vashj.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
@@ -93,7 +93,7 @@ struct boss_lady_vashj : public BossAI
scheduler.CancelAll();
me->CastStop();
me->SetReactState(REACT_PASSIVE);
- me->GetMotionMaster()->MovePoint(POINT_HOME, me->GetHomePosition().GetPositionX(), me->GetHomePosition().GetPositionY(), me->GetHomePosition().GetPositionZ(), true, true);
+ me->GetMotionMaster()->MovePoint(POINT_HOME, me->GetHomePosition().GetPositionX(), me->GetHomePosition().GetPositionY(), me->GetHomePosition().GetPositionZ(), FORCED_MOVEMENT_NONE, 0.f, true, true);
});
}
diff --git a/src/server/scripts/Outland/CoilfangReservoir/SerpentShrine/boss_leotheras_the_blind.cpp b/src/server/scripts/Outland/CoilfangReservoir/SerpentShrine/boss_leotheras_the_blind.cpp
index 621ecbc2bc..5a1d6c0fa3 100644
--- a/src/server/scripts/Outland/CoilfangReservoir/SerpentShrine/boss_leotheras_the_blind.cpp
+++ b/src/server/scripts/Outland/CoilfangReservoir/SerpentShrine/boss_leotheras_the_blind.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/scripts/Outland/CoilfangReservoir/SerpentShrine/boss_lurker_below.cpp b/src/server/scripts/Outland/CoilfangReservoir/SerpentShrine/boss_lurker_below.cpp
index 08bdae70af..510fdf745b 100644
--- a/src/server/scripts/Outland/CoilfangReservoir/SerpentShrine/boss_lurker_below.cpp
+++ b/src/server/scripts/Outland/CoilfangReservoir/SerpentShrine/boss_lurker_below.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
@@ -88,7 +88,7 @@ struct boss_the_lurker_below : public BossAI
pool->SetRespawnTime(10);
pool->SaveRespawnTime(10);
}
- me->DespawnOrUnsummon(2000);
+ me->DespawnOrUnsummon(2s);
}
void DamageTaken(Unit* /*attacker*/, uint32& damage, DamageEffectType /*type*/, SpellSchoolMask /*school*/) override
@@ -129,7 +129,7 @@ struct boss_the_lurker_below : public BossAI
{
BossAI::JustEngagedWith(who);
- SchedulerPhaseOne(38800ms, 91000ms);
+ SchedulerPhaseOne(38800ms, 91s);
}
void SummonedCreatureDies(Creature* /*summon*/, Unit* /*killer*/) override
@@ -191,7 +191,7 @@ struct boss_the_lurker_below : public BossAI
me->RemoveUnitFlag(UNIT_FLAG_NOT_SELECTABLE);
scheduler.CancelAll();
- SchedulerPhaseOne(10000ms, 90750ms);
+ SchedulerPhaseOne(10s, 90750ms);
});
}
diff --git a/src/server/scripts/Outland/CoilfangReservoir/SerpentShrine/boss_morogrim_tidewalker.cpp b/src/server/scripts/Outland/CoilfangReservoir/SerpentShrine/boss_morogrim_tidewalker.cpp
index d07b78070e..cc337beeeb 100644
--- a/src/server/scripts/Outland/CoilfangReservoir/SerpentShrine/boss_morogrim_tidewalker.cpp
+++ b/src/server/scripts/Outland/CoilfangReservoir/SerpentShrine/boss_morogrim_tidewalker.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/scripts/Outland/CoilfangReservoir/SerpentShrine/instance_serpent_shrine.cpp b/src/server/scripts/Outland/CoilfangReservoir/SerpentShrine/instance_serpent_shrine.cpp
index 1551d7c818..a587630f27 100644
--- a/src/server/scripts/Outland/CoilfangReservoir/SerpentShrine/instance_serpent_shrine.cpp
+++ b/src/server/scripts/Outland/CoilfangReservoir/SerpentShrine/instance_serpent_shrine.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
@@ -234,7 +234,7 @@ class spell_serpentshrine_cavern_serpentshrine_parasite_trigger : public SpellSc
{
PreventHitDefaultEffect(effIndex);
if (Creature* target = GetHitCreature())
- target->DespawnOrUnsummon(1);
+ target->DespawnOrUnsummon(1ms);
}
void Register() override
diff --git a/src/server/scripts/Outland/CoilfangReservoir/SerpentShrine/serpent_shrine.h b/src/server/scripts/Outland/CoilfangReservoir/SerpentShrine/serpent_shrine.h
index e25aea198f..722bb475b7 100644
--- a/src/server/scripts/Outland/CoilfangReservoir/SerpentShrine/serpent_shrine.h
+++ b/src/server/scripts/Outland/CoilfangReservoir/SerpentShrine/serpent_shrine.h
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/scripts/Outland/CoilfangReservoir/SlavePens/boss_ahune.cpp b/src/server/scripts/Outland/CoilfangReservoir/SlavePens/boss_ahune.cpp
index 95bba3d499..f34f0176d8 100644
--- a/src/server/scripts/Outland/CoilfangReservoir/SlavePens/boss_ahune.cpp
+++ b/src/server/scripts/Outland/CoilfangReservoir/SlavePens/boss_ahune.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
@@ -188,7 +188,7 @@ struct boss_ahune : public BossAI
{
BossAI::JustEngagedWith(who);
events.ScheduleEvent(EVENT_INITIAL_EMERGE, 4ms);
- events.ScheduleEvent(EVENT_SYNCH_HEALTH, 3000);
+ events.ScheduleEvent(EVENT_SYNCH_HEALTH, 3s);
}
void EnterEvadeMode(EvadeReason /*why*/) override
@@ -318,7 +318,7 @@ struct npc_frozen_core : public ScriptedAI
me->RemoveUnitFlag(UNIT_FLAG_NOT_SELECTABLE);
me->SetImmuneToPC(false);
me->RemoveAurasDueToSpell(SPELL_ICE_SPEAR_CONTROL_AURA);
- _events.ScheduleEvent(EVENT_SYNCH_HEALTH, 3000, 0, PHASE_TWO);
+ _events.ScheduleEvent(EVENT_SYNCH_HEALTH, 3s, 0, PHASE_TWO);
}
else if (action == ACTION_AHUNE_RESURFACE)
{
@@ -342,7 +342,7 @@ struct npc_frozen_core : public ScriptedAI
DoCast(ahune, SPELL_SYNCH_HEALTH, true);
else
DoCastSelf(SPELL_SUICIDE);
- _events.Repeat(3000ms, 3000ms);
+ _events.Repeat(3s, 3s);
break;
default:
break;
@@ -394,11 +394,11 @@ struct npc_ahune_bunny : public ScriptedAI
_submerged = false;
_events.Reset();
_events.SetPhase(PHASE_ONE);
- _events.ScheduleEvent(EVENT_SUMMON_AHUNE, 10000);
- _events.ScheduleEvent(EVENT_START_LOOKING_FOR_OPENING, 14000, 0, PHASE_ONE);
- _events.ScheduleEvent(EVENT_SUMMON_COLDWEAVE, 22000, 0, PHASE_ONE);
- _events.ScheduleEvent(EVENT_SUMMON_HAILSTONE, 14000, 0, PHASE_ONE);
- _events.ScheduleEvent(EVENT_AHUNE_PHASE_TWO, 108000, 0, PHASE_ONE);
+ _events.ScheduleEvent(EVENT_SUMMON_AHUNE, 10s);
+ _events.ScheduleEvent(EVENT_START_LOOKING_FOR_OPENING, 14s, 0, PHASE_ONE);
+ _events.ScheduleEvent(EVENT_SUMMON_COLDWEAVE, 22s, 0, PHASE_ONE);
+ _events.ScheduleEvent(EVENT_SUMMON_HAILSTONE, 14s, 0, PHASE_ONE);
+ _events.ScheduleEvent(EVENT_AHUNE_PHASE_TWO, 108s, 0, PHASE_ONE);
}
else if (action == ACTION_STOP_EVENT)
{
@@ -430,9 +430,9 @@ struct npc_ahune_bunny : public ScriptedAI
case EVENT_SUMMON_COLDWEAVE:
DoCast(SPELL_SUMMON_COLDWEAVE);
DoCast(SPELL_SUMMON_COLDWEAVE);
- _events.Repeat(8000ms);
+ _events.Repeat(8s);
if (_submerged)
- _events.ScheduleEvent(EVENT_SUMMON_FROSTWIND, 4000, 0, PHASE_ONE);
+ _events.ScheduleEvent(EVENT_SUMMON_FROSTWIND, 4s, 0, PHASE_ONE);
break;
case EVENT_SUMMON_FROSTWIND:
DoCast(SPELL_SUMMON_FROSTWIND);
@@ -458,17 +458,17 @@ struct npc_ahune_bunny : public ScriptedAI
ahune->AI()->DoAction(ACTION_AHUNE_RETREAT);
_events.Reset();
_events.SetPhase(PHASE_TWO);
- _events.ScheduleEvent(EVENT_CLOSE_OPENING, 25000, 0, PHASE_TWO);
- _events.ScheduleEvent(EVENT_AHUNE_PHASE_ONE, 35000, 0, PHASE_TWO);
+ _events.ScheduleEvent(EVENT_CLOSE_OPENING, 25s, 0, PHASE_TWO);
+ _events.ScheduleEvent(EVENT_AHUNE_PHASE_ONE, 35s, 0, PHASE_TWO);
break;
case EVENT_AHUNE_PHASE_ONE:
_submerged = true;
_events.Reset();
_events.SetPhase(PHASE_ONE);
- _events.ScheduleEvent(EVENT_SUMMON_COLDWEAVE, 8000, 0, PHASE_ONE);
- _events.ScheduleEvent(EVENT_SUMMON_HAILSTONE, 5000, 0, PHASE_ONE);
- _events.ScheduleEvent(EVENT_START_LOOKING_FOR_OPENING, 5000, 0, PHASE_ONE);
- _events.ScheduleEvent(EVENT_AHUNE_PHASE_TWO, 100000, 0, PHASE_ONE);
+ _events.ScheduleEvent(EVENT_SUMMON_COLDWEAVE, 8s, 0, PHASE_ONE);
+ _events.ScheduleEvent(EVENT_SUMMON_HAILSTONE, 5s, 0, PHASE_ONE);
+ _events.ScheduleEvent(EVENT_START_LOOKING_FOR_OPENING, 5s, 0, PHASE_ONE);
+ _events.ScheduleEvent(EVENT_AHUNE_PHASE_TWO, 100s, 0, PHASE_ONE);
break;
default:
break;
@@ -534,7 +534,7 @@ struct npc_earthen_ring_flamecaller : public ScriptedAI
switch (spellInfo->Id)
{
case SPELL_SHAMANS_LOOK_FOR_OPENING:
- _events.ScheduleEvent(EVENT_LOOKFOROPENING_0, 17000);
+ _events.ScheduleEvent(EVENT_LOOKFOROPENING_0, 17s);
break;
case SPELL_FOUND_OPENING:
Talk(EMOTE_RETREAT);
@@ -560,15 +560,15 @@ struct npc_earthen_ring_flamecaller : public ScriptedAI
{
case EVENT_LOOKFOROPENING_0:
LookOpening(true, 0);
- _events.ScheduleEvent(EVENT_LOOKFOROPENING_1, 26000);
+ _events.ScheduleEvent(EVENT_LOOKFOROPENING_1, 26s);
break;
case EVENT_LOOKFOROPENING_1:
LookOpening(true, 1);
- _events.ScheduleEvent(EVENT_LOOKFOROPENING_2, 25000);
+ _events.ScheduleEvent(EVENT_LOOKFOROPENING_2, 25s);
break;
case EVENT_LOOKFOROPENING_2:
LookOpening(true, 2);
- _events.ScheduleEvent(EVENT_STOP_LOOKING_FOR_OPENING, 27000);
+ _events.ScheduleEvent(EVENT_STOP_LOOKING_FOR_OPENING, 27s);
break;
case EVENT_STOP_LOOKING_FOR_OPENING:
LookOpening(false, _mySpot);
@@ -619,7 +619,7 @@ struct npc_ahune_ice_spear_bunny : public ScriptedAI
_scheduler.Schedule(2500ms, [this](TaskContext /*task*/)
{
DoCastSelf(SPELL_ICE_SPEAR_DELAY);
- me->DespawnOrUnsummon(3500);
+ me->DespawnOrUnsummon(3500ms);
});
}
diff --git a/src/server/scripts/Outland/CoilfangReservoir/SlavePens/boss_mennu_the_betrayer.cpp b/src/server/scripts/Outland/CoilfangReservoir/SlavePens/boss_mennu_the_betrayer.cpp
index dadbb878d4..547e0e4421 100644
--- a/src/server/scripts/Outland/CoilfangReservoir/SlavePens/boss_mennu_the_betrayer.cpp
+++ b/src/server/scripts/Outland/CoilfangReservoir/SlavePens/boss_mennu_the_betrayer.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/scripts/Outland/CoilfangReservoir/SlavePens/boss_quagmirran.cpp b/src/server/scripts/Outland/CoilfangReservoir/SlavePens/boss_quagmirran.cpp
index cc7d98dcec..55fb6cd4d4 100644
--- a/src/server/scripts/Outland/CoilfangReservoir/SlavePens/boss_quagmirran.cpp
+++ b/src/server/scripts/Outland/CoilfangReservoir/SlavePens/boss_quagmirran.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/scripts/Outland/CoilfangReservoir/SlavePens/boss_rokmar_the_crackler.cpp b/src/server/scripts/Outland/CoilfangReservoir/SlavePens/boss_rokmar_the_crackler.cpp
index 1486bf0bd6..5a33cdc19b 100644
--- a/src/server/scripts/Outland/CoilfangReservoir/SlavePens/boss_rokmar_the_crackler.cpp
+++ b/src/server/scripts/Outland/CoilfangReservoir/SlavePens/boss_rokmar_the_crackler.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
@@ -23,8 +23,7 @@ enum Spells
{
SPELL_ENSNARING_MOSS = 31948,
SPELL_FRENZY = 34970,
- SPELL_GRIEVOUS_WOUND_N = 31956,
- SPELL_GRIEVOUS_WOUND_H = 38801,
+ SPELL_GRIEVOUS_WOUND = 31956,
SPELL_WATER_SPIT = 35008
};
@@ -53,7 +52,7 @@ struct boss_rokmar_the_crackler : public BossAI
scheduler.Schedule(8s, [this] (TaskContext context)
{
- DoCastVictim(DUNGEON_MODE(SPELL_GRIEVOUS_WOUND_N, SPELL_GRIEVOUS_WOUND_H));
+ DoCastVictim(SPELL_GRIEVOUS_WOUND);
context.Repeat(20700ms);
}).Schedule(15300ms, [this](TaskContext context)
{
diff --git a/src/server/scripts/Outland/CoilfangReservoir/SlavePens/instance_the_slave_pens.cpp b/src/server/scripts/Outland/CoilfangReservoir/SlavePens/instance_the_slave_pens.cpp
index fa88c4b53b..ed07761582 100644
--- a/src/server/scripts/Outland/CoilfangReservoir/SlavePens/instance_the_slave_pens.cpp
+++ b/src/server/scripts/Outland/CoilfangReservoir/SlavePens/instance_the_slave_pens.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/scripts/Outland/CoilfangReservoir/SlavePens/the_slave_pens.cpp b/src/server/scripts/Outland/CoilfangReservoir/SlavePens/the_slave_pens.cpp
index 741a8e78f5..c58bfb78c2 100644
--- a/src/server/scripts/Outland/CoilfangReservoir/SlavePens/the_slave_pens.cpp
+++ b/src/server/scripts/Outland/CoilfangReservoir/SlavePens/the_slave_pens.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
@@ -31,7 +31,7 @@ public:
{
if (Creature* quagmirran = instance->GetCreature(DATA_QUAGMIRRAN))
{
- quagmirran->GetMotionMaster()->MovePath(quagmirran->GetEntry() * 100, true);
+ quagmirran->GetMotionMaster()->MoveWaypoint(quagmirran->GetEntry() * 100, true);
}
}
diff --git a/src/server/scripts/Outland/CoilfangReservoir/SlavePens/the_slave_pens.h b/src/server/scripts/Outland/CoilfangReservoir/SlavePens/the_slave_pens.h
index d54aa1c725..f51639cee9 100644
--- a/src/server/scripts/Outland/CoilfangReservoir/SlavePens/the_slave_pens.h
+++ b/src/server/scripts/Outland/CoilfangReservoir/SlavePens/the_slave_pens.h
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/scripts/Outland/CoilfangReservoir/SteamVault/boss_hydromancer_thespia.cpp b/src/server/scripts/Outland/CoilfangReservoir/SteamVault/boss_hydromancer_thespia.cpp
index c4fe9170bc..b75dc3dfcd 100644
--- a/src/server/scripts/Outland/CoilfangReservoir/SteamVault/boss_hydromancer_thespia.cpp
+++ b/src/server/scripts/Outland/CoilfangReservoir/SteamVault/boss_hydromancer_thespia.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/scripts/Outland/CoilfangReservoir/SteamVault/boss_mekgineer_steamrigger.cpp b/src/server/scripts/Outland/CoilfangReservoir/SteamVault/boss_mekgineer_steamrigger.cpp
index 49607d53c3..5f9769e62d 100644
--- a/src/server/scripts/Outland/CoilfangReservoir/SteamVault/boss_mekgineer_steamrigger.cpp
+++ b/src/server/scripts/Outland/CoilfangReservoir/SteamVault/boss_mekgineer_steamrigger.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/scripts/Outland/CoilfangReservoir/SteamVault/boss_warlord_kalithresh.cpp b/src/server/scripts/Outland/CoilfangReservoir/SteamVault/boss_warlord_kalithresh.cpp
index 2526702ea0..309b9434b3 100644
--- a/src/server/scripts/Outland/CoilfangReservoir/SteamVault/boss_warlord_kalithresh.cpp
+++ b/src/server/scripts/Outland/CoilfangReservoir/SteamVault/boss_warlord_kalithresh.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/scripts/Outland/CoilfangReservoir/SteamVault/instance_steam_vault.cpp b/src/server/scripts/Outland/CoilfangReservoir/SteamVault/instance_steam_vault.cpp
index 70437e05ae..0c2bf0f869 100644
--- a/src/server/scripts/Outland/CoilfangReservoir/SteamVault/instance_steam_vault.cpp
+++ b/src/server/scripts/Outland/CoilfangReservoir/SteamVault/instance_steam_vault.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/scripts/Outland/CoilfangReservoir/SteamVault/steam_vault.h b/src/server/scripts/Outland/CoilfangReservoir/SteamVault/steam_vault.h
index 3eeaf32668..5b18a27f67 100644
--- a/src/server/scripts/Outland/CoilfangReservoir/SteamVault/steam_vault.h
+++ b/src/server/scripts/Outland/CoilfangReservoir/SteamVault/steam_vault.h
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/scripts/Outland/CoilfangReservoir/underbog/boss_ghazan.cpp b/src/server/scripts/Outland/CoilfangReservoir/underbog/boss_ghazan.cpp
index 0510e6b91e..e0f7ef2435 100644
--- a/src/server/scripts/Outland/CoilfangReservoir/underbog/boss_ghazan.cpp
+++ b/src/server/scripts/Outland/CoilfangReservoir/underbog/boss_ghazan.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
@@ -86,13 +86,13 @@ struct boss_ghazan : public BossAI
if (type == ACTION_MOVE_TO_PLATFORM && !_movedToPlatform)
{
_movedToPlatform = true;
- me->GetMotionMaster()->MovePath((me->GetSpawnId() * 10) + 1, false);
+ me->GetMotionMaster()->MoveWaypoint((me->GetSpawnId() * 10) + 1, false);
}
}
void MovementInform(uint32 type, uint32 pointId) override
{
- if (!_movedToPlatform || type != WAYPOINT_MOTION_TYPE || pointId != 19)
+ if (!_movedToPlatform || type != WAYPOINT_MOTION_TYPE || pointId != 20)
{
return;
}
diff --git a/src/server/scripts/Outland/CoilfangReservoir/underbog/boss_hungarfen.cpp b/src/server/scripts/Outland/CoilfangReservoir/underbog/boss_hungarfen.cpp
index 73beb4eb0b..21d05d03c4 100644
--- a/src/server/scripts/Outland/CoilfangReservoir/underbog/boss_hungarfen.cpp
+++ b/src/server/scripts/Outland/CoilfangReservoir/underbog/boss_hungarfen.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
@@ -123,7 +123,7 @@ struct npc_underbog_mushroom : public ScriptedAI
context.Schedule(4s, [this](TaskContext /*context*/)
{
me->RemoveAurasDueToSpell(SPELL_GROW);
- me->DespawnOrUnsummon(2000);
+ me->DespawnOrUnsummon(2s);
});
}
else
diff --git a/src/server/scripts/Outland/CoilfangReservoir/underbog/boss_swamplord_muselek.cpp b/src/server/scripts/Outland/CoilfangReservoir/underbog/boss_swamplord_muselek.cpp
index 5954a07b54..ee2e3d36f0 100644
--- a/src/server/scripts/Outland/CoilfangReservoir/underbog/boss_swamplord_muselek.cpp
+++ b/src/server/scripts/Outland/CoilfangReservoir/underbog/boss_swamplord_muselek.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/scripts/Outland/CoilfangReservoir/underbog/boss_the_black_stalker.cpp b/src/server/scripts/Outland/CoilfangReservoir/underbog/boss_the_black_stalker.cpp
index 057e833719..1bb2ee4b52 100644
--- a/src/server/scripts/Outland/CoilfangReservoir/underbog/boss_the_black_stalker.cpp
+++ b/src/server/scripts/Outland/CoilfangReservoir/underbog/boss_the_black_stalker.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/scripts/Outland/CoilfangReservoir/underbog/instance_the_underbog.cpp b/src/server/scripts/Outland/CoilfangReservoir/underbog/instance_the_underbog.cpp
index 2f6a82c406..d8b4608e5b 100644
--- a/src/server/scripts/Outland/CoilfangReservoir/underbog/instance_the_underbog.cpp
+++ b/src/server/scripts/Outland/CoilfangReservoir/underbog/instance_the_underbog.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/scripts/Outland/CoilfangReservoir/underbog/the_underbog.h b/src/server/scripts/Outland/CoilfangReservoir/underbog/the_underbog.h
index b4230967ab..94da180b14 100644
--- a/src/server/scripts/Outland/CoilfangReservoir/underbog/the_underbog.h
+++ b/src/server/scripts/Outland/CoilfangReservoir/underbog/the_underbog.h
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/scripts/Outland/CoilfangReservoir/underbog/underbog.cpp b/src/server/scripts/Outland/CoilfangReservoir/underbog/underbog.cpp
index 5332e3dfeb..ce32df39e1 100644
--- a/src/server/scripts/Outland/CoilfangReservoir/underbog/underbog.cpp
+++ b/src/server/scripts/Outland/CoilfangReservoir/underbog/underbog.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/scripts/Outland/GruulsLair/boss_gruul.cpp b/src/server/scripts/Outland/GruulsLair/boss_gruul.cpp
index dfbdf0d915..9c0dfcd9c9 100644
--- a/src/server/scripts/Outland/GruulsLair/boss_gruul.cpp
+++ b/src/server/scripts/Outland/GruulsLair/boss_gruul.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
@@ -68,7 +68,7 @@ struct boss_gruul : public BossAI
{
_Reset();
_recentlySpoken = false;
- _caveInTimer = 29000ms;
+ _caveInTimer = 29s;
}
void JustEngagedWith(Unit* /*who*/) override
@@ -84,7 +84,7 @@ struct boss_gruul : public BossAI
}).Schedule(_caveInTimer, [this](TaskContext context)
{
DoCastRandomTarget(SPELL_CAVE_IN);
- if (_caveInTimer > 4000ms)
+ if (_caveInTimer > 4s)
{
_caveInTimer = _caveInTimer - 1500ms;
}
diff --git a/src/server/scripts/Outland/GruulsLair/boss_high_king_maulgar.cpp b/src/server/scripts/Outland/GruulsLair/boss_high_king_maulgar.cpp
index c6624521f4..2679eb6ca0 100644
--- a/src/server/scripts/Outland/GruulsLair/boss_high_king_maulgar.cpp
+++ b/src/server/scripts/Outland/GruulsLair/boss_high_king_maulgar.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
@@ -146,7 +146,7 @@ struct boss_high_king_maulgar : public BossAI
{
DoCastVictim(SPELL_MIGHTY_BLOW);
context.Repeat(16200ms, 19s);
- }).Schedule(67000ms, [this](TaskContext context)
+ }).Schedule(67s, [this](TaskContext context)
{
scheduler.DelayAll(15s);
DoCastSelf(SPELL_WHIRLWIND);
diff --git a/src/server/scripts/Outland/GruulsLair/gruuls_lair.h b/src/server/scripts/Outland/GruulsLair/gruuls_lair.h
index 5aacb769f1..80b9962bf2 100644
--- a/src/server/scripts/Outland/GruulsLair/gruuls_lair.h
+++ b/src/server/scripts/Outland/GruulsLair/gruuls_lair.h
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/scripts/Outland/GruulsLair/instance_gruuls_lair.cpp b/src/server/scripts/Outland/GruulsLair/instance_gruuls_lair.cpp
index 376c78312e..f06a42dfd1 100644
--- a/src/server/scripts/Outland/GruulsLair/instance_gruuls_lair.cpp
+++ b/src/server/scripts/Outland/GruulsLair/instance_gruuls_lair.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/scripts/Outland/HellfireCitadel/BloodFurnace/blood_furnace.h b/src/server/scripts/Outland/HellfireCitadel/BloodFurnace/blood_furnace.h
index 653491b08d..92eb3ae52d 100644
--- a/src/server/scripts/Outland/HellfireCitadel/BloodFurnace/blood_furnace.h
+++ b/src/server/scripts/Outland/HellfireCitadel/BloodFurnace/blood_furnace.h
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/scripts/Outland/HellfireCitadel/BloodFurnace/boss_broggok.cpp b/src/server/scripts/Outland/HellfireCitadel/BloodFurnace/boss_broggok.cpp
index 2c662d46af..2ca427bacc 100644
--- a/src/server/scripts/Outland/HellfireCitadel/BloodFurnace/boss_broggok.cpp
+++ b/src/server/scripts/Outland/HellfireCitadel/BloodFurnace/boss_broggok.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/scripts/Outland/HellfireCitadel/BloodFurnace/boss_kelidan_the_breaker.cpp b/src/server/scripts/Outland/HellfireCitadel/BloodFurnace/boss_kelidan_the_breaker.cpp
index a3354a2a27..41f77e9bbe 100644
--- a/src/server/scripts/Outland/HellfireCitadel/BloodFurnace/boss_kelidan_the_breaker.cpp
+++ b/src/server/scripts/Outland/HellfireCitadel/BloodFurnace/boss_kelidan_the_breaker.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/scripts/Outland/HellfireCitadel/BloodFurnace/boss_the_maker.cpp b/src/server/scripts/Outland/HellfireCitadel/BloodFurnace/boss_the_maker.cpp
index 125c9c36f2..7bb30a7c7b 100644
--- a/src/server/scripts/Outland/HellfireCitadel/BloodFurnace/boss_the_maker.cpp
+++ b/src/server/scripts/Outland/HellfireCitadel/BloodFurnace/boss_the_maker.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/scripts/Outland/HellfireCitadel/BloodFurnace/instance_blood_furnace.cpp b/src/server/scripts/Outland/HellfireCitadel/BloodFurnace/instance_blood_furnace.cpp
index 031e188af7..dbca26c5bb 100644
--- a/src/server/scripts/Outland/HellfireCitadel/BloodFurnace/instance_blood_furnace.cpp
+++ b/src/server/scripts/Outland/HellfireCitadel/BloodFurnace/instance_blood_furnace.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/scripts/Outland/HellfireCitadel/HellfireRamparts/boss_omor_the_unscarred.cpp b/src/server/scripts/Outland/HellfireCitadel/HellfireRamparts/boss_omor_the_unscarred.cpp
index 654e2b232b..d5a01b2962 100644
--- a/src/server/scripts/Outland/HellfireCitadel/HellfireRamparts/boss_omor_the_unscarred.cpp
+++ b/src/server/scripts/Outland/HellfireCitadel/HellfireRamparts/boss_omor_the_unscarred.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/scripts/Outland/HellfireCitadel/HellfireRamparts/boss_vazruden_the_herald.cpp b/src/server/scripts/Outland/HellfireCitadel/HellfireRamparts/boss_vazruden_the_herald.cpp
index 26a0c780b7..1c1645e794 100644
--- a/src/server/scripts/Outland/HellfireCitadel/HellfireRamparts/boss_vazruden_the_herald.cpp
+++ b/src/server/scripts/Outland/HellfireCitadel/HellfireRamparts/boss_vazruden_the_herald.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
@@ -102,7 +102,7 @@ struct boss_vazruden_the_herald : public BossAI
if (summon->GetEntry() == NPC_HELLFIRE_SENTRY && summons.size() == 0)
{
Talk(SAY_INTRO);
- me->GetMotionMaster()->MovePoint(POINT_MIDDLE, -1406.5f, 1746.5f, 85.0f, false);
+ me->GetMotionMaster()->MovePoint(POINT_MIDDLE, -1406.5f, 1746.5f, 85.0f, FORCED_MOVEMENT_NONE, 0.f, false);
_JustEngagedWith();
}
else if (summons.size() == 0)
@@ -155,7 +155,7 @@ struct boss_nazan : public ScriptedAI
void EnterEvadeMode(EvadeReason /*why*/) override
{
- me->DespawnOrUnsummon(1);
+ me->DespawnOrUnsummon(1ms);
}
void JustEngagedWith(Unit*) override
@@ -163,7 +163,7 @@ struct boss_nazan : public ScriptedAI
_scheduler.CancelAll();
_scheduler.Schedule(5ms, GROUP_PHASE_1, [this](TaskContext context)
{
- me->GetMotionMaster()->MovePoint(POINT_FLIGHT, NazanPos[urand(0, 2)], false);
+ me->GetMotionMaster()->MovePoint(POINT_FLIGHT, NazanPos[urand(0, 2)], FORCED_MOVEMENT_NONE, 0.f, false);
_scheduler.DelayAll(7s);
context.Repeat(30s);
}).Schedule(5s, GROUP_PHASE_1, [this](TaskContext context)
@@ -193,7 +193,7 @@ struct boss_nazan : public ScriptedAI
Talk(EMOTE_NAZAN);
me->SetReactState(REACT_PASSIVE);
me->InterruptNonMeleeSpells(true);
- me->GetMotionMaster()->MovePoint(POINT_MIDDLE, -1406.5f, 1746.5f, 81.2f, false);
+ me->GetMotionMaster()->MovePoint(POINT_MIDDLE, -1406.5f, 1746.5f, 81.2f, FORCED_MOVEMENT_NONE, 0.f, false);
}
}
@@ -262,7 +262,7 @@ struct boss_vazruden : public ScriptedAI
void EnterEvadeMode(EvadeReason /*why*/) override
{
Talk(SAY_WIPE);
- me->DespawnOrUnsummon(1);
+ me->DespawnOrUnsummon(1ms);
}
void JustEngagedWith(Unit*) override
diff --git a/src/server/scripts/Outland/HellfireCitadel/HellfireRamparts/boss_watchkeeper_gargolmar.cpp b/src/server/scripts/Outland/HellfireCitadel/HellfireRamparts/boss_watchkeeper_gargolmar.cpp
index a81cd8944d..448bdfa2b1 100644
--- a/src/server/scripts/Outland/HellfireCitadel/HellfireRamparts/boss_watchkeeper_gargolmar.cpp
+++ b/src/server/scripts/Outland/HellfireCitadel/HellfireRamparts/boss_watchkeeper_gargolmar.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/scripts/Outland/HellfireCitadel/HellfireRamparts/hellfire_ramparts.h b/src/server/scripts/Outland/HellfireCitadel/HellfireRamparts/hellfire_ramparts.h
index 95a8512c3a..670d3879ab 100644
--- a/src/server/scripts/Outland/HellfireCitadel/HellfireRamparts/hellfire_ramparts.h
+++ b/src/server/scripts/Outland/HellfireCitadel/HellfireRamparts/hellfire_ramparts.h
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/scripts/Outland/HellfireCitadel/HellfireRamparts/instance_hellfire_ramparts.cpp b/src/server/scripts/Outland/HellfireCitadel/HellfireRamparts/instance_hellfire_ramparts.cpp
index ca98f7712f..df2964c90c 100644
--- a/src/server/scripts/Outland/HellfireCitadel/HellfireRamparts/instance_hellfire_ramparts.cpp
+++ b/src/server/scripts/Outland/HellfireCitadel/HellfireRamparts/instance_hellfire_ramparts.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/scripts/Outland/HellfireCitadel/MagtheridonsLair/boss_magtheridon.cpp b/src/server/scripts/Outland/HellfireCitadel/MagtheridonsLair/boss_magtheridon.cpp
index e37234663f..f64c0fff5a 100644
--- a/src/server/scripts/Outland/HellfireCitadel/MagtheridonsLair/boss_magtheridon.cpp
+++ b/src/server/scripts/Outland/HellfireCitadel/MagtheridonsLair/boss_magtheridon.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
@@ -284,7 +284,7 @@ struct npc_target_trigger : public ScriptedAI
_scheduler.Schedule(5s, [this](TaskContext /*context*/)
{
DoCastSelf(SPELL_DEBRIS_DAMAGE);
- me->DespawnOrUnsummon(6000);
+ me->DespawnOrUnsummon(6s);
});
}
}
diff --git a/src/server/scripts/Outland/HellfireCitadel/MagtheridonsLair/instance_magtheridons_lair.cpp b/src/server/scripts/Outland/HellfireCitadel/MagtheridonsLair/instance_magtheridons_lair.cpp
index a2715fd268..21279a5a23 100644
--- a/src/server/scripts/Outland/HellfireCitadel/MagtheridonsLair/instance_magtheridons_lair.cpp
+++ b/src/server/scripts/Outland/HellfireCitadel/MagtheridonsLair/instance_magtheridons_lair.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/scripts/Outland/HellfireCitadel/MagtheridonsLair/magtheridons_lair.h b/src/server/scripts/Outland/HellfireCitadel/MagtheridonsLair/magtheridons_lair.h
index b9a6341d76..51d025429b 100644
--- a/src/server/scripts/Outland/HellfireCitadel/MagtheridonsLair/magtheridons_lair.h
+++ b/src/server/scripts/Outland/HellfireCitadel/MagtheridonsLair/magtheridons_lair.h
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/scripts/Outland/HellfireCitadel/ShatteredHalls/boss_nethekurse.cpp b/src/server/scripts/Outland/HellfireCitadel/ShatteredHalls/boss_nethekurse.cpp
index 4fc5adef6f..5d87557beb 100644
--- a/src/server/scripts/Outland/HellfireCitadel/ShatteredHalls/boss_nethekurse.cpp
+++ b/src/server/scripts/Outland/HellfireCitadel/ShatteredHalls/boss_nethekurse.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/scripts/Outland/HellfireCitadel/ShatteredHalls/boss_porung.cpp b/src/server/scripts/Outland/HellfireCitadel/ShatteredHalls/boss_porung.cpp
index 77982ad4e7..aa5856be61 100644
--- a/src/server/scripts/Outland/HellfireCitadel/ShatteredHalls/boss_porung.cpp
+++ b/src/server/scripts/Outland/HellfireCitadel/ShatteredHalls/boss_porung.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
@@ -43,7 +43,7 @@ enum Says
enum Misc
{
- POINT_SCOUT_WP_END = 3,
+ POINT_SCOUT_WP_END = 4,
SET_DATA_ARBITRARY_VALUE = 1,
SET_DATA_ENCOUNTER_DONE = 2
@@ -100,7 +100,7 @@ struct npc_shattered_hand_scout : public ScriptedAI
DoCastSelf(SPELL_CLEAR_ALL);
me->SetUnitFlag(UNIT_FLAG_NOT_SELECTABLE);
Talk(SAY_INVADERS_BREACHED);
- me->GetMotionMaster()->MovePath(me->GetEntry() * 10, false);
+ me->GetMotionMaster()->MoveWaypoint(me->GetEntry() * 10, false);
_firstZealots.clear();
std::list<Creature*> creatureList;
diff --git a/src/server/scripts/Outland/HellfireCitadel/ShatteredHalls/boss_warbringer_omrogg.cpp b/src/server/scripts/Outland/HellfireCitadel/ShatteredHalls/boss_warbringer_omrogg.cpp
index e1857ff3cc..66fe098cd4 100644
--- a/src/server/scripts/Outland/HellfireCitadel/ShatteredHalls/boss_warbringer_omrogg.cpp
+++ b/src/server/scripts/Outland/HellfireCitadel/ShatteredHalls/boss_warbringer_omrogg.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/scripts/Outland/HellfireCitadel/ShatteredHalls/boss_warchief_kargath_bladefist.cpp b/src/server/scripts/Outland/HellfireCitadel/ShatteredHalls/boss_warchief_kargath_bladefist.cpp
index a190b744b8..d275d69569 100644
--- a/src/server/scripts/Outland/HellfireCitadel/ShatteredHalls/boss_warchief_kargath_bladefist.cpp
+++ b/src/server/scripts/Outland/HellfireCitadel/ShatteredHalls/boss_warchief_kargath_bladefist.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/scripts/Outland/HellfireCitadel/ShatteredHalls/instance_shattered_halls.cpp b/src/server/scripts/Outland/HellfireCitadel/ShatteredHalls/instance_shattered_halls.cpp
index fe1a94bd90..a25b4dacd2 100644
--- a/src/server/scripts/Outland/HellfireCitadel/ShatteredHalls/instance_shattered_halls.cpp
+++ b/src/server/scripts/Outland/HellfireCitadel/ShatteredHalls/instance_shattered_halls.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/scripts/Outland/HellfireCitadel/ShatteredHalls/shattered_halls.h b/src/server/scripts/Outland/HellfireCitadel/ShatteredHalls/shattered_halls.h
index f0c0a36472..31b10add27 100644
--- a/src/server/scripts/Outland/HellfireCitadel/ShatteredHalls/shattered_halls.h
+++ b/src/server/scripts/Outland/HellfireCitadel/ShatteredHalls/shattered_halls.h
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/scripts/Outland/TempestKeep/Eye/boss_alar.cpp b/src/server/scripts/Outland/TempestKeep/Eye/boss_alar.cpp
index dab0d05907..ae178c8228 100644
--- a/src/server/scripts/Outland/TempestKeep/Eye/boss_alar.cpp
+++ b/src/server/scripts/Outland/TempestKeep/Eye/boss_alar.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
@@ -140,7 +140,7 @@ struct boss_alar : public BossAI
_noQuillTimes = 0;
_platformRoll = RAND(0, 1);
_platform = _platformRoll ? 0 : 3;
- me->GetMotionMaster()->MovePoint(POINT_QUILL, alarPoints[POINT_QUILL], false, true);
+ me->GetMotionMaster()->MovePoint(POINT_QUILL, alarPoints[POINT_QUILL], FORCED_MOVEMENT_NONE, 0.f, false, true);
_platformMoveRepeatTimer = 16s;
}
else
@@ -150,7 +150,7 @@ struct boss_alar : public BossAI
me->SetOrientation(alarPoints[_platform].GetOrientation());
SpawnPhoenixes(1, me);
}
- me->GetMotionMaster()->MovePoint(POINT_PLATFORM, alarPoints[_platform], false, true);
+ me->GetMotionMaster()->MovePoint(POINT_PLATFORM, alarPoints[_platform], FORCED_MOVEMENT_NONE, 0.f, false, true);
_platform = (_platform+1)%4;
_platformMoveRepeatTimer = 30s;
}
@@ -258,7 +258,7 @@ struct boss_alar : public BossAI
}, 30s);
ScheduleTimedEvent(34s, [&]
{
- me->GetMotionMaster()->MovePoint(POINT_DIVE, alarPoints[POINT_DIVE], false, true);
+ me->GetMotionMaster()->MovePoint(POINT_DIVE, alarPoints[POINT_DIVE], FORCED_MOVEMENT_NONE, 0.f, false, true);
scheduler.DelayAll(15s);
}, 57s);
@@ -355,17 +355,7 @@ struct boss_alar : public BossAI
void ConstructWaypointsAndMove()
{
me->StopMoving();
- if (WaypointPath const* i_path = sWaypointMgr->GetPath(me->GetWaypointPath()))
- {
- Movement::PointsArray pathPoints;
- pathPoints.push_back(G3D::Vector3(me->GetPositionX(), me->GetPositionY(), me->GetPositionZ()));
- for (uint8 i = 0; i < i_path->size(); ++i)
- {
- WaypointData const* node = i_path->at(i);
- pathPoints.push_back(G3D::Vector3(node->x, node->y, node->z));
- }
- me->GetMotionMaster()->MoveSplinePath(&pathPoints);
- }
+ me->GetMotionMaster()->MovePath(me->GetWaypointPath(), FORCED_MOVEMENT_NONE, PathSource::WAYPOINT_MGR);
}
void UpdateAI(uint32 diff) override
@@ -452,10 +442,10 @@ class spell_alar_flame_quills : public AuraScript
// 24 spells in total
for (uint8 i = 0; i < 21; ++i)
- GetUnitOwner()->m_Events.AddEvent(new CastQuill(GetUnitOwner(), SPELL_QUILL_MISSILE_1 + i), GetUnitOwner()->m_Events.CalculateTime(i * 40));
- GetUnitOwner()->m_Events.AddEvent(new CastQuill(GetUnitOwner(), SPELL_QUILL_MISSILE_2 + 0), GetUnitOwner()->m_Events.CalculateTime(22 * 40));
- GetUnitOwner()->m_Events.AddEvent(new CastQuill(GetUnitOwner(), SPELL_QUILL_MISSILE_2 + 1), GetUnitOwner()->m_Events.CalculateTime(23 * 40));
- GetUnitOwner()->m_Events.AddEvent(new CastQuill(GetUnitOwner(), SPELL_QUILL_MISSILE_2 + 2), GetUnitOwner()->m_Events.CalculateTime(24 * 40));
+ GetUnitOwner()->m_Events.AddEventAtOffset(new CastQuill(GetUnitOwner(), SPELL_QUILL_MISSILE_1 + i), Milliseconds(i * 40));
+ GetUnitOwner()->m_Events.AddEventAtOffset(new CastQuill(GetUnitOwner(), SPELL_QUILL_MISSILE_2 + 0), Milliseconds(22 * 40));
+ GetUnitOwner()->m_Events.AddEventAtOffset(new CastQuill(GetUnitOwner(), SPELL_QUILL_MISSILE_2 + 1), Milliseconds(23 * 40));
+ GetUnitOwner()->m_Events.AddEventAtOffset(new CastQuill(GetUnitOwner(), SPELL_QUILL_MISSILE_2 + 2), Milliseconds(24 * 40));
}
void Register() override
diff --git a/src/server/scripts/Outland/TempestKeep/Eye/boss_astromancer.cpp b/src/server/scripts/Outland/TempestKeep/Eye/boss_astromancer.cpp
index 4378d6a246..94e300720c 100644
--- a/src/server/scripts/Outland/TempestKeep/Eye/boss_astromancer.cpp
+++ b/src/server/scripts/Outland/TempestKeep/Eye/boss_astromancer.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
@@ -271,12 +271,12 @@ class spell_astromancer_solarian_transform : public AuraScript
void OnApply(AuraEffect const* /*aurEff*/, AuraEffectHandleModes /*mode*/)
{
- GetUnitOwner()->HandleStatModifier(UnitMods(UNIT_MOD_ARMOR), TOTAL_PCT, 400.0f, true);
+ GetUnitOwner()->ApplyStatPctModifier(UNIT_MOD_ARMOR, TOTAL_PCT, 400.0f);
}
void OnRemove(AuraEffect const* /*aurEff*/, AuraEffectHandleModes /*mode*/)
{
- GetUnitOwner()->HandleStatModifier(UnitMods(UNIT_MOD_ARMOR), TOTAL_PCT, 400.0f, false);
+ GetUnitOwner()->ApplyStatPctModifier(UnitMods(UNIT_MOD_ARMOR), TOTAL_PCT, -80.0f);
}
void Register() override
diff --git a/src/server/scripts/Outland/TempestKeep/Eye/boss_kaelthas.cpp b/src/server/scripts/Outland/TempestKeep/Eye/boss_kaelthas.cpp
index 117712e48f..c4c6c84e37 100644
--- a/src/server/scripts/Outland/TempestKeep/Eye/boss_kaelthas.cpp
+++ b/src/server/scripts/Outland/TempestKeep/Eye/boss_kaelthas.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
@@ -269,7 +269,7 @@ struct boss_kaelthas : public BossAI
void AttackStart(Unit* who) override
{
- if (_phase == PHASE_FINAL /* check is scheduled&& events.GetNextEventTime(EVENT_GRAVITY_LAPSE_END) == 0*/)
+ if (_phase == PHASE_FINAL /* check is scheduled&& !events.HasTimeUntilEvent(EVENT_GRAVITY_LAPSE_END)*/)
BossAI::AttackStart(who);
}
@@ -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)
{
@@ -364,11 +364,11 @@ struct boss_kaelthas : public BossAI
{
DoCastVictim(SPELL_FIREBALL);
}, 2400ms, 7500ms);
- ScheduleTimedEvent(10000ms, [&]
+ ScheduleTimedEvent(10s, [&]
{
DoCastRandomTarget(SPELL_FLAME_STRIKE, 0, 100.0f);
}, 30250ms, 50650ms);
- ScheduleTimedEvent(50000ms, [&]
+ ScheduleTimedEvent(50s, [&]
{
Talk(SAY_SUMMON_PHOENIX);
DoCastSelf(SPELL_PHOENIX);
@@ -429,7 +429,7 @@ struct boss_kaelthas : public BossAI
DoCastSelf(SPELL_KAEL_EXPLODES1, true);
DoCastSelf(SPELL_KAEL_GAINING_POWER);
}, EVENT_SCENE_2);
- ScheduleUniqueTimedEvent(4000ms, [&]
+ ScheduleUniqueTimedEvent(4s, [&]
{
me->SetTarget();
for (uint8 i = 0; i < 2; ++i)
@@ -440,7 +440,7 @@ struct boss_kaelthas : public BossAI
me->GetMotionMaster()->MoveTakeoff(POINT_AIR, me->GetPositionX(), me->GetPositionY(), 75.0f, 2.99, true); // AnimType Movement::ToFly does not exist for Kael
DoCastSelf(SPELL_GROW, true);
}, EVENT_SCENE_3);
- ScheduleUniqueTimedEvent(7000ms, [&]
+ ScheduleUniqueTimedEvent(7s, [&]
{
me->SetTarget();
DoCastSelf(SPELL_GROW, true);
@@ -450,7 +450,7 @@ struct boss_kaelthas : public BossAI
if (Creature* trigger = me->SummonCreature(WORLD_TRIGGER, triggersPos[i + 2], TEMPSUMMON_TIMED_DESPAWN, 60000))
trigger->CastSpell(me, SPELL_NETHERBEAM1 + i, false);
}, EVENT_SCENE_4);
- ScheduleUniqueTimedEvent(10000ms, [&]
+ ScheduleUniqueTimedEvent(10s, [&]
{
me->SetTarget();
DoCastSelf(SPELL_GROW, true);
@@ -460,7 +460,7 @@ struct boss_kaelthas : public BossAI
if (Creature* trigger = me->SummonCreature(WORLD_TRIGGER, triggersPos[i + 4], TEMPSUMMON_TIMED_DESPAWN, 60000))
trigger->CastSpell(me, SPELL_NETHERBEAM1 + i, false);
}, EVENT_SCENE_5);
- ScheduleUniqueTimedEvent(14000ms, [&]
+ ScheduleUniqueTimedEvent(14s, [&]
{
DoCastSelf(SPELL_GROW, true);
DoCastSelf(SPELL_KAEL_EXPLODES4, true);
@@ -470,7 +470,7 @@ struct boss_kaelthas : public BossAI
{
SetRoomState(GO_STATE_ACTIVE);
}, EVENT_SCENE_7);
- ScheduleUniqueTimedEvent(19000ms, [&]
+ ScheduleUniqueTimedEvent(19s, [&]
{
summons.DespawnEntry(WORLD_TRIGGER);
me->RemoveAurasDueToSpell(SPELL_NETHERBEAM_AURA1);
@@ -478,7 +478,7 @@ struct boss_kaelthas : public BossAI
me->RemoveAurasDueToSpell(SPELL_NETHERBEAM_AURA3);
DoCastSelf(SPELL_KAEL_EXPLODES5, true);
}, EVENT_SCENE_8);
- ScheduleUniqueTimedEvent(22000ms, [&]
+ ScheduleUniqueTimedEvent(22s, [&]
{
DoCastSelf(SPELL_DARK_BANISH_STATE, true);
DoCastSelf(SPELL_ARCANE_EXPLOSION_VISUAL, true);
@@ -528,14 +528,14 @@ struct boss_kaelthas : public BossAI
me->CastStop();
DoCastSelf(SPELL_KAEL_FULL_POWER);
}, EVENT_SCENE_16);
- ScheduleUniqueTimedEvent(32000ms, [&]
+ ScheduleUniqueTimedEvent(32s, [&]
{
DoCastSelf(SPELL_KAEL_PHASE_TWO, true);
DoCastSelf(SPELL_PURE_NETHER_BEAM4, true);
DoCastSelf(SPELL_PURE_NETHER_BEAM5, true);
DoCastSelf(SPELL_PURE_NETHER_BEAM6, true);
}, EVENT_SCENE_17);
- ScheduleUniqueTimedEvent(36000ms, [&]
+ ScheduleUniqueTimedEvent(36s, [&]
{
summons.DespawnEntry(WORLD_TRIGGER);
me->CastStop();
@@ -559,7 +559,7 @@ struct boss_kaelthas : public BossAI
switch (kaelAction)
{
case ACTION_START_THALADRED:
- attackStartTimer = 7000ms;
+ attackStartTimer = 7s;
advisorNPCId = NPC_THALADRED;
break;
case ACTION_START_SANGUINAR:
@@ -567,7 +567,7 @@ struct boss_kaelthas : public BossAI
advisorNPCId = NPC_LORD_SANGUINAR;
break;
case ACTION_START_CAPERNIAN:
- attackStartTimer = 9000ms;
+ attackStartTimer = 9s;
advisorNPCId = NPC_CAPERNIAN;
break;
case ACTION_START_TELONICUS:
@@ -655,18 +655,18 @@ struct boss_kaelthas : public BossAI
me->AttackStop();
me->CastStop();
me->SetReactState(REACT_PASSIVE);
- me->GetMotionMaster()->MovePoint(POINT_MIDDLE, me->GetHomePosition(), true, true);
+ me->GetMotionMaster()->MovePoint(POINT_MIDDLE, me->GetHomePosition(), FORCED_MOVEMENT_NONE, 0.f, true, true);
}
});
- ScheduleTimedEvent(1000ms, [&]
+ ScheduleTimedEvent(1s, [&]
{
DoCastVictim(SPELL_FIREBALL);
}, 2400ms, 7500ms);
- ScheduleTimedEvent(15000ms, [&]
+ ScheduleTimedEvent(15s, [&]
{
DoCastRandomTarget(SPELL_FLAME_STRIKE, 0, 100.0f);
}, 30250ms, 50650ms);
- ScheduleTimedEvent(50000ms, [&]
+ ScheduleTimedEvent(50s, [&]
{
Talk(SAY_SUMMON_PHOENIX);
DoCastSelf(SPELL_PHOENIX);
@@ -855,7 +855,7 @@ struct npc_capernian : public advisor_baseAI
DoCastVictim(SPELL_CAPERNIAN_FIREBALL);
}
}, 2500ms);
- ScheduleTimedEvent(7000ms, 10000ms, [&]{
+ ScheduleTimedEvent(7s, 10s, [&]{
DoCastRandomTarget(SPELL_CONFLAGRATION, 0, 30.0f);
}, 18500ms, 20500ms);
ScheduleTimedEvent(3s, [&]{
@@ -893,16 +893,16 @@ struct npc_thaladred : public advisor_baseAI
me->AddThreat(target, 10000000.0f);
Talk(EMOTE_THALADRED_FIXATE, target);
}
- }, 10000ms);
- ScheduleTimedEvent(4000ms, 19350ms, [&]
+ }, 10s);
+ ScheduleTimedEvent(4s, 19350ms, [&]
{
DoCastVictim(SPELL_PSYCHIC_BLOW);
}, 15700ms, 48900ms);
- ScheduleTimedEvent(3000ms, 6050ms, [&]
+ ScheduleTimedEvent(3s, 6050ms, [&]
{
DoCastVictim(SPELL_REND);
}, 15700ms, 48900ms);
- ScheduleTimedEvent(3000ms, 6050ms, [&]
+ ScheduleTimedEvent(3s, 6050ms, [&]
{
if (Unit* victim = me->GetVictim())
{
@@ -1013,7 +1013,7 @@ class spell_kaelthas_flame_strike : public AuraScript
{
GetUnitOwner()->RemoveAllAuras();
GetUnitOwner()->CastSpell(GetUnitOwner(), SPELL_FLAME_STRIKE_DAMAGE, true);
- GetUnitOwner()->ToCreature()->DespawnOrUnsummon(2000);
+ GetUnitOwner()->ToCreature()->DespawnOrUnsummon(2s);
}
void Register() override
@@ -1032,7 +1032,7 @@ public:
bool Execute(uint64 /*execTime*/, uint32 /*diff*/) override
{
if (_owner->IsBeingTeleportedNear())
- _owner->m_Events.AddEvent(new lapseTeleport(_owner), _owner->m_Events.CalculateTime(1));
+ _owner->m_Events.AddEventAtOffset(new lapseTeleport(_owner), 1ms);
else if (!_owner->IsBeingTeleported())
{
_owner->CastSpell(_owner, SPELL_GRAVITY_LAPSE_KNOCKBACK, true);
@@ -1062,7 +1062,7 @@ class spell_kaelthas_gravity_lapse : public SpellScript
if (Player* target = GetHitPlayer())
{
GetCaster()->CastSpell(target, _currentSpellId++, true);
- target->m_Events.AddEvent(new lapseTeleport(target), target->m_Events.CalculateTime(1));
+ target->m_Events.AddEventAtOffset(new lapseTeleport(target), 1ms);
}
}
diff --git a/src/server/scripts/Outland/TempestKeep/Eye/boss_void_reaver.cpp b/src/server/scripts/Outland/TempestKeep/Eye/boss_void_reaver.cpp
index a1d94f89f9..6ccf91dcae 100644
--- a/src/server/scripts/Outland/TempestKeep/Eye/boss_void_reaver.cpp
+++ b/src/server/scripts/Outland/TempestKeep/Eye/boss_void_reaver.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/scripts/Outland/TempestKeep/Eye/instance_the_eye.cpp b/src/server/scripts/Outland/TempestKeep/Eye/instance_the_eye.cpp
index 3a28db6606..60e43f0f30 100644
--- a/src/server/scripts/Outland/TempestKeep/Eye/instance_the_eye.cpp
+++ b/src/server/scripts/Outland/TempestKeep/Eye/instance_the_eye.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/scripts/Outland/TempestKeep/Eye/the_eye.h b/src/server/scripts/Outland/TempestKeep/Eye/the_eye.h
index d480f7f843..3fff6994f0 100644
--- a/src/server/scripts/Outland/TempestKeep/Eye/the_eye.h
+++ b/src/server/scripts/Outland/TempestKeep/Eye/the_eye.h
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/scripts/Outland/TempestKeep/Mechanar/boss_gatewatcher_gyrokill.cpp b/src/server/scripts/Outland/TempestKeep/Mechanar/boss_gatewatcher_gyrokill.cpp
index 87293b9d04..980cea0268 100644
--- a/src/server/scripts/Outland/TempestKeep/Mechanar/boss_gatewatcher_gyrokill.cpp
+++ b/src/server/scripts/Outland/TempestKeep/Mechanar/boss_gatewatcher_gyrokill.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/scripts/Outland/TempestKeep/Mechanar/boss_gatewatcher_ironhand.cpp b/src/server/scripts/Outland/TempestKeep/Mechanar/boss_gatewatcher_ironhand.cpp
index 2443e40e9e..1840a1c189 100644
--- a/src/server/scripts/Outland/TempestKeep/Mechanar/boss_gatewatcher_ironhand.cpp
+++ b/src/server/scripts/Outland/TempestKeep/Mechanar/boss_gatewatcher_ironhand.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/scripts/Outland/TempestKeep/Mechanar/boss_mechano_lord_capacitus.cpp b/src/server/scripts/Outland/TempestKeep/Mechanar/boss_mechano_lord_capacitus.cpp
index 89f78db760..4b094d5a46 100644
--- a/src/server/scripts/Outland/TempestKeep/Mechanar/boss_mechano_lord_capacitus.cpp
+++ b/src/server/scripts/Outland/TempestKeep/Mechanar/boss_mechano_lord_capacitus.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/scripts/Outland/TempestKeep/Mechanar/boss_nethermancer_sepethrea.cpp b/src/server/scripts/Outland/TempestKeep/Mechanar/boss_nethermancer_sepethrea.cpp
index 5999aaa8a4..e4d7597570 100644
--- a/src/server/scripts/Outland/TempestKeep/Mechanar/boss_nethermancer_sepethrea.cpp
+++ b/src/server/scripts/Outland/TempestKeep/Mechanar/boss_nethermancer_sepethrea.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/scripts/Outland/TempestKeep/Mechanar/boss_pathaleon_the_calculator.cpp b/src/server/scripts/Outland/TempestKeep/Mechanar/boss_pathaleon_the_calculator.cpp
index 07612d943a..613596d5c3 100644
--- a/src/server/scripts/Outland/TempestKeep/Mechanar/boss_pathaleon_the_calculator.cpp
+++ b/src/server/scripts/Outland/TempestKeep/Mechanar/boss_pathaleon_the_calculator.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/scripts/Outland/TempestKeep/Mechanar/instance_mechanar.cpp b/src/server/scripts/Outland/TempestKeep/Mechanar/instance_mechanar.cpp
index a5b5d40b94..d3152e4849 100644
--- a/src/server/scripts/Outland/TempestKeep/Mechanar/instance_mechanar.cpp
+++ b/src/server/scripts/Outland/TempestKeep/Mechanar/instance_mechanar.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/scripts/Outland/TempestKeep/Mechanar/mechanar.h b/src/server/scripts/Outland/TempestKeep/Mechanar/mechanar.h
index 9d3e3074a7..b17c48f726 100644
--- a/src/server/scripts/Outland/TempestKeep/Mechanar/mechanar.h
+++ b/src/server/scripts/Outland/TempestKeep/Mechanar/mechanar.h
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/scripts/Outland/TempestKeep/arcatraz/arcatraz.cpp b/src/server/scripts/Outland/TempestKeep/arcatraz/arcatraz.cpp
index 1aa95aa7d3..d4c067fa43 100644
--- a/src/server/scripts/Outland/TempestKeep/arcatraz/arcatraz.cpp
+++ b/src/server/scripts/Outland/TempestKeep/arcatraz/arcatraz.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
@@ -97,8 +97,8 @@ public:
me->SetReactState(REACT_PASSIVE);
me->SetImmuneToAll(true);
events2.Reset();
- events2.ScheduleEvent(EVENT_TELEPORT_VISUAL, 0);
- events2.ScheduleEvent(EVENT_MILLHOUSE_INTRO1, 3000);
+ events2.ScheduleEvent(EVENT_TELEPORT_VISUAL, 0ms);
+ events2.ScheduleEvent(EVENT_MILLHOUSE_INTRO1, 3s);
}
void Reset() override
@@ -125,9 +125,9 @@ public:
void JustEngagedWith(Unit*) override
{
- events.ScheduleEvent(EVENT_MILL_CHECK_HEALTH, 1000);
- events.ScheduleEvent(EVENT_MILL_PYROBLAST, 30000);
- events.ScheduleEvent(EVENT_MILL_BASE_SPELL, 2000);
+ events.ScheduleEvent(EVENT_MILL_CHECK_HEALTH, 1s);
+ events.ScheduleEvent(EVENT_MILL_PYROBLAST, 30s);
+ events.ScheduleEvent(EVENT_MILL_BASE_SPELL, 2s);
}
void DamageTaken(Unit* /*attacker*/, uint32& damage, DamageEffectType /*type*/, SpellSchoolMask /*school*/) override
@@ -150,52 +150,52 @@ public:
break;
case EVENT_MILLHOUSE_INTRO1:
Talk(SAY_INTRO_1);
- events2.ScheduleEvent(EVENT_MILLHOUSE_INTRO2, 18000);
+ events2.ScheduleEvent(EVENT_MILLHOUSE_INTRO2, 18s);
break;
case EVENT_MILLHOUSE_INTRO2:
Talk(SAY_INTRO_2);
- events2.ScheduleEvent(EVENT_MILLHOUSE_INTRO3, 8000);
+ events2.ScheduleEvent(EVENT_MILLHOUSE_INTRO3, 8s);
break;
case EVENT_MILLHOUSE_INTRO3:
Talk(SAY_INTRO_3);
- events2.ScheduleEvent(EVENT_MILLHOUSE_INTRO4, 6000);
+ events2.ScheduleEvent(EVENT_MILLHOUSE_INTRO4, 6s);
break;
case EVENT_MILLHOUSE_INTRO4:
Talk(SAY_INTRO_4);
- events2.ScheduleEvent(EVENT_MILLHOUSE_INTRO5, 8000);
+ events2.ScheduleEvent(EVENT_MILLHOUSE_INTRO5, 8s);
break;
case EVENT_MILLHOUSE_INTRO5:
Talk(SAY_WATER);
me->CastSpell(me, SPELL_CONJURE_WATER, false);
- events2.ScheduleEvent(EVENT_MILLHOUSE_INTRO6, 7000);
+ events2.ScheduleEvent(EVENT_MILLHOUSE_INTRO6, 7s);
break;
case EVENT_MILLHOUSE_INTRO6:
Talk(SAY_BUFFS);
me->CastSpell(me, SPELL_ICE_ARMOR, false);
- events2.ScheduleEvent(EVENT_MILLHOUSE_INTRO7, 7000);
+ events2.ScheduleEvent(EVENT_MILLHOUSE_INTRO7, 7s);
break;
case EVENT_MILLHOUSE_INTRO7:
Talk(SAY_DRINK);
me->CastSpell(me, SPELL_ARCANE_INTELLECT, false);
- events2.ScheduleEvent(EVENT_MILLHOUSE_INTRO8, 7000);
+ events2.ScheduleEvent(EVENT_MILLHOUSE_INTRO8, 7s);
break;
case EVENT_MILLHOUSE_INTRO8:
Talk(SAY_READY);
me->GetMotionMaster()->MovePoint(1, 445.82f, -158.38f, 43.067f);
- events2.ScheduleEvent(EVENT_MILLHOUSE_INTRO9, 5000);
+ events2.ScheduleEvent(EVENT_MILLHOUSE_INTRO9, 5s);
break;
case EVENT_MILLHOUSE_INTRO9:
me->SetFacingTo(M_PI * 1.5f);
me->SetHomePosition(me->GetPositionX(), me->GetPositionY(), me->GetPositionZ(), M_PI * 1.5f);
me->SetImmuneToAll(false);
me->SetReactState(REACT_AGGRESSIVE);
- events2.ScheduleEvent(EVENT_SEARCH_FIGHT, 1000);
+ events2.ScheduleEvent(EVENT_SEARCH_FIGHT, 1s);
break;
case EVENT_SEARCH_FIGHT:
if (!me->IsInCombat() && !me->IsInEvadeMode())
if (Unit* target = me->SelectNearbyTarget(nullptr, 30.0f))
AttackStart(target);
- events2.ScheduleEvent(EVENT_SEARCH_FIGHT, 1000);
+ events2.ScheduleEvent(EVENT_SEARCH_FIGHT, 1s);
break;
}
@@ -214,27 +214,27 @@ public:
Talk(SAY_LOWHP);
break;
}
- events.ScheduleEvent(EVENT_MILL_CHECK_HEALTH, 1000);
+ events.ScheduleEvent(EVENT_MILL_CHECK_HEALTH, 1s);
break;
case EVENT_MILL_PYROBLAST:
Talk(SAY_PYRO);
me->CastSpell(me->GetVictim(), SPELL_PYROBLAST, false);
- events.ScheduleEvent(EVENT_MILL_PYROBLAST, 30000);
+ events.ScheduleEvent(EVENT_MILL_PYROBLAST, 30s);
break;
case EVENT_MILL_BASE_SPELL:
switch (RAND(SPELL_FIREBALL, SPELL_ARCANE_MISSILES, SPELL_FROSTBOLT))
{
case SPELL_FIREBALL:
me->CastSpell(me->GetVictim(), SPELL_FIREBALL, false);
- events.ScheduleEvent(EVENT_MILL_BASE_SPELL, 4000);
+ events.ScheduleEvent(EVENT_MILL_BASE_SPELL, 4s);
break;
case SPELL_ARCANE_MISSILES:
me->CastSpell(me->GetVictim(), SPELL_ARCANE_MISSILES, false);
- events.ScheduleEvent(EVENT_MILL_BASE_SPELL, 9000);
+ events.ScheduleEvent(EVENT_MILL_BASE_SPELL, 9s);
break;
case SPELL_FROSTBOLT:
me->CastSpell(me->GetVictim(), SPELL_FROSTBOLT, false);
- events.ScheduleEvent(EVENT_MILL_BASE_SPELL, 4000);
+ events.ScheduleEvent(EVENT_MILL_BASE_SPELL, 4s);
break;
default:
break;
@@ -390,8 +390,8 @@ public:
me->setActive(true);
me->InterruptNonMeleeSpells(false);
me->SetImmuneToAll(true);
- events.ScheduleEvent(EVENT_WARDEN_INTRO1, 1500);
- events.ScheduleEvent(EVENT_WARDEN_CHECK_PLAYERS, 1000);
+ events.ScheduleEvent(EVENT_WARDEN_INTRO1, 1500ms);
+ events.ScheduleEvent(EVENT_WARDEN_CHECK_PLAYERS, 1s);
instance->SetBossState(DATA_WARDEN_MELLICHAR, IN_PROGRESS);
}
damage = 0;
@@ -410,13 +410,13 @@ public:
switch (type)
{
case DATA_WARDEN_1:
- events.ScheduleEvent(EVENT_WARDEN_INTRO8, 2000);
+ events.ScheduleEvent(EVENT_WARDEN_INTRO8, 2s);
break;
case DATA_WARDEN_3:
- events.ScheduleEvent(EVENT_WARDEN_INTRO19, 2000);
+ events.ScheduleEvent(EVENT_WARDEN_INTRO19, 2s);
break;
case DATA_WARDEN_4:
- events.ScheduleEvent(EVENT_WARDEN_INTRO24, 2000);
+ events.ScheduleEvent(EVENT_WARDEN_INTRO24, 2s);
break;
}
}
@@ -432,35 +432,35 @@ public:
CreatureAI::EnterEvadeMode();
return;
}
- events.ScheduleEvent(EVENT_WARDEN_CHECK_PLAYERS, 1000);
+ events.ScheduleEvent(EVENT_WARDEN_CHECK_PLAYERS, 1s);
break;
case EVENT_WARDEN_INTRO1:
Talk(YELL_INTRO1);
me->SetFacingTo(M_PI / 2.0f);
me->CastSpell(me, SPELL_BUBBLE_VISUAL, false);
- events.ScheduleEvent(EVENT_WARDEN_INTRO2, 1400);
+ events.ScheduleEvent(EVENT_WARDEN_INTRO2, 1400ms);
break;
case EVENT_WARDEN_INTRO2:
instance->HandleGameObject(instance->GetGuidData(DATA_WARDENS_SHIELD), false);
- events.ScheduleEvent(EVENT_WARDEN_INTRO3, 20000);
+ events.ScheduleEvent(EVENT_WARDEN_INTRO3, 20s);
break;
case EVENT_WARDEN_INTRO3:
Talk(YELL_INTRO2);
- events.ScheduleEvent(EVENT_WARDEN_INTRO4, 5000);
+ events.ScheduleEvent(EVENT_WARDEN_INTRO4, 5s);
break;
case EVENT_WARDEN_INTRO4:
me->SetFacingTo(0.5f);
me->CastSpell((Unit*)nullptr, SPELL_TARGET_ALPHA, false);
- events.ScheduleEvent(EVENT_WARDEN_INTRO5, 2000);
+ events.ScheduleEvent(EVENT_WARDEN_INTRO5, 2s);
break;
case EVENT_WARDEN_INTRO5:
instance->SetData(DATA_WARDEN_1, IN_PROGRESS);
- events.ScheduleEvent(EVENT_WARDEN_INTRO6, 3000);
+ events.ScheduleEvent(EVENT_WARDEN_INTRO6, 3s);
break;
case EVENT_WARDEN_INTRO6:
me->SetFacingTo(M_PI * 1.5f);
me->CastSpell((Unit*)nullptr, SPELL_TARGET_OMEGA, false);
- events.ScheduleEvent(EVENT_WARDEN_INTRO7, 5000);
+ events.ScheduleEvent(EVENT_WARDEN_INTRO7, 5s);
break;
case EVENT_WARDEN_INTRO7:
me->SummonCreature(RAND(NPC_TRICKSTER, NPC_PH_HUNTER), 478.326f, -148.505f, 42.56f, 3.19f, TEMPSUMMON_MANUAL_DESPAWN);
@@ -470,44 +470,44 @@ public:
Talk(YELL_RELEASE1);
me->InterruptNonMeleeSpells(false);
me->SetFacingTo(2.6f);
- events.ScheduleEvent(EVENT_WARDEN_INTRO10, 4000);
+ events.ScheduleEvent(EVENT_WARDEN_INTRO10, 4s);
break;
case EVENT_WARDEN_INTRO10:
me->CastSpell((Unit*)nullptr, SPELL_TARGET_BETA, false);
- events.ScheduleEvent(EVENT_WARDEN_INTRO11, 2000);
+ events.ScheduleEvent(EVENT_WARDEN_INTRO11, 2s);
break;
case EVENT_WARDEN_INTRO11:
Talk(YELL_RELEASE2A);
instance->SetData(DATA_WARDEN_2, IN_PROGRESS);
- events.ScheduleEvent(EVENT_WARDEN_INTRO12, 2000);
+ events.ScheduleEvent(EVENT_WARDEN_INTRO12, 2s);
break;
case EVENT_WARDEN_INTRO12:
me->SetFacingTo(M_PI * 1.5f);
me->CastSpell((Unit*)nullptr, SPELL_TARGET_OMEGA, false);
- events.ScheduleEvent(EVENT_WARDEN_INTRO13, 6000);
+ events.ScheduleEvent(EVENT_WARDEN_INTRO13, 6s);
break;
case EVENT_WARDEN_INTRO13:
me->SummonCreature(NPC_MILLHOUSE, 413.292f, -148.378f, 42.56f, 6.27f, TEMPSUMMON_MANUAL_DESPAWN);
- events.ScheduleEvent(EVENT_WARDEN_INTRO14, 14000);
+ events.ScheduleEvent(EVENT_WARDEN_INTRO14, 14s);
break;
case EVENT_WARDEN_INTRO14:
Talk(YELL_RELEASE2B);
me->InterruptNonMeleeSpells(false);
me->SetFacingTo(3.3f);
- events.ScheduleEvent(EVENT_WARDEN_INTRO15, 5000);
+ events.ScheduleEvent(EVENT_WARDEN_INTRO15, 5s);
break;
case EVENT_WARDEN_INTRO15:
me->CastSpell((Unit*)nullptr, SPELL_TARGET_DELTA, false);
- events.ScheduleEvent(EVENT_WARDEN_INTRO16, 2000);
+ events.ScheduleEvent(EVENT_WARDEN_INTRO16, 2s);
break;
case EVENT_WARDEN_INTRO16:
instance->SetData(DATA_WARDEN_3, IN_PROGRESS);
- events.ScheduleEvent(EVENT_WARDEN_INTRO17, 2000);
+ events.ScheduleEvent(EVENT_WARDEN_INTRO17, 2s);
break;
case EVENT_WARDEN_INTRO17:
me->SetFacingTo(M_PI * 1.5f);
me->CastSpell((Unit*)nullptr, SPELL_TARGET_OMEGA, false);
- events.ScheduleEvent(EVENT_WARDEN_INTRO18, 6000);
+ events.ScheduleEvent(EVENT_WARDEN_INTRO18, 6s);
break;
case EVENT_WARDEN_INTRO18:
me->SummonCreature(RAND(NPC_AKKIRIS, NPC_SULFURON), 420.179f, -174.396f, 42.58f, 0.02f, TEMPSUMMON_MANUAL_DESPAWN);
@@ -517,20 +517,20 @@ public:
Talk(YELL_RELEASE3);
me->InterruptNonMeleeSpells(false);
me->SetFacingTo(6.05f);
- events.ScheduleEvent(EVENT_WARDEN_INTRO20, 4000);
+ events.ScheduleEvent(EVENT_WARDEN_INTRO20, 4s);
break;
case EVENT_WARDEN_INTRO20:
me->CastSpell((Unit*)nullptr, SPELL_TARGET_GAMMA, false);
- events.ScheduleEvent(EVENT_WARDEN_INTRO21, 2000);
+ events.ScheduleEvent(EVENT_WARDEN_INTRO21, 2s);
break;
case EVENT_WARDEN_INTRO21:
instance->SetData(DATA_WARDEN_4, IN_PROGRESS);
- events.ScheduleEvent(EVENT_WARDEN_INTRO22, 2000);
+ events.ScheduleEvent(EVENT_WARDEN_INTRO22, 2s);
break;
case EVENT_WARDEN_INTRO22:
me->SetFacingTo(M_PI * 1.5f);
me->CastSpell((Unit*)nullptr, SPELL_TARGET_OMEGA, false);
- events.ScheduleEvent(EVENT_WARDEN_INTRO23, 6000);
+ events.ScheduleEvent(EVENT_WARDEN_INTRO23, 6s);
break;
case EVENT_WARDEN_INTRO23:
me->SummonCreature(RAND(NPC_TW_DRAK, NPC_BL_DRAK), 471.795f, -174.58f, 42.58f, 3.06f, TEMPSUMMON_MANUAL_DESPAWN);
@@ -540,7 +540,7 @@ public:
instance->SetData(DATA_WARDEN_5, IN_PROGRESS);
Talk(YELL_RELEASE4);
me->InterruptNonMeleeSpells(false);
- events.ScheduleEvent(EVENT_WARDEN_INTRO25, 8000);
+ events.ScheduleEvent(EVENT_WARDEN_INTRO25, 8s);
break;
case EVENT_WARDEN_INTRO25:
if (Creature* cr = me->SummonCreature(NPC_HARBINGER_SKYRISS, 445.763f, -191.639f, 44.64f, 1.60f, TEMPSUMMON_MANUAL_DESPAWN))
@@ -548,22 +548,22 @@ public:
cr->SetImmuneToAll(true);
cr->CastSpell(cr, SPELL_TELEPORT_VISUAL, true);
}
- events.ScheduleEvent(EVENT_WARDEN_INTRO26, 1000);
+ events.ScheduleEvent(EVENT_WARDEN_INTRO26, 1s);
break;
case EVENT_WARDEN_INTRO26:
if (Creature* creature = summons.GetCreatureWithEntry(NPC_HARBINGER_SKYRISS))
creature->AI()->Talk(SAY_HARBINGER_INTRO);
- events.ScheduleEvent(EVENT_WARDEN_INTRO27, 23000);
+ events.ScheduleEvent(EVENT_WARDEN_INTRO27, 23s);
break;
case EVENT_WARDEN_INTRO27:
Talk(YELL_WELCOME);
- events.ScheduleEvent(EVENT_WARDEN_INTRO28, 5000);
+ events.ScheduleEvent(EVENT_WARDEN_INTRO28, 5s);
break;
case EVENT_WARDEN_INTRO28:
instance->HandleGameObject(instance->GetGuidData(DATA_WARDENS_SHIELD), true);
if (Creature* creature = summons.GetCreatureWithEntry(NPC_HARBINGER_SKYRISS))
creature->CastSpell((Unit*)nullptr, SPELL_MIND_REND, false);
- events.ScheduleEvent(EVENT_WARDEN_INTRO29, 4000);
+ events.ScheduleEvent(EVENT_WARDEN_INTRO29, 4s);
break;
case EVENT_WARDEN_INTRO29:
diff --git a/src/server/scripts/Outland/TempestKeep/arcatraz/arcatraz.h b/src/server/scripts/Outland/TempestKeep/arcatraz/arcatraz.h
index 9c0cb31eed..9b41162b34 100644
--- a/src/server/scripts/Outland/TempestKeep/arcatraz/arcatraz.h
+++ b/src/server/scripts/Outland/TempestKeep/arcatraz/arcatraz.h
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/scripts/Outland/TempestKeep/arcatraz/boss_dalliah_the_doomsayer.cpp b/src/server/scripts/Outland/TempestKeep/arcatraz/boss_dalliah_the_doomsayer.cpp
index b7c56e1220..1467fcd6f8 100644
--- a/src/server/scripts/Outland/TempestKeep/arcatraz/boss_dalliah_the_doomsayer.cpp
+++ b/src/server/scripts/Outland/TempestKeep/arcatraz/boss_dalliah_the_doomsayer.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/scripts/Outland/TempestKeep/arcatraz/boss_harbinger_skyriss.cpp b/src/server/scripts/Outland/TempestKeep/arcatraz/boss_harbinger_skyriss.cpp
index ab4644a777..d4fba6bc42 100644
--- a/src/server/scripts/Outland/TempestKeep/arcatraz/boss_harbinger_skyriss.cpp
+++ b/src/server/scripts/Outland/TempestKeep/arcatraz/boss_harbinger_skyriss.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/scripts/Outland/TempestKeep/arcatraz/boss_wrath_scryer_soccothrates.cpp b/src/server/scripts/Outland/TempestKeep/arcatraz/boss_wrath_scryer_soccothrates.cpp
index 799272204e..e8bf40e51e 100644
--- a/src/server/scripts/Outland/TempestKeep/arcatraz/boss_wrath_scryer_soccothrates.cpp
+++ b/src/server/scripts/Outland/TempestKeep/arcatraz/boss_wrath_scryer_soccothrates.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
@@ -165,7 +165,7 @@ struct boss_wrath_scryer_soccothrates : public BossAI
if (!preFight && who->IsPlayer() && me->IsWithinDistInMap(who, 70.0f))
{
Talk(SAY_SOCCOTHRATES_CONVO_1);
- events2.ScheduleEvent(EVENT_PREFIGHT_1, 2000);
+ events2.ScheduleEvent(EVENT_PREFIGHT_1, 2s);
preFight = true;
}
}
@@ -178,38 +178,38 @@ struct boss_wrath_scryer_soccothrates : public BossAI
case EVENT_PREFIGHT_1:
if (Creature* dalliah = instance->GetCreature(DATA_DALLIAH))
dalliah->AI()->Talk(SAY_DALLIAH_CONVO_1);
- events2.ScheduleEvent(EVENT_PREFIGHT_2, 3000);
+ events2.ScheduleEvent(EVENT_PREFIGHT_2, 3s);
break;
case EVENT_PREFIGHT_2:
Talk(SAY_SOCCOTHRATES_CONVO_2);
- events2.ScheduleEvent(EVENT_PREFIGHT_3, 3000);
+ events2.ScheduleEvent(EVENT_PREFIGHT_3, 3s);
break;
case EVENT_PREFIGHT_3:
if (Creature* dalliah = instance->GetCreature(DATA_DALLIAH))
dalliah->AI()->Talk(SAY_DALLIAH_CONVO_2);
- events2.ScheduleEvent(EVENT_PREFIGHT_4, 6000);
+ events2.ScheduleEvent(EVENT_PREFIGHT_4, 6s);
break;
case EVENT_PREFIGHT_4:
Talk(SAY_SOCCOTHRATES_CONVO_3);
- events2.ScheduleEvent(EVENT_PREFIGHT_5, 2000);
+ events2.ScheduleEvent(EVENT_PREFIGHT_5, 2s);
break;
case EVENT_PREFIGHT_5:
if (Creature* dalliah = instance->GetCreature(DATA_DALLIAH))
dalliah->AI()->Talk(SAY_DALLIAH_CONVO_3);
- events2.ScheduleEvent(EVENT_PREFIGHT_6, 3000);
+ events2.ScheduleEvent(EVENT_PREFIGHT_6, 3s);
break;
case EVENT_PREFIGHT_6:
Talk(SAY_SOCCOTHRATES_CONVO_4);
- events2.ScheduleEvent(EVENT_PREFIGHT_7, 2000);
+ events2.ScheduleEvent(EVENT_PREFIGHT_7, 2s);
break;
case EVENT_PREFIGHT_7:
if (Creature* dalliah = instance->GetCreature(DATA_DALLIAH))
dalliah->GetMotionMaster()->MovePoint(0, 118.6048f, 96.84852f, 22.44115f);
- events2.ScheduleEvent(EVENT_PREFIGHT_8, 4000);
+ events2.ScheduleEvent(EVENT_PREFIGHT_8, 4s);
break;
case EVENT_PREFIGHT_8:
me->GetMotionMaster()->MovePoint(0, 122.1035f, 192.7203f, 22.44115f);
- events2.ScheduleEvent(EVENT_PREFIGHT_9, 4000);
+ events2.ScheduleEvent(EVENT_PREFIGHT_9, 4s);
break;
case EVENT_PREFIGHT_9:
if (Creature* dalliah = instance->GetCreature(DATA_DALLIAH))
diff --git a/src/server/scripts/Outland/TempestKeep/arcatraz/boss_zereketh_the_unbound.cpp b/src/server/scripts/Outland/TempestKeep/arcatraz/boss_zereketh_the_unbound.cpp
index 0137990ae3..fd9a478c02 100644
--- a/src/server/scripts/Outland/TempestKeep/arcatraz/boss_zereketh_the_unbound.cpp
+++ b/src/server/scripts/Outland/TempestKeep/arcatraz/boss_zereketh_the_unbound.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/scripts/Outland/TempestKeep/arcatraz/instance_arcatraz.cpp b/src/server/scripts/Outland/TempestKeep/arcatraz/instance_arcatraz.cpp
index 951eaaf128..2e2e420f7a 100644
--- a/src/server/scripts/Outland/TempestKeep/arcatraz/instance_arcatraz.cpp
+++ b/src/server/scripts/Outland/TempestKeep/arcatraz/instance_arcatraz.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/scripts/Outland/TempestKeep/botanica/boss_commander_sarannis.cpp b/src/server/scripts/Outland/TempestKeep/botanica/boss_commander_sarannis.cpp
index 6c2e41b089..4cfd1ef6c8 100644
--- a/src/server/scripts/Outland/TempestKeep/botanica/boss_commander_sarannis.cpp
+++ b/src/server/scripts/Outland/TempestKeep/botanica/boss_commander_sarannis.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/scripts/Outland/TempestKeep/botanica/boss_high_botanist_freywinn.cpp b/src/server/scripts/Outland/TempestKeep/botanica/boss_high_botanist_freywinn.cpp
index e580632255..d20ce01f23 100644
--- a/src/server/scripts/Outland/TempestKeep/botanica/boss_high_botanist_freywinn.cpp
+++ b/src/server/scripts/Outland/TempestKeep/botanica/boss_high_botanist_freywinn.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/scripts/Outland/TempestKeep/botanica/boss_laj.cpp b/src/server/scripts/Outland/TempestKeep/botanica/boss_laj.cpp
index 4864540216..87ff2954b0 100644
--- a/src/server/scripts/Outland/TempestKeep/botanica/boss_laj.cpp
+++ b/src/server/scripts/Outland/TempestKeep/botanica/boss_laj.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/scripts/Outland/TempestKeep/botanica/boss_thorngrin_the_tender.cpp b/src/server/scripts/Outland/TempestKeep/botanica/boss_thorngrin_the_tender.cpp
index 2115ae05d0..d411ed7c03 100644
--- a/src/server/scripts/Outland/TempestKeep/botanica/boss_thorngrin_the_tender.cpp
+++ b/src/server/scripts/Outland/TempestKeep/botanica/boss_thorngrin_the_tender.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/scripts/Outland/TempestKeep/botanica/boss_warp_splinter.cpp b/src/server/scripts/Outland/TempestKeep/botanica/boss_warp_splinter.cpp
index 052f6f932c..6ca8f39727 100644
--- a/src/server/scripts/Outland/TempestKeep/botanica/boss_warp_splinter.cpp
+++ b/src/server/scripts/Outland/TempestKeep/botanica/boss_warp_splinter.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/scripts/Outland/TempestKeep/botanica/instance_the_botanica.cpp b/src/server/scripts/Outland/TempestKeep/botanica/instance_the_botanica.cpp
index 9962950cd2..ffa90492a5 100644
--- a/src/server/scripts/Outland/TempestKeep/botanica/instance_the_botanica.cpp
+++ b/src/server/scripts/Outland/TempestKeep/botanica/instance_the_botanica.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/scripts/Outland/TempestKeep/botanica/the_botanica.h b/src/server/scripts/Outland/TempestKeep/botanica/the_botanica.h
index af44f970de..c9bb826a85 100644
--- a/src/server/scripts/Outland/TempestKeep/botanica/the_botanica.h
+++ b/src/server/scripts/Outland/TempestKeep/botanica/the_botanica.h
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/scripts/Outland/boss_doomlord_kazzak.cpp b/src/server/scripts/Outland/boss_doomlord_kazzak.cpp
index 5129a51e7e..5c48392f43 100644
--- a/src/server/scripts/Outland/boss_doomlord_kazzak.cpp
+++ b/src/server/scripts/Outland/boss_doomlord_kazzak.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/scripts/Outland/boss_doomwalker.cpp b/src/server/scripts/Outland/boss_doomwalker.cpp
index 4189244330..f536d26852 100644
--- a/src/server/scripts/Outland/boss_doomwalker.cpp
+++ b/src/server/scripts/Outland/boss_doomwalker.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/scripts/Outland/outland_script_loader.cpp b/src/server/scripts/Outland/outland_script_loader.cpp
index 5b4cefba93..0072c10545 100644
--- a/src/server/scripts/Outland/outland_script_loader.cpp
+++ b/src/server/scripts/Outland/outland_script_loader.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/scripts/Outland/zone_blades_edge_mountains.cpp b/src/server/scripts/Outland/zone_blades_edge_mountains.cpp
index 16e37a698d..18dd9891fe 100644
--- a/src/server/scripts/Outland/zone_blades_edge_mountains.cpp
+++ b/src/server/scripts/Outland/zone_blades_edge_mountains.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
@@ -98,7 +98,7 @@ public:
CannonGUID = caster->GetGUID();
PartyTime = true;
- events.ScheduleEvent(EVENT_PARTY_TIMER, 3000);
+ events.ScheduleEvent(EVENT_PARTY_TIMER, 3s);
}
if (count >= 3)
@@ -116,7 +116,7 @@ public:
if (Creature* bunny = GetClosestCreatureWithEntry(me, NPC_EXPLOSION_BUNNY, 200.0f))
bunny->CastSpell(nullptr, SPELL_EXPLOSION, TRIGGERED_NONE);
if (Creature* cannon = ObjectAccessor::GetCreature(*me, CannonGUID))
- cannon->DespawnOrUnsummon(5000);
+ cannon->DespawnOrUnsummon(5s);
}
me->SummonGameObject(GO_BIG_FIRE, me->GetPositionX(), me->GetPositionY(), me->GetPositionZ(), 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 60);
@@ -160,7 +160,7 @@ public:
me->SummonCreature(NPC_HOUND, 0, 0, 0, 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 10000);
else
me->SummonCreature(NPC_FEL_IMP, 0, 0, 0, 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 10000);
- events.ScheduleEvent(EVENT_PARTY_TIMER, 3000);
+ events.ScheduleEvent(EVENT_PARTY_TIMER, 3s);
break;
}
}
@@ -460,7 +460,7 @@ public:
Talk(SAY_SPELL_INFLUENCE, who);
/// @todo Move the below to updateAI and run if this statement == true
DoCast(who, SPELL_DISPELLING_ANALYSIS, true);
- bird->DespawnOrUnsummon(2000);
+ bird->DespawnOrUnsummon(2s);
}
}
}
@@ -577,18 +577,18 @@ public:
if (!CheckPlayer())
ResetNode();
else
- _events.ScheduleEvent(EVENT_SIMON_PERIODIC_PLAYER_CHECK, 2000);
+ _events.ScheduleEvent(EVENT_SIMON_PERIODIC_PLAYER_CHECK, 2s);
break;
case EVENT_SIMON_SETUP_PRE_GAME:
SetUpPreGame();
_events.CancelEvent(EVENT_SIMON_GAME_TICK);
- _events.ScheduleEvent(EVENT_SIMON_PLAY_SEQUENCE, 1000);
+ _events.ScheduleEvent(EVENT_SIMON_PLAY_SEQUENCE, 1s);
break;
case EVENT_SIMON_PLAY_SEQUENCE:
if (!playableSequence.empty())
{
PlayNextColor();
- _events.ScheduleEvent(EVENT_SIMON_PLAY_SEQUENCE, 1500);
+ _events.ScheduleEvent(EVENT_SIMON_PLAY_SEQUENCE, 1500ms);
}
else
{
@@ -597,16 +597,16 @@ public:
playerSequence.clear();
PrepareClusters();
gameTicks = 0;
- _events.ScheduleEvent(EVENT_SIMON_GAME_TICK, 3000);
+ _events.ScheduleEvent(EVENT_SIMON_GAME_TICK, 3s);
}
break;
case EVENT_SIMON_GAME_TICK:
DoCast(SPELL_AUDIBLE_GAME_TICK);
if (gameTicks > gameLevel)
- _events.ScheduleEvent(EVENT_SIMON_TOO_LONG_TIME, 500);
+ _events.ScheduleEvent(EVENT_SIMON_TOO_LONG_TIME, 500ms);
else
- _events.ScheduleEvent(EVENT_SIMON_GAME_TICK, 3000);
+ _events.ScheduleEvent(EVENT_SIMON_GAME_TICK, 3s);
gameTicks++;
break;
case EVENT_SIMON_RESET_CLUSTERS:
@@ -633,7 +633,7 @@ public:
if (gameLevel == 10)
ResetNode();
else
- _events.ScheduleEvent(EVENT_SIMON_SETUP_PRE_GAME, 1000);
+ _events.ScheduleEvent(EVENT_SIMON_SETUP_PRE_GAME, 1s);
break;
case ACTION_SIMON_CORRECT_FULL_SEQUENCE:
gameLevel++;
@@ -665,12 +665,12 @@ public:
PlayColor(pressedColor);
playerSequence.push_back(pressedColor);
- _events.ScheduleEvent(EVENT_SIMON_RESET_CLUSTERS, 500);
+ _events.ScheduleEvent(EVENT_SIMON_RESET_CLUSTERS, 500ms);
CheckPlayerSequence();
}
// Used for getting involved player guid. Parameter id is used for defining if is a large(Monument) or small(Relic) node
- void SetGUID(ObjectGuid guid, int32 id) override
+ void SetGUID(ObjectGuid const& guid, int32 id) override
{
me->SetCanFly(true);
@@ -752,8 +752,8 @@ public:
}
_events.Reset();
- _events.ScheduleEvent(EVENT_SIMON_ROUND_FINISHED, 1000);
- _events.ScheduleEvent(EVENT_SIMON_PERIODIC_PLAYER_CHECK, 2000);
+ _events.ScheduleEvent(EVENT_SIMON_ROUND_FINISHED, 1s);
+ _events.ScheduleEvent(EVENT_SIMON_PERIODIC_PLAYER_CHECK, 2s);
if (GameObject* relic = me->FindNearestGameObject(large ? GO_APEXIS_MONUMENT : GO_APEXIS_RELIC, searchDistance))
relic->SetGameObjectFlag(GO_FLAG_NOT_SELECTABLE);
@@ -775,7 +775,7 @@ public:
if (GameObject* relic = me->FindNearestGameObject(large ? GO_APEXIS_MONUMENT : GO_APEXIS_RELIC, searchDistance))
relic->RemoveGameObjectFlag(GO_FLAG_NOT_SELECTABLE);
- me->DespawnOrUnsummon(1000);
+ me->DespawnOrUnsummon(1s);
}
/*
@@ -1086,7 +1086,7 @@ public:
// Spell 37392 does not exist in dbc, manually spawning
me->SummonCreature(NPC_OSCILLATING_FREQUENCY_SCANNER_TOP_BUNNY, me->GetPositionX(), me->GetPositionY(), me->GetPositionZ(), me->GetOrientation(), TEMPSUMMON_TIMED_OR_DEAD_DESPAWN, 50000);
me->SummonGameObject(GO_OSCILLATING_FREQUENCY_SCANNER, me->GetPositionX(), me->GetPositionY(), me->GetPositionZ(), me->GetOrientation(), 0, 0, 0, 0, 50);
- me->DespawnOrUnsummon(50000);
+ me->DespawnOrUnsummon(50s);
}
timer = 500;
diff --git a/src/server/scripts/Outland/zone_hellfire_peninsula.cpp b/src/server/scripts/Outland/zone_hellfire_peninsula.cpp
index 66a12acc65..f281cae2ca 100644
--- a/src/server/scripts/Outland/zone_hellfire_peninsula.cpp
+++ b/src/server/scripts/Outland/zone_hellfire_peninsula.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
@@ -171,7 +171,10 @@ public:
npc_ancestral_wolfAI(Creature* creature) : npc_escortAI(creature)
{
if (creature->GetOwner() && creature->GetOwner()->IsPlayer())
- Start(false, false, creature->GetOwner()->GetGUID());
+ {
+ creature->SetWalk(true);
+ Start(false, creature->GetOwner()->GetGUID());
+ }
creature->SetSpeed(MOVE_WALK, 1.5f);
DoCast(SPELL_GUIDED_BY_THE_SPIRITS);
Reset();
@@ -209,7 +212,7 @@ public:
{
ryga->SetWalk(true);
ryga->SetSpeed(MOVE_WALK, 1.0f);
- ryga->GetMotionMaster()->MovePoint(0, 515.877991f, 3885.67627f, 190.470535f, true);
+ ryga->GetMotionMaster()->MovePoint(0, 515.877991f, 3885.67627f, 190.470535f, FORCED_MOVEMENT_NONE, 0.f, true);
Reset();
}
}
@@ -234,7 +237,7 @@ public:
ryga->SetStandState(UNIT_STAND_STATE_STAND);
ryga->SetWalk(true);
ryga->SetSpeed(MOVE_WALK, 1.0f);
- ryga->GetMotionMaster()->MovePoint(0, 504.59201f, 3882.12988f, 192.156006f, true);
+ ryga->GetMotionMaster()->MovePoint(0, 504.59201f, 3882.12988f, 192.156006f, FORCED_MOVEMENT_NONE, 0.f, true);
Reset();
}
}
@@ -312,7 +315,8 @@ public:
{
me->SetReactState(REACT_AGGRESSIVE);
me->SetFaction(FACTION_ESCORTEE_H_PASSIVE);
- npc_escortAI::Start(true, false, 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 d0c6df3803..609391185a 100644
--- a/src/server/scripts/Outland/zone_nagrand.cpp
+++ b/src/server/scripts/Outland/zone_nagrand.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
@@ -65,7 +65,8 @@ public:
{
creature->SetStandState(UNIT_STAND_STATE_STAND);
creature->SetFaction(FACTION_ESCORTEE_H_NEUTRAL_ACTIVE);
- EscortAI->Start(true, false, player->GetGUID(), quest);
+ creature->SetWalk(true);
+ EscortAI->Start(true, player->GetGUID(), quest);
creature->AI()->Talk(SAY_MAG_START);
creature->SummonCreature(NPC_MURK_RAIDER, m_afAmbushA[0] + 2.5f, m_afAmbushA[1] - 2.5f, m_afAmbushA[2], 0.0f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 25000);
@@ -133,7 +134,7 @@ public:
if (Player* player = GetPlayerForEscort())
player->GroupEventHappens(QUEST_TOTEM_KARDASH_H, me);
- SetRun();
+ me->SetWalk(false);
break;
}
}
@@ -303,10 +304,11 @@ public:
uint32 HealTimer;
uint32 FrostShockTimer;
- void SetGUID(ObjectGuid guid, int32 /*questId*/) override
+ void SetGUID(ObjectGuid const& guid, int32 /*questId*/) override
{
me->SetStandState(UNIT_STAND_STATE_STAND);
- Start(true, false, guid);
+ me->SetWalk(true);
+ Start(true, guid);
Talk(SAY_KUR_START);
me->SummonCreature(NPC_KUR_MURK_RAIDER, kurenaiAmbushA[0] + 2.5f, kurenaiAmbushA[1] - 2.5f, kurenaiAmbushA[2], 0.0f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 50000);
@@ -361,7 +363,7 @@ public:
if (Player* player = GetPlayerForEscort())
player->GroupEventHappens(QUEST_TOTEM_KARDASH_A, me);
- SetRun();
+ me->SetWalk(false);
break;
}
}
@@ -464,7 +466,7 @@ public:
player->KilledMonsterCredit(NPC_MAGHAR_PRISONER);
prisoner->AI()->Talk(SAY_FREE, player);
- prisoner->DespawnOrUnsummon(6000);
+ prisoner->DespawnOrUnsummon(6s);
}
return true;
diff --git a/src/server/scripts/Outland/zone_netherstorm.cpp b/src/server/scripts/Outland/zone_netherstorm.cpp
index ceb94b60e5..5136e89dda 100644
--- a/src/server/scripts/Outland/zone_netherstorm.cpp
+++ b/src/server/scripts/Outland/zone_netherstorm.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
@@ -99,11 +99,11 @@ public:
npc_escortAI::MoveInLineOfSight(who);
}
- void SetGUID(ObjectGuid playerGUID, int32 type) override
+ void SetGUID(ObjectGuid const& playerGUID, int32 type) override
{
if (type == DATA_START_ENCOUNTER)
{
- Start(true, true, playerGUID);
+ Start(true, playerGUID);
SetEscortPaused(true);
started = true;
@@ -126,7 +126,7 @@ public:
me->SetFaction(FACTION_ESCORTEE_N_NEUTRAL_ACTIVE);
Talk(SAY_SAEED_0);
- events.ScheduleEvent(EVENT_START_WALK, 3000);
+ events.ScheduleEvent(EVENT_START_WALK, 3s);
}
else if (type == DATA_START_FIGHT)
{
@@ -178,7 +178,7 @@ public:
SetEscortPaused(true);
break;
case 18:
- events.ScheduleEvent(EVENT_START_FIGHT1, 0);
+ events.ScheduleEvent(EVENT_START_FIGHT1, 0ms);
SetEscortPaused(true);
break;
case 19:
@@ -227,7 +227,7 @@ public:
break;
case EVENT_START_FIGHT1:
Talk(SAY_SAEED_3);
- events.ScheduleEvent(EVENT_START_FIGHT2, 3000);
+ events.ScheduleEvent(EVENT_START_FIGHT2, 3s);
break;
case EVENT_START_FIGHT2:
if (Creature* dimensius = me->FindNearestCreature(NPC_DIMENSIUS, 50.0f))
@@ -605,7 +605,8 @@ public:
creature->SetFaction(FACTION_ESCORTEE_N_NEUTRAL_PASSIVE);
creature->RemoveUnitFlag(UNIT_FLAG_NON_ATTACKABLE);
creature->AI()->Talk(SAY_BESSY_0);
- CAST_AI(npc_escortAI, (creature->AI()))->Start(true, false, player->GetGUID());
+ creature->SetWalk(true);
+ CAST_AI(npc_escortAI, (creature->AI()))->Start(true, player->GetGUID());
}
return true;
}
@@ -771,7 +772,8 @@ 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);
- pEscortAI->Start(false, false, player->GetGUID());
+ creature->SetWalk(true);
+ pEscortAI->Start(false, player->GetGUID());
}
}
return true;
diff --git a/src/server/scripts/Outland/zone_shadowmoon_valley.cpp b/src/server/scripts/Outland/zone_shadowmoon_valley.cpp
index 3e78e17db5..e53f34e320 100644
--- a/src/server/scripts/Outland/zone_shadowmoon_valley.cpp
+++ b/src/server/scripts/Outland/zone_shadowmoon_valley.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
@@ -133,7 +133,7 @@ public:
{
ground = me->GetMapHeight(me->GetPositionX(), me->GetPositionY(), me->GetPositionZ());
SummonInfernal();
- events.ScheduleEvent(EVENT_CAST_SUMMON_INFERNAL, urand(1000, 3000));
+ events.ScheduleEvent(EVENT_CAST_SUMMON_INFERNAL, 1s, 3s);
}
void SetData(uint32 id, uint32 data) override
@@ -161,7 +161,7 @@ public:
if (Unit* infernal = ObjectAccessor::GetUnit(*me, infernalGUID))
if (infernal->GetDisplayId() == MODEL_INVISIBLE)
me->CastSpell(infernal, SPELL_SUMMON_INFERNAL, true);
- events.ScheduleEvent(EVENT_CAST_SUMMON_INFERNAL, 12000);
+ events.ScheduleEvent(EVENT_CAST_SUMMON_INFERNAL, 12s);
break;
}
default:
@@ -566,8 +566,8 @@ public:
void JustEngagedWith(Unit* /*who*/) override
{
- events.ScheduleEvent(EVENT_KICK, urand(5000, 10000));
- events.ScheduleEvent(EVENT_SUNDER, urand(5000, 10000));
+ events.ScheduleEvent(EVENT_KICK, 5s, 10s);
+ events.ScheduleEvent(EVENT_SUNDER, 5s, 10s);
}
void SpellHit(Unit* caster, SpellInfo const* spell) override
@@ -582,7 +582,7 @@ public:
Tapped = true;
caster->GetClosePoint(x, y, z, me->GetObjectSize());
Talk(SAY_1);
- events.ScheduleEvent(EVENT_WALK_TO_MUTTON, 0);
+ events.ScheduleEvent(EVENT_WALK_TO_MUTTON, 0ms);
}
}
@@ -593,7 +593,7 @@ public:
if (GameObject* food = me->FindNearestGameObject(DELICIOUS_MUTTON, 5.0f))
me->SetFacingToObject(food);
me->HandleEmoteCommand(EMOTE_ONESHOT_EAT);
- events.ScheduleEvent(EVENT_POISONED, 5000);
+ events.ScheduleEvent(EVENT_POISONED, 5s);
}
}
@@ -617,7 +617,7 @@ public:
{
case EVENT_WALK_TO_MUTTON:
me->SetWalk(true);
- me->GetMotionMaster()->MovePoint(1, x, y, z, true);
+ me->GetMotionMaster()->MovePoint(1, x, y, z);
me->SetUInt32Value(UNIT_NPC_EMOTESTATE, EMOTE_STATE_NONE);
me->HandleEmoteCommand(EMOTE_ONESHOT_CHEER);
break;
@@ -628,7 +628,7 @@ public:
Talk(SAY_POISONED_1);
CreditPlayer();
me->CastSpell(me, SPELL_VOMIT);
- events.ScheduleEvent(EVENT_KILL, 5000);
+ events.ScheduleEvent(EVENT_KILL, 5s);
break;
case EVENT_KILL:
Unit::DealDamage(me, me, me->GetHealth(), nullptr, DIRECT_DAMAGE, SPELL_SCHOOL_MASK_NORMAL, nullptr, false);
@@ -642,11 +642,11 @@ public:
case EVENT_KICK:
if (me->GetVictim()->HasUnitState(SPELL_STATE_CASTING))
DoCastVictim(SPELL_KICK);
- events.RepeatEvent(urand(5000, 10000));
+ events.Repeat(5s, 10s);
break;
case EVENT_SUNDER:
DoCastVictim(SPELL_SUNDER);
- events.RepeatEvent(urand(5000, 10000));
+ events.Repeat(5s, 10s);
break;
}
@@ -1860,22 +1860,22 @@ struct dragonmaw_race_npc : public ScriptedAI
switch (me->GetEntry())
{
case NPC_MUCKJAW:
- me->GetMotionMaster()->MovePath(PATH_MUCKJAW, false);
+ me->GetMotionMaster()->MoveWaypoint(PATH_MUCKJAW, false);
break;
case NPC_TROPE:
- me->GetMotionMaster()->MovePath(PATH_TROPE, false);
+ me->GetMotionMaster()->MoveWaypoint(PATH_TROPE, false);
break;
case NPC_CORLOK:
- me->GetMotionMaster()->MovePath(PATH_CORLOK, false);
+ me->GetMotionMaster()->MoveWaypoint(PATH_CORLOK, false);
break;
case NPC_ICHMAN:
- me->GetMotionMaster()->MovePath(PATH_ICHMAN, false);
+ me->GetMotionMaster()->MoveWaypoint(PATH_ICHMAN, false);
break;
case NPC_MULVERICK:
- me->GetMotionMaster()->MovePath(PATH_MULVERICK, false);
+ me->GetMotionMaster()->MoveWaypoint(PATH_MULVERICK, false);
break;
case NPC_SKYSHATTER:
- me->GetMotionMaster()->MovePath(PATH_SKYSHATTER, false);
+ me->GetMotionMaster()->MoveWaypoint(PATH_SKYSHATTER, false);
break;
default:
break;
diff --git a/src/server/scripts/Outland/zone_shattrath_city.cpp b/src/server/scripts/Outland/zone_shattrath_city.cpp
index 29382d6ae4..0cd938e3b1 100644
--- a/src/server/scripts/Outland/zone_shattrath_city.cpp
+++ b/src/server/scripts/Outland/zone_shattrath_city.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
@@ -246,7 +246,10 @@ public:
Player* player = summoner->ToPlayer();
if (player && player->GetQuestStatus(10211) == QUEST_STATUS_INCOMPLETE)
- Start(false, false, summoner->GetGUID());
+ {
+ 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 ffbed2ade5..5ffc172d1e 100644
--- a/src/server/scripts/Outland/zone_terokkar_forest.cpp
+++ b/src/server/scripts/Outland/zone_terokkar_forest.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
@@ -433,9 +433,9 @@ public:
void JustEngagedWith(Unit*) override
{
events.Reset();
- events.ScheduleEvent(EVENT_SPELL_WRATH, 0);
- events.ScheduleEvent(EVENT_SPELL_MOONFIRE, 4000);
- events.ScheduleEvent(EVENT_SPELL_ENTANGLING_ROOTS, 10000);
+ events.ScheduleEvent(EVENT_SPELL_WRATH, 0ms);
+ events.ScheduleEvent(EVENT_SPELL_MOONFIRE, 4s);
+ events.ScheduleEvent(EVENT_SPELL_ENTANGLING_ROOTS, 10s);
}
void UpdateEscortAI(uint32 diff) override
@@ -451,15 +451,15 @@ public:
{
case EVENT_SPELL_WRATH:
me->CastSpell(me->GetVictim(), SPELL_WRATH, false);
- events.ScheduleEvent(EVENT_SPELL_WRATH, 3000);
+ events.ScheduleEvent(EVENT_SPELL_WRATH, 3s);
break;
case EVENT_SPELL_MOONFIRE:
me->CastSpell(me->GetVictim(), SPELL_MOONFIRE, false);
- events.ScheduleEvent(EVENT_SPELL_MOONFIRE, 12000);
+ events.ScheduleEvent(EVENT_SPELL_MOONFIRE, 12s);
break;
case EVENT_SPELL_ENTANGLING_ROOTS:
me->CastSpell(me->GetVictim(), SPELL_ENTANGLING_ROOTS, false);
- events.ScheduleEvent(EVENT_SPELL_ENTANGLING_ROOTS, 20000);
+ events.ScheduleEvent(EVENT_SPELL_ENTANGLING_ROOTS, 20s);
break;
}
@@ -473,7 +473,8 @@ public:
{
if (quest->GetQuestId() == QUEST_EFTW_H || quest->GetQuestId() == QUEST_EFTW_A)
{
- CAST_AI(npc_escortAI, (creature->AI()))->Start(true, false, player->GetGUID());
+ creature->SetWalk(true);
+ CAST_AI(npc_escortAI, (creature->AI()))->Start(true, player->GetGUID());
creature->SetFaction(FACTION_ESCORTEE_N_NEUTRAL_ACTIVE);
}
return true;
diff --git a/src/server/scripts/Pet/pet_dk.cpp b/src/server/scripts/Pet/pet_dk.cpp
index 1a8a815408..e4b25ebf3b 100644
--- a/src/server/scripts/Pet/pet_dk.cpp
+++ b/src/server/scripts/Pet/pet_dk.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/scripts/Pet/pet_generic.cpp b/src/server/scripts/Pet/pet_generic.cpp
index 6e91d2a19a..725f28c6cb 100644
--- a/src/server/scripts/Pet/pet_generic.cpp
+++ b/src/server/scripts/Pet/pet_generic.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
@@ -49,7 +49,7 @@ struct npc_pet_gen_soul_trader_beacon : public ScriptedAI
npc_pet_gen_soul_trader_beacon(Creature* c) : ScriptedAI(c)
{
events.Reset();
- events.ScheduleEvent(EVENT_INITIAL_TALK, 0);
+ events.ScheduleEvent(EVENT_INITIAL_TALK, 0ms);
if (me->ToTempSummon())
if (Unit* owner = me->ToTempSummon()->GetOwner())
{
@@ -65,7 +65,7 @@ struct npc_pet_gen_soul_trader_beacon : public ScriptedAI
if (spellInfo->Id == SPELL_STEAL_ESSENCE_VISUAL && target == me)
{
Talk(1);
- events.ScheduleEvent(EVENT_ADD_TOKEN, 3000);
+ events.ScheduleEvent(EVENT_ADD_TOKEN, 3s);
me->CastSpell(me, SPELL_EMOTE_STATE_SWIM_RUN, true);
}
}
@@ -160,7 +160,7 @@ struct npc_pet_gen_argent_pony_bridle : public ScriptedAI
if (Unit* owner = me->GetCharmerOrOwner())
{
me->GetMotionMaster()->Clear(false);
- me->GetMotionMaster()->MoveFollow(owner, PET_FOLLOW_DIST, me->GetFollowAngle(), MOTION_SLOT_ACTIVE);
+ me->GetMotionMaster()->MoveFollow(owner, PET_FOLLOW_DIST, MINI_PET_FOLLOW_ANGLE, MOTION_SLOT_ACTIVE);
}
}
@@ -193,7 +193,7 @@ struct npc_pet_gen_argent_pony_bridle : public ScriptedAI
duration = cooldown;
aura = SPELL_AURA_POSTMAN_S + i;
_state = argentPonyService[TEAM_ALLIANCE][i];
- me->ToTempSummon()->UnSummon(duration);
+ me->ToTempSummon()->UnSummon(Milliseconds(duration));
break;
}
}
@@ -204,7 +204,7 @@ struct npc_pet_gen_argent_pony_bridle : public ScriptedAI
duration = cooldown * IN_MILLISECONDS;
aura = SPELL_AURA_BANK_G + i;
_state = argentPonyService[TEAM_HORDE][i];
- me->ToTempSummon()->UnSummon(duration);
+ me->ToTempSummon()->UnSummon(Milliseconds(duration));
break;
}
}
@@ -327,7 +327,7 @@ struct npc_pet_gen_argent_pony_bridle : public ScriptedAI
creature->CastSpell(creature, spellId, true);
player->AddSpellCooldown(spellId, 0, 3 * MINUTE * IN_MILLISECONDS);
player->AddSpellCooldown(player->GetTeamId(true) ? SPELL_AURA_TIRED_G : SPELL_AURA_TIRED_S, 0, 3 * MINUTE * IN_MILLISECONDS + 4 * HOUR * IN_MILLISECONDS);
- creature->DespawnOrUnsummon(3 * MINUTE * IN_MILLISECONDS);
+ creature->DespawnOrUnsummon(180s);
}
return true;
}
@@ -388,7 +388,7 @@ struct npc_pet_gen_target_following_bomb : public NullCreatureAI
if (me->GetDistance(target) < 3.0f)
{
me->CastSpell(me, bombSpellId, false);
- me->DespawnOrUnsummon(500);
+ me->DespawnOrUnsummon(500ms);
}
}
else if (!me->HasUnitState(UNIT_STATE_FOLLOW))
@@ -557,7 +557,7 @@ struct npc_pet_gen_imp_in_a_bottle : public NullCreatureAI
if (_talkTimer >= 5000)
{
_talkTimer = 0;
- me->DespawnOrUnsummon(1);
+ me->DespawnOrUnsummon(1ms);
if (!_hasParty)
Talk(0, ObjectAccessor::GetPlayer(*me, _ownerGUID));
else if (Player* player = ObjectAccessor::GetPlayer(*me, _ownerGUID))
@@ -567,9 +567,9 @@ struct npc_pet_gen_imp_in_a_bottle : public NullCreatureAI
for (GroupReference* itr = player->GetGroup()->GetFirstMember(); itr != nullptr && limit < 4; itr = itr->next(), ++limit)
if (Player* groupPlayer = itr->GetSource())
if (groupPlayer != player)
- groupPlayer->GetSession()->SendPacket(&_data);
+ groupPlayer->SendDirectMessage(&_data);
- player->GetSession()->SendPacket(&_data);
+ player->SendDirectMessage(&_data);
}
}
}
@@ -709,7 +709,7 @@ struct npc_pet_gen_toxic_wasteling : public PassiveAI
if (Unit* owner = me->GetCharmerOrOwner())
{
me->GetMotionMaster()->Clear(false);
- me->GetMotionMaster()->MoveFollow(owner, PET_FOLLOW_DIST, me->GetFollowAngle(), MOTION_SLOT_ACTIVE);
+ me->GetMotionMaster()->MoveFollow(owner, PET_FOLLOW_DIST, MINI_PET_FOLLOW_ANGLE, MOTION_SLOT_ACTIVE);
}
me->AddAura(71854, me); // Growth
checkTimer = 0;
diff --git a/src/server/scripts/Pet/pet_hunter.cpp b/src/server/scripts/Pet/pet_hunter.cpp
index 3f973ba59d..b82180e666 100644
--- a/src/server/scripts/Pet/pet_hunter.cpp
+++ b/src/server/scripts/Pet/pet_hunter.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
@@ -99,7 +99,7 @@ struct npc_pet_hunter_snake_trap : public ScriptedAI
uint32 health = uint32(107 * (me->GetLevel() - 40) * 0.025f);
me->SetCreateHealth(health);
- me->SetModifierValue(UNIT_MOD_HEALTH, BASE_VALUE, (float)health);
+ me->SetStatFlatModifier(UNIT_MOD_HEALTH, BASE_VALUE, (float)health);
me->SetMaxHealth(health);
//Add delta to make them not all hit the same time
diff --git a/src/server/scripts/Pet/pet_mage.cpp b/src/server/scripts/Pet/pet_mage.cpp
index 72ab586eca..54677e4722 100644
--- a/src/server/scripts/Pet/pet_mage.cpp
+++ b/src/server/scripts/Pet/pet_mage.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
@@ -62,10 +62,18 @@ struct npc_pet_mage_mirror_image : CasterAI
ObjectGuid _ebonGargoyleGUID;
uint32 checktarget;
uint32 dist = urand(1, 5);
+ bool _delayAttack;
void InitializeAI() override
{
CasterAI::InitializeAI();
+
+ _delayAttack = true;
+ me->m_Events.AddEventAtOffset([this]()
+ {
+ _delayAttack = false;
+ }, 1200ms);
+
Unit* owner = me->GetOwner();
if (!owner)
return;
@@ -130,7 +138,7 @@ struct npc_pet_mage_mirror_image : CasterAI
newAura->SetDuration(visAura->GetDuration());
}
- me->m_Events.AddEvent(new DeathEvent(*me), me->m_Events.CalculateTime(29500));
+ me->m_Events.AddEventAtOffset(new DeathEvent(*me), 29500ms);
}
// Do not reload Creature templates on evade mode enter - prevent visual lost
@@ -185,10 +193,11 @@ struct npc_pet_mage_mirror_image : CasterAI
void UpdateAI(uint32 diff) override
{
- events.Update(diff);
- if (events.GetTimer() < 1200)
+ if (_delayAttack)
return;
+ events.Update(diff);
+
if (!me->IsInCombat() || !me->GetVictim())
{
MySelectNextTarget();
@@ -212,7 +221,7 @@ struct npc_pet_mage_mirror_image : CasterAI
if (uint32 spellId = events.ExecuteEvent())
{
- events.RescheduleEvent(spellId, spellId == 59637 ? 6500 : 2500);
+ events.RescheduleEvent(spellId, spellId == 59637 ? 6500ms : 2500ms);
me->CastSpell(me->GetVictim(), spellId, false);
}
}
diff --git a/src/server/scripts/Pet/pet_priest.cpp b/src/server/scripts/Pet/pet_priest.cpp
index 4dd38d8fc7..e5945c6f15 100644
--- a/src/server/scripts/Pet/pet_priest.cpp
+++ b/src/server/scripts/Pet/pet_priest.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/scripts/Pet/pet_shaman.cpp b/src/server/scripts/Pet/pet_shaman.cpp
index d5266ea04e..d5272513c5 100644
--- a/src/server/scripts/Pet/pet_shaman.cpp
+++ b/src/server/scripts/Pet/pet_shaman.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
@@ -49,7 +49,7 @@ struct npc_pet_shaman_earth_elemental : public ScriptedAI
void JustEngagedWith(Unit*) override
{
_events.Reset();
- _events.ScheduleEvent(EVENT_SHAMAN_ANGEREDEARTH, 0);
+ _events.ScheduleEvent(EVENT_SHAMAN_ANGEREDEARTH, 0ms);
}
void InitializeAI() override { }
@@ -74,7 +74,7 @@ struct npc_pet_shaman_earth_elemental : public ScriptedAI
if (_events.ExecuteEvent() == EVENT_SHAMAN_ANGEREDEARTH)
{
DoCastVictim(SPELL_SHAMAN_ANGEREDEARTH);
- _events.ScheduleEvent(EVENT_SHAMAN_ANGEREDEARTH, urand(5000, 20000));
+ _events.ScheduleEvent(EVENT_SHAMAN_ANGEREDEARTH, 5s, 20s);
}
DoMeleeAttackIfReady();
@@ -94,9 +94,9 @@ struct npc_pet_shaman_fire_elemental : public ScriptedAI
void JustEngagedWith(Unit*) override
{
_events.Reset();
- _events.ScheduleEvent(EVENT_SHAMAN_FIRENOVA, urand(5000, 20000));
- _events.ScheduleEvent(EVENT_SHAMAN_FIREBLAST, urand(5000, 20000));
- //_events.ScheduleEvent(EVENT_SHAMAN_FIRESHIELD, 0);
+ _events.ScheduleEvent(EVENT_SHAMAN_FIRENOVA, 5s, 20s);
+ _events.ScheduleEvent(EVENT_SHAMAN_FIREBLAST, 5s, 20s);
+ //_events.ScheduleEvent(EVENT_SHAMAN_FIRESHIELD, 0ms);
me->RemoveAurasDueToSpell(SPELL_SHAMAN_FIRESHIELD);
me->CastSpell(me, SPELL_SHAMAN_FIRESHIELD, true);
@@ -124,11 +124,11 @@ struct npc_pet_shaman_fire_elemental : public ScriptedAI
{
case EVENT_SHAMAN_FIRENOVA:
me->CastSpell(me, SPELL_SHAMAN_FIRENOVA, false);
- _events.ScheduleEvent(EVENT_SHAMAN_FIRENOVA, urand(8000, 15000));
+ _events.ScheduleEvent(EVENT_SHAMAN_FIRENOVA, 8s, 15s);
break;
case EVENT_SHAMAN_FIREBLAST:
me->CastSpell(me->GetVictim(), SPELL_SHAMAN_FIREBLAST, false);
- _events.ScheduleEvent(EVENT_SHAMAN_FIREBLAST, urand(4000, 8000));
+ _events.ScheduleEvent(EVENT_SHAMAN_FIREBLAST, 4s, 8s);
break;
default:
break;
diff --git a/src/server/scripts/Pet/pets_script_loader.cpp b/src/server/scripts/Pet/pets_script_loader.cpp
index f863db0e4a..22a2ad07cb 100644
--- a/src/server/scripts/Pet/pets_script_loader.cpp
+++ b/src/server/scripts/Pet/pets_script_loader.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/scripts/ScriptLoader.cpp.in.cmake b/src/server/scripts/ScriptLoader.cpp.in.cmake
index a994096273..1f6096ccb5 100644
--- a/src/server/scripts/ScriptLoader.cpp.in.cmake
+++ b/src/server/scripts/ScriptLoader.cpp.in.cmake
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/scripts/ScriptLoader.h b/src/server/scripts/ScriptLoader.h
index 30f0c08967..dfeec4a240 100644
--- a/src/server/scripts/ScriptLoader.h
+++ b/src/server/scripts/ScriptLoader.h
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/scripts/ScriptPCH.h b/src/server/scripts/ScriptPCH.h
index 874925ecae..c612ccab34 100644
--- a/src/server/scripts/ScriptPCH.h
+++ b/src/server/scripts/ScriptPCH.h
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/scripts/Spells/spell_dk.cpp b/src/server/scripts/Spells/spell_dk.cpp
index b2d312a5a6..36c849bc7b 100644
--- a/src/server/scripts/Spells/spell_dk.cpp
+++ b/src/server/scripts/Spells/spell_dk.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
@@ -152,7 +152,7 @@ class spell_dk_raise_ally : public SpellScript
SpellCastResult CheckCast()
{
- Player* unitTarget = GetHitPlayer();
+ Unit* unitTarget = GetExplTargetUnit();
if (!unitTarget)
return SPELL_FAILED_BAD_TARGETS;
@@ -174,8 +174,8 @@ class spell_dk_raise_ally : public SpellScript
if (pInfo) // exist in DB
{
ghoul->SetCreateHealth(pInfo->health);
- ghoul->SetModifierValue(UNIT_MOD_HEALTH, BASE_VALUE, pInfo->health);
- ghoul->SetModifierValue(UNIT_MOD_ARMOR, BASE_VALUE, float(pInfo->armor));
+ ghoul->SetStatFlatModifier(UNIT_MOD_HEALTH, BASE_VALUE, pInfo->health);
+ ghoul->SetStatFlatModifier(UNIT_MOD_ARMOR, BASE_VALUE, float(pInfo->armor));
for (uint8 stat = 0; stat < MAX_STATS; ++stat)
ghoul->SetCreateStat(Stats(stat), float(pInfo->stats[stat]));
}
@@ -194,9 +194,9 @@ class spell_dk_raise_ally : public SpellScript
// DK Ghoul haste refresh
float val = (GetCaster()->m_modAttackSpeedPct[BASE_ATTACK] - 1.0f) * 100.0f;
+ val = 2000.0f * (100.0f + val) / 100.0f;
ghoul->m_modAttackSpeedPct[BASE_ATTACK] = GetCaster()->m_modAttackSpeedPct[BASE_ATTACK];
- ghoul->SetFloatValue(UNIT_FIELD_BASEATTACKTIME, 2000.0f);
- ghoul->ApplyPercentModFloatValue(UNIT_FIELD_BASEATTACKTIME, val, true); // we want to reduce attack time
+ ghoul->SetFloatValue(UNIT_FIELD_BASEATTACKTIME, val);
// Strength + Stamina
for (uint8 i = STAT_STRENGTH; i <= STAT_STAMINA; ++i)
@@ -223,20 +223,20 @@ class spell_dk_raise_ally : public SpellScript
value = float(GetCaster()->GetStat(stat)) * mod;
value = ghoul->GetTotalStatValue(stat, value);
ghoul->SetStat(stat, int32(value));
- ghoul->ApplyStatBuffMod(stat, value, true);
+ ghoul->UpdateStatBuffMod(stat);
}
// Attack Power
- ghoul->SetModifierValue(UNIT_MOD_ATTACK_POWER, BASE_VALUE, 589 + ghoul->GetStat(STAT_STRENGTH) + ghoul->GetStat(STAT_AGILITY));
- ghoul->SetInt32Value(UNIT_FIELD_ATTACK_POWER, (int32)ghoul->GetModifierValue(UNIT_MOD_ATTACK_POWER, BASE_VALUE) * ghoul->GetModifierValue(UNIT_MOD_ATTACK_POWER, BASE_PCT));
- ghoul->SetInt32Value(UNIT_FIELD_ATTACK_POWER_MODS, (int32)ghoul->GetModifierValue(UNIT_MOD_ATTACK_POWER, TOTAL_VALUE));
- ghoul->SetFloatValue(UNIT_FIELD_ATTACK_POWER_MULTIPLIER, ghoul->GetModifierValue(UNIT_MOD_ATTACK_POWER, TOTAL_PCT) - 1.0f);
+ ghoul->SetStatFlatModifier(UNIT_MOD_ATTACK_POWER, BASE_VALUE, 589 + ghoul->GetStat(STAT_STRENGTH) + ghoul->GetStat(STAT_AGILITY));
+ ghoul->SetInt32Value(UNIT_FIELD_ATTACK_POWER, (int32)ghoul->GetFlatModifierValue(UNIT_MOD_ATTACK_POWER, BASE_VALUE) * ghoul->GetPctModifierValue(UNIT_MOD_ATTACK_POWER, BASE_PCT));
+ ghoul->SetInt32Value(UNIT_FIELD_ATTACK_POWER_MODS, (int32)ghoul->GetFlatModifierValue(UNIT_MOD_ATTACK_POWER, TOTAL_VALUE));
+ ghoul->SetFloatValue(UNIT_FIELD_ATTACK_POWER_MULTIPLIER, ghoul->GetPctModifierValue(UNIT_MOD_ATTACK_POWER, TOTAL_PCT) - 1.0f);
// Health
- ghoul->SetModifierValue(UNIT_MOD_HEALTH, TOTAL_VALUE, (ghoul->GetStat(STAT_STAMINA) - ghoul->GetCreateStat(STAT_STAMINA)) * 10.0f);
+ ghoul->SetStatFlatModifier(UNIT_MOD_HEALTH, TOTAL_VALUE, (ghoul->GetStat(STAT_STAMINA) - ghoul->GetCreateStat(STAT_STAMINA)) * 10.0f);
// Power Energy
- ghoul->SetModifierValue(UnitMods(UNIT_MOD_POWER_START + static_cast<uint8>(POWER_ENERGY)), BASE_VALUE, ghoul->GetCreatePowers(POWER_ENERGY));
+ ghoul->SetStatFlatModifier(UnitMods(UNIT_MOD_POWER_START + static_cast<uint8>(POWER_ENERGY)), BASE_VALUE, ghoul->GetCreatePowers(POWER_ENERGY));
ghoul->UpdateAllStats();
ghoul->SetFullHealth();
diff --git a/src/server/scripts/Spells/spell_druid.cpp b/src/server/scripts/Spells/spell_druid.cpp
index c388af6344..85a12610da 100644
--- a/src/server/scripts/Spells/spell_druid.cpp
+++ b/src/server/scripts/Spells/spell_druid.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
@@ -443,15 +443,16 @@ class spell_dru_enrage : public AuraScript
void RecalculateBaseArmor()
{
+ // Recalculate modifies the list while we're iterating through it, so let's copy it instead
Unit::AuraEffectList const& auras = GetTarget()->GetAuraEffectsByType(SPELL_AURA_MOD_BASE_RESISTANCE_PCT);
- for (Unit::AuraEffectList::const_iterator i = auras.begin(); i != auras.end(); ++i)
+ std::vector<AuraEffect*> aurEffs(auras.begin(), auras.end());
+
+ for (AuraEffect* aurEff : aurEffs)
{
- SpellInfo const* spellInfo = (*i)->GetSpellInfo();
+ SpellInfo const* spellInfo = aurEff->GetSpellInfo();
// Dire- / Bear Form (Passive)
if (spellInfo->SpellFamilyName == SPELLFAMILY_DRUID && spellInfo->SpellFamilyFlags.HasFlag(0x0, 0x0, 0x2))
- {
- (*i)->RecalculateAmount();
- }
+ aurEff->RecalculateAmount();
}
}
diff --git a/src/server/scripts/Spells/spell_generic.cpp b/src/server/scripts/Spells/spell_generic.cpp
index 5b1d646acc..38f669693f 100644
--- a/src/server/scripts/Spells/spell_generic.cpp
+++ b/src/server/scripts/Spells/spell_generic.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
@@ -1970,7 +1970,7 @@ class spell_pvp_trinket_wotf_shared_cd : public SpellScript
{
WorldPacket data;
player->BuildCooldownPacket(data, SPELL_COOLDOWN_FLAG_INCLUDE_GCD, 7744, GetSpellInfo()->CategoryRecoveryTime); // Will of the forsaken
- player->GetSession()->SendPacket(&data);
+ player->SendDirectMessage(&data);
}
else
{
@@ -1983,11 +1983,11 @@ class spell_pvp_trinket_wotf_shared_cd : public SpellScript
data << uint16(GetSpellInfo()->GetCategory()); // spell category
data << uint32(0);
data << uint32(GetSpellInfo()->CategoryRecoveryTime);
- player->GetSession()->SendPacket(&data);
+ player->SendDirectMessage(&data);
WorldPacket data2;
player->BuildCooldownPacket(data2, SPELL_COOLDOWN_FLAG_INCLUDE_GCD, SPELL_PVP_TRINKET, GetSpellInfo()->CategoryRecoveryTime); // PvP Trinket spell
- player->GetSession()->SendPacket(&data2);
+ player->SendDirectMessage(&data2);
}
}
}
@@ -2019,15 +2019,16 @@ class spell_gen_animal_blood : public AuraScript
{
// Remove all auras with spell id 46221, except the one currently being applied
while (Aura* aur = GetUnitOwner()->GetOwnedAura(SPELL_ANIMAL_BLOOD, ObjectGuid::Empty, ObjectGuid::Empty, 0, GetAura()))
- GetUnitOwner()->RemoveOwnedAura(aur);
+ GetUnitOwner()->RemoveOwnedAura(aur, AURA_REMOVE_BY_EXPIRE);
}
void OnRemove(AuraEffect const* /*aurEff*/, AuraEffectHandleModes /*mode*/)
{
+ if (GetTargetApplication()->GetRemoveMode() == AURA_REMOVE_BY_EXPIRE)
+ return;
+
if (Unit* owner = GetUnitOwner())
- {
owner->CastSpell(owner, SPELL_SPAWN_BLOOD_POOL, true);
- }
}
void Register() override
@@ -2045,7 +2046,7 @@ class spell_spawn_blood_pool : public SpellScript
void SetDest(SpellDestination &dest)
{
Unit* caster = GetCaster();
- LiquidData liquidStatus = caster->GetMap()->GetLiquidData(caster->GetPhaseMask(), caster->GetPositionX(), caster->GetPositionY(), caster->GetPositionZ(), caster->GetCollisionHeight(), MAP_ALL_LIQUIDS);
+ LiquidData liquidStatus = caster->GetMap()->GetLiquidData(caster->GetPhaseMask(), caster->GetPositionX(), caster->GetPositionY(), caster->GetPositionZ(), caster->GetCollisionHeight(), {});
float level = liquidStatus.Level > INVALID_HEIGHT ? liquidStatus.Level : caster->GetPositionZ();
Position pos = Position(caster->GetPositionX(), caster->GetPositionY(), level, caster->GetOrientation());
@@ -2650,7 +2651,7 @@ class spell_gen_spirit_healer_res : public SpellScript
{
WorldPacket data(SMSG_SPIRIT_HEALER_CONFIRM, 8);
data << target->GetGUID();
- originalCaster->GetSession()->SendPacket(&data);
+ originalCaster->SendDirectMessage(&data);
}
}
@@ -3706,7 +3707,7 @@ class spell_gen_despawn_self : public SpellScript
void HandleDummy(SpellEffIndex effIndex)
{
if (GetSpellInfo()->Effects[effIndex].Effect == SPELL_EFFECT_DUMMY || GetSpellInfo()->Effects[effIndex].Effect == SPELL_EFFECT_SCRIPT_EFFECT)
- GetCaster()->ToCreature()->DespawnOrUnsummon(1);
+ GetCaster()->ToCreature()->DespawnOrUnsummon(1ms);
}
void Register() override
@@ -4422,7 +4423,9 @@ class spell_gen_eject_all_passengers : public SpellScript
}
};
-/* 62539 - Eject Passenger 2
+/* 49259 - Despawn Driver
+ 49261 - Dismount Passenger
+ 62539 - Eject Passenger 2
64614 - Eject Passenger 4
64629 - Eject Passenger 1
64630 - Eject Passenger 2
@@ -5528,6 +5531,171 @@ class spell_gen_food_heart_emote : public AuraScript
}
};
+// 456 - SHOWLABEL Only OFF
+class spell_gen_showlabel_off : public SpellScript
+{
+ PrepareSpellScript(spell_gen_showlabel_off)
+
+ void HandleScriptEffect(SpellEffIndex /*effIndex*/)
+ {
+ if (Player* player = GetCaster()->ToPlayer())
+ player->SetGMChat(false);
+ }
+
+ void Register() override
+ {
+ OnEffectHit += SpellEffectFn(spell_gen_showlabel_off::HandleScriptEffect, EFFECT_0, SPELL_EFFECT_SCRIPT_EFFECT);
+ }
+};
+
+// 2765 - SHOWLABEL Only ON
+class spell_gen_showlabel_on : public SpellScript
+{
+ PrepareSpellScript(spell_gen_showlabel_on)
+
+ void HandleScriptEffect(SpellEffIndex /*effIndex*/)
+ {
+ if (Player* player = GetCaster()->ToPlayer())
+ player->SetGMChat(true);
+ }
+
+ void Register() override
+ {
+ OnEffectHit += SpellEffectFn(spell_gen_showlabel_on::HandleScriptEffect, EFFECT_0, SPELL_EFFECT_SCRIPT_EFFECT);
+ }
+};
+
+// 1509 - GM Only OFF
+class spell_gen_gm_off : public SpellScript
+{
+ PrepareSpellScript(spell_gen_gm_off)
+
+ void HandleScriptEffect(SpellEffIndex /*effIndex*/)
+ {
+ if (Player* player = GetCaster()->ToPlayer())
+ {
+ player->SetGameMaster(false);
+ player->UpdateTriggerVisibility();
+ }
+ }
+
+ void Register() override
+ {
+ OnEffectHit += SpellEffectFn(spell_gen_gm_off::HandleScriptEffect, EFFECT_0, SPELL_EFFECT_SCRIPT_EFFECT);
+ }
+};
+
+// 18139 - GM Only ON
+class spell_gen_gm_on : public SpellScript
+{
+ PrepareSpellScript(spell_gen_gm_on)
+
+ void HandleScriptEffect(SpellEffIndex /*effIndex*/)
+ {
+ if (Player* player = GetCaster()->ToPlayer())
+ {
+ player->SetGameMaster(true);
+ player->UpdateTriggerVisibility();
+ }
+ }
+
+ void Register() override
+ {
+ OnEffectHit += SpellEffectFn(spell_gen_gm_on::HandleScriptEffect, EFFECT_0, SPELL_EFFECT_SCRIPT_EFFECT);
+ }
+};
+
+// 6147 - INVIS Only OFF
+class spell_gen_invis_off : public SpellScript
+{
+ PrepareSpellScript(spell_gen_invis_off)
+
+ void HandleScriptEffect(SpellEffIndex /*effIndex*/)
+ {
+ if (Player* player = GetCaster()->ToPlayer())
+ player->SetGMVisible(true);
+ }
+
+ void Register() override
+ {
+ OnEffectHit += SpellEffectFn(spell_gen_invis_off::HandleScriptEffect, EFFECT_0, SPELL_EFFECT_SCRIPT_EFFECT);
+ }
+};
+
+// 2763 - INVIS Only ON
+class spell_gen_invis_on : public SpellScript
+{
+ PrepareSpellScript(spell_gen_invis_on)
+
+ void HandleScriptEffect(SpellEffIndex /*effIndex*/)
+ {
+ if (Player* player = GetCaster()->ToPlayer())
+ player->SetGMVisible(false);
+ }
+
+ void Register() override
+ {
+ OnEffectHit += SpellEffectFn(spell_gen_invis_on::HandleScriptEffect, EFFECT_0, SPELL_EFFECT_SCRIPT_EFFECT);
+ }
+};
+
+// 20114, 24675 - BM Only OFF
+class spell_gen_bm_off : public SpellScript
+{
+ PrepareSpellScript(spell_gen_bm_off)
+
+ void HandleScriptEffect(SpellEffIndex /*effIndex*/)
+ {
+ if (Player* player = GetCaster()->ToPlayer())
+ player->SetBeastMaster(false);
+ }
+
+ void Register() override
+ {
+ OnEffectHit += SpellEffectFn(spell_gen_bm_off::HandleScriptEffect, EFFECT_0, SPELL_EFFECT_SCRIPT_EFFECT);
+ }
+};
+
+// 20115, 24676 - BM Only ON
+class spell_gen_bm_on : public SpellScript
+{
+ PrepareSpellScript(spell_gen_bm_on)
+
+ void HandleScriptEffect(SpellEffIndex /*effIndex*/)
+ {
+ if (Player* player = GetCaster()->ToPlayer())
+ player->SetBeastMaster(true);
+ }
+
+ void Register() override
+ {
+ OnEffectHit += SpellEffectFn(spell_gen_bm_on::HandleScriptEffect, EFFECT_0, SPELL_EFFECT_SCRIPT_EFFECT);
+ }
+};
+
+class spell_gen_whisper_to_controller : public SpellScript
+{
+ PrepareSpellScript(spell_gen_whisper_to_controller);
+
+ bool Validate(SpellInfo const* spellInfo) override
+ {
+ return sObjectMgr->GetBroadcastText(uint32(spellInfo->GetEffect(EFFECT_0).CalcValue()));
+ }
+
+ void HandleScript(SpellEffIndex /*effIndex*/)
+ {
+ if (Unit* caster = GetCaster())
+ if (TempSummon* casterSummon = caster->ToTempSummon())
+ if (Player* target = casterSummon->GetSummonerUnit()->ToPlayer())
+ casterSummon->Unit::Whisper(uint32(GetEffectValue()), target, false);
+ }
+
+ void Register() override
+ {
+ OnEffectHit += SpellEffectFn(spell_gen_whisper_to_controller::HandleScript, EFFECT_0, SPELL_EFFECT_SCRIPT_EFFECT);
+ }
+};
+
void AddSC_generic_spell_scripts()
{
RegisterSpellScript(spell_silithyst);
@@ -5693,4 +5861,13 @@ void AddSC_generic_spell_scripts()
RegisterSpellScriptWithArgs(spell_gen_translocate, "spell_gen_translocate_up", SPELL_TRANSLOCATION_UP);
RegisterSpellScript(spell_gen_cooldown_all);
RegisterSpellScript(spell_gen_food_heart_emote);
+ RegisterSpellScript(spell_gen_showlabel_off);
+ RegisterSpellScript(spell_gen_showlabel_on);
+ RegisterSpellScript(spell_gen_gm_off);
+ RegisterSpellScript(spell_gen_gm_on);
+ RegisterSpellScript(spell_gen_invis_off);
+ RegisterSpellScript(spell_gen_invis_on);
+ RegisterSpellScript(spell_gen_bm_on);
+ RegisterSpellScript(spell_gen_bm_off);
+ RegisterSpellScript(spell_gen_whisper_to_controller);
}
diff --git a/src/server/scripts/Spells/spell_hunter.cpp b/src/server/scripts/Spells/spell_hunter.cpp
index d3325403ad..7ebf339993 100644
--- a/src/server/scripts/Spells/spell_hunter.cpp
+++ b/src/server/scripts/Spells/spell_hunter.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
@@ -302,7 +302,7 @@ class spell_hun_taming_the_beast : public AuraScript
{
if (Unit* target = GetTarget())
if (Creature* creature = target->ToCreature())
- creature->DespawnOrUnsummon(1);
+ creature->DespawnOrUnsummon(1ms);
}
void Register() override
diff --git a/src/server/scripts/Spells/spell_item.cpp b/src/server/scripts/Spells/spell_item.cpp
index 29269f5379..d3fcc55b91 100644
--- a/src/server/scripts/Spells/spell_item.cpp
+++ b/src/server/scripts/Spells/spell_item.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
@@ -347,7 +347,7 @@ class spell_item_rocket_chicken : public AuraScript
{
if (roll_chance_i(5))
{
- GetTarget()->ToCreature()->DespawnOrUnsummon(8000);
+ GetTarget()->ToCreature()->DespawnOrUnsummon(8s);
GetTarget()->Kill(GetTarget(), GetTarget());
}
else if (roll_chance_i(50))
@@ -468,7 +468,7 @@ class spell_item_toxic_wasteling : public SpellScript
GetCaster()->GetMotionMaster()->MoveIdle();
GetCaster()->ToCreature()->SetHomePosition(target->GetPositionX(), target->GetPositionY(), target->GetPositionZ(), 0.0f);
GetCaster()->GetMotionMaster()->MoveJump(target->GetPositionX(), target->GetPositionY(), target->GetPositionZ(), 12.0f, 3.0f, 1);
- target->DespawnOrUnsummon(1500);
+ target->DespawnOrUnsummon(1500ms);
}
}
@@ -505,7 +505,7 @@ class spell_item_lil_xt : public SpellScript
return;
if (GetCaster()->IsCreature() && GetCaster()->ToCreature()->AI())
GetCaster()->ToCreature()->AI()->Talk(2);
- target->DespawnOrUnsummon(500);
+ target->DespawnOrUnsummon(500ms);
}
void Register() override
@@ -1083,7 +1083,7 @@ class spell_item_enchanted_broom_periodic : public AuraScript
{
if (owner->isMoving())
{
- GetTarget()->GetMotionMaster()->MoveFollow(owner, PET_FOLLOW_DIST, GetTarget()->GetFollowAngle(), MOTION_SLOT_ACTIVE);
+ GetTarget()->GetMotionMaster()->MoveFollow(owner, PET_FOLLOW_DIST, MINI_PET_FOLLOW_ANGLE, MOTION_SLOT_ACTIVE);
}
else
{
@@ -1206,27 +1206,38 @@ class spell_item_direbrew_remote_aura : public AuraScript
}
};
-enum EyeOfGruul
+enum HealingTrance
{
- SPELL_DRUID_ITEM_HEALING_TRANCE = 37721,
- SPELL_PALADIN_ITEM_HEALING_TRANCE = 37723,
- SPELL_PRIEST_ITEM_HEALING_TRANCE = 37706,
- SPELL_SHAMAN_ITEM_HEALING_TRANCE = 37722
+ SPELL_HEALING_DISCOUNT = 37705,
+ SPELL_SOUL_PRESERVER = 60510,
+ SPELL_PRIEST_EYE_OF_GRUUL_HEALING_TRANCE = 37706,
+ SPELL_DRUID_EYE_OF_GRUUL_HEALING_TRANCE = 37721,
+ SPELL_SHAMAN_EYE_OF_GRUUL_HEALING_TRANCE = 37722,
+ SPELL_PALADIN_EYE_OF_GRUUL_HEALING_TRANCE = 37723,
+ SPELL_DRUID_SOUL_PRESERVER_HEALING_TRANCE = 60512,
+ SPELL_PALADIN_SOUL_PRESERVER_HEALING_TRANCE = 60513,
+ SPELL_PRIEST_SOUL_PRESERVER_HEALING_TRANCE = 60514,
+ SPELL_SHAMAN_SOUL_PRESERVER_HEALING_TRANCE = 60515,
};
// 37705 - Healing Discount
-class spell_item_eye_of_gruul_healing_discount : public AuraScript
+// 60510 - Soul Preserver
+class spell_item_healing_trance : public AuraScript
{
- PrepareAuraScript(spell_item_eye_of_gruul_healing_discount);
+ PrepareAuraScript(spell_item_healing_trance);
bool Validate(SpellInfo const* /*spellInfo*/) override
{
return ValidateSpellInfo(
{
- SPELL_DRUID_ITEM_HEALING_TRANCE,
- SPELL_PALADIN_ITEM_HEALING_TRANCE,
- SPELL_PRIEST_ITEM_HEALING_TRANCE,
- SPELL_SHAMAN_ITEM_HEALING_TRANCE
+ SPELL_PRIEST_EYE_OF_GRUUL_HEALING_TRANCE,
+ SPELL_DRUID_EYE_OF_GRUUL_HEALING_TRANCE,
+ SPELL_SHAMAN_EYE_OF_GRUUL_HEALING_TRANCE,
+ SPELL_PALADIN_EYE_OF_GRUUL_HEALING_TRANCE,
+ SPELL_DRUID_SOUL_PRESERVER_HEALING_TRANCE,
+ SPELL_PALADIN_SOUL_PRESERVER_HEALING_TRANCE,
+ SPELL_PRIEST_SOUL_PRESERVER_HEALING_TRANCE,
+ SPELL_SHAMAN_SOUL_PRESERVER_HEALING_TRANCE,
});
}
@@ -1235,32 +1246,57 @@ class spell_item_eye_of_gruul_healing_discount : public AuraScript
PreventDefaultAction();
if (Unit* unitTarget = GetTarget())
{
- uint32 spell_id = 0;
- switch (unitTarget->getClass())
+ uint32 const itemSpell = GetSpellInfo()->Id;
+ uint32 spellId = 0;
+
+ if (itemSpell == SPELL_HEALING_DISCOUNT)
+ {
+ switch (unitTarget->getClass())
+ {
+ case CLASS_DRUID:
+ spellId = SPELL_DRUID_EYE_OF_GRUUL_HEALING_TRANCE;
+ break;
+ case CLASS_PALADIN:
+ spellId = SPELL_PALADIN_EYE_OF_GRUUL_HEALING_TRANCE;
+ break;
+ case CLASS_PRIEST:
+ spellId = SPELL_PRIEST_EYE_OF_GRUUL_HEALING_TRANCE;
+ break;
+ case CLASS_SHAMAN:
+ spellId = SPELL_SHAMAN_EYE_OF_GRUUL_HEALING_TRANCE;
+ break;
+ default:
+ return; // ignore for non-healing classes
+ }
+ }
+ else if (itemSpell == SPELL_SOUL_PRESERVER)
{
+ switch (unitTarget->getClass())
+ {
case CLASS_DRUID:
- spell_id = SPELL_DRUID_ITEM_HEALING_TRANCE;
+ spellId = SPELL_DRUID_SOUL_PRESERVER_HEALING_TRANCE;
break;
case CLASS_PALADIN:
- spell_id = SPELL_PALADIN_ITEM_HEALING_TRANCE;
+ spellId = SPELL_PALADIN_SOUL_PRESERVER_HEALING_TRANCE;
break;
case CLASS_PRIEST:
- spell_id = SPELL_PRIEST_ITEM_HEALING_TRANCE;
+ spellId = SPELL_PRIEST_SOUL_PRESERVER_HEALING_TRANCE;
break;
case CLASS_SHAMAN:
- spell_id = SPELL_SHAMAN_ITEM_HEALING_TRANCE;
+ spellId = SPELL_SHAMAN_SOUL_PRESERVER_HEALING_TRANCE;
break;
default:
return; // ignore for non-healing classes
+ }
}
- unitTarget->CastSpell(unitTarget, spell_id, true, nullptr, aurEff);
+ unitTarget->CastSpell(unitTarget, spellId, true, nullptr, aurEff);
}
}
void Register() override
{
- OnEffectProc += AuraEffectProcFn(spell_item_eye_of_gruul_healing_discount::HandleProc, EFFECT_0, SPELL_AURA_PROC_TRIGGER_SPELL);
+ OnEffectProc += AuraEffectProcFn(spell_item_healing_trance::HandleProc, EFFECT_0, SPELL_AURA_PROC_TRIGGER_SPELL);
}
};
@@ -1467,16 +1503,20 @@ class spell_item_blessing_of_ancient_kings : public AuraScript
HealInfo* healInfo = eventInfo.GetHealInfo();
if (!healInfo)
- {
return;
- }
int32 absorb = int32(CalculatePct(healInfo->GetHeal(), 15.0f));
// xinef: all heals contribute to one bubble
if (AuraEffect* protEff = eventInfo.GetProcTarget()->GetAuraEffect(SPELL_PROTECTION_OF_ANCIENT_KINGS, 0/*, eventInfo.GetActor()->GetGUID()*/))
{
- // The shield can grow to a maximum size of 20,000 damage absorbtion
- protEff->SetAmount(std::min<int32>(protEff->GetAmount() + absorb, 20000));
+ // The shield is supposed to cap out at 20,000 absorption...
+ absorb += protEff->GetAmount();
+
+ // ...but Blizz wrote this instead. See #23152 for details
+ if (absorb > 20000)
+ absorb = 200000;
+
+ protEff->SetAmount(absorb);
// Refresh and return to prevent replacing the aura
protEff->GetBase()->RefreshDuration();
@@ -1629,7 +1669,7 @@ public:
_player->HandleEmoteCommand(RAND(EMOTE_ONESHOT_APPLAUD, EMOTE_ONESHOT_DANCESPECIAL, EMOTE_ONESHOT_LAUGH, EMOTE_ONESHOT_CHEER, EMOTE_ONESHOT_CHICKEN));
}
- _player->m_Events.AddEvent(this, RAND(_player->m_Events.CalculateTime(5000), _player->m_Events.CalculateTime(10000), _player->m_Events.CalculateTime(15000)));
+ _player->m_Events.AddEventAtOffset(this, RAND(5s, 10s, 15s));
return false; // do not delete re-added event in EventProcessor::Update
}
@@ -1650,7 +1690,7 @@ class spell_item_party_time : public AuraScript
return;
}
- player->m_Events.AddEvent(new PartyTimeEmoteEvent(player), RAND(player->m_Events.CalculateTime(5000), player->m_Events.CalculateTime(10000), player->m_Events.CalculateTime(15000)));
+ player->m_Events.AddEventAtOffset(new PartyTimeEmoteEvent(player), RAND(5s, 10s, 15s));
}
void Register() override
@@ -4292,7 +4332,7 @@ void AddSC_item_spell_scripts()
RegisterSpellScript(spell_item_summon_or_dismiss);
RegisterSpellScript(spell_item_draenic_pale_ale);
RegisterSpellAndAuraScriptPair(spell_item_direbrew_remote, spell_item_direbrew_remote_aura);
- RegisterSpellScript(spell_item_eye_of_gruul_healing_discount);
+ RegisterSpellScript(spell_item_healing_trance);
RegisterSpellScript(spell_item_summon_argent_knight);
RegisterSpellScript(spell_item_instant_statue);
// 23074 Arcanite Dragonling
diff --git a/src/server/scripts/Spells/spell_mage.cpp b/src/server/scripts/Spells/spell_mage.cpp
index 19c51be737..aa1fe3b6df 100644
--- a/src/server/scripts/Spells/spell_mage.cpp
+++ b/src/server/scripts/Spells/spell_mage.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/scripts/Spells/spell_paladin.cpp b/src/server/scripts/Spells/spell_paladin.cpp
index 941af7f4f6..0acf87cb21 100644
--- a/src/server/scripts/Spells/spell_paladin.cpp
+++ b/src/server/scripts/Spells/spell_paladin.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
@@ -473,11 +473,7 @@ class spell_pal_blessing_of_sanctuary : public AuraScript
{
Unit* target = GetTarget();
if (Unit* caster = GetCaster())
- {
- // xinef: hack
- int32 value = 9;
- caster->CastCustomSpell(target, SPELL_PALADIN_BLESSING_OF_SANCTUARY_BUFF, &value, &value, 0, true);
- }
+ caster->CastSpell(target, SPELL_PALADIN_BLESSING_OF_SANCTUARY_BUFF, true);
}
void HandleEffectRemove(AuraEffect const* /*aurEff*/, AuraEffectHandleModes /*mode*/)
@@ -965,6 +961,24 @@ class spell_pal_lay_on_hands : public SpellScript
return true;
}
+ void HandleMaxHealthHeal(SpellEffIndex /*effIndex*/)
+ {
+ Unit* caster = GetCaster();
+ Unit* target = GetExplTargetUnit();
+
+ if (!target || !caster)
+ return;
+
+ uint32 baseHeal = caster->GetMaxHealth();
+ uint32 modifiedHeal = target->SpellHealingBonusTaken(caster, GetSpellInfo(), baseHeal, HEAL);
+
+ // EffectHealMaxHealth() ignores healing modifiers, so we pre-apply the
+ // difference here; this delta will be added on top of the raw heal.
+ int64 healAdjustment = int64(modifiedHeal) - int64(baseHeal);
+
+ SetHitHeal(healAdjustment);
+ }
+
SpellCastResult CheckCast()
{
Unit* caster = GetCaster();
@@ -1004,6 +1018,7 @@ class spell_pal_lay_on_hands : public SpellScript
{
OnCheckCast += SpellCheckCastFn(spell_pal_lay_on_hands::CheckCast);
AfterHit += SpellHitFn(spell_pal_lay_on_hands::HandleScript);
+ OnEffectHitTarget += SpellEffectFn(spell_pal_lay_on_hands::HandleMaxHealthHeal, EFFECT_0, SPELL_EFFECT_HEAL_MAX_HEALTH);
}
int32 _manaAmount;
diff --git a/src/server/scripts/Spells/spell_priest.cpp b/src/server/scripts/Spells/spell_priest.cpp
index dcc482ff8a..a4b3c71aee 100644
--- a/src/server/scripts/Spells/spell_priest.cpp
+++ b/src/server/scripts/Spells/spell_priest.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/scripts/Spells/spell_quest.cpp b/src/server/scripts/Spells/spell_quest.cpp
index 127bd957aa..4e1b563333 100644
--- a/src/server/scripts/Spells/spell_quest.cpp
+++ b/src/server/scripts/Spells/spell_quest.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
@@ -68,7 +68,7 @@ class spell_q11065_wrangle_some_aether_rays_aura : public AuraScript
{
cr->CastSpell(player, 40926, true);
cr->GetMotionMaster()->MoveFollow(player, 5.0f, 2 * M_PI * rand_norm());
- ar->ToCreature()->DespawnOrUnsummon(500);
+ ar->ToCreature()->DespawnOrUnsummon(500ms);
}
}
}
@@ -247,28 +247,6 @@ class spell_q10525_vision_guide : public AuraScript
}
};
-class spell_q11322_q11317_the_cleansing : public AuraScript
-{
- PrepareAuraScript(spell_q11322_q11317_the_cleansing)
-
- void HandleEffectApply(AuraEffect const* /*aurEff*/, AuraEffectHandleModes /*mode*/)
- {
- Unit* ar = GetCaster();
- if (ar && ar->ToPlayer())
- {
- if (ar->ToPlayer()->GetQuestStatus(11317) == QUEST_STATUS_INCOMPLETE || ar->ToPlayer()->GetQuestStatus(11322) == QUEST_STATUS_INCOMPLETE)
- ar->SummonCreature(27959, 3032.0f, -5095.0f, 723.0f, 0.0f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 60000);
-
- ar->SetStandState(UNIT_STAND_STATE_SIT);
- }
- }
-
- void Register() override
- {
- OnEffectApply += AuraEffectApplyFn(spell_q11322_q11317_the_cleansing::HandleEffectApply, EFFECT_0, SPELL_AURA_DUMMY, AURA_EFFECT_HANDLE_REAL);
- }
-};
-
class spell_q10714_on_spirits_wings : public SpellScript
{
PrepareSpellScript(spell_q10714_on_spirits_wings);
@@ -756,10 +734,10 @@ private:
uint32 _originalEntry;
uint32 _newEntry;
bool _shouldAttack;
- uint32 _despawnTime;
+ Milliseconds _despawnTime;
public:
- spell_generic_quest_update_entry_SpellScript(uint16 spellEffect, uint8 effIndex, uint32 originalEntry, uint32 newEntry, bool shouldAttack, uint32 despawnTime = 0) :
+ spell_generic_quest_update_entry_SpellScript(uint16 spellEffect, uint8 effIndex, uint32 originalEntry, uint32 newEntry, bool shouldAttack, Milliseconds despawnTime = 0ms) :
SpellScript(), _spellEffect(spellEffect), _effIndex(effIndex), _originalEntry(originalEntry),
_newEntry(newEntry), _shouldAttack(shouldAttack), _despawnTime(despawnTime) { }
@@ -772,7 +750,7 @@ public:
if (_shouldAttack && creatureTarget->IsAIEnabled)
creatureTarget->AI()->AttackStart(GetCaster());
- if (_despawnTime)
+ if (_despawnTime > 0ms)
creatureTarget->DespawnOrUnsummon(_despawnTime);
}
}
@@ -900,10 +878,11 @@ enum Quests6124_6129Data
NPC_SICKLY_GAZELLE = 12296,
NPC_CURED_GAZELLE = 12297,
NPC_SICKLY_DEER = 12298,
- NPC_CURED_DEER = 12299,
- DESPAWN_TIME = 30000
+ NPC_CURED_DEER = 12299
};
+constexpr Milliseconds DESPAWN_TIME = 30s;
+
class spell_q6124_6129_apply_salve : public SpellScript
{
PrepareSpellScript(spell_q6124_6129_apply_salve);
@@ -1364,12 +1343,15 @@ class spell_q12937_relief_for_the_fallen : public AuraScript
void OnRemove(AuraEffect const* /*aurEff*/, AuraEffectHandleModes /*mode*/)
{
+ if (!GetCaster() || !GetCaster()->IsPlayer())
+ return;
+
Player* caster = GetCaster()->ToPlayer();
Unit* target = GetUnitOwner();
if (target && target->ToCreature())
{
caster->KilledMonsterCredit(NPC_FALLEN_EARTHEN_DEFENDER);
- target->ToCreature()->DespawnOrUnsummon(5000);
+ target->ToCreature()->DespawnOrUnsummon(5s);
target->SetStandState(UNIT_STAND_STATE_STAND);
target->ToCreature()->AI()->Talk(TALK_FALLEN_EARTHEN_HEALED);
@@ -1510,7 +1492,7 @@ class spell_q9874_liquid_fire : public SpellScript
{
caster->KilledMonsterCredit(NPC_VILLAGER_KILL_CREDIT);
target->CastSpell(target, SPELL_FLAMES, true);
- target->DespawnOrUnsummon(20000);
+ target->DespawnOrUnsummon(20s);
}
}
@@ -1557,7 +1539,7 @@ class spell_q12805_lifeblood_dummy : public SpellScript
caster->KilledMonsterCredit(NPC_SHARD_KILL_CREDIT);
target->CastSpell(target, uint32(GetEffectValue()), true);
- target->DespawnOrUnsummon(2000);
+ target->DespawnOrUnsummon(2s);
}
void Register() override
@@ -2141,7 +2123,7 @@ class spell_q12690_burst_at_the_seams : public SpellScript
void HandleScript(SpellEffIndex /*effIndex*/)
{
- GetCaster()->ToCreature()->DespawnOrUnsummon(2 * IN_MILLISECONDS);
+ GetCaster()->ToCreature()->DespawnOrUnsummon(2s);
}
void Register() override
@@ -2495,7 +2477,6 @@ void AddSC_quest_spell_scripts()
RegisterSpellScript(spell_q12014_steady_as_a_rock);
RegisterSpellAndAuraScriptPair(spell_q11026_a11051_banish_the_demons, spell_q11026_a11051_banish_the_demons_aura);
RegisterSpellScript(spell_q10525_vision_guide);
- RegisterSpellScript(spell_q11322_q11317_the_cleansing);
RegisterSpellScript(spell_q10714_on_spirits_wings);
RegisterSpellScript(spell_q10720_the_smallest_creature);
RegisterSpellScript(spell_q13086_last_line_of_defence);
diff --git a/src/server/scripts/Spells/spell_rogue.cpp b/src/server/scripts/Spells/spell_rogue.cpp
index b165cef939..53e661a831 100644
--- a/src/server/scripts/Spells/spell_rogue.cpp
+++ b/src/server/scripts/Spells/spell_rogue.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/scripts/Spells/spell_shaman.cpp b/src/server/scripts/Spells/spell_shaman.cpp
index 46e9e9ca99..23e9fb2e91 100644
--- a/src/server/scripts/Spells/spell_shaman.cpp
+++ b/src/server/scripts/Spells/spell_shaman.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/scripts/Spells/spell_warlock.cpp b/src/server/scripts/Spells/spell_warlock.cpp
index ee018810a5..e484b2b333 100644
--- a/src/server/scripts/Spells/spell_warlock.cpp
+++ b/src/server/scripts/Spells/spell_warlock.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
@@ -18,6 +18,7 @@
#include "AreaDefines.h"
#include "CreatureScript.h"
#include "Pet.h"
+#include "PetDefines.h"
#include "Player.h"
#include "SpellAuraEffects.h"
#include "SpellInfo.h"
@@ -25,6 +26,8 @@
#include "SpellScript.h"
#include "SpellScriptLoader.h"
#include "TemporarySummon.h"
+#include "Unit.h"
+#include "Util.h"
/*
* Scripts for spells with SPELLFAMILY_WARLOCK and SPELLFAMILY_GENERIC spells used by warlock players.
* Ordered alphabetically using scriptname.
@@ -73,6 +76,7 @@ enum WarlockSpells
SPELL_WARLOCK_EYE_OF_KILROGG_FLY = 58083,
SPELL_WARLOCK_PET_VOID_STAR_TALISMAN = 37386, // Void Star Talisman
SPELL_WARLOCK_DEMONIC_PACT_PROC = 48090,
+ SPELL_WARLOCK_GLYPH_OF_VOIDWALKER = 56247,
};
enum WarlockSpellIcons
@@ -292,7 +296,7 @@ class spell_warl_generic_scaling : public AuraScript
void CalculateResistanceAmount(AuraEffect const* aurEff, int32& amount, bool& /*canBeRecalculated*/)
{
- // xinef: pet inherits 40% of resistance from owner and 35% of armor
+ // pet inherits 40% of resistance from owner and 35% of armor
if (Unit* owner = GetUnitOwner()->GetOwner())
{
SpellSchoolMask schoolMask = SpellSchoolMask(aurEff->GetSpellInfo()->Effects[aurEff->GetEffIndex()].MiscValue);
@@ -308,7 +312,7 @@ class spell_warl_generic_scaling : public AuraScript
void CalculateStatAmount(AuraEffect const* aurEff, int32& amount, bool& /*canBeRecalculated*/)
{
- // xinef: by default warlock pet inherits 75% of stamina and 30% of intellect
+ // by default warlock pet inherits 75% of stamina and 30% of intellect
if (Unit* owner = GetUnitOwner()->GetOwner())
{
Stats stat = Stats(aurEff->GetSpellInfo()->Effects[aurEff->GetEffIndex()].MiscValue);
@@ -317,21 +321,33 @@ class spell_warl_generic_scaling : public AuraScript
}
}
- void CalculateAPAmount(AuraEffect const* /*aurEff*/, int32& amount, bool& /*canBeRecalculated*/)
+ void CalculateAPAmount(AuraEffect const* aurEff, int32& amount, bool& /*canBeRecalculated*/)
{
- // xinef: by default warlock pet inherits 57% of max(SP FIRE, SP SHADOW) as AP
- if (Unit* owner = GetUnitOwner()->GetOwner())
+ if (Unit* pet = GetUnitOwner())
{
- int32 fire = owner->SpellBaseDamageBonusDone(SPELL_SCHOOL_MASK_FIRE);
- int32 shadow = owner->SpellBaseDamageBonusDone(SPELL_SCHOOL_MASK_SHADOW);
- int32 maximum = (fire > shadow) ? fire : shadow;
- amount = CalculatePct(std::max<int32>(0, maximum), 57);
+ // by default warlock pet inherits 57% of max(SP FIRE, SP SHADOW) as AP
+ if (Unit* owner = pet->GetOwner())
+ {
+ int32 fire = owner->SpellBaseDamageBonusDone(SPELL_SCHOOL_MASK_FIRE);
+ int32 shadow = owner->SpellBaseDamageBonusDone(SPELL_SCHOOL_MASK_SHADOW);
+ int32 maximum = (fire > shadow) ? fire : shadow;
+ amount = CalculatePct(std::max<int32>(0, maximum), 57);
+
+ // Glyph of felguard, 99% sure this is a HACK
+ if (pet->GetEntry() == NPC_FELGUARD)
+ {
+ if (AuraEffect* glyph = owner->GetAuraEffect(SPELL_GLYPH_OF_FELGUARD, EFFECT_0))
+ {
+ amount += CalculatePct(pet->GetTotalAuraModValue(UNIT_MOD_ATTACK_POWER) - aurEff->GetAmount() + amount, glyph->GetAmount());
+ }
+ }
+ }
}
}
void CalculateSPAmount(AuraEffect const* /*aurEff*/, int32& amount, bool& /*canBeRecalculated*/)
{
- // xinef: by default warlock pet inherits 15% of max(SP FIRE, SP SHADOW) as SP
+ // by default warlock pet inherits 15% of max(SP FIRE, SP SHADOW) as SP
if (Unit* owner = GetUnitOwner()->GetOwner())
{
int32 fire = owner->SpellBaseDamageBonusDone(SPELL_SCHOOL_MASK_FIRE);
@@ -339,7 +355,7 @@ class spell_warl_generic_scaling : public AuraScript
int32 maximum = (fire > shadow) ? fire : shadow;
amount = CalculatePct(std::max<int32>(0, maximum), 15);
- // xinef: Update appropriate player field
+ // Update appropriate player field
if (owner->IsPlayer())
owner->SetUInt32Value(PLAYER_PET_SPELL_POWER, (uint32)amount);
}
@@ -1370,81 +1386,27 @@ class spell_warl_shadowburn : public AuraScript
}
};
-class spell_warl_glyph_of_felguard : public AuraScript
+class spell_warl_voidwalker_pet_passive : public AuraScript
{
- PrepareAuraScript(spell_warl_glyph_of_felguard);
+ PrepareAuraScript(spell_warl_voidwalker_pet_passive);
- void HandleApply(AuraEffect const* aurEff, AuraEffectHandleModes /*mode*/)
- {
- if (Player* player = GetCaster()->ToPlayer())
- {
- if (Pet* pet = player->GetPet())
- {
- if (pet->GetEntry() == NPC_FELGUARD)
- {
- pet->HandleStatModifier(UNIT_MOD_ATTACK_POWER, TOTAL_PCT, aurEff->GetAmount(), true);
- }
- }
- }
- }
-
- void HandleRemove(AuraEffect const* aurEff, AuraEffectHandleModes /*mode*/)
- {
- if (Player* player = GetCaster()->ToPlayer())
- {
- if (Pet* pet = player->GetPet())
- {
- if (pet->GetEntry() == NPC_FELGUARD)
- {
- pet->HandleStatModifier(UNIT_MOD_ATTACK_POWER, TOTAL_PCT, aurEff->GetAmount(), false);
- }
- }
- }
- }
-
- void Register() override
- {
- OnEffectApply += AuraEffectApplyFn(spell_warl_glyph_of_felguard::HandleApply, EFFECT_0, SPELL_AURA_DUMMY, AURA_EFFECT_HANDLE_REAL);
- OnEffectRemove += AuraEffectRemoveFn(spell_warl_glyph_of_felguard::HandleRemove, EFFECT_0, SPELL_AURA_DUMMY, AURA_EFFECT_HANDLE_REAL);
- }
-};
-
-class spell_warl_glyph_of_voidwalker : public AuraScript
-{
- PrepareAuraScript(spell_warl_glyph_of_voidwalker);
-
- void HandleApply(AuraEffect const* aurEff, AuraEffectHandleModes /*mode*/)
+ bool Validate(SpellInfo const* /*spellInfo*/) override
{
- if (Player* player = GetCaster()->ToPlayer())
- {
- if (Pet* pet = player->GetPet())
- {
- if (pet->GetEntry() == NPC_VOIDWALKER)
- {
- pet->HandleStatModifier(UNIT_MOD_STAT_STAMINA, TOTAL_PCT, aurEff->GetAmount(), true);
- }
- }
- }
+ return ValidateSpellInfo({ SPELL_WARLOCK_GLYPH_OF_VOIDWALKER });
}
- void HandleRemove(AuraEffect const* aurEff, AuraEffectHandleModes /*mode*/)
+ void CalculateAmount(AuraEffect const* /* aurEff */, int32& amount, bool& /*canBeRecalculated*/)
{
- if (Player* player = GetCaster()->ToPlayer())
- {
- if (Pet* pet = player->GetPet())
- {
- if (pet->GetEntry() == NPC_VOIDWALKER)
- {
- pet->HandleStatModifier(UNIT_MOD_STAT_STAMINA, TOTAL_PCT, aurEff->GetAmount(), false);
- }
- }
- }
+ if (Unit* pet = GetUnitOwner())
+ if (pet->IsPet())
+ if (Unit* owner = pet->ToPet()->GetOwner())
+ if (AuraEffect* aurEff = owner->GetAuraEffect(SPELL_WARLOCK_GLYPH_OF_VOIDWALKER, EFFECT_0))
+ amount += aurEff->GetAmount();
}
void Register() override
{
- OnEffectApply += AuraEffectApplyFn(spell_warl_glyph_of_voidwalker::HandleApply, EFFECT_0, SPELL_AURA_DUMMY, AURA_EFFECT_HANDLE_REAL);
- OnEffectRemove += AuraEffectRemoveFn(spell_warl_glyph_of_voidwalker::HandleRemove, EFFECT_0, SPELL_AURA_DUMMY, AURA_EFFECT_HANDLE_REAL);
+ DoEffectCalcAmount += AuraEffectCalcAmountFn(spell_warl_voidwalker_pet_passive::CalculateAmount, EFFECT_0, SPELL_AURA_MOD_TOTAL_STAT_PERCENTAGE);
}
};
@@ -1529,7 +1491,6 @@ void AddSC_warlock_spell_scripts()
RegisterSpellScript(spell_warl_unstable_affliction);
RegisterSpellScript(spell_warl_drain_soul);
RegisterSpellScript(spell_warl_shadowburn);
- RegisterSpellScript(spell_warl_glyph_of_felguard);
- RegisterSpellScript(spell_warl_glyph_of_voidwalker);
+ RegisterSpellScript(spell_warl_voidwalker_pet_passive);
RegisterSpellScript(spell_warl_demonic_pact_aura);
}
diff --git a/src/server/scripts/Spells/spell_warrior.cpp b/src/server/scripts/Spells/spell_warrior.cpp
index ab722693c1..ba6e24c28a 100644
--- a/src/server/scripts/Spells/spell_warrior.cpp
+++ b/src/server/scripts/Spells/spell_warrior.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/scripts/Spells/spells_script_loader.cpp b/src/server/scripts/Spells/spells_script_loader.cpp
index ea9aed61cc..ac6a6b2dbf 100644
--- a/src/server/scripts/Spells/spells_script_loader.cpp
+++ b/src/server/scripts/Spells/spells_script_loader.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/scripts/World/achievement_scripts.cpp b/src/server/scripts/World/achievement_scripts.cpp
index 40fdd9ef2a..eebd7cac89 100644
--- a/src/server/scripts/World/achievement_scripts.cpp
+++ b/src/server/scripts/World/achievement_scripts.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/scripts/World/action_ip_logger.cpp b/src/server/scripts/World/action_ip_logger.cpp
index 17a2808bd2..045c03d48d 100644
--- a/src/server/scripts/World/action_ip_logger.cpp
+++ b/src/server/scripts/World/action_ip_logger.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/scripts/World/areatrigger_scripts.cpp b/src/server/scripts/World/areatrigger_scripts.cpp
index 58adcbda7e..d031d44651 100644
--- a/src/server/scripts/World/areatrigger_scripts.cpp
+++ b/src/server/scripts/World/areatrigger_scripts.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
@@ -170,7 +170,7 @@ public:
{
QuestStatus QLR = player->GetQuestStatus(QUEST_LAST_RITES);
QuestStatus QBT = player->GetQuestStatus(QUEST_BREAKING_THROUGH);
- if (!(QLR == QUEST_STATUS_INCOMPLETE || QLR == QUEST_STATUS_COMPLETE ||
+ if (!(QLR == QUEST_STATUS_INCOMPLETE || QLR == QUEST_STATUS_COMPLETE || QLR == QUEST_STATUS_REWARDED ||
QBT == QUEST_STATUS_INCOMPLETE || QBT == QUEST_STATUS_COMPLETE))
return false;
diff --git a/src/server/scripts/World/boss_emerald_dragons.cpp b/src/server/scripts/World/boss_emerald_dragons.cpp
index 814871ee1d..002b56988b 100644
--- a/src/server/scripts/World/boss_emerald_dragons.cpp
+++ b/src/server/scripts/World/boss_emerald_dragons.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
@@ -105,9 +105,9 @@ struct emerald_dragonAI : public WorldBossAI
me->RemoveUnitFlag(UNIT_FLAG_NOT_SELECTABLE | UNIT_FLAG_NON_ATTACKABLE);
me->SetReactState(REACT_AGGRESSIVE);
DoCast(me, SPELL_MARK_OF_NATURE_AURA, true);
- events.ScheduleEvent(EVENT_TAIL_SWEEP, 4000);
- events.ScheduleEvent(EVENT_NOXIOUS_BREATH, urand(7500, 15000));
- events.ScheduleEvent(EVENT_SEEPING_FOG, urand(12500, 20000));
+ events.ScheduleEvent(EVENT_TAIL_SWEEP, 4s);
+ events.ScheduleEvent(EVENT_NOXIOUS_BREATH, 7500ms, 15s);
+ events.ScheduleEvent(EVENT_SEEPING_FOG, 12500ms, 20s);
events.ScheduleEvent(EVENT_SUMMON_PLAYER, 1s);
}
@@ -128,17 +128,17 @@ struct emerald_dragonAI : public WorldBossAI
// Despawntime is 2 minutes, so reschedule it for new cast after 2 minutes + a minor "random time" (30 seconds at max)
DoCast(me, SPELL_SEEPING_FOG_LEFT, true);
DoCast(me, SPELL_SEEPING_FOG_RIGHT, true);
- events.ScheduleEvent(EVENT_SEEPING_FOG, urand(120000, 150000));
+ events.ScheduleEvent(EVENT_SEEPING_FOG, 120s, 150s);
break;
case EVENT_NOXIOUS_BREATH:
// Noxious Breath is cast on random intervals, no less than 7.5 seconds between
DoCast(me, SPELL_NOXIOUS_BREATH);
- events.ScheduleEvent(EVENT_NOXIOUS_BREATH, urand(7500, 15000));
+ events.ScheduleEvent(EVENT_NOXIOUS_BREATH, 7500ms, 15s);
break;
case EVENT_TAIL_SWEEP:
// Tail Sweep is cast every two seconds, no matter what goes on in front of the dragon
DoCast(me, SPELL_TAIL_SWEEP);
- events.ScheduleEvent(EVENT_TAIL_SWEEP, 2000);
+ events.ScheduleEvent(EVENT_TAIL_SWEEP, 2s);
break;
case EVENT_SUMMON_PLAYER:
if (Unit* target = me->GetVictim())
@@ -219,7 +219,7 @@ public:
});
}
- void SetGUID(ObjectGuid guid, int32 type) override
+ void SetGUID(ObjectGuid const& guid, int32 type) override
{
if (type == GUID_DRAGON)
{
@@ -304,7 +304,7 @@ public:
{
_stage = 1;
emerald_dragonAI::Reset();
- events.ScheduleEvent(EVENT_LIGHTNING_WAVE, 12000);
+ events.ScheduleEvent(EVENT_LIGHTNING_WAVE, 12s);
}
void JustEngagedWith(Unit* who) override
@@ -344,7 +344,7 @@ public:
{
case EVENT_LIGHTNING_WAVE:
DoCastVictim(SPELL_LIGHTNING_WAVE);
- events.ScheduleEvent(EVENT_LIGHTNING_WAVE, urand(10000, 20000));
+ events.ScheduleEvent(EVENT_LIGHTNING_WAVE, 10s, 20s);
break;
default:
emerald_dragonAI::ExecuteEvent(eventId);
@@ -476,7 +476,7 @@ public:
if (moveType == FOLLOW_MOTION_TYPE && data == _summonerGuid.GetCounter())
{
me->CastSpell((Unit*)nullptr, SPELL_DARK_OFFERING, false);
- me->DespawnOrUnsummon(1000);
+ me->DespawnOrUnsummon(1s);
}
}
@@ -524,7 +524,7 @@ public:
{
_stage = 1;
emerald_dragonAI::Reset();
- events.ScheduleEvent(EVENT_VOLATILE_INFECTION, 12000);
+ events.ScheduleEvent(EVENT_VOLATILE_INFECTION, 12s);
}
void KilledUnit(Unit* who) override
@@ -559,7 +559,7 @@ public:
{
case EVENT_VOLATILE_INFECTION:
DoCastVictim(SPELL_VOLATILE_INFECTION);
- events.ScheduleEvent(EVENT_VOLATILE_INFECTION, 120000);
+ events.ScheduleEvent(EVENT_VOLATILE_INFECTION, 120s);
break;
default:
emerald_dragonAI::ExecuteEvent(eventId);
@@ -624,8 +624,8 @@ public:
_banishedTimer = 0;
emerald_dragonAI::Reset();
- events.ScheduleEvent(EVENT_ARCANE_BLAST, 12000);
- events.ScheduleEvent(EVENT_BELLOWING_ROAR, 30000);
+ events.ScheduleEvent(EVENT_ARCANE_BLAST, 12s);
+ events.ScheduleEvent(EVENT_BELLOWING_ROAR, 30s);
}
void JustEngagedWith(Unit* who) override
@@ -671,11 +671,11 @@ public:
{
case EVENT_ARCANE_BLAST:
DoCast(SPELL_ARCANE_BLAST);
- events.ScheduleEvent(EVENT_ARCANE_BLAST, urand(7000, 12000));
+ events.ScheduleEvent(EVENT_ARCANE_BLAST, 7s, 12s);
break;
case EVENT_BELLOWING_ROAR:
DoCast(SPELL_BELLOWING_ROAR);
- events.ScheduleEvent(EVENT_BELLOWING_ROAR, urand(20000, 30000));
+ events.ScheduleEvent(EVENT_BELLOWING_ROAR, 20s, 30s);
break;
default:
emerald_dragonAI::ExecuteEvent(eventId);
diff --git a/src/server/scripts/World/chat_log.cpp b/src/server/scripts/World/chat_log.cpp
index 4dac652129..3feb0c528f 100644
--- a/src/server/scripts/World/chat_log.cpp
+++ b/src/server/scripts/World/chat_log.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
@@ -27,16 +27,16 @@ public:
ChatLogScript() :
PlayerScript("ChatLogScript",
{
- PLAYERHOOK_ON_CHAT,
- PLAYERHOOK_ON_CHAT_WITH_GROUP,
- PLAYERHOOK_ON_CHAT_WITH_GUILD,
- PLAYERHOOK_ON_CHAT_WITH_CHANNEL,
- PLAYERHOOK_ON_CHAT_WITH_RECEIVER
+ PLAYERHOOK_CAN_PLAYER_USE_CHAT,
+ PLAYERHOOK_CAN_PLAYER_USE_PRIVATE_CHAT,
+ PLAYERHOOK_CAN_PLAYER_USE_GROUP_CHAT,
+ PLAYERHOOK_CAN_PLAYER_USE_GUILD_CHAT,
+ PLAYERHOOK_CAN_PLAYER_USE_CHANNEL_CHAT,
})
{
}
- void OnPlayerChat(Player* player, uint32 type, uint32 lang, std::string& msg) override
+ bool OnPlayerCanUseChat(Player* player, uint32 type, uint32 lang, std::string& msg) override
{
std::string logType = "";
std::string chatType = "";
@@ -56,14 +56,16 @@ public:
chatType = "yells";
break;
default:
- return;
+ return true;
}
LOG_INFO(logType, "Player {} {} (language {}): {}",
player->GetName(), chatType, lang, msg);
+
+ return true;
}
- void OnPlayerChat(Player* player, uint32 /*type*/, uint32 lang, std::string& msg, Player* receiver) override
+ bool OnPlayerCanUseChat(Player* player, uint32 /*type*/, uint32 lang, std::string& msg, Player* receiver) override
{
//! NOTE:
//! LANG_ADDON can only be sent by client in "PARTY", "RAID", "GUILD", "BATTLEGROUND", "WHISPER"
@@ -72,9 +74,11 @@ public:
LOG_INFO(logType + msgType, "Player {} {} {}: {}",
player->GetName(), msgType, receiver ? receiver->GetName() : "<unknown>", msg);
+
+ return true;
}
- void OnPlayerChat(Player* player, uint32 type, uint32 lang, std::string& msg, Group* group) override
+ bool OnPlayerCanUseChat(Player* player, uint32 type, uint32 lang, std::string& msg, Group* group) override
{
//! NOTE:
//! LANG_ADDON can only be sent by client in "PARTY", "RAID", "GUILD", "BATTLEGROUND", "WHISPER"
@@ -97,7 +101,7 @@ public:
msgType = "bg";
break;
default:
- return;
+ return true;
}
std::string role = (type == CHAT_MSG_PARTY_LEADER || type == CHAT_MSG_RAID_LEADER || type == CHAT_MSG_BATTLEGROUND_LEADER) ? "Leader player" : "Player";
@@ -106,9 +110,11 @@ public:
LOG_INFO(logType + msgType, "{} {} {} {} with leader {}: {}",
role, player->GetName(), action, msgType, targetGroup, msg);
+
+ return true;
}
- void OnPlayerChat(Player* player, uint32 type, uint32 lang, std::string& msg, Guild* guild) override
+ bool OnPlayerCanUseChat(Player* player, uint32 type, uint32 lang, std::string& msg, Guild* guild) override
{
//! NOTE:
//! LANG_ADDON can only be sent by client in "PARTY", "RAID", "GUILD", "BATTLEGROUND", "WHISPER"
@@ -124,14 +130,16 @@ public:
msgType = "guild.officer";
break;
default:
- return;
+ return true;
}
LOG_INFO(logType + msgType, "Player {} tells {} \"{}\": {}",
player->GetName(), msgType, guild ? guild->GetName() : "<unknown>", msg);
+
+ return true;
}
- void OnPlayerChat(Player* player, uint32 /*type*/, uint32 /*lang*/, std::string& msg, Channel* channel) override
+ bool OnPlayerCanUseChat(Player* player, uint32 /*type*/, uint32 /*lang*/, std::string& msg, Channel* channel) override
{
bool isSystem = channel &&
(channel->HasFlag(CHANNEL_FLAG_TRADE) ||
@@ -152,6 +160,8 @@ public:
LOG_INFO("chat.channel." + channelName, "Player {} tells channel {}: {}",
player->GetName(), channelName, msg);
}
+
+ return true;
}
};
diff --git a/src/server/scripts/World/go_scripts.cpp b/src/server/scripts/World/go_scripts.cpp
index ff9adc9635..fa258e37bd 100644
--- a/src/server/scripts/World/go_scripts.cpp
+++ b/src/server/scripts/World/go_scripts.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
@@ -283,7 +283,7 @@ public:
for (std::list<Creature*>::const_iterator itr = cList.begin(); itr != cList.end(); ++itr)
{
player->KilledMonsterCredit(NPC_WINTERFIN_TADPOLE);
- (*itr)->DespawnOrUnsummon(urand(45000, 60000));
+ (*itr)->DespawnOrUnsummon(randtime(45s, 60s));
(*itr)->GetMotionMaster()->MoveFollow(player, 1.0f, frand(0.0f, 2 * M_PI), MOTION_SLOT_CONTROLLED);
}
}
@@ -412,7 +412,7 @@ public:
void Initialize()
{
- _events.ScheduleEvent(EVENT_CHECK, 1000);
+ _events.ScheduleEvent(EVENT_CHECK, 1s);
}
void UpdateAI(uint32 const diff) override
@@ -432,7 +432,7 @@ public:
}
else
{
- _events.ScheduleEvent(EVENT_CHECK, 1000);
+ _events.ScheduleEvent(EVENT_CHECK, 1s);
}
break;
}
@@ -474,7 +474,7 @@ public:
{
go_l70_etc_musicAI(GameObject* go) : GameObjectAI(go)
{
- _events.ScheduleEvent(EVENT_ETC_START_MUSIC, 1600);
+ _events.ScheduleEvent(EVENT_ETC_START_MUSIC, 1600ms);
}
void UpdateAI(uint32 diff) override
@@ -489,7 +489,7 @@ public:
me->PlayDirectMusic(MUSIC_L70_ETC_MUSIC_LOUD);
else
me->PlayDirectMusic(MUSIC_L70_ETC_MUSIC);
- _events.ScheduleEvent(EVENT_ETC_START_MUSIC, 1600); // Every 1.6 seconds SMSG_PLAY_MUSIC packet (PlayDirectMusic) is pushed to the client (sniffed value)
+ _events.ScheduleEvent(EVENT_ETC_START_MUSIC, 1600ms); // Every 1.6 seconds SMSG_PLAY_MUSIC packet (PlayDirectMusic) is pushed to the client (sniffed value)
break;
default:
break;
@@ -521,15 +521,12 @@ enum BrewfestMusic
};
// These are in seconds
-enum BrewfestMusicTime
-{
- EVENT_BREWFESTDWARF01_TIME = 95000,
- EVENT_BREWFESTDWARF02_TIME = 155000,
- EVENT_BREWFESTDWARF03_TIME = 23000,
- EVENT_BREWFESTGOBLIN01_TIME = 68000,
- EVENT_BREWFESTGOBLIN02_TIME = 93000,
- EVENT_BREWFESTGOBLIN03_TIME = 28000
-};
+constexpr Milliseconds EVENT_BREWFESTDWARF01_TIME = 95s;
+constexpr Milliseconds EVENT_BREWFESTDWARF02_TIME = 155s;
+constexpr Milliseconds EVENT_BREWFESTDWARF03_TIME = 23s;
+constexpr Milliseconds EVENT_BREWFESTGOBLIN01_TIME = 68s;
+constexpr Milliseconds EVENT_BREWFESTGOBLIN02_TIME = 93s;
+constexpr Milliseconds EVENT_BREWFESTGOBLIN03_TIME = 28s;
enum BrewfestMusicEvents
{
@@ -546,8 +543,8 @@ public:
{
go_brewfest_musicAI(GameObject* go) : GameObjectAI(go)
{
- _events.ScheduleEvent(EVENT_BM_SELECT_MUSIC, 1000);
- _events.ScheduleEvent(EVENT_BM_START_MUSIC, 1500);
+ _events.ScheduleEvent(EVENT_BM_SELECT_MUSIC, 1s);
+ _events.ScheduleEvent(EVENT_BM_START_MUSIC, 1500ms);
_currentMusicEvent = EVENT_BREWFESTGOBLIN01;
}
@@ -564,7 +561,7 @@ public:
break;
// Select random music sample
uint32 rnd = urand(0, 2);
- uint32 musicTime = 1000;
+ Milliseconds musicTime = 1s;
//Restart the current selected music
_currentMusicEvent = 0;
//Check zone to play correct music
@@ -652,7 +649,7 @@ public:
{
me->PlayDirectMusic(_currentMusicEvent);
}
- _events.ScheduleEvent(EVENT_BM_START_MUSIC, 5000); // Every 5 second's SMSG_PLAY_MUSIC packet (PlayDirectMusic) is pushed to the client
+ _events.ScheduleEvent(EVENT_BM_START_MUSIC, 5s); // Every 5 second's SMSG_PLAY_MUSIC packet (PlayDirectMusic) is pushed to the client
break;
default:
break;
@@ -695,7 +692,7 @@ public:
go_pirate_day_musicAI(GameObject* go) : GameObjectAI(go)
{
- _events.ScheduleEvent(EVENT_PDM_START_MUSIC, 1000);
+ _events.ScheduleEvent(EVENT_PDM_START_MUSIC, 1s);
}
void UpdateAI(uint32 diff) override
@@ -709,7 +706,7 @@ public:
if (!IsHolidayActive(HOLIDAY_PIRATES_DAY))
break;
me->PlayDirectMusic(MUSIC_PIRATE_DAY_MUSIC);
- _events.ScheduleEvent(EVENT_PDM_START_MUSIC, 5000); // Every 5 second's SMSG_PLAY_MUSIC packet (PlayDirectMusic) is pushed to the client (sniffed value)
+ _events.ScheduleEvent(EVENT_PDM_START_MUSIC, 5s); // Every 5 second's SMSG_PLAY_MUSIC packet (PlayDirectMusic) is pushed to the client (sniffed value)
break;
default:
break;
@@ -750,7 +747,7 @@ public:
go_darkmoon_faire_musicAI(GameObject* go) : GameObjectAI(go)
{
- _events.ScheduleEvent(EVENT_DFM_START_MUSIC, 1000);
+ _events.ScheduleEvent(EVENT_DFM_START_MUSIC, 1s);
}
void UpdateAI(uint32 diff) override
@@ -764,7 +761,7 @@ public:
if (!IsHolidayActive(HOLIDAY_DARKMOON_FAIRE_ELWYNN) || !IsHolidayActive(HOLIDAY_DARKMOON_FAIRE_THUNDER) || !IsHolidayActive(HOLIDAY_DARKMOON_FAIRE_SHATTRATH))
break;
me->PlayDirectMusic(MUSIC_DARKMOON_FAIRE_MUSIC);
- _events.ScheduleEvent(EVENT_DFM_START_MUSIC, 5000); // Every 5 second's SMSG_PLAY_MUSIC packet (PlayDirectMusic) is pushed to the client (sniffed value)
+ _events.ScheduleEvent(EVENT_DFM_START_MUSIC, 5s); // Every 5 second's SMSG_PLAY_MUSIC packet (PlayDirectMusic) is pushed to the client (sniffed value)
break;
default:
break;
@@ -805,7 +802,7 @@ public:
{
go_midsummer_musicAI(GameObject* go) : GameObjectAI(go)
{
- _events.ScheduleEvent(EVENT_MM_START_MUSIC, 1000);
+ _events.ScheduleEvent(EVENT_MM_START_MUSIC, 1s);
}
void UpdateAI(uint32 diff) override
@@ -836,7 +833,7 @@ public:
}
}
- _events.ScheduleEvent(EVENT_MM_START_MUSIC, 5000); // Every 5 second's SMSG_PLAY_MUSIC packet (PlayDirectMusic) is pushed to the client (sniffed value)
+ _events.ScheduleEvent(EVENT_MM_START_MUSIC, 5s); // Every 5 second's SMSG_PLAY_MUSIC packet (PlayDirectMusic) is pushed to the client (sniffed value)
break;
}
default:
@@ -895,7 +892,7 @@ public:
_playerGUID = player->GetGUID();
me->SetGameObjectFlag((GameObjectFlags)1);
me->RemoveByteFlag(GAMEOBJECT_BYTES_1, 0, 1);
- _events.ScheduleEvent(EVENT_STILLBLADE_SPAWN, 1000);
+ _events.ScheduleEvent(EVENT_STILLBLADE_SPAWN, 1s);
}
}
return true;
@@ -914,7 +911,7 @@ public:
if (Player* player = ObjectAccessor::GetPlayer(*me, _playerGUID))
{
player->SummonCreature(NPC_STILLBLADE, 8032.587f, -7524.518f, 149.68073f, 6.161012172698974609f, TEMPSUMMON_DEAD_DESPAWN, 60000);
- _events.ScheduleEvent(EVENT_RESET_BRAZIER, 4000);
+ _events.ScheduleEvent(EVENT_RESET_BRAZIER, 4s);
}
break;
}
@@ -1066,7 +1063,7 @@ class go_southfury_moonstone : public GameObjectScript
public:
go_southfury_moonstone() : GameObjectScript("go_southfury_moonstone") { }
- bool OnGossipHello(Player* player, GameObject* /*go*/) override
+ bool OnGossipHello(Player* player, GameObject* go) override
{
//implicitTarget=48 not implemented as of writing this code, and manual summon may be just ok for our purpose
//player->CastSpell(player, SPELL_SUMMON_RIZZLE, false);
@@ -1076,6 +1073,7 @@ public:
// no need casting spell blackjack, it's casted by script npc_rizzle_sprysprocket.
//creature->CastSpell(player, SPELL_BLACKJACK, false);
creature->AI()->AttackStart(player);
+ go->DespawnOrUnsummon(8000ms);
}
return false;
@@ -1696,7 +1694,7 @@ public:
for (std::list<Creature*>::const_iterator itr = childrenList.begin(); itr != childrenList.end(); ++itr)
{
player->KilledMonsterCredit(NPC_CAPTIVE_CHILD, (*itr)->GetGUID());
- (*itr)->DespawnOrUnsummon(5000);
+ (*itr)->DespawnOrUnsummon(5s);
(*itr)->GetMotionMaster()->MovePoint(1, go->GetPositionX() + 5, go->GetPositionY(), go->GetPositionZ());
(*itr)->AI()->Talk(SAY_FREE_0);
(*itr)->GetMotionMaster()->Clear();
@@ -1821,7 +1819,7 @@ public:
{
// Reset
once = false;
- _events.ScheduleEvent(EVENT_TIME, 1000);
+ _events.ScheduleEvent(EVENT_TIME, 1s);
}
while (uint32 eventId = _events.ExecuteEvent())
@@ -1844,7 +1842,7 @@ public:
// Schedule ring event
for (auto i = 0; i < _rings; ++i)
{
- _events.ScheduleEvent(EVENT_RING_BELL, (i * 4 + 1) * 1000);
+ _events.ScheduleEvent(EVENT_RING_BELL, Seconds(i * 4 + 1));
}
break;
}
diff --git a/src/server/scripts/World/guards.cpp b/src/server/scripts/World/guards.cpp
index 30a0f3615b..293d61db24 100644
--- a/src/server/scripts/World/guards.cpp
+++ b/src/server/scripts/World/guards.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/scripts/World/item_scripts.cpp b/src/server/scripts/World/item_scripts.cpp
index 7cf898de23..81b2cbb8d7 100644
--- a/src/server/scripts/World/item_scripts.cpp
+++ b/src/server/scripts/World/item_scripts.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/scripts/World/mob_generic_creature.cpp b/src/server/scripts/World/mob_generic_creature.cpp
index 57946538ce..03e9acbc65 100644
--- a/src/server/scripts/World/mob_generic_creature.cpp
+++ b/src/server/scripts/World/mob_generic_creature.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/scripts/World/npc_innkeeper.cpp b/src/server/scripts/World/npc_innkeeper.cpp
index 46b447bdb8..6919a41fb8 100644
--- a/src/server/scripts/World/npc_innkeeper.cpp
+++ b/src/server/scripts/World/npc_innkeeper.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/scripts/World/npc_professions.cpp b/src/server/scripts/World/npc_professions.cpp
index 8bd08d4ff4..afda87fdaf 100644
--- a/src/server/scripts/World/npc_professions.cpp
+++ b/src/server/scripts/World/npc_professions.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/scripts/World/npc_stave_of_ancients.cpp b/src/server/scripts/World/npc_stave_of_ancients.cpp
index 20c64c4921..fbe9a9c366 100644
--- a/src/server/scripts/World/npc_stave_of_ancients.cpp
+++ b/src/server/scripts/World/npc_stave_of_ancients.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
@@ -42,7 +42,7 @@ void NPCStaveQuestAI::RevealForm()
{
me->UpdateEntry(GetFormEntry("evil"));
me->SetFullHealth();
- me->DespawnOrUnsummon(900000);
+ me->DespawnOrUnsummon(900s);
}
}
@@ -306,11 +306,11 @@ public:
me->CastSpell(who, SPELL_FOOLS_PLIGHT, true);
}
- events.ScheduleEvent(EVENT_FOOLS_PLIGHT, urand(2000, 3000));
- events.ScheduleEvent(EVENT_RANGE_CHECK, 1000);
- events.ScheduleEvent(EVENT_UNFAIR_FIGHT, 1000);
- events.ScheduleEvent(ARTORIUS_EVENT_DEMONIC_DOOM, urand(3000, 5000));
- events.ScheduleEvent(ARTORIUS_EVENT_DEMONIC_ENRAGE, urand(6000, 8000));
+ events.ScheduleEvent(EVENT_FOOLS_PLIGHT, 2s, 3s);
+ events.ScheduleEvent(EVENT_RANGE_CHECK, 1s);
+ events.ScheduleEvent(EVENT_UNFAIR_FIGHT, 1s);
+ events.ScheduleEvent(ARTORIUS_EVENT_DEMONIC_DOOM, 3s, 5s);
+ events.ScheduleEvent(ARTORIUS_EVENT_DEMONIC_ENRAGE, 6s, 8s);
}
void UpdateAI(uint32 diff) override
@@ -325,7 +325,7 @@ public:
me->Say(ARTORIUS_SAY);
me->HandleEmoteCommand(EMOTE_ONESHOT_TALK);
me->RemoveUnitFlag(UNIT_FLAG_NON_ATTACKABLE);
- events.ScheduleEvent(EVENT_REVEAL, 5000);
+ events.ScheduleEvent(EVENT_REVEAL, 5s);
break;
case EVENT_REVEAL:
RevealForm();
@@ -355,7 +355,7 @@ public:
{
me->CastSpell(me->GetVictim(), SPELL_FOOLS_PLIGHT, true);
}
- events.RepeatEvent(urand(3000, 6000));
+ events.Repeat(3s, 6s);
break;
case EVENT_RANGE_CHECK:
if (!me->GetVictim() || !me->GetVictim()->IsWithinDist2d(me, 60.0f))
@@ -364,7 +364,7 @@ public:
}
else
{
- events.RepeatEvent(2000);
+ events.Repeat(2s);
}
break;
case EVENT_UNFAIR_FIGHT:
@@ -373,21 +373,21 @@ public:
SetHomePosition();
me->SetUnitFlag(UNIT_FLAG_DISABLE_MOVE | UNIT_FLAG_NON_ATTACKABLE | UNIT_FLAG_NOT_ATTACKABLE_1);
me->SetImmuneToAll(true);
- me->DespawnOrUnsummon(5000);
+ me->DespawnOrUnsummon(5s);
break;
}
- events.RepeatEvent(2000);
+ events.Repeat(2s);
break;
case ARTORIUS_EVENT_DEMONIC_DOOM:
if (!me->GetVictim()->HasAura(ARTORIUS_SPELL_DEMONIC_DOOM))
{
me->CastSpell(me->GetVictim(), ARTORIUS_SPELL_DEMONIC_DOOM, false);
}
- events.RepeatEvent(urand(5000, 10000));
+ events.Repeat(5s, 10s);
break;
case ARTORIUS_EVENT_DEMONIC_ENRAGE:
me->CastSpell(me, SPELL_DEMONIC_ENRAGE, false);
- events.RepeatEvent(urand(22000, 39000));
+ events.Repeat(22s, 39s);
break;
}
@@ -423,7 +423,7 @@ public:
if (action == EVENT_ENCOUNTER_START)
{
PrepareForEncounter();
- events.ScheduleEvent(EVENT_ENCOUNTER_START, 5000);
+ events.ScheduleEvent(EVENT_ENCOUNTER_START, 5s);
}
}
};
@@ -476,7 +476,7 @@ public:
{
if (flaggedForDespawn)
{
- me->DespawnOrUnsummon(0);
+ me->DespawnOrUnsummon(0ms);
flaggedForDespawn = false;
}
}
@@ -640,7 +640,7 @@ public:
}
else
{
- Precious()->DespawnOrUnsummon(0);
+ Precious()->DespawnOrUnsummon(0ms);
}
}
@@ -649,7 +649,7 @@ public:
ResetState(SIMONE_SPELL_SILENCE);
events.Reset();
- events.ScheduleEvent(SIMONE_EVENT_CHECK_PET_STATE, 2000);
+ events.ScheduleEvent(SIMONE_EVENT_CHECK_PET_STATE, 2s);
}
void JustEngagedWith(Unit* who) override
@@ -664,13 +664,13 @@ public:
me->CastSpell(who, SPELL_FOOLS_PLIGHT, true);
}
- events.ScheduleEvent(EVENT_RANGE_CHECK, 1000);
- events.ScheduleEvent(EVENT_UNFAIR_FIGHT, 1000);
- events.ScheduleEvent(SIMONE_EVENT_CHAIN_LIGHTNING, 3000);
- events.ScheduleEvent(SIMONE_EVENT_TEMPTRESS_KISS, 1000);
+ events.ScheduleEvent(EVENT_RANGE_CHECK, 1s);
+ events.ScheduleEvent(EVENT_UNFAIR_FIGHT, 1s);
+ events.ScheduleEvent(SIMONE_EVENT_CHAIN_LIGHTNING, 3s);
+ events.ScheduleEvent(SIMONE_EVENT_TEMPTRESS_KISS, 1s);
}
- events.ScheduleEvent(EVENT_FOOLS_PLIGHT, urand(2000, 3000));
+ events.ScheduleEvent(EVENT_FOOLS_PLIGHT, 2s, 3s);
}
void UpdateAI(uint32 diff) override
@@ -685,7 +685,7 @@ public:
me->TextEmote(SIMONE_EMOTE, GetGossipPlayer());
me->HandleEmoteCommand(EMOTE_ONESHOT_NONE);
me->HandleEmoteCommand(EMOTE_ONESHOT_LAUGH);
- events.ScheduleEvent(SIMONE_EVENT_TALK, 4000);
+ events.ScheduleEvent(SIMONE_EVENT_TALK, 4s);
break;
case SIMONE_EVENT_TALK:
me->Say(SIMONE_SAY, GetGossipPlayer());
@@ -695,7 +695,7 @@ public:
{
Precious()->RemoveUnitFlag(UNIT_FLAG_NON_ATTACKABLE);
}
- events.ScheduleEvent(EVENT_REVEAL, 5000);
+ events.ScheduleEvent(EVENT_REVEAL, 5s);
break;
case EVENT_REVEAL:
RevealForm();
@@ -713,7 +713,7 @@ public:
HandlePetRespawn();
}
- events.ScheduleEvent(SIMONE_EVENT_CHECK_PET_STATE, 1000);
+ events.ScheduleEvent(SIMONE_EVENT_CHECK_PET_STATE, 1s);
}
break;
}
@@ -730,7 +730,7 @@ public:
if (me->HasUnitState(UNIT_STATE_CASTING) && eventId != EVENT_RANGE_CHECK && eventId != EVENT_UNFAIR_FIGHT)
{
- events.RepeatEvent(1000);
+ events.Repeat(1s);
return;
}
@@ -742,7 +742,7 @@ public:
{
me->CastSpell(me->GetVictim(), SPELL_FOOLS_PLIGHT, true);
}
- events.RepeatEvent(urand(3000, 6000));
+ events.Repeat(3s, 6s);
break;
case EVENT_RANGE_CHECK:
if (!me->GetVictim()->IsWithinDist2d(me, 60.0f))
@@ -751,7 +751,7 @@ public:
}
else
{
- events.RepeatEvent(2000);
+ events.Repeat(2s);
}
break;
case EVENT_UNFAIR_FIGHT:
@@ -765,20 +765,20 @@ public:
me->SetUnitFlag(UNIT_FLAG_DISABLE_MOVE | UNIT_FLAG_NON_ATTACKABLE | UNIT_FLAG_NOT_ATTACKABLE_1);
me->SetImmuneToAll(true);
- Precious()->DespawnOrUnsummon(5000);
+ Precious()->DespawnOrUnsummon(5s);
- me->DespawnOrUnsummon(5000);
+ me->DespawnOrUnsummon(5s);
break;
}
- events.RepeatEvent(2000);
+ events.Repeat(2s);
break;
case SIMONE_EVENT_CHAIN_LIGHTNING:
me->CastSpell(me->GetVictim(), SIMONE_SPELL_CHAIN_LIGHTNING, false);
- events.RepeatEvent(7000);
+ events.Repeat(7s);
break;
case SIMONE_EVENT_TEMPTRESS_KISS:
me->CastSpell(me->GetVictim(), SIMONE_SPELL_TEMPTRESS_KISS, false);
- events.RepeatEvent(45000);
+ events.Repeat(45s);
break;
}
@@ -805,7 +805,7 @@ public:
PreciousAI()->PrepareForEncounter();
}
gossipPlayerGUID = playerGUID;
- events.ScheduleEvent(EVENT_ENCOUNTER_START, 1000);
+ events.ScheduleEvent(EVENT_ENCOUNTER_START, 1s);
}
};
@@ -906,11 +906,11 @@ public:
me->CastSpell(who, SPELL_FOOLS_PLIGHT, true);
}
- events.ScheduleEvent(EVENT_FOOLS_PLIGHT, urand(2000, 3000));
- events.ScheduleEvent(EVENT_RANGE_CHECK, 1000);
- events.ScheduleEvent(EVENT_UNFAIR_FIGHT, 1000);
- events.ScheduleEvent(NELSON_EVENT_DREADFUL_FRIGHT, 10000);
- events.ScheduleEvent(NELSON_EVENT_CREEPING_DOOM, 5000);
+ events.ScheduleEvent(EVENT_FOOLS_PLIGHT, 2s, 3s);
+ events.ScheduleEvent(EVENT_RANGE_CHECK, 1s);
+ events.ScheduleEvent(EVENT_UNFAIR_FIGHT, 1s);
+ events.ScheduleEvent(NELSON_EVENT_DREADFUL_FRIGHT, 10s);
+ events.ScheduleEvent(NELSON_EVENT_CREEPING_DOOM, 5s);
}
void UpdateAI(uint32 diff) override
@@ -925,7 +925,7 @@ public:
me->Say(NELSON_SAY);
me->HandleEmoteCommand(EMOTE_ONESHOT_TALK);
me->RemoveUnitFlag(UNIT_FLAG_NON_ATTACKABLE);
- events.ScheduleEvent(EVENT_REVEAL, 5000);
+ events.ScheduleEvent(EVENT_REVEAL, 5s);
break;
case EVENT_REVEAL:
RevealForm();
@@ -944,7 +944,7 @@ public:
if (me->HasUnitState(UNIT_STATE_CASTING))
{
- events.RepeatEvent(1000);
+ events.Repeat(1s);
return;
}
@@ -956,7 +956,7 @@ public:
{
me->CastSpell(me->GetVictim(), SPELL_FOOLS_PLIGHT, true);
}
- events.RepeatEvent(urand(3000, 6000));
+ events.Repeat(3s, 6s);
break;
case EVENT_RANGE_CHECK:
if (!me->GetVictim()->IsWithinDist2d(me, 60.0f))
@@ -965,7 +965,7 @@ public:
}
else
{
- events.RepeatEvent(2000);
+ events.Repeat(2s);
}
break;
case EVENT_UNFAIR_FIGHT:
@@ -978,18 +978,18 @@ public:
me->CombatStop(true);
me->Say(NELSON_DESPAWN_SAY);
me->HandleEmoteCommand(EMOTE_ONESHOT_TALK);
- me->DespawnOrUnsummon(5000);
+ me->DespawnOrUnsummon(5s);
break;
}
- events.RepeatEvent(2000);
+ events.Repeat(2s);
break;
case NELSON_EVENT_DREADFUL_FRIGHT:
me->CastSpell(me->GetVictim(), NELSON_SPELL_DREADFUL_FRIGHT, false);
- events.RepeatEvent(urand(12000, 19000));
+ events.Repeat(12s, 19s);
break;
case NELSON_EVENT_CREEPING_DOOM:
me->CastSpell(me->GetVictim(), NELSON_SPELL_CREEPING_DOOM, false);
- events.RepeatEvent(urand(10000, 12000));
+ events.Repeat(10s, 12s);
break;
}
@@ -1016,7 +1016,7 @@ public:
if (action == EVENT_ENCOUNTER_START)
{
PrepareForEncounter();
- events.ScheduleEvent(EVENT_ENCOUNTER_START, 5000);
+ events.ScheduleEvent(EVENT_ENCOUNTER_START, 5s);
}
}
};
@@ -1077,12 +1077,12 @@ public:
me->CastSpell(who, SPELL_FOOLS_PLIGHT, true);
}
- events.ScheduleEvent(FRANKLIN_EVENT_DEMONIC_ENRAGE, urand(9000, 13000));
- events.ScheduleEvent(EVENT_RANGE_CHECK, 1000);
- events.ScheduleEvent(EVENT_UNFAIR_FIGHT, 1000);
+ events.ScheduleEvent(FRANKLIN_EVENT_DEMONIC_ENRAGE, 9s, 13s);
+ events.ScheduleEvent(EVENT_RANGE_CHECK, 1s);
+ events.ScheduleEvent(EVENT_UNFAIR_FIGHT, 1s);
}
- events.ScheduleEvent(EVENT_FOOLS_PLIGHT, urand(2000, 3000));
+ events.ScheduleEvent(EVENT_FOOLS_PLIGHT, 2s, 3s);
}
void UpdateAI(uint32 diff) override
@@ -1097,7 +1097,7 @@ public:
me->Say(FRANKLIN_SAY, GetGossipPlayer());
me->HandleEmoteCommand(EMOTE_ONESHOT_TALK);
me->RemoveUnitFlag(UNIT_FLAG_NON_ATTACKABLE);
- events.ScheduleEvent(EVENT_REVEAL, 5000);
+ events.ScheduleEvent(EVENT_REVEAL, 5s);
break;
case EVENT_REVEAL:
RevealForm();
@@ -1116,7 +1116,7 @@ public:
if (me->HasUnitState(UNIT_STATE_CASTING))
{
- events.RepeatEvent(1000);
+ events.Repeat(1s);
return;
}
@@ -1128,7 +1128,7 @@ public:
{
me->CastSpell(me->GetVictim(), SPELL_FOOLS_PLIGHT, true);
}
- events.RepeatEvent(urand(3000, 6000));
+ events.Repeat(3s, 6s);
break;
case EVENT_RANGE_CHECK:
if (!me->GetVictim()->IsWithinDist2d(me, 60.0f))
@@ -1137,7 +1137,7 @@ public:
}
else
{
- events.RepeatEvent(2000);
+ events.Repeat(2s);
}
break;
case EVENT_UNFAIR_FIGHT:
@@ -1149,15 +1149,15 @@ public:
me->CombatStop(true);
me->Say(FRANKLIN_DESPAWN_SAY);
me->HandleEmoteCommand(EMOTE_ONESHOT_TALK);
- me->DespawnOrUnsummon(5000);
+ me->DespawnOrUnsummon(5s);
break;
}
- events.RepeatEvent(2000);
+ events.Repeat(2s);
break;
case FRANKLIN_EVENT_DEMONIC_ENRAGE:
me->CastSpell(me, SPELL_DEMONIC_ENRAGE, false);
me->TextEmote(FRANKLIN_ENRAGE_EMOTE);
- events.RepeatEvent(urand(9000, 22000));
+ events.Repeat(9s, 22s);
break;
}
@@ -1189,7 +1189,7 @@ public:
{
PrepareForEncounter();
gossipPlayerGUID = playerGUID;
- events.ScheduleEvent(EVENT_ENCOUNTER_START, 5000);
+ events.ScheduleEvent(EVENT_ENCOUNTER_START, 5s);
}
};
diff --git a/src/server/scripts/World/npc_stave_of_ancients.h b/src/server/scripts/World/npc_stave_of_ancients.h
index f517218f6c..f21ac37516 100644
--- a/src/server/scripts/World/npc_stave_of_ancients.h
+++ b/src/server/scripts/World/npc_stave_of_ancients.h
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/scripts/World/npc_taxi.cpp b/src/server/scripts/World/npc_taxi.cpp
index 42bcd1cfaf..4d5cee1bfd 100644
--- a/src/server/scripts/World/npc_taxi.cpp
+++ b/src/server/scripts/World/npc_taxi.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/scripts/World/npcs_special.cpp b/src/server/scripts/World/npcs_special.cpp
index 6612f6dc09..cb669c3f0e 100644
--- a/src/server/scripts/World/npcs_special.cpp
+++ b/src/server/scripts/World/npcs_special.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
@@ -68,7 +68,7 @@ public:
npc_elder_clearwaterAI(Creature* c) : ScriptedAI(c)
{
events.Reset();
- events.ScheduleEvent(EVENT_CLEARWATER_ANNOUNCE, 1000, 1, 0);
+ events.ScheduleEvent(EVENT_CLEARWATER_ANNOUNCE, 1s, 1, 0);
finished = false;
preWarning = false;
startWarning = false;
@@ -126,7 +126,7 @@ public:
}
}
- events.RepeatEvent(1000);
+ events.Repeat(1s);
break;
}
}
@@ -563,10 +563,6 @@ public:
if (!SpawnAssoc)
return;
- // check if they're hostile
- if (!(me->IsHostileTo(who) || who->IsHostileTo(me)))
- return;
-
if (me->IsValidAttackTarget(who))
{
Player* playerTarget = who->ToPlayer();
@@ -1421,7 +1417,8 @@ public:
break;
}
- Start(false, true);
+ me->SetWalk(true);
+ Start(false);
}
else
EnterEvadeMode(); //something went wrong
diff --git a/src/server/scripts/World/player_scripts.cpp b/src/server/scripts/World/player_scripts.cpp
index 9fee806a1b..22e0bd85a6 100644
--- a/src/server/scripts/World/player_scripts.cpp
+++ b/src/server/scripts/World/player_scripts.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/scripts/World/scourge_invasion.cpp b/src/server/scripts/World/scourge_invasion.cpp
index dc61a79cea..4eafd53065 100644
--- a/src/server/scripts/World/scourge_invasion.cpp
+++ b/src/server/scripts/World/scourge_invasion.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
@@ -63,14 +63,8 @@ struct npc_herald_of_the_lich_king : public ScriptedAI
void UpdateWeather(bool startEvent)
{
- if (Weather* weather = WeatherMgr::FindWeather(me->GetZoneId()))
- {
- if (startEvent)
- weather->SetWeather(WEATHER_TYPE_STORM, 0.25f);
- else
- weather->SetWeather(WEATHER_TYPE_RAIN, 0.0f);
- }
- else if (Weather* weather = WeatherMgr::AddWeather(me->GetZoneId()))
+ Weather* weather = me->GetMap()->GetOrGenerateZoneDefaultWeather(me->GetZoneId());
+ if (weather)
{
if (startEvent)
weather->SetWeather(WEATHER_TYPE_STORM, 0.25f);
@@ -956,14 +950,8 @@ struct npc_pallid_horror : public ScriptedAI
void UpdateWeather(bool startEvent)
{
- if (Weather* weather = WeatherMgr::FindWeather(me->GetZoneId()))
- {
- if (startEvent)
- weather->SetWeather(WEATHER_TYPE_STORM, 0.25f);
- else
- weather->SetWeather(WEATHER_TYPE_RAIN, 0.0f);
- }
- else if (Weather* weather = WeatherMgr::AddWeather(me->GetZoneId()))
+ Weather* weather = me->GetMap()->GetOrGenerateZoneDefaultWeather(me->GetZoneId());
+ if (weather)
{
if (startEvent)
weather->SetWeather(WEATHER_TYPE_STORM, 0.25f);
diff --git a/src/server/scripts/World/scourge_invasion.h b/src/server/scripts/World/scourge_invasion.h
index 0bc511acee..bc43779f97 100644
--- a/src/server/scripts/World/scourge_invasion.h
+++ b/src/server/scripts/World/scourge_invasion.h
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/scripts/World/server_mail.cpp b/src/server/scripts/World/server_mail.cpp
index 07272cd20e..1a8d418a47 100644
--- a/src/server/scripts/World/server_mail.cpp
+++ b/src/server/scripts/World/server_mail.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/scripts/World/suns_reach_reclamation.cpp b/src/server/scripts/World/suns_reach_reclamation.cpp
index 4a81e35378..1a4cf4b149 100644
--- a/src/server/scripts/World/suns_reach_reclamation.cpp
+++ b/src/server/scripts/World/suns_reach_reclamation.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/scripts/World/transport_zeppelin.h b/src/server/scripts/World/transport_zeppelin.h
index 232e812002..dd252a14e9 100644
--- a/src/server/scripts/World/transport_zeppelin.h
+++ b/src/server/scripts/World/transport_zeppelin.h
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/scripts/World/transport_zeppelins.cpp b/src/server/scripts/World/transport_zeppelins.cpp
index 2cb8496921..3edbceca9b 100644
--- a/src/server/scripts/World/transport_zeppelins.cpp
+++ b/src/server/scripts/World/transport_zeppelins.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/scripts/World/world_script_loader.cpp b/src/server/scripts/World/world_script_loader.cpp
index 7cdf5e8bf0..08cd25e916 100644
--- a/src/server/scripts/World/world_script_loader.cpp
+++ b/src/server/scripts/World/world_script_loader.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/shared/DataStores/DBCDatabaseLoader.cpp b/src/server/shared/DataStores/DBCDatabaseLoader.cpp
index 4208b3c40b..44e65653d1 100644
--- a/src/server/shared/DataStores/DBCDatabaseLoader.cpp
+++ b/src/server/shared/DataStores/DBCDatabaseLoader.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/shared/DataStores/DBCDatabaseLoader.h b/src/server/shared/DataStores/DBCDatabaseLoader.h
index 4d7627ffb9..313c49897c 100644
--- a/src/server/shared/DataStores/DBCDatabaseLoader.h
+++ b/src/server/shared/DataStores/DBCDatabaseLoader.h
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/shared/DataStores/DBCEnums.h b/src/server/shared/DataStores/DBCEnums.h
index b0b6b45d65..9d73f761ec 100644
--- a/src/server/shared/DataStores/DBCEnums.h
+++ b/src/server/shared/DataStores/DBCEnums.h
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/shared/DataStores/DBCStorageIterator.h b/src/server/shared/DataStores/DBCStorageIterator.h
index c1ea3a0713..fd0b5eb21f 100644
--- a/src/server/shared/DataStores/DBCStorageIterator.h
+++ b/src/server/shared/DataStores/DBCStorageIterator.h
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/shared/DataStores/DBCStore.cpp b/src/server/shared/DataStores/DBCStore.cpp
index c4e1af2e5d..80f9e5d94b 100644
--- a/src/server/shared/DataStores/DBCStore.cpp
+++ b/src/server/shared/DataStores/DBCStore.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/shared/DataStores/DBCStore.h b/src/server/shared/DataStores/DBCStore.h
index b0ab578466..4611d94f8c 100644
--- a/src/server/shared/DataStores/DBCStore.h
+++ b/src/server/shared/DataStores/DBCStore.h
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/shared/DataStores/DBCStructure.h b/src/server/shared/DataStores/DBCStructure.h
index db36fcaa91..4e7e8ca2cd 100644
--- a/src/server/shared/DataStores/DBCStructure.h
+++ b/src/server/shared/DataStores/DBCStructure.h
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
@@ -1208,8 +1208,7 @@ struct ItemRandomPropertiesEntry
{
uint32 ID; // 0
//char const* InternalName; // 1
- std::array<uint32, MAX_ITEM_ENCHANTMENT_EFFECTS> Enchantment; // 2-4
- //std::array<uint32, 2> UnusedEnchantment; // 5-6
+ std::array<uint32, MAX_ITEM_ENCHANTMENT_EFFECTS> Enchantment; // 2-6
std::array<char const*, 16> Name; // 7-22
//uint32 Name_lang_mask; // 23
};
@@ -1220,10 +1219,8 @@ struct ItemRandomSuffixEntry
std::array<char const*, 16> Name; // 1-16
//uint32 Name_lang_mask; // 17
//char const* InternalName; // 18
- std::array<uint32, MAX_ITEM_ENCHANTMENT_EFFECTS> Enchantment; // 19-21
- //std::array<uint32, 2> UnusedEnchantment; // 22-23
- std::array<uint32, MAX_ITEM_ENCHANTMENT_EFFECTS> AllocationPct; // 24-26
- //std::array<uint32, 2> UnusedAllocationPct; // 27-28
+ std::array<uint32, MAX_ITEM_ENCHANTMENT_EFFECTS> Enchantment; // 19-23
+ std::array<uint32, MAX_ITEM_ENCHANTMENT_EFFECTS> AllocationPct; // 24-28
};
#define MAX_ITEM_SET_ITEMS 10
diff --git a/src/server/shared/DataStores/DBCfmt.h b/src/server/shared/DataStores/DBCfmt.h
index d17da2dd99..9a568d5bb1 100644
--- a/src/server/shared/DataStores/DBCfmt.h
+++ b/src/server/shared/DataStores/DBCfmt.h
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/shared/Network/AsyncAcceptor.h b/src/server/shared/Network/AsyncAcceptor.h
index 7caea48968..71c58ed937 100644
--- a/src/server/shared/Network/AsyncAcceptor.h
+++ b/src/server/shared/Network/AsyncAcceptor.h
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
@@ -20,6 +20,7 @@
#include "IpAddress.h"
#include "Log.h"
+#include "Systemd.h"
#include <atomic>
#include <boost/asio/ip/tcp.hpp>
#include <functional>
@@ -33,10 +34,20 @@ class AsyncAcceptor
public:
typedef void(*AcceptCallback)(tcp::socket&& newSocket, uint32 threadIndex);
- AsyncAcceptor(Acore::Asio::IoContext& ioContext, std::string const& bindIp, uint16 port) :
+ AsyncAcceptor(Acore::Asio::IoContext& ioContext, std::string const& bindIp, uint16 port, bool supportSocketActivation = false) :
_acceptor(ioContext), _endpoint(Acore::Net::make_address(bindIp), port),
- _socket(ioContext), _closed(false), _socketFactory([this](){ return DefaultSocketFactory(); })
+ _socket(ioContext), _closed(false), _socketFactory([this](){ return DefaultSocketFactory(); }),
+ _supportSocketActivation(supportSocketActivation)
{
+ int const listen_fd = get_listen_fd();
+ if (_supportSocketActivation && listen_fd > 0)
+ {
+ LOG_DEBUG("network", "Using socket from systemd socket activation");
+ boost::system::error_code errorCode;
+ _acceptor.assign(boost::asio::ip::tcp::v4(), listen_fd, errorCode);
+ if (errorCode)
+ LOG_WARN("network", "Failed to assign socket {}", errorCode.message());
+ }
}
template<class T>
@@ -72,27 +83,31 @@ public:
bool Bind()
{
boost::system::error_code errorCode;
- _acceptor.open(_endpoint.protocol(), errorCode);
- if (errorCode)
+ // with socket activation the acceptor is already open and bound
+ if (!_acceptor.is_open())
{
- LOG_INFO("network", "Failed to open acceptor {}", errorCode.message());
- return false;
- }
+ _acceptor.open(_endpoint.protocol(), errorCode);
+ if (errorCode)
+ {
+ LOG_INFO("network", "Failed to open acceptor {}", errorCode.message());
+ return false;
+ }
#if AC_PLATFORM != AC_PLATFORM_WINDOWS
- _acceptor.set_option(boost::asio::ip::tcp::acceptor::reuse_address(true), errorCode);
- if (errorCode)
- {
- LOG_INFO("network", "Failed to set reuse_address option on acceptor {}", errorCode.message());
- return false;
- }
+ _acceptor.set_option(boost::asio::ip::tcp::acceptor::reuse_address(true), errorCode);
+ if (errorCode)
+ {
+ LOG_INFO("network", "Failed to set reuse_address option on acceptor {}", errorCode.message());
+ return false;
+ }
#endif
- _acceptor.bind(_endpoint, errorCode);
- if (errorCode)
- {
- LOG_INFO("network", "Could not bind to {}:{} {}", _endpoint.address().to_string(), _endpoint.port(), errorCode.message());
- return false;
+ _acceptor.bind(_endpoint, errorCode);
+ if (errorCode)
+ {
+ LOG_INFO("network", "Could not bind to {}:{} {}", _endpoint.address().to_string(), _endpoint.port(), errorCode.message());
+ return false;
+ }
}
_acceptor.listen(ACORE_MAX_LISTEN_CONNECTIONS, errorCode);
@@ -124,6 +139,7 @@ private:
tcp::socket _socket;
std::atomic<bool> _closed;
std::function<std::pair<tcp::socket*, uint32>()> _socketFactory;
+ bool _supportSocketActivation;
};
template<class T>
diff --git a/src/server/shared/Network/NetworkThread.h b/src/server/shared/Network/NetworkThread.h
index 0f65a97b63..674ad60ec2 100644
--- a/src/server/shared/Network/NetworkThread.h
+++ b/src/server/shared/Network/NetworkThread.h
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/shared/Network/Socket.h b/src/server/shared/Network/Socket.h
index 45b9633b1a..c4f62807cd 100644
--- a/src/server/shared/Network/Socket.h
+++ b/src/server/shared/Network/Socket.h
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/shared/Network/SocketMgr.h b/src/server/shared/Network/SocketMgr.h
index 5cb64d0f18..085e4e2380 100644
--- a/src/server/shared/Network/SocketMgr.h
+++ b/src/server/shared/Network/SocketMgr.h
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
@@ -19,6 +19,7 @@
#define SocketMgr_h__
#include "AsyncAcceptor.h"
+#include "Config.h"
#include "Errors.h"
#include "NetworkThread.h"
#include <boost/asio/ip/tcp.hpp>
@@ -42,7 +43,8 @@ public:
std::unique_ptr<AsyncAcceptor> acceptor;
try
{
- acceptor = std::make_unique<AsyncAcceptor>(ioContext, bindIp, port);
+ bool supportSocketActivation = sConfigMgr->GetOption<bool>("Network.UseSocketActivation", false);
+ acceptor = std::make_unique<AsyncAcceptor>(ioContext, bindIp, port, supportSocketActivation);
}
catch (boost::system::system_error const& err)
{
diff --git a/src/server/shared/Packets/ByteBuffer.cpp b/src/server/shared/Packets/ByteBuffer.cpp
index b17b85dcea..4f6273e083 100644
--- a/src/server/shared/Packets/ByteBuffer.cpp
+++ b/src/server/shared/Packets/ByteBuffer.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/shared/Packets/ByteBuffer.h b/src/server/shared/Packets/ByteBuffer.h
index 1b005826ee..56966e815b 100644
--- a/src/server/shared/Packets/ByteBuffer.h
+++ b/src/server/shared/Packets/ByteBuffer.h
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/shared/Realms/Realm.cpp b/src/server/shared/Realms/Realm.cpp
index 4e51aefe63..6462896062 100644
--- a/src/server/shared/Realms/Realm.cpp
+++ b/src/server/shared/Realms/Realm.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/shared/Realms/Realm.h b/src/server/shared/Realms/Realm.h
index d3b17096e9..0090b17505 100644
--- a/src/server/shared/Realms/Realm.h
+++ b/src/server/shared/Realms/Realm.h
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/shared/Realms/RealmList.cpp b/src/server/shared/Realms/RealmList.cpp
index b3b3f7656b..142ed6ae73 100644
--- a/src/server/shared/Realms/RealmList.cpp
+++ b/src/server/shared/Realms/RealmList.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/shared/Realms/RealmList.h b/src/server/shared/Realms/RealmList.h
index 9d8912ad2c..cb85b32922 100644
--- a/src/server/shared/Realms/RealmList.h
+++ b/src/server/shared/Realms/RealmList.h
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/shared/Secrets/SecretMgr.cpp b/src/server/shared/Secrets/SecretMgr.cpp
index bb8602778e..3c9782499b 100644
--- a/src/server/shared/Secrets/SecretMgr.cpp
+++ b/src/server/shared/Secrets/SecretMgr.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/shared/Secrets/SecretMgr.h b/src/server/shared/Secrets/SecretMgr.h
index 8c6ceb20df..d6e9996658 100644
--- a/src/server/shared/Secrets/SecretMgr.h
+++ b/src/server/shared/Secrets/SecretMgr.h
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/shared/SharedDefines.cpp b/src/server/shared/SharedDefines.cpp
index 42e906e271..667cb407a1 100644
--- a/src/server/shared/SharedDefines.cpp
+++ b/src/server/shared/SharedDefines.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/server/shared/SharedDefines.h b/src/server/shared/SharedDefines.h
index fb95d6cea5..bfa5a699bb 100644
--- a/src/server/shared/SharedDefines.h
+++ b/src/server/shared/SharedDefines.h
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
@@ -4010,14 +4010,15 @@ enum ServerProcessTypes
// Login Failure Reasons
enum class LoginFailureReason : uint8
{
- Failed = 0,
- NoWorld = 1,
- DuplicateCharacter = 2,
- NoInstances = 3,
- Disabled = 4,
- NoCharacter = 5,
- LockedForTransfer = 6,
- LockedByBilling = 7
+ Failed = 0, // Login failed
+ NoWorld = 1, // World server down
+ DuplicateCharacter = 2, // A character with that name already exists
+ NoInstances = 3, // No instance servers are available
+ Disabled = 4, // Login for that race, class or character is currently disabled.
+ NoCharacter = 5, // Character not found
+ LockedForTransfer = 6, // You cannot log in until the character update process you recently initiated is complete.
+ LockedByBilling = 7, // Character locked. Contact billing for more information
+ UsingRemote = 8, // You cannot log in while using World of Warcraft Remote.
};
namespace Acore::Impl
diff --git a/src/server/shared/enuminfo_SharedDefines.cpp b/src/server/shared/enuminfo_SharedDefines.cpp
index db09518165..53e4ec80c0 100644
--- a/src/server/shared/enuminfo_SharedDefines.cpp
+++ b/src/server/shared/enuminfo_SharedDefines.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/test/common/Configuration/Config.cpp b/src/test/common/Configuration/Config.cpp
index d23b87ff05..ab6654060f 100644
--- a/src/test/common/Configuration/Config.cpp
+++ b/src/test/common/Configuration/Config.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/test/mocks/WorldMock.h b/src/test/mocks/WorldMock.h
index db9ca51942..b370441198 100644
--- a/src/test/mocks/WorldMock.h
+++ b/src/test/mocks/WorldMock.h
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/test/server/game/Battlegrounds/ArenaSeason/ArenaSeasonRewardDistributorTest.cpp b/src/test/server/game/Battlegrounds/ArenaSeason/ArenaSeasonRewardDistributorTest.cpp
index 82f68e8634..0e0d472ed8 100644
--- a/src/test/server/game/Battlegrounds/ArenaSeason/ArenaSeasonRewardDistributorTest.cpp
+++ b/src/test/server/game/Battlegrounds/ArenaSeason/ArenaSeasonRewardDistributorTest.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/test/server/game/Battlegrounds/ArenaSeason/ArenaTeamFilterTest.cpp b/src/test/server/game/Battlegrounds/ArenaSeason/ArenaTeamFilterTest.cpp
index 7863f56002..9aa30170ad 100644
--- a/src/test/server/game/Battlegrounds/ArenaSeason/ArenaTeamFilterTest.cpp
+++ b/src/test/server/game/Battlegrounds/ArenaSeason/ArenaTeamFilterTest.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/test/server/game/Commands/GmVisibleCommandTest.cpp b/src/test/server/game/Commands/GmVisibleCommandTest.cpp
index 8d4512ade5..67a7e9a2f5 100644
--- a/src/test/server/game/Commands/GmVisibleCommandTest.cpp
+++ b/src/test/server/game/Commands/GmVisibleCommandTest.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/test/server/game/Miscellaneous/FormulasTest.cpp b/src/test/server/game/Miscellaneous/FormulasTest.cpp
index 803fd72cb2..7bc2e2b096 100644
--- a/src/test/server/game/Miscellaneous/FormulasTest.cpp
+++ b/src/test/server/game/Miscellaneous/FormulasTest.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/tools/CMakeLists.txt b/src/tools/CMakeLists.txt
index 9efea7aaec..03fa926fd4 100644
--- a/src/tools/CMakeLists.txt
+++ b/src/tools/CMakeLists.txt
@@ -140,7 +140,8 @@ foreach(TOOL_NAME ${TOOLS_BUILD_LIST})
mpq
zlib
Recast
- g3dlib)
+ g3dlib
+ fkYAML)
endif()
unset(TOOL_PUBLIC_INCLUDES)
@@ -170,4 +171,8 @@ foreach(TOOL_NAME ${TOOLS_BUILD_LIST})
elseif (WIN32)
install(TARGETS ${TOOL_PROJECT_NAME} DESTINATION "${CMAKE_INSTALL_PREFIX}")
endif()
+
+ if (${TOOL_PROJECT_NAME} STREQUAL "mmaps_generator")
+ install(FILES ${SOURCE_TOOL_PATH}/mmaps-config.yaml DESTINATION bin)
+ endif()
endforeach()
diff --git a/src/tools/dbimport/Main.cpp b/src/tools/dbimport/Main.cpp
index 87371f62a3..06b3ce6658 100644
--- a/src/tools/dbimport/Main.cpp
+++ b/src/tools/dbimport/Main.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
@@ -109,8 +109,8 @@ bool StartDB()
DatabaseLoader loader =
modules.empty() ? DatabaseLoader("dbimport") :
- (modules == "all") ? DatabaseLoader("dbimport", DatabaseLoader::DATABASE_NONE, AC_MODULES_LIST) :
- DatabaseLoader("dbimport", DatabaseLoader::DATABASE_NONE, modules);
+ (modules == "all") ? DatabaseLoader("dbimport", DatabaseLoader::DATABASE_MASK_ALL, AC_MODULES_LIST) :
+ DatabaseLoader("dbimport", DatabaseLoader::DATABASE_MASK_ALL, modules);
loader
.AddDatabase(LoginDatabase, "Login")
@@ -140,7 +140,8 @@ variables_map GetConsoleArguments(int argc, char** argv, fs::path& configFile)
("help,h", "print usage message")
("version,v", "print version build info")
("dry-run,d", "Dry run")
- ("config,c", value<fs::path>(&configFile)->default_value(fs::path(sConfigMgr->GetConfigPath() + std::string(_ACORE_DB_IMPORT_CONFIG))), "use <arg> as configuration file");
+ ("config,c", value<fs::path>(&configFile)->default_value(fs::path(sConfigMgr->GetConfigPath() + std::string(_ACORE_DB_IMPORT_CONFIG))), "use <arg> as configuration file")
+ ("config-policy", value<std::string>()->value_name("policy"), "override config severity policy (e.g. default=skip,critical_option=fatal)");
variables_map variablesMap;
diff --git a/src/tools/map_extractor/System.cpp b/src/tools/map_extractor/System.cpp
index 4396ed47f7..4fef9164e7 100644
--- a/src/tools/map_extractor/System.cpp
+++ b/src/tools/map_extractor/System.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/tools/map_extractor/adt.cpp b/src/tools/map_extractor/adt.cpp
index 7717080c82..7a3c524182 100644
--- a/src/tools/map_extractor/adt.cpp
+++ b/src/tools/map_extractor/adt.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/tools/map_extractor/adt.h b/src/tools/map_extractor/adt.h
index 01917e66f9..4cbbb20a07 100644
--- a/src/tools/map_extractor/adt.h
+++ b/src/tools/map_extractor/adt.h
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/tools/map_extractor/dbcfile.cpp b/src/tools/map_extractor/dbcfile.cpp
index 589511666d..ecec134aea 100644
--- a/src/tools/map_extractor/dbcfile.cpp
+++ b/src/tools/map_extractor/dbcfile.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/tools/map_extractor/dbcfile.h b/src/tools/map_extractor/dbcfile.h
index 5fd5365938..0fb6298fc1 100644
--- a/src/tools/map_extractor/dbcfile.h
+++ b/src/tools/map_extractor/dbcfile.h
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/tools/map_extractor/loadlib.cpp b/src/tools/map_extractor/loadlib.cpp
index 8434fa641c..67cf659142 100644
--- a/src/tools/map_extractor/loadlib.cpp
+++ b/src/tools/map_extractor/loadlib.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/tools/map_extractor/loadlib/loadlib.h b/src/tools/map_extractor/loadlib/loadlib.h
index 68fd5ea00b..6a34ea62f8 100644
--- a/src/tools/map_extractor/loadlib/loadlib.h
+++ b/src/tools/map_extractor/loadlib/loadlib.h
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/tools/map_extractor/mpq_libmpq.cpp b/src/tools/map_extractor/mpq_libmpq.cpp
index 5b70a933ad..f9101027ea 100644
--- a/src/tools/map_extractor/mpq_libmpq.cpp
+++ b/src/tools/map_extractor/mpq_libmpq.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/tools/map_extractor/mpq_libmpq04.h b/src/tools/map_extractor/mpq_libmpq04.h
index dece851e9e..6576111390 100644
--- a/src/tools/map_extractor/mpq_libmpq04.h
+++ b/src/tools/map_extractor/mpq_libmpq04.h
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/tools/map_extractor/wdt.cpp b/src/tools/map_extractor/wdt.cpp
index 5ff0ddc299..ef10704a3d 100644
--- a/src/tools/map_extractor/wdt.cpp
+++ b/src/tools/map_extractor/wdt.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/tools/map_extractor/wdt.h b/src/tools/map_extractor/wdt.h
index 3272959207..8ce1003646 100644
--- a/src/tools/map_extractor/wdt.h
+++ b/src/tools/map_extractor/wdt.h
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/tools/mmaps_generator/Config.cpp b/src/tools/mmaps_generator/Config.cpp
new file mode 100644
index 0000000000..dabdb0f0d3
--- /dev/null
+++ b/src/tools/mmaps_generator/Config.cpp
@@ -0,0 +1,276 @@
+/*
+ * This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
+ * more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#include "Config.h"
+#include <filesystem>
+#include <fkYAML/node.hpp>
+#include "PathCommon.h"
+#include "TerrainBuilder.h"
+
+namespace MMAP
+{
+ float ComputeBaseUnitDim(int vertexPerMapEdge)
+ {
+ return GRID_SIZE / static_cast<float>(vertexPerMapEdge);
+ }
+
+ std::pair<uint32, uint32> MakeTileKey(uint32 x, uint32 y)
+ {
+ return {x, y};
+ }
+
+ bool isCurrentDirectory(const std::string& pathStr) {
+ try {
+ const std::filesystem::path givenPath = std::filesystem::canonical(std::filesystem::absolute(pathStr));
+ const std::filesystem::path currentPath = std::filesystem::canonical(std::filesystem::current_path());
+ return givenPath == currentPath;
+ } catch (const std::filesystem::filesystem_error& e) {
+ std::cerr << "Filesystem error: " << e.what() << "\n";
+ return false;
+ }
+ }
+
+ MmapTileRecastConfig ResolvedMeshConfig::toMMAPTileRecastConfig() const {
+ MmapTileRecastConfig config;
+ config.walkableSlopeAngle = walkableSlopeAngle;
+ config.walkableHeight = walkableHeight;
+ config.walkableClimb = walkableClimb;
+ config.walkableRadius = walkableRadius;
+ config.maxSimplificationError = maxSimplificationError;
+ config.cellSizeHorizontal = cellSizeHorizontal;
+ config.cellSizeVertical = cellSizeVertical;
+ config.baseUnitDim = baseUnitDim;
+ config.vertexPerMapEdge = vertexPerMapEdge;
+ config.vertexPerTileEdge = vertexPerTileEdge;
+ config.tilesPerMapEdge = tilesPerMapEdge;
+ return config;
+ }
+
+ std::optional<Config> Config::FromFile(std::string_view configFile) {
+ Config config;
+ if (!config.LoadConfig(configFile))
+ return std::nullopt;
+
+ return config;
+ }
+
+ Config::Config()
+ {
+ }
+
+ ResolvedMeshConfig Config::GetConfigForTile(uint32 mapID, uint32 tileX, uint32 tileY) const
+ {
+ const MapOverride* mapOverride = nullptr;
+ const TileOverride* tileOverride = nullptr;
+
+ // Lookup map and tile overrides
+ if (auto mapIt = _maps.find(mapID); mapIt != _maps.end())
+ {
+ mapOverride = &mapIt->second;
+
+ auto tileIt = mapOverride->tileOverrides.find(MakeTileKey(tileY, tileX));
+ if (tileIt != mapOverride->tileOverrides.end())
+ tileOverride = &tileIt->second;
+ }
+
+ // Helper lambdas to resolve values in order: tile -> map -> global
+ auto resolveFloat = [&](auto TileField, auto MapField, float GlobalValue) -> float {
+ if (tileOverride && TileField(tileOverride)) return *TileField(tileOverride);
+ if (mapOverride && MapField(mapOverride)) return *MapField(mapOverride);
+ return GlobalValue;
+ };
+
+ auto resolveInt = [&](auto TileField, auto MapField, int GlobalValue) -> int {
+ if (tileOverride && TileField(tileOverride)) return *TileField(tileOverride);
+ if (mapOverride && MapField(mapOverride)) return *MapField(mapOverride);
+ return GlobalValue;
+ };
+
+ // Resolve vertex settings
+ int vertexPerMap = resolveInt(
+ [](const TileOverride*) { return std::optional<int>{}; },
+ [](const MapOverride* m) { return m->vertexPerMapEdge; },
+ _global.vertexPerMapEdge
+ );
+
+ int vertexPerTile = resolveInt(
+ [](const TileOverride*) { return std::optional<int>{}; },
+ [](const MapOverride* m) { return m->vertexPerTileEdge; },
+ _global.vertexPerTileEdge
+ );
+
+ ResolvedMeshConfig config;
+ config.walkableSlopeAngle = resolveFloat(
+ [](const TileOverride* t) { return t->walkableSlopeAngle; },
+ [](const MapOverride* m) { return m->walkableSlopeAngle; },
+ _global.walkableSlopeAngle
+ );
+
+ config.walkableRadius = resolveInt(
+ [](const TileOverride* t) { return t->walkableRadius; },
+ [](const MapOverride* m) { return m->walkableRadius; },
+ _global.walkableRadius
+ );
+
+ config.walkableHeight = resolveInt(
+ [](const TileOverride* t) { return t->walkableHeight; },
+ [](const MapOverride* m) { return m->walkableHeight; },
+ _global.walkableHeight
+ );
+
+ config.walkableClimb = resolveInt(
+ [](const TileOverride* t) { return t->walkableClimb; },
+ [](const MapOverride* m) { return m->walkableClimb; },
+ _global.walkableClimb
+ );
+
+ config.vertexPerMapEdge = vertexPerMap;
+ config.vertexPerTileEdge = vertexPerTile;
+ config.baseUnitDim = ComputeBaseUnitDim(vertexPerMap);
+ config.tilesPerMapEdge = vertexPerMap / vertexPerTile;
+ config.maxSimplificationError = _global.maxSimplificationError;
+ config.cellSizeHorizontal = config.baseUnitDim;
+ config.cellSizeVertical = config.baseUnitDim;
+
+ if (mapOverride && mapOverride->cellSizeHorizontal.has_value())
+ config.cellSizeHorizontal = *mapOverride->cellSizeHorizontal;
+
+ if (mapOverride && mapOverride->cellSizeVertical.has_value())
+ config.cellSizeVertical = *mapOverride->cellSizeVertical;
+
+ return config;
+ }
+
+ bool Config::LoadConfig(std::string_view configFile) {
+ FILE* f = std::fopen(configFile.data(), "r");
+ if (!f)
+ return false;
+
+ fkyaml::node root = fkyaml::node::deserialize(f);
+ std::fclose(f);
+
+ if (!root.contains("mmapsConfig"))
+ return false;
+
+ fkyaml::node mmapsNode = root["mmapsConfig"];
+
+ auto tryFloat = [](const fkyaml::node& n, const char* key, float& out)
+ {
+ if (n.contains(key)) out = n[key].get_value<float>();
+ };
+ auto tryInt = [](const fkyaml::node& n, const char* key, int& out)
+ {
+ if (n.contains(key)) out = n[key].get_value<int>();
+ };
+ auto tryBoolean = [](const fkyaml::node& n, const char* key, bool& out)
+ {
+ if (n.contains(key)) out = n[key].get_value<bool>();
+ };
+ auto tryString = [](const fkyaml::node& n, const char* key, std::string& out)
+ {
+ if (n.contains(key)) out = n[key].get_value<std::string>();
+ };
+
+ tryBoolean(mmapsNode, "skipLiquid", _skipLiquid);
+ tryBoolean(mmapsNode, "skipContinents", _skipContinents);
+ tryBoolean(mmapsNode, "skipJunkMaps", _skipJunkMaps);
+ tryBoolean(mmapsNode, "skipBattlegrounds", _skipBattlegrounds);
+ tryBoolean(mmapsNode, "debugOutput", _debugOutput);
+
+ std::string dataDirPath;
+ tryString(mmapsNode, "dataDir", dataDirPath);
+ _dataDir = dataDirPath;
+
+ mmapsNode = mmapsNode["meshSettings"];
+
+ // Global config
+ tryFloat(mmapsNode, "walkableSlopeAngle", _global.walkableSlopeAngle);
+ tryInt(mmapsNode, "walkableHeight", _global.walkableHeight);
+ tryInt(mmapsNode, "walkableClimb", _global.walkableClimb);
+ tryInt(mmapsNode, "walkableRadius", _global.walkableRadius);
+ tryInt(mmapsNode, "vertexPerMapEdge", _global.vertexPerMapEdge);
+ tryInt(mmapsNode, "vertexPerTileEdge", _global.vertexPerTileEdge);
+ tryFloat(mmapsNode, "maxSimplificationError", _global.maxSimplificationError);
+
+ // Map overrides
+ if (mmapsNode.contains("mapsOverrides"))
+ {
+ fkyaml::node maps = mmapsNode["mapsOverrides"];
+ for (auto const& mapEntry : maps.as_map())
+ {
+ uint32 mapId = std::stoi(mapEntry.first.as_str());
+
+ MapOverride override;
+ fkyaml::node mapNode = mapEntry.second;
+
+ if (mapNode.contains("walkableSlopeAngle"))
+ override.walkableSlopeAngle = mapNode["walkableSlopeAngle"].get_value<float>();
+ if (mapNode.contains("walkableRadius"))
+ override.walkableRadius = mapNode["walkableRadius"].get_value<int>();
+ if (mapNode.contains("walkableHeight"))
+ override.walkableHeight = mapNode["walkableHeight"].get_value<int>();
+ if (mapNode.contains("walkableClimb"))
+ override.walkableClimb = mapNode["walkableClimb"].get_value<int>();
+ if (mapNode.contains("vertexPerMapEdge"))
+ override.vertexPerMapEdge = mapNode["vertexPerMapEdge"].get_value<int>();
+ if (mapNode.contains("cellSizeHorizontal"))
+ override.cellSizeHorizontal = mapNode["cellSizeHorizontal"].get_value<float>();
+ if (mapNode.contains("cellSizeVertical"))
+ override.cellSizeVertical = mapNode["cellSizeVertical"].get_value<float>();
+
+ // Tile overrides
+ if (mapNode.contains("tilesOverrides"))
+ {
+ fkyaml::node tiles = mapNode["tilesOverrides"];
+ for (auto const& tileEntry : tiles.as_map())
+ {
+ std::string key = tileEntry.first.as_str();
+ fkyaml::node tileNode = tileEntry.second;
+
+ size_t comma = key.find(',');
+ if (comma == std::string::npos)
+ continue;
+
+ uint32 tileX = static_cast<uint32>(std::stoi(key.substr(0, comma)));
+ uint32 tileY = static_cast<uint32>(std::stoi(key.substr(comma + 1)));
+
+ TileOverride tileOverride;
+ if (tileNode.contains("walkableSlopeAngle"))
+ tileOverride.walkableSlopeAngle = tileNode["walkableSlopeAngle"].get_value<float>();
+ if (tileNode.contains("walkableRadius"))
+ tileOverride.walkableRadius = tileNode["walkableRadius"].get_value<int>();
+ if (tileNode.contains("walkableHeight"))
+ tileOverride.walkableHeight = tileNode["walkableHeight"].get_value<int>();
+ if (tileNode.contains("walkableClimb"))
+ tileOverride.walkableClimb = tileNode["walkableClimb"].get_value<int>();
+
+ override.tileOverrides[{tileX, tileY}] = std::move(tileOverride);
+ }
+ }
+
+ _maps[mapId] = std::move(override);
+ }
+ }
+
+ // Resolve data dir path. Maybe we need to use an executable path instead of the current dir.
+ if (isCurrentDirectory(_dataDir.string()) && !std::filesystem::exists(MapsPath()))
+ if (auto execPath = std::filesystem::path(executableDirectoryPath()); std::filesystem::exists(execPath/ "maps"))
+ _dataDir = execPath;
+
+ return true;
+ }
+}
diff --git a/src/tools/mmaps_generator/Config.h b/src/tools/mmaps_generator/Config.h
new file mode 100644
index 0000000000..c97fa79998
--- /dev/null
+++ b/src/tools/mmaps_generator/Config.h
@@ -0,0 +1,159 @@
+/*
+ * This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
+ * more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#ifndef CONFIG_H
+#define CONFIG_H
+
+#include <filesystem>
+#include <optional>
+#include <string>
+#include <string_view>
+#include <unordered_map>
+#include <boost/program_options/options_description.hpp>
+#include "Define.h"
+#include "MapDefines.h"
+
+namespace std
+{
+ template <>
+ struct hash<std::pair<uint32_t, uint32_t>>
+ {
+ std::size_t operator()(const std::pair<uint32_t, uint32_t>& p) const noexcept
+ {
+ return std::hash<uint64_t>()((static_cast<uint64_t>(p.first) << 32) | p.second);
+ }
+ };
+}
+
+namespace MMAP
+{
+ struct ResolvedMeshConfig {
+ float walkableSlopeAngle;
+ int walkableRadius;
+ int walkableHeight;
+ int walkableClimb;
+ int vertexPerMapEdge;
+ int vertexPerTileEdge;
+ int tilesPerMapEdge;
+ float baseUnitDim;
+ float cellSizeHorizontal;
+ float cellSizeVertical;
+ float maxSimplificationError;
+
+ MmapTileRecastConfig toMMAPTileRecastConfig() const;
+ };
+
+ class Config {
+ public:
+ static std::optional<Config> FromFile(std::string_view configFile);
+
+ ~Config() = default;
+
+ ResolvedMeshConfig GetConfigForTile(uint32 mapID, uint32 tileX, uint32 tileY) const;
+
+ bool ShouldSkipLiquid() const { return _skipLiquid; }
+ bool ShouldSkipContinents() const { return _skipContinents; }
+ bool ShouldSkipJunkMaps() const { return _skipJunkMaps; }
+ bool ShouldSkipBattlegrounds() const { return _skipBattlegrounds; }
+ bool IsDebugOutputEnabled() const { return _debugOutput; }
+
+ std::string VMapsPath() const { return (_dataDir / "vmaps").string(); }
+ std::string MapsPath() const { return (_dataDir / "maps").string(); }
+ std::string MMapsPath() const { return (_dataDir / "mmaps").string(); }
+ std::string DataDirPath() const { return _dataDir.string(); }
+
+ private:
+ explicit Config();
+
+ bool LoadConfig(std::string_view configFile);
+
+ struct TileOverride {
+ std::optional<float> walkableSlopeAngle;
+ std::optional<int> walkableRadius;
+ std::optional<int> walkableHeight;
+ std::optional<int> walkableClimb;
+ };
+
+ struct MapOverride {
+ std::optional<float> walkableSlopeAngle;
+ std::optional<int> walkableRadius;
+ std::optional<int> walkableHeight;
+ std::optional<int> walkableClimb;
+ std::optional<int> vertexPerMapEdge;
+ std::optional<int> vertexPerTileEdge;
+
+ // The width/depth of each cell in the XZ-plane grid used for voxelization. [Units: world units]
+ // A smaller value increases navmesh resolution but also memory and CPU usage.
+ // Default is equal to calculated baseUnitDim.
+ // Recast reference: https://github.com/recastnavigation/recastnavigation/blob/bd98d84c274ee06842bf51a4088ca82ac71f8c2d/Recast/Include/Recast.h#L231
+ std::optional<float> cellSizeHorizontal;
+
+ // The height of each cell in the Y-axis used for voxelization. [Units: world units]
+ // Controls how vertical features are represented. Lower values improve accuracy for uneven terrain.
+ // Default is equal to calculated baseUnitDim.
+ // Recast reference: https://github.com/recastnavigation/recastnavigation/blob/bd98d84c274ee06842bf51a4088ca82ac71f8c2d/Recast/Include/Recast.h#L234
+ std::optional<float> cellSizeVertical;
+
+ std::unordered_map<std::pair<uint32, uint32>, TileOverride> tileOverrides;
+ };
+
+ struct GlobalConfig {
+ // Maximum slope angle (in degrees) NPCs can walk on.
+ // Surfaces steeper than this will be considered unwalkable.
+ float walkableSlopeAngle = 60.0f;
+
+ // Minimum distance (in cell units) around walkable surfaces.
+ // Helps prevent NPCs from clipping into walls and narrow gaps.
+ int walkableRadius = 2;
+
+ // Minimum ceiling height (in cell units) NPCs need to pass under an obstacle.
+ // Controls how much vertical clearance is required.
+ int walkableHeight = 6;
+
+ // Maximum height difference (in cell units) NPCs can step up or down.
+ // Higher values allow walking over fences, ledges, or steps.
+ int walkableClimb = 6;
+
+ // Number of vertices along one edge of the entire map's navmesh grid.
+ // Higher values increase mesh resolution but also CPU/memory usage.
+ int vertexPerMapEdge = 2000;
+
+ // Number of vertices along one edge of each tile chunk.
+ // Must divide (vertexPerMapEdge - 1) evenly for seamless tiles.
+ // A higher vertex count per tile means fewer total tiles,
+ // reducing runtime work to load, unload, and manage tiles.
+ int vertexPerTileEdge = 80;
+
+ // Tolerance for how much a polygon can deviate from the original geometry when simplified.
+ // Higher values produce simpler (faster) meshes but can reduce accuracy.
+ float maxSimplificationError = 1.8f;
+ };
+
+ GlobalConfig _global;
+ std::unordered_map<uint32, MapOverride> _maps;
+
+ bool _skipLiquid;
+ bool _skipContinents;
+ bool _skipJunkMaps;
+ bool _skipBattlegrounds;
+ bool _debugOutput;
+
+ std::filesystem::path _dataDir;
+ };
+}
+
+#endif //CONFIG_H
diff --git a/src/tools/mmaps_generator/Info/readme.txt b/src/tools/mmaps_generator/Info/readme.txt
index 7e1a1ece6f..c0702d50c4 100644
--- a/src/tools/mmaps_generator/Info/readme.txt
+++ b/src/tools/mmaps_generator/Info/readme.txt
@@ -1,5 +1,8 @@
Generator command line args
+--config [file.*] The path the yaml config file
+ Default: "mmaps-config.yaml"
+
--threads [#] Max number of threads used by the generator
Default: 3
@@ -11,39 +14,6 @@ Generator command line args
--silent [] Make us script friendly. Do not wait for user input
on error or completion.
---bigBaseUnit [true|false] Generate tile/map using bigger basic unit.
- Use this option only if you have unexpected gaps.
-
- false: use normal metrics (default)
-
---maxAngle [#] Max walkable inclination angle
-
- float between 45 and 90 degrees (default 60)
-
---skipLiquid [true|false] extract liquid data for maps
-
- false: include liquid data (default)
-
---skipContinents [true|false] continents are maps 0 (Eastern Kingdoms),
- 1 (Kalimdor), 530 (Outlands), 571 (Northrend)
-
- false: build continents (default)
-
---skipJunkMaps [true|false] junk maps include some unused
- maps, transport maps, and some other
-
- true: skip junk maps (default)
-
---skipBattlegrounds [true|false] does not include PVP arenas
-
- false: skip battlegrounds (default)
-
---debugOutput [true|false] create debugging files for use with RecastDemo
- if you are only creating mmaps for use with Moongose,
- you don't want debugging files
-
- false: don't create debugging files (default)
-
--tile [#,#] Build the specified tile
seperate number with a comma ','
must specify a map number (see below)
@@ -58,9 +28,6 @@ examples:
movement_extractor
builds maps using the default settings (see above for defaults)
-movement_extractor --skipContinents true
-builds the default maps, except continents
-
movement_extractor 0
builds all tiles of map 0
diff --git a/src/tools/mmaps_generator/IntermediateValues.cpp b/src/tools/mmaps_generator/IntermediateValues.cpp
index 12b478979e..584d14c021 100644
--- a/src/tools/mmaps_generator/IntermediateValues.cpp
+++ b/src/tools/mmaps_generator/IntermediateValues.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
@@ -16,6 +16,8 @@
*/
#include "IntermediateValues.h"
+#include <string>
+#include "StringFormat.h"
namespace MMAP
{
@@ -28,15 +30,15 @@ namespace MMAP
rcFreePolyMeshDetail(polyMeshDetail);
}
- void IntermediateValues::writeIV(uint32 mapID, uint32 tileX, uint32 tileY)
+ void IntermediateValues::writeIV(const std::string& dataPath, uint32 mapID, uint32 tileX, uint32 tileY)
{
- char fileName[255];
+ char fileName[512];
char tileString[25];
sprintf(tileString, "[%02u,%02u]: ", tileX, tileY);
printf("%sWriting debug output... \r", tileString);
- std::string name("meshes/%03u%02i%02i.");
+ std::string name(dataPath+"/meshes/%03u%02i%02i.");
#define DEBUG_WRITE(fileExtension,data) \
do { \
@@ -198,16 +200,19 @@ namespace MMAP
fwrite(mesh->meshes, sizeof(int), mesh->nmeshes * 4, file);
}
- void IntermediateValues::generateObjFile(uint32 mapID, uint32 tileX, uint32 tileY, MeshData& meshData)
+ void IntermediateValues::generateObjFile(const std::string& dataPath, uint32 mapID, uint32 tileX, uint32 tileY, MeshData& meshData)
{
- char objFileName[255];
- sprintf(objFileName, "meshes/map%03u%02u%02u.obj", mapID, tileY, tileX);
+ std::string objFileName = Acore::StringFormat(
+ "{}/meshes/map{:03}{:02}{:02}.obj",
+ dataPath,
+ mapID, tileY, tileX
+ );
- FILE* objFile = fopen(objFileName, "wb");
+ FILE* objFile = fopen(objFileName.c_str(), "wb");
if (!objFile)
{
char message[1024];
- sprintf(message, "Failed to open %s for writing!\n", objFileName);
+ sprintf(message, "Failed to open %s for writing!\n", objFileName.c_str());
perror(message);
return;
}
@@ -237,13 +242,17 @@ namespace MMAP
sprintf(tileString, "[%02u,%02u]: ", tileY, tileX);
printf("%sWriting debug output... \r", tileString);
- sprintf(objFileName, "meshes/%03u.map", mapID);
+ objFileName = Acore::StringFormat(
+ "{}/meshes/{:03}.map",
+ dataPath,
+ mapID
+ );
- objFile = fopen(objFileName, "wb");
+ objFile = fopen(objFileName.c_str(), "wb");
if (!objFile)
{
char message[1024];
- sprintf(message, "Failed to open %s for writing!\n", objFileName);
+ sprintf(message, "Failed to open %s for writing!\n", objFileName.c_str());
perror(message);
return;
}
@@ -252,12 +261,17 @@ namespace MMAP
fwrite(&b, sizeof(char), 1, objFile);
fclose(objFile);
- sprintf(objFileName, "meshes/%03u%02u%02u.mesh", mapID, tileY, tileX);
- objFile = fopen(objFileName, "wb");
+ objFileName = Acore::StringFormat(
+ "{}/meshes/{:03}{:02}{:02}.mesh",
+ dataPath,
+ mapID, tileY, tileX
+ );
+
+ objFile = fopen(objFileName.c_str(), "wb");
if (!objFile)
{
char message[1024];
- sprintf(message, "Failed to open %s for writing!\n", objFileName);
+ sprintf(message, "Failed to open %s for writing!\n", objFileName.c_str());
perror(message);
return;
}
diff --git a/src/tools/mmaps_generator/IntermediateValues.h b/src/tools/mmaps_generator/IntermediateValues.h
index 971cf9000a..2894e5b58e 100644
--- a/src/tools/mmaps_generator/IntermediateValues.h
+++ b/src/tools/mmaps_generator/IntermediateValues.h
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
@@ -35,7 +35,7 @@ namespace MMAP
IntermediateValues() {}
~IntermediateValues();
- void writeIV(uint32 mapID, uint32 tileX, uint32 tileY);
+ void writeIV(const std::string& dataPath, uint32 mapID, uint32 tileX, uint32 tileY);
void debugWrite(FILE* file, const rcHeightfield* mesh);
void debugWrite(FILE* file, const rcCompactHeightfield* chf);
@@ -43,7 +43,7 @@ namespace MMAP
void debugWrite(FILE* file, const rcPolyMesh* mesh);
void debugWrite(FILE* file, const rcPolyMeshDetail* mesh);
- void generateObjFile(uint32 mapID, uint32 tileX, uint32 tileY, MeshData& meshData);
+ void generateObjFile(const std::string& dataPath, uint32 mapID, uint32 tileX, uint32 tileY, MeshData& meshData);
};
}
#endif
diff --git a/src/tools/mmaps_generator/MapBuilder.cpp b/src/tools/mmaps_generator/MapBuilder.cpp
index 407cdb103c..45c71367b7 100644
--- a/src/tools/mmaps_generator/MapBuilder.cpp
+++ b/src/tools/mmaps_generator/MapBuilder.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
@@ -16,28 +16,28 @@
*/
#include "MapBuilder.h"
+#include <DetourCommon.h>
+#include <DetourNavMesh.h>
+#include <DetourNavMeshBuilder.h>
#include "IntermediateValues.h"
#include "MapDefines.h"
#include "MapTree.h"
+#include "MMapMgr.h"
#include "ModelInstance.h"
#include "PathCommon.h"
#include "StringFormat.h"
#include "VMapMgr2.h"
-#include <DetourCommon.h>
-#include <DetourNavMesh.h>
-#include <DetourNavMeshBuilder.h>
namespace MMAP
{
- TileBuilder::TileBuilder(MapBuilder* mapBuilder, bool skipLiquid, bool bigBaseUnit, bool debugOutput) :
- m_bigBaseUnit(bigBaseUnit),
+ TileBuilder::TileBuilder(MapBuilder* mapBuilder, bool skipLiquid, bool debugOutput) :
m_debugOutput(debugOutput),
m_mapBuilder(mapBuilder),
m_terrainBuilder(nullptr),
m_workerThread(&TileBuilder::WorkerThread, this),
m_rcContext(nullptr)
{
- m_terrainBuilder = new TerrainBuilder(skipLiquid);
+ m_terrainBuilder = new TerrainBuilder(m_mapBuilder->getConfig().DataDirPath(), skipLiquid);
m_rcContext = new rcContext(false);
}
@@ -55,26 +55,22 @@ namespace MMAP
m_workerThread.join();
}
- MapBuilder::MapBuilder(float maxWalkableAngle, bool skipLiquid,
- bool skipContinents, bool skipJunkMaps, bool skipBattlegrounds,
- bool debugOutput, bool bigBaseUnit, int mapid, const char* offMeshFilePath, unsigned int threads) :
-
- m_debugOutput (debugOutput),
+ MapBuilder::MapBuilder(Config* config, int mapid, const char* offMeshFilePath, unsigned int threads) :
+ m_config (config),
+ m_debugOutput (config->IsDebugOutputEnabled()),
m_offMeshFilePath (offMeshFilePath),
m_threads (threads),
- m_skipContinents (skipContinents),
- m_skipJunkMaps (skipJunkMaps),
- m_skipBattlegrounds (skipBattlegrounds),
- m_skipLiquid (skipLiquid),
- m_maxWalkableAngle (maxWalkableAngle),
- m_bigBaseUnit (bigBaseUnit),
+ m_skipContinents (config->ShouldSkipContinents()),
+ m_skipJunkMaps (config->ShouldSkipJunkMaps()),
+ m_skipBattlegrounds (config->ShouldSkipBattlegrounds()),
+ m_skipLiquid (config->ShouldSkipLiquid()),
m_mapid (mapid),
m_totalTiles (0u),
m_totalTilesProcessed(0u),
_cancelationToken (false)
{
- m_terrainBuilder = new TerrainBuilder(skipLiquid);
+ m_terrainBuilder = new TerrainBuilder(config->DataDirPath(), config->ShouldSkipLiquid());
m_rcContext = new rcContext(false);
@@ -105,7 +101,7 @@ namespace MMAP
char filter[12];
printf("Discovering maps... ");
- getDirContents(files, "maps");
+ getDirContents(files, m_config->MapsPath());
for (auto & file : files)
{
mapID = uint32(atoi(file.substr(0, file.size() - 8).c_str()));
@@ -117,7 +113,7 @@ namespace MMAP
}
files.clear();
- getDirContents(files, "vmaps", "*.vmtree");
+ getDirContents(files, m_config->VMapsPath(), "*.vmtree");
for (auto & file : files)
{
mapID = uint32(atoi(file.substr(0, file.size() - 7).c_str()));
@@ -138,7 +134,7 @@ namespace MMAP
sprintf(filter, "%03u*.vmtile", mapID);
files.clear();
- getDirContents(files, "vmaps", filter);
+ getDirContents(files, m_config->VMapsPath(), filter);
for (auto & file : files)
{
fsize = file.size();
@@ -153,7 +149,7 @@ namespace MMAP
sprintf(filter, "%03u*", mapID);
files.clear();
- getDirContents(files, "maps", filter);
+ getDirContents(files, m_config->MapsPath(), filter);
for (auto & file : files)
{
fsize = file.size();
@@ -209,7 +205,7 @@ namespace MMAP
for (unsigned int i = 0; i < m_threads; ++i)
{
- m_tileBuilders.push_back(new TileBuilder(this, m_skipLiquid, m_bigBaseUnit, m_debugOutput));
+ m_tileBuilders.push_back(new TileBuilder(this, m_skipLiquid, m_debugOutput));
}
if (mapID)
@@ -367,7 +363,7 @@ namespace MMAP
getTileBounds(tileX, tileY, data.solidVerts.getCArray(), data.solidVerts.size() / 3, bmin, bmax);
// build navmesh tile
- TileBuilder tileBuilder = TileBuilder(this, m_skipLiquid, m_bigBaseUnit, m_debugOutput);
+ TileBuilder tileBuilder = TileBuilder(this, m_skipLiquid, m_debugOutput);
tileBuilder.buildMoveMapTile(mapId, tileX, tileY, data, bmin, bmax, navMesh);
fclose(file);
}
@@ -385,7 +381,7 @@ namespace MMAP
/// @todo: delete the old tile as the user clearly wants to rebuild it
- TileBuilder tileBuilder = TileBuilder(this, m_skipLiquid, m_bigBaseUnit, m_debugOutput);
+ TileBuilder tileBuilder = TileBuilder(this, m_skipLiquid, m_debugOutput);
tileBuilder.buildTile(mapID, tileX, tileY, navMesh);
dtFreeNavMesh(navMesh);
@@ -567,15 +563,18 @@ namespace MMAP
return;
}
- char fileName[25];
- sprintf(fileName, "mmaps/%03u.mmap", mapID);
+ const std::string fileName = Acore::StringFormat(
+ MAP_FILE_NAME_FORMAT,
+ m_config->DataDirPath(),
+ mapID
+ );
- FILE* file = fopen(fileName, "wb");
+ FILE* file = fopen(fileName.c_str(), "wb");
if (!file)
{
dtFreeNavMesh(navMesh);
char message[1024];
- sprintf(message, "[Map %03i] Failed to open %s for writing!\n", mapID, fileName);
+ sprintf(message, "[Map %03i] Failed to open %s for writing!\n", mapID, fileName.c_str());
perror(message);
return;
}
@@ -608,16 +607,17 @@ namespace MMAP
int lTriCount = meshData.liquidTris.size() / 3;
uint8* lTriFlags = meshData.liquidType.getCArray();
- const TileConfig tileConfig = TileConfig(m_bigBaseUnit);
- int TILES_PER_MAP = tileConfig.TILES_PER_MAP;
- float BASE_UNIT_DIM = tileConfig.BASE_UNIT_DIM;
- rcConfig config = m_mapBuilder->GetMapSpecificConfig(mapID, bmin, bmax, tileConfig);
+ ResolvedMeshConfig cfg = m_mapBuilder->getConfig().GetConfigForTile(mapID, tileX, tileY);
+ int tilesPerMap = cfg.tilesPerMapEdge;
+ float baseUnitDim = cfg.baseUnitDim;
+
+ rcConfig config = m_mapBuilder->getRecastConfig(cfg, bmin, bmax);
// this sets the dimensions of the heightfield - should maybe happen before border padding
rcCalcGridSize(config.bmin, config.bmax, config.cs, &config.width, &config.height);
// allocate subregions : tiles
- Tile* tiles = new Tile[TILES_PER_MAP * TILES_PER_MAP];
+ Tile* tiles = new Tile[tilesPerMap * tilesPerMap];
// Initialize per tile config.
rcConfig tileCfg = config;
@@ -625,15 +625,16 @@ namespace MMAP
tileCfg.height = config.tileSize + config.borderSize * 2;
// merge per tile poly and detail meshes
- rcPolyMesh** pmmerge = new rcPolyMesh*[TILES_PER_MAP * TILES_PER_MAP];
- rcPolyMeshDetail** dmmerge = new rcPolyMeshDetail*[TILES_PER_MAP * TILES_PER_MAP];
+ rcPolyMesh** pmmerge = new rcPolyMesh*[tilesPerMap * tilesPerMap];
+ rcPolyMeshDetail** dmmerge = new rcPolyMeshDetail*[tilesPerMap * tilesPerMap];
int nmerge = 0;
+
// build all tiles
- for (int y = 0; y < TILES_PER_MAP; ++y)
+ for (int y = 0; y < tilesPerMap; ++y)
{
- for (int x = 0; x < TILES_PER_MAP; ++x)
+ for (int x = 0; x < tilesPerMap; ++x)
{
- Tile& tile = tiles[x + y * TILES_PER_MAP];
+ Tile& tile = tiles[x + y * tilesPerMap];
// Calculate the per tile bounding box.
tileCfg.bmin[0] = config.bmin[0] + x * float(config.tileSize * config.cs);
@@ -790,9 +791,9 @@ namespace MMAP
params.offMeshConAreas = meshData.offMeshConnectionsAreas.getCArray();
params.offMeshConFlags = meshData.offMeshConnectionsFlags.getCArray();
- params.walkableHeight = BASE_UNIT_DIM * config.walkableHeight; // agent height
- params.walkableRadius = BASE_UNIT_DIM * config.walkableRadius; // agent radius
- params.walkableClimb = BASE_UNIT_DIM * config.walkableClimb; // keep less that walkableHeight (aka agent height)!
+ params.walkableHeight = baseUnitDim * config.walkableHeight; // agent height
+ params.walkableRadius = baseUnitDim * config.walkableRadius; // agent radius
+ params.walkableClimb = baseUnitDim * config.walkableClimb; // keep less that walkableHeight (aka agent height)!
params.tileX = (((bmin[0] + bmax[0]) / 2) - navMesh->getParams()->orig[0]) / GRID_SIZE;
params.tileY = (((bmin[2] + bmax[2]) / 2) - navMesh->getParams()->orig[2]) / GRID_SIZE;
rcVcopy(params.bmin, bmin);
@@ -861,13 +862,17 @@ namespace MMAP
}
// file output
- char fileName[255];
- sprintf(fileName, "mmaps/%03u%02i%02i.mmtile", mapID, tileY, tileX);
- FILE* file = fopen(fileName, "wb");
+ const std::string fileName = Acore::StringFormat(
+ TILE_FILE_NAME_FORMAT,
+ m_mapBuilder->getConfig().DataDirPath(),
+ mapID, tileY, tileX
+ );
+
+ FILE* file = fopen(fileName.c_str(), "wb");
if (!file)
{
char message[1024];
- sprintf(message, "[Map %03i] Failed to open %s for writing!\n", mapID, fileName);
+ sprintf(message, "[Map %03i] Failed to open %s for writing!\n", mapID, fileName.c_str());
perror(message);
navMesh->removeTile(tileRef, nullptr, nullptr);
break;
@@ -879,6 +884,7 @@ namespace MMAP
MmapTileHeader header;
header.usesLiquids = m_terrainBuilder->usesLiquids();
header.size = uint32(navDataSize);
+ header.recastConfig = cfg.toMMAPTileRecastConfig();
fwrite(&header, sizeof(MmapTileHeader), 1, file);
// write data
@@ -899,8 +905,8 @@ namespace MMAP
v[2] += (unsigned short)config.borderSize;
}
- iv.generateObjFile(mapID, tileX, tileY, meshData);
- iv.writeIV(mapID, tileX, tileY);
+ iv.generateObjFile(m_mapBuilder->getConfig().DataDirPath(), mapID, tileX, tileY, meshData);
+ iv.writeIV(m_mapBuilder->getConfig().DataDirPath(), mapID, tileX, tileY);
}
}
@@ -1028,9 +1034,13 @@ namespace MMAP
/**************************************************************************/
bool TileBuilder::shouldSkipTile(uint32 mapID, uint32 tileX, uint32 tileY) const
{
- char fileName[255];
- sprintf(fileName, "mmaps/%03u%02i%02i.mmtile", mapID, tileY, tileX);
- FILE* file = fopen(fileName, "rb");
+ const std::string fileName = Acore::StringFormat(
+ TILE_FILE_NAME_FORMAT,
+ m_mapBuilder->getConfig().DataDirPath(),
+ mapID, tileY, tileX
+ );
+
+ FILE* file = fopen(fileName.c_str(), "rb");
if (!file)
return false;
@@ -1046,10 +1056,11 @@ namespace MMAP
if (header.mmapVersion != MMAP_VERSION)
return false;
- return true;
+ const auto desiredRecastConfig = m_mapBuilder->getConfig().GetConfigForTile(mapID, tileX, tileY).toMMAPTileRecastConfig();
+ return header.recastConfig == desiredRecastConfig;
}
- rcConfig MapBuilder::GetMapSpecificConfig(uint32 mapID, float bmin[3], float bmax[3], const TileConfig &tileConfig) const
+ rcConfig MapBuilder::getRecastConfig(const ResolvedMeshConfig &cfg, float bmin[3], float bmax[3]) const
{
rcConfig config;
memset(&config, 0, sizeof(rcConfig));
@@ -1058,39 +1069,20 @@ namespace MMAP
rcVcopy(config.bmax, bmax);
config.maxVertsPerPoly = DT_VERTS_PER_POLYGON;
- config.cs = tileConfig.BASE_UNIT_DIM;
- config.ch = tileConfig.BASE_UNIT_DIM;
- config.walkableSlopeAngle = m_maxWalkableAngle;
- config.tileSize = tileConfig.VERTEX_PER_TILE;
- config.walkableRadius = m_bigBaseUnit ? 1 : 2;
- config.borderSize = config.walkableRadius + 3;
- config.maxEdgeLen = tileConfig.VERTEX_PER_TILE + 1; // anything bigger than tileSize
- config.walkableHeight = m_bigBaseUnit ? 3 : 6;
- // a value >= 3|6 allows npcs to walk over some fences
- // a value >= 4|8 allows npcs to walk over all fences
- config.walkableClimb = m_bigBaseUnit ? 3 : 6;
+ config.cs = cfg.cellSizeHorizontal;
+ config.ch = cfg.cellSizeVertical;
+ config.walkableSlopeAngle = cfg.walkableSlopeAngle;
+ config.tileSize = cfg.vertexPerTileEdge;
+ config.walkableRadius = cfg.walkableRadius;
+ config.borderSize = cfg.walkableRadius + 3;
+ config.maxEdgeLen = cfg.vertexPerTileEdge + 1; // anything bigger than tileSize
+ config.walkableHeight = cfg.walkableHeight;
+ config.walkableClimb = cfg.walkableClimb;
config.minRegionArea = rcSqr(60);
config.mergeRegionArea = rcSqr(50);
- config.maxSimplificationError = 1.8f; // eliminates most jagged edges (tiny polygons)
+ config.maxSimplificationError = cfg.maxSimplificationError; // eliminates most jagged edges (tiny polygons)
config.detailSampleDist = config.cs * 16;
config.detailSampleMaxError = config.ch * 1;
-
- switch (mapID)
- {
- // Blade's Edge Arena
- case 562:
- // This allows to walk on the ropes to the pillars
- config.walkableRadius = 0;
- break;
- // Blackfathom Deeps
- case 48:
- // Reduce the chance to have underground levels
- config.ch *= 2;
- break;
- default:
- break;
- }
-
return config;
}
diff --git a/src/tools/mmaps_generator/MapBuilder.h b/src/tools/mmaps_generator/MapBuilder.h
index 19ef1ef59f..313c88c525 100644
--- a/src/tools/mmaps_generator/MapBuilder.h
+++ b/src/tools/mmaps_generator/MapBuilder.h
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
@@ -24,6 +24,7 @@
#include <thread>
#include <vector>
+#include "Config.h"
#include "Optional.h"
#include "TerrainBuilder.h"
@@ -71,27 +72,6 @@ namespace MMAP
rcPolyMeshDetail* dmesh{nullptr};
};
- struct TileConfig
- {
- TileConfig(bool bigBaseUnit)
- {
- // these are WORLD UNIT based metrics
- // this are basic unit dimentions
- // value have to divide GRID_SIZE(533.3333f) ( aka: 0.5333, 0.2666, 0.3333, 0.1333, etc )
- BASE_UNIT_DIM = bigBaseUnit ? 0.5333333f : 0.2666666f;
-
- // All are in UNIT metrics!
- VERTEX_PER_MAP = int(GRID_SIZE / BASE_UNIT_DIM + 0.5f);
- VERTEX_PER_TILE = bigBaseUnit ? 40 : 80; // must divide VERTEX_PER_MAP
- TILES_PER_MAP = VERTEX_PER_MAP / VERTEX_PER_TILE;
- }
-
- float BASE_UNIT_DIM;
- int VERTEX_PER_MAP;
- int VERTEX_PER_TILE;
- int TILES_PER_MAP;
- };
-
struct TileInfo
{
TileInfo() : m_mapId(uint32(-1)), m_tileX(), m_tileY(), m_navMeshParams() {}
@@ -109,7 +89,6 @@ namespace MMAP
public:
TileBuilder(MapBuilder* mapBuilder,
bool skipLiquid,
- bool bigBaseUnit,
bool debugOutput);
TileBuilder(TileBuilder&&) = default;
@@ -131,7 +110,6 @@ namespace MMAP
bool shouldSkipTile(uint32 mapID, uint32 tileX, uint32 tileY) const;
private:
- bool m_bigBaseUnit;
bool m_debugOutput;
MapBuilder* m_mapBuilder;
@@ -145,13 +123,7 @@ namespace MMAP
{
friend class TileBuilder;
public:
- MapBuilder(float maxWalkableAngle,
- bool skipLiquid,
- bool skipContinents,
- bool skipJunkMaps,
- bool skipBattlegrounds,
- bool debugOutput,
- bool bigBaseUnit,
+ MapBuilder(Config* config,
int mapid,
char const* offMeshFilePath,
unsigned int threads);
@@ -166,6 +138,7 @@ namespace MMAP
// builds list of maps, then builds all of mmap tiles (based on the skip settings)
void buildMaps(Optional<uint32> mapID);
+ const Config& getConfig() const { return *m_config; }
private:
// builds all mmap tiles for the specified map id (ignores skip settings)
void buildMap(uint32 mapID);
@@ -184,7 +157,7 @@ namespace MMAP
bool isTransportMap(uint32 mapID) const;
bool isContinentMap(uint32 mapID) const;
- rcConfig GetMapSpecificConfig(uint32 mapID, float bmin[3], float bmax[3], const TileConfig &tileConfig) const;
+ rcConfig getRecastConfig(const ResolvedMeshConfig &cfg, float bmin[3], float bmax[3]) const;
uint32 percentageDone(uint32 totalTiles, uint32 totalTilesDone) const;
uint32 currentPercentageDone() const;
@@ -201,10 +174,10 @@ namespace MMAP
bool m_skipBattlegrounds;
bool m_skipLiquid;
- float m_maxWalkableAngle;
- bool m_bigBaseUnit;
int32 m_mapid;
+ Config* m_config;
+
std::atomic<uint32> m_totalTiles;
std::atomic<uint32> m_totalTilesProcessed;
diff --git a/src/tools/mmaps_generator/PathCommon.h b/src/tools/mmaps_generator/PathCommon.h
index 866dffb688..6dc6dd608e 100644
--- a/src/tools/mmaps_generator/PathCommon.h
+++ b/src/tools/mmaps_generator/PathCommon.h
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
@@ -20,6 +20,7 @@
#include <string>
#include <vector>
+#include <boost/dll/runtime_symbol_info.hpp>
#ifndef _WIN32
#include <cstddef>
@@ -35,6 +36,11 @@
namespace MMAP
{
+ inline std::string executableDirectoryPath()
+ {
+ return boost::dll::program_location().parent_path().string();
+ }
+
inline bool matchWildcardFilter(const char* filter, const char* str)
{
if (!filter || !str)
diff --git a/src/tools/mmaps_generator/PathGenerator.cpp b/src/tools/mmaps_generator/PathGenerator.cpp
index 03fece6462..b7fa572c16 100644
--- a/src/tools/mmaps_generator/PathGenerator.cpp
+++ b/src/tools/mmaps_generator/PathGenerator.cpp
@@ -1,20 +1,21 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
* with this program. If not, see <http://www.gnu.org/licenses/>.
*/
+#include "Config.h"
#include "MapBuilder.h"
#include "PathCommon.h"
#include "Timer.h"
@@ -23,37 +24,34 @@
using namespace MMAP;
-bool checkDirectories(bool debugOutput)
+bool checkDirectories(const std::string &dataDirPath, bool debugOutput)
{
std::vector<std::string> dirFiles;
- if (getDirContents(dirFiles, "maps") == LISTFILE_DIRECTORY_NOT_FOUND || dirFiles.empty())
+ if (getDirContents(dirFiles, (std::filesystem::path(dataDirPath) / "maps").string()) == LISTFILE_DIRECTORY_NOT_FOUND || dirFiles.empty())
{
printf("'maps' directory is empty or does not exist\n");
return false;
}
dirFiles.clear();
- if (getDirContents(dirFiles, "vmaps", "*.vmtree") == LISTFILE_DIRECTORY_NOT_FOUND || dirFiles.empty())
+ if (getDirContents(dirFiles, (std::filesystem::path(dataDirPath) / "vmaps").string(), "*.vmtree") == LISTFILE_DIRECTORY_NOT_FOUND || dirFiles.empty())
{
printf("'vmaps' directory is empty or does not exist\n");
return false;
}
dirFiles.clear();
- if (getDirContents(dirFiles, "mmaps") == LISTFILE_DIRECTORY_NOT_FOUND)
+ if (getDirContents(dirFiles, (std::filesystem::path(dataDirPath) / "mmaps").string()) == LISTFILE_DIRECTORY_NOT_FOUND)
{
- return boost::filesystem::create_directory("mmaps");
+ return boost::filesystem::create_directory((std::filesystem::path(dataDirPath) / "mmaps").string());
}
dirFiles.clear();
- if (debugOutput)
+ if (debugOutput && getDirContents(dirFiles, (std::filesystem::path(dataDirPath) / "meshes").string()) == LISTFILE_DIRECTORY_NOT_FOUND)
{
- if (getDirContents(dirFiles, "meshes") == LISTFILE_DIRECTORY_NOT_FOUND)
- {
- printf("'meshes' directory does not exist (no place to put debugOutput files)\n");
- return false;
- }
+ printf("'meshes' directory does not exist creating...\n");
+ return boost::filesystem::create_directory((std::filesystem::path(dataDirPath) / "meshes").string());
}
return true;
@@ -63,32 +61,24 @@ bool handleArgs(int argc, char** argv,
int& mapnum,
int& tileX,
int& tileY,
- float& maxAngle,
- bool& skipLiquid,
- bool& skipContinents,
- bool& skipJunkMaps,
- bool& skipBattlegrounds,
- bool& debugOutput,
+ std::string& configFilePath,
bool& silent,
- bool& bigBaseUnit,
char*& offMeshInputPath,
char*& file,
unsigned int& threads)
{
+ bool hasCustomConfigPath = false;
char* param = nullptr;
for (int i = 1; i < argc; ++i)
{
- if (strcmp(argv[i], "--maxAngle") == 0)
+ if (strcmp(argv[i], "--config") == 0)
{
param = argv[++i];
if (!param)
return false;
- float maxangle = atof(param);
- if (maxangle <= 90.f && maxangle >= 45.f)
- maxAngle = maxangle;
- else
- printf("invalid option for '--maxAngle', using default\n");
+ hasCustomConfigPath = true;
+ configFilePath = param;
}
else if (strcmp(argv[i], "--threads") == 0)
{
@@ -126,88 +116,10 @@ bool handleArgs(int argc, char** argv,
return false;
}
}
- else if (strcmp(argv[i], "--skipLiquid") == 0)
- {
- param = argv[++i];
- if (!param)
- return false;
-
- if (strcmp(param, "true") == 0)
- skipLiquid = true;
- else if (strcmp(param, "false") == 0)
- skipLiquid = false;
- else
- printf("invalid option for '--skipLiquid', using default\n");
- }
- else if (strcmp(argv[i], "--skipContinents") == 0)
- {
- param = argv[++i];
- if (!param)
- return false;
-
- if (strcmp(param, "true") == 0)
- skipContinents = true;
- else if (strcmp(param, "false") == 0)
- skipContinents = false;
- else
- printf("invalid option for '--skipContinents', using default\n");
- }
- else if (strcmp(argv[i], "--skipJunkMaps") == 0)
- {
- param = argv[++i];
- if (!param)
- return false;
-
- if (strcmp(param, "true") == 0)
- skipJunkMaps = true;
- else if (strcmp(param, "false") == 0)
- skipJunkMaps = false;
- else
- printf("invalid option for '--skipJunkMaps', using default\n");
- }
- else if (strcmp(argv[i], "--skipBattlegrounds") == 0)
- {
- param = argv[++i];
- if (!param)
- return false;
-
- if (strcmp(param, "true") == 0)
- skipBattlegrounds = true;
- else if (strcmp(param, "false") == 0)
- skipBattlegrounds = false;
- else
- printf("invalid option for '--skipBattlegrounds', using default\n");
- }
- else if (strcmp(argv[i], "--debugOutput") == 0)
- {
- param = argv[++i];
- if (!param)
- return false;
-
- if (strcmp(param, "true") == 0)
- debugOutput = true;
- else if (strcmp(param, "false") == 0)
- debugOutput = false;
- else
- printf("invalid option for '--debugOutput', using default true\n");
- }
else if (strcmp(argv[i], "--silent") == 0)
{
silent = true;
}
- else if (strcmp(argv[i], "--bigBaseUnit") == 0)
- {
- param = argv[++i];
- if (!param)
- return false;
-
- if (strcmp(param, "true") == 0)
- bigBaseUnit = true;
- else if (strcmp(param, "false") == 0)
- bigBaseUnit = false;
- else
- printf("invalid option for '--bigBaseUnit', using default false\n");
- }
else if (strcmp(argv[i], "--offMeshInput") == 0)
{
param = argv[++i];
@@ -229,6 +141,23 @@ bool handleArgs(int argc, char** argv,
}
}
+ if (!hasCustomConfigPath)
+ {
+ FILE* f = fopen(configFilePath.c_str(), "r");
+ if (!f)
+ {
+ auto execRelPath = std::filesystem::path(executableDirectoryPath())/configFilePath;
+ f = fopen(execRelPath.string().c_str(), "r");
+ if (!f)
+ {
+ printf("Failed to load configuration. Ensure that 'mmaps-config.yaml' exists in the current directory or specify its path using the --config option.'\n");
+ return false;
+ }
+ configFilePath = execRelPath.string();
+ }
+ fclose(f);
+ }
+
return true;
}
@@ -244,42 +173,36 @@ int main(int argc, char** argv)
unsigned int threads = std::thread::hardware_concurrency();
int mapnum = -1;
int tileX = -1, tileY = -1;
- float maxAngle = 60.0f;
- bool skipLiquid = false,
- skipContinents = false,
- skipJunkMaps = true,
- skipBattlegrounds = false,
- debugOutput = false,
- silent = false,
- bigBaseUnit = false;
+ bool silent = false;
char* offMeshInputPath = nullptr;
char* file = nullptr;
-
+ std::string configFilePath = "mmaps-config.yaml";
bool validParam = handleArgs(argc, argv, mapnum,
- tileX, tileY, maxAngle,
- skipLiquid, skipContinents, skipJunkMaps, skipBattlegrounds,
- debugOutput, silent, bigBaseUnit, offMeshInputPath, file, threads);
+ tileX, tileY, configFilePath, silent, offMeshInputPath, file, threads);
if (!validParam)
return silent ? -1 : finish("You have specified invalid parameters", -1);
- if (mapnum == -1 && debugOutput)
+ auto config = Config::FromFile(configFilePath);
+ if (!config)
+ return silent ? -1 : finish("Failed to load configuration. Ensure that 'mmaps-config.yaml' exists in the current directory or specify its path using the --config option.", -1);
+
+ if (mapnum == -1 && config->IsDebugOutputEnabled())
{
if (silent)
return -2;
- printf("You have specifed debug output, but didn't specify a map to generate.\n");
+ printf("You have specified debug output, but didn't specify a map to generate.\n");
printf("This will generate debug output for ALL maps.\n");
printf("Are you sure you want to continue? (y/n) ");
if (getchar() != 'y')
return 0;
}
- if (!checkDirectories(debugOutput))
+ if (!checkDirectories(config->DataDirPath(), config->IsDebugOutputEnabled()))
return silent ? -3 : finish("Press ENTER to close...", -3);
- MapBuilder builder(maxAngle, skipLiquid, skipContinents, skipJunkMaps,
- skipBattlegrounds, debugOutput, bigBaseUnit, mapnum, offMeshInputPath, threads);
+ MapBuilder builder(&config.value(), mapnum, offMeshInputPath, threads);
uint32 start = getMSTime();
if (file)
diff --git a/src/tools/mmaps_generator/TerrainBuilder.cpp b/src/tools/mmaps_generator/TerrainBuilder.cpp
index 2faee49d94..6fb539b0fc 100644
--- a/src/tools/mmaps_generator/TerrainBuilder.cpp
+++ b/src/tools/mmaps_generator/TerrainBuilder.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
@@ -25,6 +25,8 @@
#include <vector>
#include <map>
+#include "StringFormat.h"
+
// ******************************************
// Map file format defines
// ******************************************
@@ -80,10 +82,17 @@ struct map_liquidHeader
namespace MMAP
{
+ static char const* const MAP_FILE_NAME_FORMAT = "{}/{:03}{:02}{:02}.map";
uint32 const MAP_VERSION_MAGIC = 9;
- TerrainBuilder::TerrainBuilder(bool skipLiquid) : m_skipLiquid (skipLiquid) { }
+ TerrainBuilder::TerrainBuilder(const std::string &dataDirPath, bool skipLiquid) :
+ m_skipLiquid (skipLiquid),
+ m_mapsPath((std::filesystem::path(dataDirPath) / "maps").string()),
+ m_vmapsPath((std::filesystem::path(dataDirPath) / "vmaps").string())
+ {
+ }
+
TerrainBuilder::~TerrainBuilder() = default;
/**************************************************************************/
@@ -134,10 +143,13 @@ namespace MMAP
/**************************************************************************/
bool TerrainBuilder::loadMap(uint32 mapID, uint32 tileX, uint32 tileY, MeshData& meshData, Spot portion)
{
- char mapFileName[255];
- sprintf(mapFileName, "maps/%03u%02u%02u.map", mapID, tileY, tileX);
+ const std::string mapFileName = Acore::StringFormat(
+ MAP_FILE_NAME_FORMAT,
+ m_mapsPath,
+ mapID, tileY, tileX
+ );
- FILE* mapFile = fopen(mapFileName, "rb");
+ FILE* mapFile = fopen(mapFileName.c_str(), "rb");
if (!mapFile)
return false;
@@ -146,7 +158,7 @@ namespace MMAP
fheader.versionMagic != MAP_VERSION_MAGIC)
{
fclose(mapFile);
- printf("%s is the wrong version, please extract new .map files\n", mapFileName);
+ printf("%s is the wrong version, please extract new .map files\n", mapFileName.c_str());
return false;
}
@@ -665,7 +677,7 @@ namespace MMAP
bool TerrainBuilder::loadVMap(uint32 mapID, uint32 tileX, uint32 tileY, MeshData& meshData)
{
IVMapMgr* vmapMgr = new VMapMgr2();
- int result = vmapMgr->loadMap("vmaps", mapID, tileX, tileY);
+ int result = vmapMgr->loadMap(m_vmapsPath.c_str(), mapID, tileX, tileY);
bool retval = false;
do
diff --git a/src/tools/mmaps_generator/TerrainBuilder.h b/src/tools/mmaps_generator/TerrainBuilder.h
index 23cdbc4710..63c21fe081 100644
--- a/src/tools/mmaps_generator/TerrainBuilder.h
+++ b/src/tools/mmaps_generator/TerrainBuilder.h
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
@@ -76,7 +76,7 @@ namespace MMAP
class TerrainBuilder
{
public:
- TerrainBuilder(bool skipLiquid);
+ TerrainBuilder(const std::string &mapsPath, bool skipLiquid);
~TerrainBuilder();
TerrainBuilder(const TerrainBuilder& tb) = delete;
@@ -121,6 +121,9 @@ namespace MMAP
/// Get the liquid type for a specific position
uint8 getLiquidType(int square, const uint8 liquid_type[16][16]);
+
+ std::string m_mapsPath;
+ std::string m_vmapsPath;
};
}
diff --git a/src/tools/mmaps_generator/mmaps-config.yaml b/src/tools/mmaps_generator/mmaps-config.yaml
new file mode 100644
index 0000000000..7adcee64cf
--- /dev/null
+++ b/src/tools/mmaps_generator/mmaps-config.yaml
@@ -0,0 +1,150 @@
+mmapsConfig:
+ skipLiquid: false
+ skipContinents: false
+ skipJunkMaps: true
+ skipBattlegrounds: false
+
+ # Path to the directory containing navigation data files.
+ # This directory should contain the "maps" and "vmaps" folders,
+ # and is also where the "mmaps" folder will be created or located.
+ dataDir: "./"
+
+ meshSettings:
+ # Here we have global config for recast navigation.
+ # It's possible to override these data on map or tile level (see mapsOverrides).
+
+ # Maximum slope angle (in degrees) NPCs can walk on.
+ # Surfaces steeper than this will be considered unwalkable.
+ walkableSlopeAngle: 60
+
+ # --- Cell Size Calculation ---
+ # Many parameters below are defined in "cell units".
+ # In RecastDemo, you often work with world units instead of cell units.
+ # By default, these cell units are converted to world units using the formula:
+ #
+ # cellSize = MMAP::GRID_SIZE / (verticesPerMapEdge - 1)
+ #
+ # Where:
+ # MMAP::GRID_SIZE = 533.3333f (the size of one map tile in world units)
+ # verticesPerMapEdge = number of vertices along one edge of the full map grid
+ #
+ # Example:
+ # If verticesPerMapEdge = 2000, then:
+ # cellSize ≈ 533.3333 / (2000 - 1) ≈ 0.2667 world units per cell
+ #
+ # To convert a value from cell units to world units (e.g., walkableClimb),
+ # multiply by cellSize. For example, a walkableClimb of 6 corresponds to:
+ # 6 * 0.2667 ≈ 1.6 world units
+
+ # Minimum ceiling height (in cell units) NPCs need to pass under an obstacle.
+ # Controls how much vertical clearance is required.
+ # To convert to world units, multiply by cellSize (see "Cell Size Calculation").
+ walkableHeight: 6
+
+ # Maximum height difference (in cell units) NPCs can step up or down.
+ # Higher values allow walking over fences, ledges, or steps.
+ # To convert to world units, multiply by cellSize (see "Cell Size Calculation").
+ #
+ # Vanilla WotLK uses 6, which allows creatures to "jump" over fences.
+ # Classic WotLK uses 4, which forces creatures to walk around fences.
+ walkableClimb: 6
+
+ # Minimum distance (in cell units) around walkable surfaces.
+ # Helps prevent NPCs from clipping into walls and narrow gaps.
+ # To convert to world units, multiply by cellSize (see "Cell Size Calculation").
+ walkableRadius: 2
+
+ # Number of vertices along one edge of the entire map's navmesh grid.
+ # Higher values increase mesh resolution but also CPU/memory usage.
+ verticesPerMapEdge: 2000
+
+ # Number of vertices along one edge of each tile chunk.
+ # Must divide (vertexPerMapEdge - 1) evenly for seamless tiles.
+ # A higher vertex count per tile means fewer total tiles,
+ # reducing runtime work to load, unload, and manage tiles.
+ verticesPerTileEdge: 80
+
+ # Tolerance for how much a polygon can deviate from the original geometry when simplified.
+ # Higher values produce simpler (faster) meshes but can reduce accuracy.
+ maxSimplificationError: 1.8
+
+ # You can override any global parameter for a specific map by specifying its map ID.
+ # Inside each map override, you can also override parameters per individual tile,
+ # identified by a string "tileX,tileY" (coordinates).
+ #
+ # Overrides cascade: global settings → map overrides → tile overrides.
+ # For example:
+ #
+ # mapsOverrides:
+ # "0": # Map ID 0 overrides
+ # walkableRadius: 5 # Override global climb height for entire map 0
+ #
+ # tilesOverrides:
+ # "50,70": # Tile at coordinates (50,70) on map 0
+ # walkableSlopeAngle: 70 # Override slope angle locally just here
+ # walkableClimb: 4 # Also override climb height for this tile only
+ #
+ # "51,71":
+ # walkableClimb: 3 # Override climb height for tile (51,71)
+ #
+ # "48,32":
+ # walkableClimb: 1 # Even smaller climb for tile (48,32)
+ #
+ # "1": # Map ID 1 overrides example
+ # walkableHeight: 8 # Increase clearance for whole map 1
+ #
+ # tilesOverrides:
+ # "100,100":
+ # maxSimplificationError: 2.5 # Looser mesh simplification for this tile only
+ #
+ # "101,101":
+ # walkableRadius: 1 # Smaller NPC radius here for tight corridors
+ #
+ # This approach allows very fine-grained control of navigation mesh parameters
+ # on a per-map and per-tile basis, optimizing pathfinding quality and performance.
+ #
+ # All parameters defined globally are eligible for override.
+ # Just specify the parameter name and new value in the override section.
+ mapsOverrides:
+ "562": # Blade's Edge Arena
+ walkableRadius: 0 # This allows walking on the ropes to the pillars
+
+ "48": # Blackfathom Deeps
+ cellSizeVertical: 0.5334 # ch*2 = 0.2667 * 2 ≈ 0.5334. Reduce the chance to have underground levels.
+
+ "529": # Arathi Basin
+ tilesOverrides:
+ "30,29": # Lumber Mill
+ # Make sure that Fear will not drop players rom cliff -
+ # https://github.com/azerothcore/azerothcore-wotlk/pull/22462#issuecomment-3067024680
+ walkableSlopeAngle: 45
+
+ "530": # Outland
+ tilesOverrides:
+ "32,30": # Dark portal
+ walkableSlopeAngle: 45 # https://github.com/chromiecraft/chromiecraft/issues/8404#issuecomment-3476012660
+
+ # debugOutput generates debug files in the `meshes` directory for use with RecastDemo.
+ # This is useful for inspecting and debugging mmap generation visually.
+ #
+ # My workflow:
+ # 1. Install RecastDemo. I'm building it from the source of this fork: https://github.com/jackpoz/recastnavigation
+ # 2. In-game, move your character to the area you want to debug.
+ # 3. Type `.mmap loc` in chat. This will output:
+ # - The current tile file name (e.g., `04832.mmtile`)
+ # - The Recast config values used to generate that tile
+ # 4. Enable `debugOutput` and regenerate mmaps (preferably just the tile from step 3).
+ # - To regenerate only one tile, delete it from the `mmaps` folder.
+ # 5. After generation, you will find debug files in the `meshes` folder, including an OBJ file (e.g., `map0004832.obj`)
+ # 6. Copy these debug files to the `Meshes` folder used by RecastDemo.
+ # - RecastDemo expects this folder to be in the same directory as its executable.
+ # 7. In RecastDemo:
+ # - Click "Input Mesh" and select the `.obj` file
+ # - Choose "Solo Mesh" in the Sample selector
+ # 8. (Optional) Reuse the Recast config values from step 3:
+ # - `cellSizeHorizontal` → "Cell Size"
+ # - `walkableSlopeAngle` → "Max Slope"
+ # - `walkableClimb` → "Max Climb"
+ # - and so on
+ # 9. Scroll to the bottom of RecastDemo UI and press "Build" to generate the navigation mesh
+ debugOutput: false
diff --git a/src/tools/vmap4_assembler/VMapAssembler.cpp b/src/tools/vmap4_assembler/VMapAssembler.cpp
index fbe5fadb59..a0a6981ea6 100644
--- a/src/tools/vmap4_assembler/VMapAssembler.cpp
+++ b/src/tools/vmap4_assembler/VMapAssembler.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/tools/vmap4_extractor/adtfile.cpp b/src/tools/vmap4_extractor/adtfile.cpp
index 6db292bc86..98513c93dc 100644
--- a/src/tools/vmap4_extractor/adtfile.cpp
+++ b/src/tools/vmap4_extractor/adtfile.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/tools/vmap4_extractor/adtfile.h b/src/tools/vmap4_extractor/adtfile.h
index 201806f3a3..7ddd412d71 100644
--- a/src/tools/vmap4_extractor/adtfile.h
+++ b/src/tools/vmap4_extractor/adtfile.h
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/tools/vmap4_extractor/dbcfile.cpp b/src/tools/vmap4_extractor/dbcfile.cpp
index 3e6351b141..561d86265f 100644
--- a/src/tools/vmap4_extractor/dbcfile.cpp
+++ b/src/tools/vmap4_extractor/dbcfile.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/tools/vmap4_extractor/dbcfile.h b/src/tools/vmap4_extractor/dbcfile.h
index ad7a4bb703..49535cff9b 100644
--- a/src/tools/vmap4_extractor/dbcfile.h
+++ b/src/tools/vmap4_extractor/dbcfile.h
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/tools/vmap4_extractor/gameobject_extract.cpp b/src/tools/vmap4_extractor/gameobject_extract.cpp
index fd7160e783..b1470497e9 100644
--- a/src/tools/vmap4_extractor/gameobject_extract.cpp
+++ b/src/tools/vmap4_extractor/gameobject_extract.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/tools/vmap4_extractor/loadlib/loadlib.h b/src/tools/vmap4_extractor/loadlib/loadlib.h
index 83222d83af..037f15e633 100644
--- a/src/tools/vmap4_extractor/loadlib/loadlib.h
+++ b/src/tools/vmap4_extractor/loadlib/loadlib.h
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/tools/vmap4_extractor/model.cpp b/src/tools/vmap4_extractor/model.cpp
index d2912f0f37..ed006fbad2 100644
--- a/src/tools/vmap4_extractor/model.cpp
+++ b/src/tools/vmap4_extractor/model.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/tools/vmap4_extractor/model.h b/src/tools/vmap4_extractor/model.h
index 021d1dedba..6eb1c5ea94 100644
--- a/src/tools/vmap4_extractor/model.h
+++ b/src/tools/vmap4_extractor/model.h
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/tools/vmap4_extractor/modelheaders.h b/src/tools/vmap4_extractor/modelheaders.h
index b6230fee3f..8a46311628 100644
--- a/src/tools/vmap4_extractor/modelheaders.h
+++ b/src/tools/vmap4_extractor/modelheaders.h
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/tools/vmap4_extractor/mpq_libmpq.cpp b/src/tools/vmap4_extractor/mpq_libmpq.cpp
index 2e5e4eb2b7..d699c78294 100644
--- a/src/tools/vmap4_extractor/mpq_libmpq.cpp
+++ b/src/tools/vmap4_extractor/mpq_libmpq.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/tools/vmap4_extractor/mpq_libmpq04.h b/src/tools/vmap4_extractor/mpq_libmpq04.h
index 5b6c81ce3b..605ca54a8a 100644
--- a/src/tools/vmap4_extractor/mpq_libmpq04.h
+++ b/src/tools/vmap4_extractor/mpq_libmpq04.h
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/tools/vmap4_extractor/vec3d.h b/src/tools/vmap4_extractor/vec3d.h
index 25a042fc2e..fb07d0d473 100644
--- a/src/tools/vmap4_extractor/vec3d.h
+++ b/src/tools/vmap4_extractor/vec3d.h
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/tools/vmap4_extractor/vmapexport.cpp b/src/tools/vmap4_extractor/vmapexport.cpp
index 3acd698727..52f4983f8d 100644
--- a/src/tools/vmap4_extractor/vmapexport.cpp
+++ b/src/tools/vmap4_extractor/vmapexport.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
@@ -144,6 +144,7 @@ bool ExtractSingleWmo(std::string& fname)
WMODoodadData& doodads = WmoDoodads[plain_name];
std::swap(doodads, froot.DoodadData);
int Wmo_nVertices = 0;
+ uint32 groupCount = 0;
//printf("root has %d groups\n", froot->nGroups);
if (froot.nGroups != 0)
{
@@ -170,7 +171,11 @@ bool ExtractSingleWmo(std::string& fname)
break;
}
+ if (fgroup.ShouldSkip(&froot))
+ continue;
+
Wmo_nVertices += fgroup.ConvertToVMAPGroupWmo(output, preciseVectorData);
+ ++groupCount;
for (uint16 groupReference : fgroup.DoodadReferences)
{
if (groupReference >= doodads.Spawns.size())
@@ -187,6 +192,8 @@ bool ExtractSingleWmo(std::string& fname)
fseek(output, 8, SEEK_SET); // store the correct no of vertices
fwrite(&Wmo_nVertices, sizeof(int), 1, output);
+ // store the correct no of groups
+ fwrite(&groupCount, sizeof(uint32), 1, output);
fclose(output);
// Delete the extracted file in the case of an error
diff --git a/src/tools/vmap4_extractor/vmapexport.h b/src/tools/vmap4_extractor/vmapexport.h
index 4f51ae165f..fc84339968 100644
--- a/src/tools/vmap4_extractor/vmapexport.h
+++ b/src/tools/vmap4_extractor/vmapexport.h
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
@@ -24,8 +24,8 @@
namespace VMAP
{
- const char VMAP_MAGIC[] = "VMAP_4.7";
- const char RAW_VMAP_MAGIC[] = "VMAP047"; // used in extracted vmap files with raw data
+ const char VMAP_MAGIC[] = "VMAP_4.8";
+ const char RAW_VMAP_MAGIC[] = "VMAP048"; // used in extracted vmap files with raw data
}
enum ModelFlags
diff --git a/src/tools/vmap4_extractor/wdtfile.cpp b/src/tools/vmap4_extractor/wdtfile.cpp
index 1a52342408..59955d1571 100644
--- a/src/tools/vmap4_extractor/wdtfile.cpp
+++ b/src/tools/vmap4_extractor/wdtfile.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/tools/vmap4_extractor/wdtfile.h b/src/tools/vmap4_extractor/wdtfile.h
index e2a6a61dfe..f534a60c88 100644
--- a/src/tools/vmap4_extractor/wdtfile.h
+++ b/src/tools/vmap4_extractor/wdtfile.h
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
diff --git a/src/tools/vmap4_extractor/wmo.cpp b/src/tools/vmap4_extractor/wmo.cpp
index 70164930b7..ed20db1196 100644
--- a/src/tools/vmap4_extractor/wmo.cpp
+++ b/src/tools/vmap4_extractor/wmo.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
@@ -103,6 +103,11 @@ bool WMORoot::open()
DoodadData.Spawns.resize(size / sizeof(WMO::MODD));
f.read(DoodadData.Spawns.data(), size);
}
+ else if (!strcmp(fourcc, "MOGN"))
+ {
+ GroupNames.resize(size);
+ f.read(GroupNames.data(), size);
+ }
/*
else if (!strcmp(fourcc,"MOTX"))
{
@@ -497,6 +502,22 @@ uint32 WMOGroup::GetLiquidTypeId(uint32 liquidTypeId)
return liquidTypeId;
}
+bool WMOGroup::ShouldSkip(WMORoot const* root) const
+{
+ // skip unreachable
+ if (mogpFlags & 0x80)
+ return true;
+
+ // skip antiportals
+ if (mogpFlags & 0x4000000)
+ return true;
+
+ if (groupName < int32(root->GroupNames.size()) && !strcmp(&root->GroupNames[groupName], "antiportal"))
+ return true;
+
+ return false;
+}
+
WMOGroup::~WMOGroup()
{
delete [] MOPY;
diff --git a/src/tools/vmap4_extractor/wmo.h b/src/tools/vmap4_extractor/wmo.h
index 8967a87a4a..4d00b11cea 100644
--- a/src/tools/vmap4_extractor/wmo.h
+++ b/src/tools/vmap4_extractor/wmo.h
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
@@ -85,6 +85,7 @@ public:
float bbcorn1[3];
float bbcorn2[3];
+ std::vector<char> GroupNames;
WMODoodadData DoodadData;
std::unordered_set<uint32> ValidDoodadNames;
@@ -154,6 +155,7 @@ public:
bool open(WMORoot* rootWMO);
int ConvertToVMAPGroupWmo(FILE* output, bool preciseVectorData);
uint32 GetLiquidTypeId(uint32 liquidTypeId);
+ bool ShouldSkip(WMORoot const* root) const;
};
namespace MapObject