diff --git a/.gitignore b/.gitignore index 34f87cabac2..8e1bacb6355 100644 --- a/.gitignore +++ b/.gitignore @@ -88,6 +88,8 @@ cmake_install.cmake # Special exceptions # +src/modules + # recastnavigation directory needs exception !dep/recastnavigation/RecastDemo/Build/ /_build/ diff --git a/contrib/extractor/meson.build b/contrib/extractor/meson.build new file mode 100644 index 00000000000..ad7a78c5047 --- /dev/null +++ b/contrib/extractor/meson.build @@ -0,0 +1,18 @@ +ad_sources = [ + 'loadlib/loadlib.cpp', + 'loadlib/adt.cpp', + 'loadlib/wdt.cpp', + 'dbcfile.cpp', + 'mpq_libmpq.cpp', + 'System.cpp', +] + +executable('ad', + ad_sources, + link_with: [lib_libmpq], + include_directories: global_includes, + dependencies: [boost_dep, zlib_dep], + link_args: _linker_args, + install_dir: 'bin/tools', + install: true +) diff --git a/contrib/git_id/meson.build b/contrib/git_id/meson.build new file mode 100644 index 00000000000..4d46efc4d0a --- /dev/null +++ b/contrib/git_id/meson.build @@ -0,0 +1,3 @@ +executable('git_id', + 'git_id.cpp', +) \ No newline at end of file diff --git a/contrib/mmap/meson.build b/contrib/mmap/meson.build new file mode 100644 index 00000000000..3d8fcdb630d --- /dev/null +++ b/contrib/mmap/meson.build @@ -0,0 +1,51 @@ +movemapgen_args = '' +movemapgen_args = [movemapgen_args, '-DMMAP_GENERATOR', '-DNO_CORE_FUNCS', '-DNO_vsnprintf', '-DDT_POLYREF64'] +movemapgen_sources = [ + 'src/generator.cpp', + 'src/IntermediateValues.cpp', + 'src/MapBuilder.cpp', + 'src/TerrainBuilder.cpp', + 'src/VMapExtensions.cpp' +] + +if build_machine.system() == 'linux' + movemapgen_args = [movemapgen_args, '-ggdb'] +endif + +vmaplib = static_library('vmaplib', + ['../../src/game/Vmap/BIH.cpp', '../../src/game/Vmap/VMapManager2.cpp', '../../src/game/Vmap/MapTree.cpp', '../../src/game/Vmap/TileAssembler.cpp', '../../src/game/Vmap/WorldModel.cpp', '../../src/game/Vmap/ModelInstance.cpp', '../../src/game/Vmap/GameObjectModelVmaps.cpp'], + include_directories: global_includes, + dependencies: [zlib_dep, boost_dep], + cpp_args: movemapgen_args, + link_with: [g3dlib, detourlib, recastlib, frameworklib, sharedlib], + install : false +) + +mmaplib = static_library('mmaplib', + ['src/generator.cpp', 'src/IntermediateValues.cpp', 'src/MapBuilder.cpp', 'src/TerrainBuilder.cpp', 'src/VMapExtensions.cpp', '../../src/game/MotionGenerators/MoveMapSharedDefines.cpp'], + include_directories: global_includes, + dependencies: [zlib_dep, boost_dep], + cpp_args: movemapgen_args, + link_with: [vmaplib, detourlib, recastlib, g3dlib, frameworklib], + install: false +) + +if get_option('BUILD_EXTRACTORS') + if build_machine.system() == 'linux' + local_linker = [_linker_args, '-rdynamic'] + endif + executable('MoveMapGen', + movemapgen_sources, + link_with: [vmaplib, detourlib, recastlib, mmaplib], + include_directories: global_includes, + dependencies: [boost_dep, zlib_dep], + cpp_args: movemapgen_args, + link_args: _linker_args, + install_dir: 'bin/tools', + install: true + ) + install_data(movemapgen_script_file, install_dir: 'bin/tools') + install_data(offmesh_file, install_dir: 'bin/tools') + install_data(config_json_file, install_dir: 'bin/tools') +endif + diff --git a/contrib/vmap_assembler/meson.build b/contrib/vmap_assembler/meson.build new file mode 100644 index 00000000000..39742f3b437 --- /dev/null +++ b/contrib/vmap_assembler/meson.build @@ -0,0 +1,31 @@ +assembler_args = '' +if get_option('DEBUG') + assembler_args = [assembler_args, '-DIOMAP_DEBUG'] +endif + +assembler_args = [assembler_args, '-DNO_CORE_FUNCS'] + +if build_machine.system() == 'linux' + assembler_args = [assembler_args, '-ggdb'] +endif + +vmap_assembler_sources = [ + '../../src/game/Vmap/BIH.cpp', + '../../src/game/Vmap/VMapManager2.cpp', + '../../src/game/Vmap/MapTree.cpp', + '../../src/game/Vmap/TileAssembler.cpp', + '../../src/game/Vmap/WorldModel.cpp', + '../../src/game/Vmap/ModelInstance.cpp', + 'vmap_assembler.cpp' +] + +executable('vmap_assembler', + vmap_assembler_sources, + link_with: [sharedlib, g3dlib, frameworklib], + include_directories: global_includes, + dependencies: [boost_dep, zlib_dep], + cpp_args: assembler_args, + link_args: _linker_args, + install_dir: 'bin/tools', + install: true +) \ No newline at end of file diff --git a/contrib/vmap_extractor/meson.build b/contrib/vmap_extractor/meson.build new file mode 100644 index 00000000000..3188f07f848 --- /dev/null +++ b/contrib/vmap_extractor/meson.build @@ -0,0 +1,7 @@ +vmap_extractor_args = ['-DIOMAP_DEBUG', '-DUSE_LIBMPQ04'] + +if build_machine.system() == 'linux' + vmap_extractor_args = [vmap_extractor_args, '-ggdb'] +endif + +subdir('vmapextract') \ No newline at end of file diff --git a/contrib/vmap_extractor/vmapextract/meson.build b/contrib/vmap_extractor/vmapextract/meson.build new file mode 100644 index 00000000000..08174f1bb3f --- /dev/null +++ b/contrib/vmap_extractor/vmapextract/meson.build @@ -0,0 +1,20 @@ +vmap_extractor_sources = [ + 'adtfile.cpp', + 'dbcfile.cpp', + 'gameobject_extract.cpp', + 'model.cpp', + 'mpq_libmpq.cpp', + 'vmapexport.cpp', + 'wdtfile.cpp', + 'wmo.cpp' +] + +executable('vmap_extractor', + vmap_extractor_sources, + include_directories: global_includes, + link_with: [g3dlib, lib_libmpq, detourlib, recastlib], + link_args: _linker_args, + install_dir: 'bin/tools', + install: true +) +install_data(extractor_script_file, install_dir: 'bin/tools') \ No newline at end of file diff --git a/dep/g3dlite/meson.build b/dep/g3dlite/meson.build new file mode 100644 index 00000000000..d67873f1ab0 --- /dev/null +++ b/dep/g3dlite/meson.build @@ -0,0 +1,52 @@ +g3d_sources = [ + 'AABox.cpp', + 'Any.cpp', + 'BinaryFormat.cpp', + 'BinaryInput.cpp', + 'BinaryOutput.cpp', + 'Box.cpp', + 'Capsule.cpp', + 'CollisionDetection.cpp', + 'CoordinateFrame.cpp', + 'Crypto.cpp', + 'Cylinder.cpp', + 'FileSystem.cpp', + 'Line.cpp', + 'LineSegment.cpp', + 'Log.cpp', + 'Matrix3.cpp', + 'Matrix4.cpp', + 'MemoryManager.cpp', + 'PhysicsFrame.cpp', + 'Plane.cpp', + 'Quat.cpp', + 'Random.cpp', + 'Ray.cpp', + 'ReferenceCount.cpp', + 'RegistryUtil.cpp', + 'Sphere.cpp', + 'System.cpp', + 'TextInput.cpp', + 'TextOutput.cpp', + 'Triangle.cpp', + 'UprightFrame.cpp', + 'Vector2.cpp', + 'Vector3.cpp', + 'Vector4.cpp', + 'debugAssert.cpp', + 'fileutils.cpp', + 'format.cpp', + 'g3dfnmatch.cpp', + 'g3dmath.cpp', + 'prompt.cpp', + 'stringutils.cpp', + 'uint128.cpp' +] + +g3d_inc = include_directories('G3D', '../include') + +g3dlib = static_library('g3dlite', + g3d_sources, + include_directories: g3d_inc, + dependencies: zlib_dep, + install : false) \ No newline at end of file diff --git a/dep/libmpq/meson.build b/dep/libmpq/meson.build new file mode 100644 index 00000000000..9cb6aeb0dfb --- /dev/null +++ b/dep/libmpq/meson.build @@ -0,0 +1,34 @@ +libmpq_sources = [ + 'config.h', + 'libmpq/common.c', + 'libmpq/common.h', + 'libmpq/crypt_buf.h', + 'libmpq/explode.c', + 'libmpq/explode.h', + 'libmpq/extract.c', + 'libmpq/huffman.c', + 'libmpq/huffman.h', + 'libmpq/mpq-internal.h', + 'libmpq/mpq.c', + 'libmpq/mpq.h', + 'libmpq/pack_begin.h', + 'libmpq/pack_end.h', + 'libmpq/platform.h', + 'libmpq/wave.c', + 'libmpq/wave.h' +] + +libmpq_inc_dir = ['.'] + +if meson.get_compiler('cpp').get_id() == 'msvc' + libmpq_inc_dir = [libmpq_inc_dir, 'win'] +endif + +libmpq_inc = include_directories(libmpq_inc_dir) + +lib_libmpq = static_library('libmpq', + libmpq_sources, + include_directories: libmpq_inc, + dependencies: [zlib_dep, bzip2_dep], + install : false +) \ No newline at end of file diff --git a/dep/meson.build b/dep/meson.build new file mode 100644 index 00000000000..7ea6c11152b --- /dev/null +++ b/dep/meson.build @@ -0,0 +1,8 @@ +if get_option('BUILD_GAME_SERVER') or get_option('BUILD_LOGIN_SERVER') or get_option('BUILD_EXTRACTORS') + subdir('recastnavigation') + subdir('src') + subdir('g3dlite') + if get_option('BUILD_EXTRACTORS') + subdir('libmpq') + endif +endif \ No newline at end of file diff --git a/dep/recastnavigation/Detour/meson.build b/dep/recastnavigation/Detour/meson.build new file mode 100644 index 00000000000..a8b4604a843 --- /dev/null +++ b/dep/recastnavigation/Detour/meson.build @@ -0,0 +1,26 @@ +detour_sources = [ + 'Source/DetourAlloc.cpp', + 'Source/DetourAssert.cpp', + 'Source/DetourCommon.cpp', + 'Source/DetourNavMesh.cpp', + 'Source/DetourNavMeshBuilder.cpp', + 'Source/DetourNavMeshQuery.cpp', + 'Source/DetourNode.cpp', + 'Include/DetourAlloc.h', + 'Include/DetourAssert.h', + 'Include/DetourCommon.h', + 'Include/DetourMath.h', + 'Include/DetourNavMesh.h', + 'Include/DetourNavMeshBuilder.h', + 'Include/DetourNavMeshQuery.h', + 'Include/DetourNode.h', + 'Include/DetourStatus.h' +] + +detour_inc = include_directories('Include') + +detourlib = static_library('Detour', + detour_sources, + include_directories: detour_inc, + cpp_args: recastnav_args, + install : false) \ No newline at end of file diff --git a/dep/recastnavigation/Recast/meson.build b/dep/recastnavigation/Recast/meson.build new file mode 100644 index 00000000000..ead65597fd2 --- /dev/null +++ b/dep/recastnavigation/Recast/meson.build @@ -0,0 +1,23 @@ +recast_sources = [ + 'Source/Recast.cpp', + 'Source/RecastAlloc.cpp', + 'Source/RecastArea.cpp', + 'Source/RecastAssert.cpp', + 'Source/RecastContour.cpp', + 'Source/RecastFilter.cpp', + 'Source/RecastLayers.cpp', + 'Source/RecastMesh.cpp', + 'Source/RecastMeshDetail.cpp', + 'Source/RecastRasterization.cpp', + 'Source/RecastRegion.cpp', + 'Include/Recast.h', + 'Include/RecastAlloc.h', + 'Include/RecastAssert.h' +] + +recastlib = static_library('recast', + recast_sources, + include_directories: include_directories('Include'), + cpp_args: recastnav_args, + install : false +) \ No newline at end of file diff --git a/dep/recastnavigation/meson.build b/dep/recastnavigation/meson.build new file mode 100644 index 00000000000..6cc57ac9b1c --- /dev/null +++ b/dep/recastnavigation/meson.build @@ -0,0 +1,14 @@ +if get_option('BUILD_GAME_SERVER') or get_option('BUILD_EXTRACTORS') or get_option('BUILD_RECASTDEMOMOD') + recastnav_args = '-DDT_POLYREF64' + subdir('Detour') +endif + +if get_option('BUILD_EXTRACTORS') or get_option('BUILD_RECASTDEMOMOD') + subdir('Recast') +endif + +if get_option('BUILD_RECASTDEMOMOD') + subdir('DetourCrowd') + subdir('DetourTileCache') + subdir('DebugUtils') +endif \ No newline at end of file diff --git a/dep/src/bzip2/meson.build b/dep/src/bzip2/meson.build new file mode 100644 index 00000000000..d6d94c17cc5 --- /dev/null +++ b/dep/src/bzip2/meson.build @@ -0,0 +1,21 @@ +bzip2_sources = [ + 'compress.c', + 'crctable.c', + 'decompress.c', + 'huffman.c', + 'randtable.c', + 'blocksort.c', + 'bzlib.c' +] + +bz2_inc = include_directories('.') + +bz2lib = static_library('bzip2', + bzip2_sources, + include_directories: [global_includes, bz2_inc], + install : false) + +bzip2_dep = declare_dependency( + include_directories: bz2_inc, + link_with: bz2lib +) \ No newline at end of file diff --git a/dep/src/gsoap/meson.build b/dep/src/gsoap/meson.build new file mode 100644 index 00000000000..13611254ab1 --- /dev/null +++ b/dep/src/gsoap/meson.build @@ -0,0 +1,6 @@ +gsoap_sources = ['stdsoap2.cpp'] + +gsoaplib = static_library('gsoap', + gsoap_sources, + include_directories: global_includes, + install : false) \ No newline at end of file diff --git a/dep/src/meson.build b/dep/src/meson.build new file mode 100644 index 00000000000..cf0c7baa5b3 --- /dev/null +++ b/dep/src/meson.build @@ -0,0 +1,7 @@ +subdir('gsoap') +if get_option('BUILD_EXTRACTORS') + bzip2_dep = dependency('bzip2', required: false) + if not bzip2_dep.found() + subdir('bzip2') + endif +endif \ No newline at end of file diff --git a/doc/meson.build b/doc/meson.build new file mode 100644 index 00000000000..45d4466d891 --- /dev/null +++ b/doc/meson.build @@ -0,0 +1,12 @@ +doxygen = find_program('doxygen', required : false) +if doxygen.found() + doxy_file = configure_file( + configuration: {'PACKAGE': meson.project_name(), 'VERSION': meson.project_version(), 'TOPSRCDIR': meson.source_root(), 'DESTDIR': meson.build_root() + '/doc/docs'}, + input: 'Doxyfile.dist', + output: 'Doxyfile' + ) + run_command([doxygen, meson.build_root() + '/doc/Doxyfile'], check: false) + install_subdir(meson.build_root() + '/doc/docs/html', install_dir: 'docs') +else + warning('Documentation disabled without doxygen') +endif diff --git a/meson.build b/meson.build new file mode 100644 index 00000000000..2664f27af86 --- /dev/null +++ b/meson.build @@ -0,0 +1,145 @@ +project('CMaNGOS WotLK', 'cpp', 'c', + license: 'GPL-2.0-only', + meson_version: '>=1.3.1', + default_options : ['cpp_std=vc++17,c++17', 'buildtype=release', 'warning_level=0', 'default_library=static']) + +if build_machine.system() == 'windows' + add_project_arguments('/Zc:strictStrings-', language : 'cpp') +endif + +_linker_args = '' + +boost_dep = dependency('boost', version: '>=1.66.0', static: true, modules: ['thread', 'program_options', 'system', 'filesystem'], required: false) +if not boost_dep.found() + message('Static Boost libraries could not be found. Trying dynamic libraries') + boost_dep = dependency('boost', version: '>=1.66.0', static:false, modules: ['thread', 'program_options', 'system', 'filesystem'], required: true) +endif +dblib_dep = dependency('mariadb', 'libmariadb', 'mysql', 'libmysql', 'postgresql', required: false) +zlib_dep = dependency('zlib', version: '>=1.2.13', static: true, fallback: ['zlib', 'zlib_dep'], required: true) +openssl_dep = dependency('openssl', version: '>=1.1.1', static: true, fallback: ['openssl'], required: true) +utfcpp_dep = dependency('utf8cpp', 'utfcpp', static: true, required: false) +sqlite_dep = dependency('sqlite3', static: true, fallback: ['sqlite3'], required: get_option('SQLITE')) + +global_includes = include_directories('src/game', 'dep/libmpq', 'src', 'src/framework', 'src/game/Vmap', + 'dep/json', 'dep/g3dlite', 'src/shared', 'dep/recastnavigation', + 'dep/recastnavigation/Recast/Include', 'dep/recastnavigation/Detour/Include', + 'src/game/MotionGenerators', 'dep/include/bzip2', 'dep/include/gsoap', + 'dep/include') + +if not get_option('SQLITE') + if not dblib_dep.found() + if build_machine.system() == 'windows' + mysql_dirs = [ + 'C:\Program Files\MySQL\MySQL Server 8.0\lib', + 'C:\Program Files\MySQL\MySQL Server 5.7\lib', + 'C:\Program Files\MariaDB 11.0\lib', + 'C:\Program Files\MariaDB 11.1\lib', + 'C:\Program Files\MariaDB 11.2\lib', + get_option('LIBMYSQL_PATH'), + ] + + fs = import('fs') + if fs.is_dir('C:\Program Files\MySQL\MySQL Server 8.0\lib') + mysql_dll = 'C:\Program Files\MySQL\MySQL Server 8.0\lib\libmysql.dll' + elif fs.is_dir('C:\Program Files\MySQL\MySQL Server 5.7\lib') + mysql_dll = 'C:\Program Files\MySQL\MySQL Server 5.7\lib\libmysql.dll' + elif fs.is_dir('C:\Program Files\MariaDB 11.2\lib') + mysql_dll = 'C:\Program Files\MariaDB 11.2\lib\libmariadb.dll' + elif fs.is_dir('C:\Program Files\MariaDB 11.1\lib') + mysql_dll = 'C:\Program Files\MariaDB 11.1\liblibmariadb.dll' + elif fs.is_dir('C:\Program Files\MariaDB 11.0\lib') + mysql_dll = 'C:\Program Files\MariaDB 11.0\lib\libmariadb.dll' + elif fs.is_dir(get_option('LIBMYSQL_PATH')) + mysql_dll = get_option('LIBMYSQL_PATH') + '\libmysql.dll' + else + error('No local MySQL Server installation found') + endif + + dblib_dep = meson.get_compiler('cpp').find_library('mysql', dirs: mysql_dirs, static: true, required: false) + if not dblib_dep.found() + dblib_dep = meson.get_compiler('cpp').find_library('mariadb', dirs: mysql_dirs, static: true, required: false) + endif + install_data(mysql_dll, install_dir: get_option('bindir')) + else + error('No local MySQL Server installation found') + endif + endif +else + dblib_dep = sqlite_dep +endif + +if not dblib_dep.found() + error('No local SQL Server installation found') +endif + +if get_option('POSTGRESQL') + add_project_arguments('-DDO_POSTGRESQL', language: 'cpp') +endif + +if get_option('SQLITE') + add_project_arguments('-DDO_SQLITE=1', language: 'cpp') +endif + +if get_option('DEBUG') + add_project_arguments('-g3', language: 'cpp') +endif + +if not get_option('WARNINGS') + add_project_arguments('-w', language: 'cpp') +endif + +if build_machine.system() == 'linux' + add_project_arguments('-DSYSCONFDIR="../etc/"', language: 'cpp') +endif + +add_project_arguments('-DBOOST_ALL_NO_LIB', language: 'cpp') + +if get_option('BUILD_SCRIPTDEV') + add_project_arguments('-DBUILD_SCRIPTDEV', language: 'cpp') +endif +if get_option('BUILD_PLAYERBOT') + add_project_arguments('-DBUILD_PLAYERBOT', language: 'cpp') +endif +if get_option('BUILD_AHBOT') + add_project_arguments('-DBUILD_AHBOT', language: 'cpp') +endif +if get_option('BUILD_METRICS') + add_project_arguments('-DBUILD_METRICS', language: 'cpp') +endif + +if get_option('BUILD_DOCS') + subdir('doc') +endif + +if get_option('BUILD_RECASTDEMOMOD') + error('RECASTDEMOMOD currently unavailable') + if build_machine.system() == 'windows' + if not get_option('BUILD_EXTRACTORS') + subdir('contrib/mmap') + endif + subdir('contrib/recastdemomod') + else + message('BUILD_RECASTDEMOMOD forced to OFF. Not supported on non windows system.') + endif +endif + +if get_option('BUILD_GIT_ID') + subdir('contrib/git_id') +endif + +subdir('dep') +if get_option('BUILD_GAME_SERVER') or get_option('BUILD_LOGIN_SERVER') or get_option('BUILD_EXTRACTORS') + subdir('src') +endif + +if get_option('BUILD_EXTRACTORS') + extractor_script_file = files('contrib/extractor_scripts/ExtractResources.sh') + movemapgen_script_file = files('contrib/extractor_scripts/MoveMapGen.sh') + config_json_file = files('contrib/extractor_scripts/config.json') + offmesh_file = files('contrib/extractor_scripts/offmesh.txt') + subdir('contrib/extractor') + subdir('contrib/vmap_extractor') + subdir('contrib/vmap_assembler') + subdir('contrib/mmap') +endif + diff --git a/meson_options.txt b/meson_options.txt new file mode 100644 index 00000000000..24a7d118053 --- /dev/null +++ b/meson_options.txt @@ -0,0 +1,17 @@ +option('DEBUG', type : 'boolean', value: false, description: 'Include additional debug-code in core') +option('WARNINGS', type : 'boolean', value: false, description: 'Show all warnings during compile') +option('POSTGRESQL', type : 'boolean', value: false, description: 'Use PostgreSQL') +option('SQLITE', type : 'boolean', value: false, description: 'Use SQLite') +option('PCH', type : 'boolean', value: true, description: 'Use precompiled headers') +option('BUILD_GAME_SERVER', type : 'boolean', value: true, description: 'Build game server') +option('BUILD_LOGIN_SERVER', type : 'boolean', value: true, description: 'Build login server') +option('BUILD_EXTRACTORS', type : 'boolean', value: false, description: 'Build map/dbc/vmap/mmap extractors') +option('BUILD_SCRIPTDEV', type : 'boolean', value: true, description: 'Build ScriptDev. (Off speeds up build)') +option('BUILD_PLAYERBOT', type : 'boolean', value: false, description: 'Build Playerbot mod') +option('BUILD_AHBOT', type : 'boolean', value: false, description: 'Build Acution House Bot mod') +option('BUILD_METRICS', type : 'boolean', value: false, description: 'Build Metrics, generate data for Grafana') +option('BUILD_RECASTDEMOMOD', type : 'boolean', value: false, description: 'Build map/vmap/mmap viewer') +option('BUILD_GIT_ID', type : 'boolean', value: false, description: 'Build git_id') +option('BUILD_DOCS', type : 'boolean', value: false, description: 'Build documentation with doxygen') +option('USE_ANTICHEAT', type : 'boolean', value: true, description: 'Use anticheat system') +option('LIBMYSQL_PATH', type : 'string', value: '', description: 'Path to the MySQL Library') diff --git a/sql/scriptdev2/spell.sql b/sql/scriptdev2/spell.sql index f082b9fc9ec..bfc831027e7 100644 --- a/sql/scriptdev2/spell.sql +++ b/sql/scriptdev2/spell.sql @@ -927,6 +927,9 @@ INSERT INTO spell_scripts(Id, ScriptName) VALUES (59906,'spell_swift_hand_of_justice'), (59915,'spell_discerning_eye_of_the_beast'), (60079,'spell_fire_sgm3'), +(60075,'spell_flame_leviathan_buff'), +(60076,'spell_flame_leviathan_buff'), +(60077,'spell_flame_leviathan_buff'), (60211,'spell_cauterize'), (60528,'spell_rod_of_siphoning'), (60539,'spell_sapphiron_achievement_check'), @@ -935,6 +938,7 @@ INSERT INTO spell_scripts(Id, ScriptName) VALUES (60775,'spell_increased_spell_damage_done_dummy'), (60779,'spell_increased_healing_done_dummy'), (60831,'spell_alumeths_remains'), +(60603,'spell_eject_passenger_1'), (60929,'spell_loatheb_prewarn'), (61071,'spell_vortex_aura'), (61072,'spell_vortex_aura'), @@ -944,6 +948,7 @@ INSERT INTO spell_scripts(Id, ScriptName) VALUES (61187,'spell_twilight_shift_aura'), (61190,'spell_twilight_shift_aura'), (61210,'spell_align_disk_aggro'), +(61242,'spell_parachute_leviathan'), (61474,'spell_grip_of_sladran'), (61475,'spell_gundrak_snake_wrap'), (61546,'spell_shatter'), @@ -952,7 +957,20 @@ INSERT INTO spell_scripts(Id, ScriptName) VALUES (62108,'spell_tails_up_summon_female_frost_leopard'), (62116,'spell_tails_up_summon_female_icepaw_bear'), (62138,'spell_teleport_inside_violet_hold'), +(62297,'spell_hodirs_fury_leviathan'), +(62323,'spell_hookshot'), +(62324,'spell_throw_passenger'), +(62907,'spell_freyas_ward_leviathan'), +(62910,'spell_mimirons_inferno_leviathan'), +(62912,'spell_thorims_hammer_leviathan'), +(62336,'spell_hookshot_aura'), +(62363,'spell_anti_air_rocket'), +(62374,'spell_pursue_leviathan'), (62382,'spell_ignis_brittle'), +(62399,'spell_overload_circuit'), +(62475,'spell_systems_shutdown'), +(62634,'spell_demolisher_mortar'), +(62635,'spell_demolisher_mortar'), (62789,'spell_heart_overload'), (62826,'spell_energy_orb_dummy'), (62828,'spell_recharge_robot'), @@ -967,17 +985,26 @@ INSERT INTO spell_scripts(Id, ScriptName) VALUES (62717,'spell_slag_pot'), (63474,'spell_ignis_scorch'), (63482,'spell_lightning_whirl_heroic'), +(63575,'spell_smoke_trail_leviathan'), +(63605,'spell_rope_beam'), +(63618,'spell_overload_leviathan'), (63845,'spell_create_lance'), (64203,'spell_void_zone_xt'), (64209,'spell_consumption_xt'), (64210,'spell_life_spark_xt'), (64234,'spell_gravity_bomb'), (64235,'spell_void_zone_xt'), +(64414,'spell_load_into_catapult_leviathan'), (64411,'spell_blessing_of_ancient_kings'), (64415,'spell_valanyr_equip_effect'), (64475,'spell_ignis_remove_strength'), +(64482,'spell_flame_leviathan_buff'), (64503,'spell_ignis_water'), (64568,'spell_blood_reserve_enchant'), +(64979,'spell_anti_air_rocket'), +(64998,'spell_ready_to_fly'), +(65044,'spell_flames_leviathan'), +(65045,'spell_flames_leviathan'), (65121,'spell_searing_light'), (65667,'spell_ignis_heat'), (65869,'spell_disengage'), @@ -988,6 +1015,7 @@ INSERT INTO spell_scripts(Id, ScriptName) VALUES (67009,'spell_nether_power'), (67114,'spell_ignis_brittle'), (67322,'spell_burrower_submerge'), +(67372,'spell_grab_crate_leviathan'), (67470,'spell_pursuing_spikes'), (67547,'spell_clear_valkyr_essence'), (67590,'spell_powering_up'), diff --git a/src/framework/meson.build b/src/framework/meson.build new file mode 100644 index 00000000000..477e80daee0 --- /dev/null +++ b/src/framework/meson.build @@ -0,0 +1,13 @@ +framework_sources = [ + 'Policies/ObjectLifeTime.cpp', + 'Utilities/EventProcessor.cpp' +] + +if get_option('BUILD_GAME_SERVER') or get_option('BUILD_LOGIN_SERVER') or get_option('BUILD_EXTRACTORS') +frameworklib = static_library('framework', + framework_sources, + include_directories: global_includes, + dependencies: [boost_dep, dblib_dep, zlib_dep, openssl_dep, utfcpp_dep], + install : false +) +endif \ No newline at end of file diff --git a/src/game/AI/ScriptDevAI/base/BossAI.cpp b/src/game/AI/ScriptDevAI/base/BossAI.cpp index 3d340146a23..c9df747c948 100644 --- a/src/game/AI/ScriptDevAI/base/BossAI.cpp +++ b/src/game/AI/ScriptDevAI/base/BossAI.cpp @@ -14,11 +14,9 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ -#include "AI/ScriptDevAI/include/sc_creature.h" #include "AI/ScriptDevAI/include/sc_instance.h" #include "Entities/Creature.h" #include "AI/ScriptDevAI/base/BossAI.h" -#include "Spells/Spell.h" #include "Spells/SpellMgr.h" #include "AI/ScriptDevAI/ScriptDevAIMgr.h" @@ -92,18 +90,18 @@ void BossAI::AddExitObject(uint32 value) void BossAI::EnterEvadeMode() { + OpenEntrances(); if (m_instanceDataType == -1) return; if (ScriptedInstance* instance = static_cast(m_creature->GetInstanceData())) instance->SetData(m_instanceDataType, FAIL); - OpenEntrances(); if (m_respawnDelay == -1) { CombatAI::EnterEvadeMode(); return; } m_creature->SetRespawnDelay(m_respawnDelay, true); - m_creature->ForcedDespawn(); + m_creature->ForcedDespawn(2000); } void BossAI::AddCastOnDeath(QueuedCast cast) @@ -114,4 +112,4 @@ void BossAI::AddCastOnDeath(QueuedCast cast) void BossAI::AddRespawnOnEvade(std::chrono::seconds delay) { m_respawnDelay = delay.count(); -} \ No newline at end of file +} diff --git a/src/game/AI/ScriptDevAI/base/BossAI.h b/src/game/AI/ScriptDevAI/base/BossAI.h index 43f96ef7c5b..926b72ef953 100644 --- a/src/game/AI/ScriptDevAI/base/BossAI.h +++ b/src/game/AI/ScriptDevAI/base/BossAI.h @@ -18,8 +18,8 @@ #define BOSS_AI_H #include "AI/ScriptDevAI/include/sc_instance.h" -#include "Entities/Creature.h" #include "AI/ScriptDevAI/include/sc_creature.h" +#include "Entities/Creature.h" #include "AI/ScriptDevAI/base/CombatAI.h" enum InstanceActions @@ -54,6 +54,7 @@ class BossAI : public CombatAI for (auto& id : m_entranceObjects) instance->DoUseOpenableObject(id, open); } + void OpenExits() { ScriptedInstance* instance = dynamic_cast(m_creature->GetInstanceData()); @@ -112,6 +113,10 @@ class BossAI : public CombatAI void SetGateDelay(std::chrono::milliseconds delay) { m_gateDelay = delay; } void EnterEvadeMode() override; + /** + * Adds one or more Spells to cast with CastSpell on creature death + * @param cast Initialized struct of QueuedCast type + */ void AddCastOnDeath(QueuedCast cast); template void AddCastOnDeath(QueuedCast cast, Targs... fargs) @@ -120,6 +125,10 @@ class BossAI : public CombatAI AddCastOnDeath(fargs...); } + /** + * Adds a timer to respawn the Creature on Evade (instead of walking back to spawn) + * @param delay The amount of time until the Creature is supposed to respawn as a std::chrono literal + */ void AddRespawnOnEvade(std::chrono::seconds delay); std::chrono::seconds TimeSinceEncounterStart() @@ -147,4 +156,4 @@ class BossAI : public CombatAI std::chrono::steady_clock::time_point m_combatStartTimestamp; }; -#endif \ No newline at end of file +#endif diff --git a/src/game/AI/ScriptDevAI/scripts/northrend/ulduar/ulduar/boss_flame_leviathan.cpp b/src/game/AI/ScriptDevAI/scripts/northrend/ulduar/ulduar/boss_flame_leviathan.cpp index 774dcda069a..c110ddbe9a1 100644 --- a/src/game/AI/ScriptDevAI/scripts/northrend/ulduar/ulduar/boss_flame_leviathan.cpp +++ b/src/game/AI/ScriptDevAI/scripts/northrend/ulduar/ulduar/boss_flame_leviathan.cpp @@ -16,40 +16,45 @@ /* ScriptData SDName: boss_flame_leviathan -SD%Complete: 75% -SDComment: Defense turret AI and related event NYI. +SD%Complete: 100% +SDComment: SDCategory: Ulduar EndScriptData */ #include "AI/ScriptDevAI/include/sc_common.h" +#include "Maps/GridDefines.h" +#include "Spells/Scripts/SpellScript.h" +#include "Spells/SpellEffectDefines.h" #include "ulduar.h" +#include "AI/ScriptDevAI/base/BossAI.h" +#include "Entities/Vehicle.h" enum { - SAY_AGGRO = -1603159, - SAY_SLAY = -1603160, - SAY_DEATH = -1603161, - SAY_CHANGE_1 = -1603162, - SAY_CHANGE_2 = -1603163, - SAY_CHANGE_3 = -1603164, - - SAY_PLAYER_RIDE = -1603165, - SAY_OVERLOAD_1 = -1603166, - SAY_OVERLOAD_2 = -1603167, - SAY_OVERLOAD_3 = -1603168, - - SAY_HARD_MODE = -1603169, - SAY_TOWER_FROST = -1603170, - SAY_TOWER_FIRE = -1603171, - SAY_TOWER_ENERGY = -1603172, - SAY_TOWER_NATURE = -1603173, - SAY_TOWER_DOWN = -1603174, - - EMOTE_PURSUE = -1603175, - EMOTE_HODIR_FURY = -1603242, - EMOTE_FREYA_WARD = -1603243, - EMOTE_MIMIRON_INFERNO = -1603244, - EMOTE_THORIM_HAMMER = -1603245, + SAY_AGGRO = 33487, + SAY_SLAY = 33507, + SAY_DEATH = 33506, + SAY_CHANGE_1 = 33488, + SAY_CHANGE_2 = 33489, + SAY_CHANGE_3 = 33490, + + SAY_PLAYER_RIDE = 33501, + SAY_OVERLOAD_1 = 33503, + SAY_OVERLOAD_2 = 33504, + SAY_OVERLOAD_3 = 33505, + + SAY_HARD_MODE = 33491, + SAY_TOWER_FROST = 33493, + SAY_TOWER_FIRE = 33495, + SAY_TOWER_ENERGY = 33499, + SAY_TOWER_NATURE = 33497, + SAY_TOWER_DOWN = 33492, + + EMOTE_PURSUE = 33502, + EMOTE_HODIR_FURY = 33494, + EMOTE_FREYA_WARD = 33498, + EMOTE_MIMIRON_INFERNO = 33496, + EMOTE_THORIM_HAMMER = 33500, // Leviathan spells SPELL_INVISIBILITY_DETECTION = 18950, @@ -69,15 +74,20 @@ enum SPELL_SYSTEMS_SHUTDOWN = 62475, // sends event 21605 for achiev check // Leviathan seat has missing aura 62421 - // leviathan other spells - for the moment these are not used - // SPELL_SMOKE_TRAIL = 63575, - // SPELL_EJECT_ALL_PASSENGERS = 50630, // used by vehicles on death; currently handled by DB linking - // SPELL_EJECT_PASSENGER_4 = 64614, - // SPELL_EJECT_PASSENGER_1 = 60603, + // leviathan other spells + SPELL_SMOKE_TRAIL = 63575, + SPELL_EJECT_ALL_PASSENGERS = 50630, // used by vehicles on death; currently handled by DB linking + SPELL_EJECT_PASSENGER_4 = 64614, + SPELL_EJECT_PASSENGER_1 = 60603, + SPELL_LOAD_INTO_CATAPULT = 64414, + SPELL_PASSENGER_LOADED = 62340, + SPELL_HOOKSHOT_AURA = 62336, + SPELL_RIDE_VEHICLE_SCALES_WITH_GEAR = 62309, + SPELL_OVERLOAD = 63618, // tower buffs to Leviathan (applied on combat start if the towers are alive) SPELL_TOWER_OF_FROST = 65077, - // SPELL_TOWER_OF_FROST_DEBUFF = 65079, // removed by hotfix + SPELL_TOWER_OF_FROST_DEBUFF = 65079, // removed by hotfix SPELL_TOWER_OF_LIFE = 64482, SPELL_TOWER_OF_STORMS = 65076, SPELL_TOWER_OF_FLAMES = 65075, @@ -99,14 +109,30 @@ enum // SPELL_TARGET_SEARCH_B = 63762, // moves the caster to the target location // SPELL_TARGET_SEARCH_C = 63763, // these are not used since we are doing this by waypoint movement // SPELL_TARGET_SEARCH_D = 63764, - // SPELL_BEAM_TARGET_STATE = 62898, // cast by all tower reticles; purpose unk - // SPELL_BIRTH = 40031, // not used; purpose unk + SPELL_BEAM_TARGET_STATE = 62898, // cast by all tower reticles; purpose unk + SPELL_BIRTH = 40031, // not used; purpose unk + + // player vehicle spells + SPELL_LIQUID_PYRITE_AURA = 62494, + SPELL_LIQUID_PYRITE = 62496, + SPELL_RELOAD_AMMMO = 62473, + SPELL_GENERAL_TRIGGER_1_FROM_PSG_2 = 69748, + SPELL_GENERAL_TRIGGER_2_TO_SELF = 67395, + SPELL_GRAB_PYRITE = 67372, + SPELL_EJECT_PASSENGER = 67393, + + // gauntlet spells + SPELL_DUSTY_EXPLOSION = 63360, + SPELL_DUST_CLOUD_IMPACT = 54740, + SPELL_SPAWN_PYRITE = 62543, + SPELL_COSMETIC_PARACHITE = 56093, + SPELL_ROPE_BEAM = 63605, // vehicle accessories - // NPC_LEVIATHAN_SEAT = 33114, - // NPC_LEVIATHAN_TURRET = 33139, - // NPC_DEFENSE_TURRET = 33142, - // NPC_OVERLOAD_DEVICE = 33143, + //NPC_LEVIATHAN_SEAT = 33114, + NPC_LEVIATHAN_TURRET = 33139, + NPC_DEFENSE_TURRET = 33142, + NPC_OVERLOAD_DEVICE = 33143, // hard mode beacons - they cast the actual damage spells NPC_HODIR_FURY = 33212, @@ -120,6 +146,10 @@ enum NPC_HODIR_FURY_VEHICLE = 33108, // has accessory 33212 NPC_FREYA_WARD_VEHICLE = 33366, // has accessory 33367 + /* +UPDATE vehicle_accessory SET seat=0 WHERE vehicle_entry IN (33364, 33369, 33108, 33366); + */ + // freya's ward summons - handled by eventAI NPC_WRITHING_LASHER = 33387, // both spam spell 65062 on target NPC_WARD_OF_LIFE = 34275, @@ -139,441 +169,470 @@ enum TOWER_ID_FREYA = 1, TOWER_ID_MIMIRON = 2, TOWER_ID_THORIM = 3, + + // string_ids + ULDUAR_PLAYER_VEHICLES = 6030001, + ULDUAR_FLAME_LEVIATHAN_PARTY = 6030002, }; -static const int32 aLeviathanTowerYell[KEEPER_ENCOUNTER] = { SAY_TOWER_FROST, SAY_TOWER_NATURE, SAY_TOWER_FIRE, SAY_TOWER_ENERGY }; -static const int32 aLeviathanTowerEmote[KEEPER_ENCOUNTER] = { EMOTE_HODIR_FURY, EMOTE_FREYA_WARD, EMOTE_MIMIRON_INFERNO, EMOTE_THORIM_HAMMER }; +static const int32 leviathanTowerYell[KEEPER_ENCOUNTER] = { SAY_TOWER_FROST, SAY_TOWER_NATURE, SAY_TOWER_FIRE, SAY_TOWER_ENERGY }; +static const int32 leviathanTowerEmote[KEEPER_ENCOUNTER] = { EMOTE_HODIR_FURY, EMOTE_FREYA_WARD, EMOTE_MIMIRON_INFERNO, EMOTE_THORIM_HAMMER }; static const float afFreyaWard[MAX_FREYA_WARD][4] = { - {156.9291f, 61.52306f, 409.887f, 5.68f}, - {376.641f, 68.61361f, 411.2287f, 3.85f}, - {383.6206f, -130.8576f, 410.7088f, 2.26f}, - {154.9095f, -137.4339f, 409.887f, 0.79f}, + {156.9291f, 61.52306f, 410.887f, 5.68f}, + {376.641f, 68.61361f, 412.2287f, 3.85f}, + {383.6206f, -130.8576f, 411.7088f, 2.26f}, + {154.9095f, -137.4339f, 410.887f, 0.79f}, }; static const float afHodirFury[MAX_HODIR_FURY][3] = { - {219.9013f, 7.913357f, 409.7861f}, - {326.0777f, -74.99034f, 409.887f}, + {219.9013f, 7.913357f, 410.7861f}, + {326.0777f, -74.99034f, 410.887f}, }; -static const float afMimironInferno[3] = {329.1809f, 8.02577f, 409.887f}; +static const float afMimironInferno[3] = {329.1809f, 8.02577f, 410.887f}; + +static const std::vector addEntries = {NPC_LEVIATHAN_SEAT, NPC_LEVIATHAN_TURRET, NPC_DEFENSE_TURRET, NPC_OVERLOAD_DEVICE}; /*###### ## boss_flame_leviathan ######*/ -struct boss_flame_leviathanAI : public ScriptedAI +enum FlameLeviathanActions { - boss_flame_leviathanAI(Creature* pCreature) : ScriptedAI(pCreature) + LEVIATHAN_FETCH_TOWERS, + LEVIATHAN_HARDMODES, + LEVIATHAN_THORIMS_HAMMER, + LEVIATHAN_RESET_OVERLOAD, + LEVIATHAN_ACTIONS_MAX, +}; + +struct boss_flame_leviathanAI : public BossAI +{ + boss_flame_leviathanAI(Creature* creature) : BossAI(creature, LEVIATHAN_ACTIONS_MAX), + m_instance(dynamic_cast(creature->GetInstanceData())), + m_isRegularMode(creature->GetMap()->IsRegularDifficulty()) { - m_pInstance = (instance_ulduar*)pCreature->GetInstanceData(); - m_bIsRegularMode = pCreature->GetMap()->IsRegularDifficulty(); - m_bInitTowers = false; + SetDataType(TYPE_LEVIATHAN); + AddOnAggroText(SAY_AGGRO); + AddOnKillText(SAY_SLAY); + AddOnDeathText(SAY_DEATH); + AddTimerlessCombatAction(LEVIATHAN_FETCH_TOWERS, true); + AddCombatAction(LEVIATHAN_HARDMODES, 10s); + AddCombatAction(LEVIATHAN_THORIMS_HAMMER, true); + AddEntranceObject(GO_SHIELD_WALL); + AddExitObject(GO_LIGHTNING_DOOR, GO_XT002_GATE); + SetGateDelay(5s); Reset(); + AddCustomAction(LEVIATHAN_RESET_OVERLOAD, true, [&]() + { + Aura* aura = m_creature->GetAura(SPELL_OVERLOAD_CIRCUIT, EFFECT_INDEX_1); + if (!aura) + return; + if (Unit* caster = aura->GetCaster()) + caster->InterruptNonMeleeSpells(true); + }); + m_creature->GetCombatManager().SetLeashingCheck([&](Unit*, float x, float, float) + { + return x < 148; + }); + m_creature->ApplySpellImmune(nullptr, IMMUNITY_EFFECT, SPELL_EFFECT_KNOCK_BACK, true); } - instance_ulduar* m_pInstance; - bool m_bIsRegularMode; - bool m_bInitTowers; - bool m_bUlduarTower[KEEPER_ENCOUNTER]; - - uint32 m_uiBatteringRamTimer; - uint32 m_uiFlameVentsTimer; - uint32 m_uiMissileBarrageTimer; - uint32 m_uiPursueTimer; - uint32 m_uiGatheringSpeedTimer; + instance_ulduar* m_instance; + bool m_isRegularMode; + bool m_initTowers; + bool m_ulduarTower[KEEPER_ENCOUNTER]; - uint32 m_uiHardModeTimer; - uint8 m_uiHardModeStep; + uint8 m_hardmodeStep; - uint8 m_uiThorimHammerCount; + uint8 m_thorimsHammerCount; uint32 m_uiThorimHammerTimer; void Reset() override { + m_initTowers = false; DoCastSpellIfCan(m_creature, SPELL_INVISIBILITY_DETECTION, CAST_TRIGGERED | CAST_AURA_NOT_PRESENT); - for (bool& i : m_bUlduarTower) + for (bool& i : m_ulduarTower) i = false; - m_uiBatteringRamTimer = 10000; - m_uiFlameVentsTimer = 30000; - m_uiMissileBarrageTimer = 1000; - m_uiPursueTimer = 1000; - m_uiGatheringSpeedTimer = 10000; - - m_uiHardModeTimer = 10000; - m_uiHardModeStep = 0; - m_uiThorimHammerCount = 0; - m_uiThorimHammerTimer = 0; + m_hardmodeStep = 0; + m_thorimsHammerCount = 0; } - void JustDied(Unit* /*pKiller*/) override + void JustDied(Unit* /*killer*/) override { - if (m_pInstance) + BossAI::JustDied(); + if (m_instance) { - m_pInstance->SetData(TYPE_LEVIATHAN, DONE); - // clear hard mode auras - if (Creature* pOrbital = m_pInstance->GetSingleCreatureFromStorage(NPC_ORBITAL_SUPPORT)) - pOrbital->RemoveAllAuras(); + if (Creature* orbital = m_instance->GetSingleCreatureFromStorage(NPC_ORBITAL_SUPPORT)) + orbital->RemoveAllAuras(); + } + + auto* LeviAdds = m_creature->GetMap()->GetCreatures(ULDUAR_FLAME_LEVIATHAN_PARTY); + for (Creature* leviPartyMember : *LeviAdds) + { + if (leviPartyMember) + { + switch (leviPartyMember->GetEntry()) + { + case NPC_DEFENSE_TURRET: + case NPC_LEVIATHAN_TURRET: + case NPC_LEVIATHAN_SEAT: + { + if (leviPartyMember->IsAlive()) + leviPartyMember->Suicide(); + break; + } + case NPC_OVERLOAD_DEVICE: + case NPC_ORBITAL_SUPPORT: + { + if (leviPartyMember->IsAlive()) + leviPartyMember->Suicide(); + leviPartyMember->ForcedDespawn(); + break; + } + default: break; + } + } + } + + auto* playerVehicles = m_creature->GetMap()->GetCreatures(ULDUAR_PLAYER_VEHICLES); + for (Creature* add : *playerVehicles) + { + if (!add || !add->IsAlive()) + continue; + switch (add->GetEntry()) + { + case NPC_SALVAGED_SIEGE_ENGINE: + case NPC_SALVAGED_CHOPPER: + add->CastSpell(nullptr, SPELL_EJECT_PASSENGER_1, TRIGGERED_OLD_TRIGGERED); + break; + case NPC_SALVAGED_DEMOLISHER: + add->CastSpell(nullptr, SPELL_EJECT_PASSENGER_1, TRIGGERED_OLD_TRIGGERED); + add->CastSpell(nullptr, SPELL_EJECT_PASSENGER_4, TRIGGERED_OLD_TRIGGERED); + break; + case NPC_SALVAGED_SIEGE_TURRET: + case NPC_SALVAGED_DEMOLISHER_SEAT: + add->CastSpell(nullptr, SPELL_EJECT_ALL_PASSENGERS, TRIGGERED_OLD_TRIGGERED); + break; + default: break; + } } - DoScriptText(SAY_DEATH, m_creature); // start epilogue event if (Creature* pFlyMachine = m_creature->SummonCreature(NPC_BRANN_FLYING_MACHINE, 175.2838f, -210.4325f, 501.2375f, 1.42f, TEMPSPAWN_CORPSE_DESPAWN, 0)) { - if (Creature* pBrann = m_creature->SummonCreature(NPC_BRANN_BRONZEBEARD_LEVIATHAN, 175.2554f, -210.6305f, 500.7375f, 1.42f, TEMPSPAWN_CORPSE_DESPAWN, 0)) - pBrann->CastSpell(pFlyMachine, SPELL_RIDE_VEHICLE, TRIGGERED_OLD_TRIGGERED); + if (Creature* brann = m_creature->SummonCreature(NPC_BRANN_BRONZEBEARD_LEVIATHAN, 175.2554f, -210.6305f, 500.7375f, 1.42f, TEMPSPAWN_CORPSE_DESPAWN, 0)) + brann->CastSpell(pFlyMachine, SPELL_RIDE_VEHICLE, TRIGGERED_OLD_TRIGGERED); pFlyMachine->SetWalk(false); pFlyMachine->GetMotionMaster()->MovePoint(1, 229.9419f, -130.3764f, 409.5681f); } } - void Aggro(Unit* /*pWho*/) override + void Aggro(Unit* who) override { - // check the towers again to make sure that some of them were not destroyed in the meanwhile - FetchTowers(); - - if (m_pInstance) - m_pInstance->SetData(TYPE_LEVIATHAN, IN_PROGRESS); - - DoScriptText(SAY_AGGRO, m_creature); + BossAI::Aggro(who); + SendAIEventAround(AI_EVENT_CUSTOM_EVENTAI_A, nullptr, 0, 20.f); } - void KilledUnit(Unit* /*pVictim*/) override + void EnterEvadeMode() override { - if (urand(0, 1)) - DoScriptText(SAY_SLAY, m_creature); + m_creature->CastSpell(m_creature, SPELL_EJECT_ALL_PASSENGERS, TRIGGERED_OLD_TRIGGERED); + m_creature->CastSpell(nullptr, SPELL_OVERLOAD, TRIGGERED_OLD_TRIGGERED); + CreatureList leviAdds; + for (const uint32& entry : addEntries) + { + GetCreatureListWithEntryInGrid(leviAdds, m_creature, entry, 30.f); + for (auto add : leviAdds) + { + if (add) + add->ForcedDespawn(); + } + } + + if (m_instance) + { + // clear hard mode auras + if (Creature* orbital = m_instance->GetSingleCreatureFromStorage(NPC_ORBITAL_SUPPORT)) + orbital->RemoveAllAuras(); + } + BossAI::EnterEvadeMode(); + //m_creature->ForcedDespawn(3000); } void JustReachedHome() override { - if (m_pInstance) - m_pInstance->SetData(TYPE_LEVIATHAN, FAIL); + BossAI::JustReachedHome(); + m_creature->GetVehicleInfo()->RecallAndRespawnAccessories(); } - void JustSummoned(Creature* pSummoned) override + void JustSummoned(Creature* summoned) override { - switch (pSummoned->GetEntry()) + switch (summoned->GetEntry()) { case NPC_THORIM_HAMMER_VEHICLE: - pSummoned->CastSpell(pSummoned, SPELL_LIGHTNING_SKYBEAM, TRIGGERED_OLD_TRIGGERED); + summoned->CastSpell(summoned, SPELL_BIRTH, TRIGGERED_OLD_TRIGGERED); + summoned->CastSpell(summoned, SPELL_BEAM_TARGET_STATE, TRIGGERED_OLD_TRIGGERED); + summoned->CastSpell(summoned, 50195, TRIGGERED_OLD_TRIGGERED); // Hackfix for reticles until hovering is properly implemented + summoned->CastSpell(summoned, SPELL_LIGHTNING_SKYBEAM, TRIGGERED_OLD_TRIGGERED); + m_creature->AddSummonForOnDeathDespawn(summoned->GetObjectGuid()); break; case NPC_MIMIRON_INFERNO_VEHICLE: - pSummoned->CastSpell(pSummoned, SPELL_RED_SKYBEAM, TRIGGERED_OLD_TRIGGERED); + summoned->CastSpell(summoned, SPELL_BIRTH, TRIGGERED_OLD_TRIGGERED); + summoned->CastSpell(summoned, SPELL_BEAM_TARGET_STATE, TRIGGERED_OLD_TRIGGERED); + summoned->CastSpell(summoned, 50195, TRIGGERED_OLD_TRIGGERED); // Hackfix for reticles until hovering is properly implemented + summoned->CastSpell(summoned, SPELL_RED_SKYBEAM, TRIGGERED_OLD_TRIGGERED); + m_creature->AddSummonForOnDeathDespawn(summoned->GetObjectGuid()); break; case NPC_HODIR_FURY_VEHICLE: - pSummoned->CastSpell(pSummoned, SPELL_BLUE_SKYBEAM, TRIGGERED_OLD_TRIGGERED); + summoned->CastSpell(summoned, SPELL_BIRTH, TRIGGERED_OLD_TRIGGERED); + summoned->CastSpell(summoned, SPELL_BEAM_TARGET_STATE, TRIGGERED_OLD_TRIGGERED); + summoned->CastSpell(summoned, 50195, TRIGGERED_OLD_TRIGGERED); // Hackfix for reticles until hovering is properly implemented + summoned->CastSpell(summoned, SPELL_BLUE_SKYBEAM, TRIGGERED_OLD_TRIGGERED); + m_creature->AddSummonForOnDeathDespawn(summoned->GetObjectGuid()); break; case NPC_FREYA_WARD_VEHICLE: - pSummoned->CastSpell(pSummoned, SPELL_GREEN_SKYBEAM, TRIGGERED_OLD_TRIGGERED); + summoned->CastSpell(summoned, SPELL_BIRTH, TRIGGERED_OLD_TRIGGERED); + summoned->CastSpell(summoned, SPELL_BEAM_TARGET_STATE, TRIGGERED_OLD_TRIGGERED); + summoned->CastSpell(summoned, 50195, TRIGGERED_OLD_TRIGGERED); // Hackfix for reticles until hovering is properly implemented + summoned->CastSpell(summoned, SPELL_GREEN_SKYBEAM, TRIGGERED_OLD_TRIGGERED); + m_creature->AddSummonForOnDeathDespawn(summoned->GetObjectGuid()); break; } } - void SummonedMovementInform(Creature* pSummoned, uint32 uiMoveType, uint32 uiPointId) override + void SummonedMovementInform(Creature* summoned, uint32 moveType, uint32 pointId) override { - if (uiMoveType != POINT_MOTION_TYPE || !uiPointId) + if (moveType != POINT_MOTION_TYPE || !pointId) return; - if (pSummoned->GetEntry() == NPC_BRANN_FLYING_MACHINE) + if (summoned->GetEntry() == NPC_BRANN_FLYING_MACHINE) { // spawn the Archmange and eject Brann - if (Creature* pArchmage = m_creature->SummonCreature(NPC_ARCHMANGE_RHYDIAN, 235.5596f, -136.1876f, 409.6508f, 1.78f, TEMPSPAWN_CORPSE_DESPAWN, 0)) + if (Creature* archmage = m_creature->SummonCreature(NPC_ARCHMANGE_RHYDIAN, 235.5596f, -136.1876f, 409.6508f, 1.78f, TEMPSPAWN_CORPSE_DESPAWN, 0)) { - pArchmage->SetWalk(false); - pArchmage->GetMotionMaster()->MovePoint(1, 239.3158f, -123.6443f, 409.8174f); + archmage->SetWalk(false); + archmage->GetMotionMaster()->MovePoint(1, 239.3158f, -123.6443f, 409.8174f); } - pSummoned->RemoveAllAuras(); + summoned->RemoveAllAuras(); } - else if (pSummoned->GetEntry() == NPC_ARCHMANGE_RHYDIAN) + else if (summoned->GetEntry() == NPC_ARCHMANGE_RHYDIAN) { - if (Creature* pBrann = GetClosestCreatureWithEntry(pSummoned, NPC_BRANN_BRONZEBEARD_LEVIATHAN, 30.0f)) + if (Creature* brann = GetClosestCreatureWithEntry(summoned, NPC_BRANN_BRONZEBEARD_LEVIATHAN, 30.0f)) { // rest will be handled by DB scripts - pBrann->SetWalk(false); - pBrann->GetMotionMaster()->MoveWaypoint(); + brann->SetWalk(false); + brann->GetMotionMaster()->MoveWaypoint(); } } } - void MovementInform(uint32 uiMoveType, uint32 uiPointId) override + void MovementInform(uint32 moveType, uint32 pointId) override { - if (uiMoveType != POINT_MOTION_TYPE || !uiPointId) + if (moveType != EFFECT_MOTION_TYPE) return; // set boss in combat (if not already) - m_creature->SetInCombatWithZone(); + m_creature->SetInCombatWithZone(false); } - void SpellHitTarget(Unit* pTarget, SpellEntry const* pSpellEntry) override + void HandleHardmode() { - if (pTarget->IsVehicle() && pSpellEntry->Id == SPELL_PURSUED) + if(!m_creature->IsInCombat()) { - m_creature->FixateTarget(pTarget); + DisableCombatAction(LEVIATHAN_HARDMODES); + return; + } + // if all towers are deactivated then skip the rest + if (!m_ulduarTower[TOWER_ID_HODIR] && !m_ulduarTower[TOWER_ID_FREYA] && !m_ulduarTower[TOWER_ID_MIMIRON] && !m_ulduarTower[TOWER_ID_THORIM]) + { + DoBroadcastText(SAY_TOWER_DOWN, m_creature); + DisableCombatAction(LEVIATHAN_HARDMODES); + } + else + { + // yell hard mode start and start activating each tower one by one + switch (m_hardmodeStep) + { + case 0: + DoBroadcastText(SAY_HARD_MODE, m_creature); + ResetCombatAction(LEVIATHAN_HARDMODES, 10s); + ++m_hardmodeStep; + break; + default: + // iterate through all towers to check which is active; skip the ones which are deactivated without triggering the timer + for (uint8 i = m_hardmodeStep - 1; i < KEEPER_ENCOUNTER; ++i) + { + if (m_ulduarTower[i]) + { + // yell tower active + DoBroadcastText(leviathanTowerYell[i], m_creature); + DoBroadcastText(leviathanTowerEmote[i], m_creature); + + // activate the timer for each tower ability + switch (i) + { + case TOWER_ID_HODIR: DoSpawnHodirsFury(); break; + case TOWER_ID_FREYA: DoSpawnFreyasWard(); break; + case TOWER_ID_MIMIRON: DoSpawnMimironsInferno(); break; + case TOWER_ID_THORIM: ResetCombatAction(LEVIATHAN_THORIMS_HAMMER, 1s); break; + } - if (Player* pPlayer = pTarget->GetBeneficiaryPlayer()) - DoScriptText(EMOTE_PURSUE, m_creature, pPlayer); + // reset timer and wait for another turn + ResetCombatAction(LEVIATHAN_HARDMODES, 10s); + ++m_hardmodeStep; + break; + } + ++m_hardmodeStep; + + // stop the timer after the final element + if (i == KEEPER_ENCOUNTER - 1) + DisableCombatAction(LEVIATHAN_HARDMODES); + } + break; + } } } // check for all active towers void FetchTowers() { - if (!m_pInstance) + if (!m_instance) return; // the orbital support applies the tower auras - Creature* pOrbital = m_pInstance->GetSingleCreatureFromStorage(NPC_ORBITAL_SUPPORT); - if (!pOrbital) + Creature* orbital = m_instance->GetSingleCreatureFromStorage(NPC_ORBITAL_SUPPORT); + if (!orbital) return; - uint8 uiActiveTowers = 0; + uint8 activeTowers = 0; // check the states twice: at reset and at aggro to make sure that some towers were not destroyed in the meanwhile - if (m_pInstance->GetData(TYPE_TOWER_HODIR) == DONE) + if (m_instance->GetData(TYPE_TOWER_HODIR) == DONE) { - pOrbital->CastSpell(pOrbital, SPELL_TOWER_OF_FROST, TRIGGERED_OLD_TRIGGERED); - ++uiActiveTowers; - m_bUlduarTower[TOWER_ID_HODIR] = true; + orbital->CastSpell(orbital, SPELL_TOWER_OF_FROST, TRIGGERED_OLD_TRIGGERED); + ++activeTowers; + m_ulduarTower[TOWER_ID_HODIR] = true; } else - pOrbital->RemoveAurasDueToSpell(SPELL_TOWER_OF_FROST); - if (m_pInstance->GetData(TYPE_TOWER_FREYA) == DONE) + orbital->RemoveAurasDueToSpell(SPELL_TOWER_OF_FROST); + if (m_instance->GetData(TYPE_TOWER_FREYA) == DONE) { - pOrbital->CastSpell(pOrbital, SPELL_TOWER_OF_LIFE, TRIGGERED_OLD_TRIGGERED); - ++uiActiveTowers; - m_bUlduarTower[TOWER_ID_FREYA] = true; + orbital->CastSpell(orbital, SPELL_TOWER_OF_LIFE, TRIGGERED_OLD_TRIGGERED); + ++activeTowers; + m_ulduarTower[TOWER_ID_FREYA] = true; } else - pOrbital->RemoveAurasDueToSpell(SPELL_TOWER_OF_LIFE); - if (m_pInstance->GetData(TYPE_TOWER_MIMIRON) == DONE) + orbital->RemoveAurasDueToSpell(SPELL_TOWER_OF_LIFE); + if (m_instance->GetData(TYPE_TOWER_MIMIRON) == DONE) { - pOrbital->CastSpell(pOrbital, SPELL_TOWER_OF_FLAMES, TRIGGERED_OLD_TRIGGERED); - ++uiActiveTowers; - m_bUlduarTower[TOWER_ID_MIMIRON] = true; + orbital->CastSpell(orbital, SPELL_TOWER_OF_FLAMES, TRIGGERED_OLD_TRIGGERED); + ++activeTowers; + m_ulduarTower[TOWER_ID_MIMIRON] = true; } else - pOrbital->RemoveAurasDueToSpell(SPELL_TOWER_OF_FLAMES); - if (m_pInstance->GetData(TYPE_TOWER_THORIM) == DONE) + orbital->RemoveAurasDueToSpell(SPELL_TOWER_OF_FLAMES); + if (m_instance->GetData(TYPE_TOWER_THORIM) == DONE) { - pOrbital->CastSpell(pOrbital, SPELL_TOWER_OF_STORMS, TRIGGERED_OLD_TRIGGERED); - ++uiActiveTowers; - m_bUlduarTower[TOWER_ID_THORIM] = true; + orbital->CastSpell(orbital, SPELL_TOWER_OF_STORMS, TRIGGERED_OLD_TRIGGERED); + ++activeTowers; + m_ulduarTower[TOWER_ID_THORIM] = true; } else - pOrbital->RemoveAurasDueToSpell(SPELL_TOWER_OF_STORMS); + orbital->RemoveAurasDueToSpell(SPELL_TOWER_OF_STORMS); // inform instance about all active towers for future use in achievements and hard mode loot - m_pInstance->SetData(TYPE_LEVIATHAN_HARD, uiActiveTowers); + m_instance->SetData(TYPE_LEVIATHAN_HARD, activeTowers); } // Functions which handle the spawn of each type of add - void DoSpawnHodirFury() + void DoSpawnHodirsFury() { for (auto i : afHodirFury) m_creature->SummonCreature(NPC_HODIR_FURY_VEHICLE, i[0], i[1], i[2], 0, TEMPSPAWN_DEAD_DESPAWN, 0); } - void DoSpawnFreyaWard() + void DoSpawnFreyasWard() { for (auto i : afFreyaWard) m_creature->SummonCreature(NPC_FREYA_WARD_VEHICLE, i[0], i[1], i[2], i[3], TEMPSPAWN_DEAD_DESPAWN, 0); } - void DoSpawnMimironInferno() + void DoSpawnMimironsInferno() { // Mimiron inferno has waypoint movement m_creature->SummonCreature(NPC_MIMIRON_INFERNO_VEHICLE, afMimironInferno[0], afMimironInferno[1], afMimironInferno[2], 0, TEMPSPAWN_DEAD_DESPAWN, 0); } - void DoSpawnThorimHammer() + void DoSpawnThorimsHammer() { - if (!m_pInstance) + if (!m_instance) return; // get a random point compared to the center and spawn the npcs - if (Creature* pOrbital = m_pInstance->GetSingleCreatureFromStorage(NPC_ORBITAL_SUPPORT)) + if (Creature* orbital = m_instance->GetSingleCreatureFromStorage(NPC_ORBITAL_SUPPORT)) { float fX, fY, fZ; - m_creature->GetRandomPoint(pOrbital->GetPositionX(), pOrbital->GetPositionY(), pOrbital->GetPositionZ(), 150.0f, fX, fY, fZ); - m_creature->SummonCreature(NPC_THORIM_HAMMER_VEHICLE, fX, fY, fZ, 0, TEMPSPAWN_TIMED_DESPAWN, 8000); + m_creature->GetRandomPoint(orbital->GetPositionX(), orbital->GetPositionY(), orbital->GetPositionZ(), 150.0f, fX, fY, fZ); + m_creature->SummonCreature(NPC_THORIM_HAMMER_VEHICLE, fX, fY, fZ + 1, 0, TEMPSPAWN_TIMED_DESPAWN, 8000); } } - void UpdateAI(const uint32 uiDiff) override + void ExecuteAction(uint32 action) override { - // fetch all tower buffs on the first update - if (!m_bInitTowers) + switch (action) { - FetchTowers(); - m_bInitTowers = true; - } - - if (!m_creature->SelectHostileTarget() || !m_creature->GetVictim()) - return; - - if (m_uiPursueTimer < uiDiff) - { - if (DoCastSpellIfCan(m_creature, SPELL_PURSUED) == CAST_OK) + case LEVIATHAN_FETCH_TOWERS: { - // don't yell from the beginning - if (!m_uiHardModeTimer) - { - switch (urand(0, 2)) - { - case 0: DoScriptText(SAY_CHANGE_1, m_creature); break; - case 1: DoScriptText(SAY_CHANGE_2, m_creature); break; - case 2: DoScriptText(SAY_CHANGE_3, m_creature); break; - } - } - m_uiPursueTimer = 30000; + FetchTowers(); + DisableCombatAction(action); + return; } - } - else - m_uiPursueTimer -= uiDiff; - - if (m_uiFlameVentsTimer < uiDiff) - { - if (DoCastSpellIfCan(m_creature, SPELL_FLAME_VENTS) == CAST_OK) - m_uiFlameVentsTimer = urand(15000, 25000); - } - else - m_uiFlameVentsTimer -= uiDiff; - - if (m_uiBatteringRamTimer < uiDiff) - { - if (DoCastSpellIfCan(m_creature->GetVictim(), SPELL_BATTERING_RAM) == CAST_OK) - m_uiBatteringRamTimer = urand(10000, 15000); - } - else - m_uiBatteringRamTimer -= uiDiff; - - if (m_uiMissileBarrageTimer < uiDiff) - { - if (Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0)) + case LEVIATHAN_HARDMODES: { - if (DoCastSpellIfCan(pTarget, SPELL_MISSILE_BARRAGE_TARGET) == CAST_OK) - m_uiMissileBarrageTimer = urand(1000, 2000); + HandleHardmode(); } - } - else - m_uiMissileBarrageTimer -= uiDiff; - - if (m_uiGatheringSpeedTimer < uiDiff) - { - if (DoCastSpellIfCan(m_creature, SPELL_GATHERING_SPEED) == CAST_OK) - m_uiGatheringSpeedTimer = 10000; - } - else - m_uiGatheringSpeedTimer -= uiDiff; - - // start hard mode - if (m_uiHardModeTimer) - { - if (m_uiHardModeTimer <= uiDiff) + case LEVIATHAN_THORIMS_HAMMER: { - // if all towers are deactivated then skip the rest - if (!m_bUlduarTower[TOWER_ID_HODIR] && !m_bUlduarTower[TOWER_ID_FREYA] && !m_bUlduarTower[TOWER_ID_MIMIRON] && !m_bUlduarTower[TOWER_ID_THORIM]) - { - DoScriptText(SAY_TOWER_DOWN, m_creature); - m_uiHardModeTimer = 0; - } + DoSpawnThorimsHammer(); + ++m_thorimsHammerCount; + + if (m_thorimsHammerCount < MAX_THORIM_HAMMER) + ResetCombatAction(LEVIATHAN_THORIMS_HAMMER, 500ms); else { - // yell hard mode start and start activating each tower one by one - switch (m_uiHardModeStep) - { - case 0: - DoScriptText(SAY_HARD_MODE, m_creature); - m_uiHardModeTimer = 10000; - ++m_uiHardModeStep; - break; - default: - // iterate through all towers to check which is active; skip the ones which are deactivated without triggering the timer - for (uint8 i = m_uiHardModeStep - 1; i < KEEPER_ENCOUNTER; ++i) - { - if (m_bUlduarTower[i]) - { - // yell tower active - DoScriptText(aLeviathanTowerYell[i], m_creature); - DoScriptText(aLeviathanTowerEmote[i], m_creature); - - // activate the timer for each tower ability - switch (i) - { - case TOWER_ID_HODIR: DoSpawnHodirFury(); break; - case TOWER_ID_FREYA: DoSpawnFreyaWard(); break; - case TOWER_ID_MIMIRON: DoSpawnMimironInferno(); break; - case TOWER_ID_THORIM: m_uiThorimHammerTimer = 1000; break; - } - - // reset timer and wait for another turn - m_uiHardModeTimer = 10000; - ++m_uiHardModeStep; - break; - } - ++m_uiHardModeStep; - - // stop the timer after the final element - if (i == KEEPER_ENCOUNTER - 1) - m_uiHardModeTimer = 0; - } - break; - } + ResetCombatAction(action, 80s); + m_thorimsHammerCount = 0; } } - else - m_uiHardModeTimer -= uiDiff; - } - - // Tower of Storm abilities - if (m_uiThorimHammerTimer) - { - if (m_uiThorimHammerTimer <= uiDiff) - { - DoSpawnThorimHammer(); - ++m_uiThorimHammerCount; - - if (m_uiThorimHammerCount == MAX_THORIM_HAMMER) - m_uiThorimHammerTimer = 0; - else - m_uiThorimHammerTimer = 1000; - } - else - m_uiThorimHammerTimer -= uiDiff; } - - DoMeleeAttackIfReady(); } }; -UnitAI* GetAI_boss_flame_leviathan(Creature* pCreature) -{ - return new boss_flame_leviathanAI(pCreature); -} - /*###### ## npc_hodir_fury_reticle ######*/ struct npc_hodir_fury_reticleAI : public ScriptedAI { - npc_hodir_fury_reticleAI(Creature* pCreature) : ScriptedAI(pCreature) + npc_hodir_fury_reticleAI(Creature* creature) : ScriptedAI(creature) { - m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); + m_instance = (ScriptedInstance*)creature->GetInstanceData(); Reset(); } - ScriptedInstance* m_pInstance; + ScriptedInstance* m_instance; uint32 m_uiTargetChaseTimer; + std::chrono::time_point m_castOnCooldown = std::chrono::steady_clock::now(); ObjectGuid m_hodirFuryGuid; void Reset() override @@ -582,54 +641,64 @@ struct npc_hodir_fury_reticleAI : public ScriptedAI SetCombatMovement(false); } - void AttackStart(Unit* /*pWho*/) override { } - void MoveInLineOfSight(Unit* /*pWho*/) override { } + void AttackStart(Unit* /*who*/) override { } + void MoveInLineOfSight(Unit* who) override + { + if (who->GetDistance2d(m_creature->GetPositionX(), m_creature->GetPositionY()) > 3.f) + return; + if (std::chrono::steady_clock::now() < m_castOnCooldown) + return; + if (!who->HasCharmer() || m_creature->IsFriend(who)) + return; + m_creature->GetMotionMaster()->Clear(); + m_uiTargetChaseTimer = 0; + m_castOnCooldown = std::chrono::steady_clock::now() + 5s; + MovementInform(POINT_MOTION_TYPE, 1); + } - void JustSummoned(Creature* pSummoned) override + void JustSummoned(Creature* summoned) override { - if (pSummoned->GetEntry() == NPC_HODIR_FURY) - m_hodirFuryGuid = pSummoned->GetObjectGuid(); + if (summoned->GetEntry() == NPC_HODIR_FURY) + m_creature->AddSummonForOnDeathDespawn(summoned->GetObjectGuid()); } - void MovementInform(uint32 uiMoveType, uint32 uiPointId) override + void MovementInform(uint32 moveType, uint32 pointId) override { - if (uiMoveType != POINT_MOTION_TYPE || !uiPointId) + if (moveType != POINT_MOTION_TYPE || !pointId) return; // cast Hodir Fury on point reached and search for another target - if (Creature* pHodirFury = m_creature->GetMap()->GetCreature(m_hodirFuryGuid)) - pHodirFury->CastSpell(m_creature, SPELL_HODIR_FURY, TRIGGERED_OLD_TRIGGERED); + //if (Creature* pHodirFury = m_creature->GetMap()->GetCreature(m_hodirFuryGuid)) + if (m_creature->IsVehicle() && m_creature->GetVehicleInfo()) + if (Unit* hodirsFuryCaster = m_creature->GetVehicleInfo()->GetPassenger(0)) + hodirsFuryCaster->CastSpell(m_creature, SPELL_HODIR_FURY, TRIGGERED_IGNORE_CASTER_AURA_STATE); + //m_creature->CastSpell(m_creature, SPELL_HODIR_FURY, TRIGGERED_OLD_TRIGGERED); m_uiTargetChaseTimer = 5000; } - void UpdateAI(const uint32 uiDiff) override + void UpdateAI(const uint32 diff) override { if (m_uiTargetChaseTimer) { - if (m_uiTargetChaseTimer <= uiDiff) + if (m_uiTargetChaseTimer <= diff) { - if (m_pInstance) + if (m_instance) { - if (Creature* pLeviathan = m_pInstance->GetSingleCreatureFromStorage(NPC_LEVIATHAN)) + if (Creature* pLeviathan = m_instance->GetSingleCreatureFromStorage(NPC_LEVIATHAN)) { - if (Unit* pTarget = pLeviathan->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0)) - m_creature->GetMotionMaster()->MovePoint(1, pTarget->GetPositionX(), pTarget->GetPositionY(), pTarget->GetPositionZ()); + if (Unit* target = pLeviathan->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0)) + m_creature->GetMotionMaster()->MovePoint(1, target->GetPositionX(), target->GetPositionY(), target->GetPositionZ() + 1); } } m_uiTargetChaseTimer = 0; } else - m_uiTargetChaseTimer -= uiDiff; + m_uiTargetChaseTimer -= diff; } } }; -UnitAI* GetAI_npc_hodir_fury_reticle(Creature* pCreature) -{ - return new npc_hodir_fury_reticleAI(pCreature); -} - /*###### ## npc_hodir_fury ######*/ @@ -637,19 +706,14 @@ UnitAI* GetAI_npc_hodir_fury_reticle(Creature* pCreature) // TODO Remove this 'script' when combat can be proper prevented from core-side struct npc_hodir_furyAI : public Scripted_NoMovementAI { - npc_hodir_furyAI(Creature* pCreature) : Scripted_NoMovementAI(pCreature) { Reset(); } + npc_hodir_furyAI(Creature* creature) : Scripted_NoMovementAI(creature) { Reset(); } void Reset() override { } - void AttackStart(Unit* /*pWho*/) override { } - void MoveInLineOfSight(Unit* /*pWho*/) override { } - void UpdateAI(const uint32 /*uiDiff*/) override { } + void AttackStart(Unit* /*who*/) override { } + void MoveInLineOfSight(Unit* /*who*/) override { } + void UpdateAI(const uint32 /*diff*/) override { } }; -UnitAI* GetAI_npc_hodir_fury(Creature* pCreature) -{ - return new npc_hodir_furyAI(pCreature); -} - /*###### ## npc_freya_ward ######*/ @@ -657,7 +721,7 @@ UnitAI* GetAI_npc_hodir_fury(Creature* pCreature) // TODO Move this 'script' to eventAI when combat can be proper prevented from core-side struct npc_freya_wardAI : public Scripted_NoMovementAI { - npc_freya_wardAI(Creature* pCreature) : Scripted_NoMovementAI(pCreature) { Reset();} + npc_freya_wardAI(Creature* creature) : Scripted_NoMovementAI(creature) { Reset();} uint32 m_uiFreyaWardTimer; @@ -666,32 +730,33 @@ struct npc_freya_wardAI : public Scripted_NoMovementAI m_uiFreyaWardTimer = 30000; } - void AttackStart(Unit* /*pWho*/) override { } - void MoveInLineOfSight(Unit* /*pWho*/) override { } + void AttackStart(Unit* /*who*/) override { } + void MoveInLineOfSight(Unit* /*who*/) override { } - void JustSummoned(Creature* pSummoned) override + void JustSummoned(Creature* summoned) override { - if (pSummoned->GetEntry() == NPC_WRITHING_LASHER || pSummoned->GetEntry() == NPC_WARD_OF_LIFE) - pSummoned->SetInCombatWithZone(); + if (summoned->GetEntry() == NPC_WRITHING_LASHER || summoned->GetEntry() == NPC_WARD_OF_LIFE) + summoned->SetInCombatWithZone(false); + m_creature->AddSummonForOnDeathDespawn(summoned->GetObjectGuid()); } - void UpdateAI(const uint32 uiDiff) override + void UpdateAI(const uint32 diff) override { - if (m_uiFreyaWardTimer < uiDiff) + if (m_uiFreyaWardTimer < diff) { - if (DoCastSpellIfCan(m_creature, SPELL_FREYA_WARD) == CAST_OK) - m_uiFreyaWardTimer = 30000; + if (m_creature->IsBoarded()) + { + Unit* vehicle = static_cast(m_creature->GetTransportInfo()->GetTransport()); + if (vehicle && vehicle->GetVehicleInfo()) + if (DoCastSpellIfCan(vehicle, SPELL_FREYA_WARD) == CAST_OK) + m_uiFreyaWardTimer = 30000; + } } else - m_uiFreyaWardTimer -= uiDiff; + m_uiFreyaWardTimer -= diff; } }; -UnitAI* GetAI_npc_freya_ward(Creature* pCreature) -{ - return new npc_freya_wardAI(pCreature); -} - /*###### ## npc_mimiron_inferno ######*/ @@ -699,7 +764,7 @@ UnitAI* GetAI_npc_freya_ward(Creature* pCreature) // TODO Move this 'script' to eventAI when combat can be proper prevented from core-side struct npc_mimiron_infernoAI : public Scripted_NoMovementAI { - npc_mimiron_infernoAI(Creature* pCreature) : Scripted_NoMovementAI(pCreature) { Reset(); } + npc_mimiron_infernoAI(Creature* creature) : Scripted_NoMovementAI(creature) { Reset(); } uint32 m_uiMimironInfernoTimer; @@ -708,50 +773,808 @@ struct npc_mimiron_infernoAI : public Scripted_NoMovementAI m_uiMimironInfernoTimer = 15000; } - void AttackStart(Unit* /*pWho*/) override { } - void MoveInLineOfSight(Unit* /*pWho*/) override { } + void AttackStart(Unit* /*who*/) override { } + void MoveInLineOfSight(Unit* /*who*/) override { } - void UpdateAI(const uint32 uiDiff) override + void UpdateAI(const uint32 diff) override { - if (m_uiMimironInfernoTimer < uiDiff) + if (m_uiMimironInfernoTimer < diff) { - if (DoCastSpellIfCan(m_creature, SPELL_MIMIRON_INFERNO) == CAST_OK) - m_uiMimironInfernoTimer = 1000; + if (DoCastSpellIfCan(nullptr, SPELL_MIMIRON_INFERNO) == CAST_OK) + m_uiMimironInfernoTimer = 3000; } else - m_uiMimironInfernoTimer -= uiDiff; + m_uiMimironInfernoTimer -= diff; + } +}; + +struct npc_liquid_pyriteAI : public Scripted_NoMovementAI +{ + npc_liquid_pyriteAI(Creature* creature) : Scripted_NoMovementAI(creature) { + AddCustomAction(0, true, [&]() + { + if (!m_creature->IsBoarded()) + return; + Unit* vehicle = static_cast(m_creature->GetTransportInfo()->GetTransport()); + if (!vehicle) + return; + if (vehicle->GetEntry() == 33167 || vehicle->GetEntry() == NPC_SALVAGED_DEMOLISHER) + { + m_creature->CastSpell(vehicle, SPELL_LIQUID_PYRITE, TRIGGERED_OLD_TRIGGERED); + m_creature->ForcedDespawn(3000); + } + }); + Reset(); + } + + void Reset() override + { + Scripted_NoMovementAI::Reset(); + DoCastSpellIfCan(m_creature, SPELL_LIQUID_PYRITE_AURA, CAST_TRIGGERED | CAST_AURA_NOT_PRESENT); + } + + void MovementInform(uint32 motionType, uint32 /*value*/) override + { + if (motionType != BOARD_VEHICLE_MOTION_TYPE) + return; + ResetTimer(0, 2s); } }; -UnitAI* GetAI_npc_mimiron_inferno(Creature* pCreature) +struct npc_pyrite_safety_containerAI : public Scripted_NoMovementAI { - return new npc_mimiron_infernoAI(pCreature); + npc_pyrite_safety_containerAI(Creature* creature) : Scripted_NoMovementAI(creature) + { + AddCustomAction(0, 1s, [&]() + { + Creature* lift = static_cast(m_creature->GetSpawner()); + if (!lift || !lift->IsCreature() || !lift->IsAlive()) + return; + m_creature->CastSpell(lift, SPELL_ROPE_BEAM, TRIGGERED_OLD_TRIGGERED); + }); + } + + void MovementInform(uint32 moveType, uint32 pointId) override + { + if (moveType == FALL_MOTION_TYPE && pointId == EVENT_FALL) + { + m_creature->CastSpell(nullptr, SPELL_DUSTY_EXPLOSION, TRIGGERED_OLD_TRIGGERED); + m_creature->CastSpell(nullptr, SPELL_DUST_CLOUD_IMPACT, TRIGGERED_OLD_TRIGGERED); + m_creature->CastSpell(nullptr, SPELL_SPAWN_PYRITE, TRIGGERED_OLD_TRIGGERED); + m_creature->ForcedDespawn(1000); + } + } +}; + +enum DemolisherActions +{ + DEMOLISHER_ACTIONS_MAX, + DEMOLISHER_SYNC_ENERGY, +}; + +struct npc_salvaged_demolisherAI : public CombatAI +{ + npc_salvaged_demolisherAI(Creature* creature) : CombatAI(creature, DEMOLISHER_ACTIONS_MAX) + { + AddCustomAction(DEMOLISHER_SYNC_ENERGY, 1s, [&]() { initialize(); }); + SetCombatMovement(false); + } + + void initialize() + { + m_creature->SetMaxPower(POWER_ENERGY, 50); + m_creature->SetPower(POWER_ENERGY, 50); + if (!m_creature->IsVehicle()) + return; + Unit* mechanicSeat = m_creature->GetVehicleInfo()->GetPassenger(1); + if (!mechanicSeat) + return; + mechanicSeat->SetPowerType(POWER_ENERGY); + mechanicSeat->SetMaxPower(POWER_ENERGY, 50); + mechanicSeat->SetPower(POWER_ENERGY, 50); + } + + void JustRespawned() override + { + CombatAI::JustRespawned(); + ResetTimer(DEMOLISHER_SYNC_ENERGY, 1s); + } +}; + +struct npc_salvaged_chopperAI : public CombatAI +{ + npc_salvaged_chopperAI(Creature* creature) : CombatAI(creature, 0) + { + SetCombatMovement(false); + m_creature->SetCanEnterCombat(false); +#ifdef PRENERF_3_4_1 + m_creature->UpdateSpell(3, 0); +#endif + } + + void OnPassengerRide(Unit* passenger, bool boarded, uint8 seat) override + { + Player* driver = static_cast(m_creature->GetVehicleInfo()->GetPassenger(0)); + if (!driver || !driver->IsPlayer()) + return; + if (!seat) + return; + CharmInfo* charmInfo = m_creature->InitCharmInfo(m_creature); + if (boarded) + { + //m_creature->CastSpell(nullptr, SPELL_GENERAL_TRIGGER_1_FROM_PSG_2, TRIGGERED_OLD_TRIGGERED); + m_creature->UpdateSpell(3, SPELL_EJECT_PASSENGER); +#ifdef PRENERF_3_4_1 + m_creature->UpdateSpell(3, 0); +#endif + charmInfo->InitVehicleCreateSpells(); + driver->VehicleSpellInitialize(); + } + else + { + m_creature->UpdateSpell(3, SPELL_GRAB_PYRITE); +#ifdef PRENERF_3_4_1 + m_creature->UpdateSpell(3, 0); +#endif + charmInfo->InitVehicleCreateSpells(); + driver->VehicleSpellInitialize(); + } + } +}; + +enum DefenseTurretActions +{ + DEFENSE_TURRET_RANGE_CHECK, + DEFENSE_TURRET_ACTIONS_MAX, +}; + +struct npc_leviathan_defense_turretAI : public CombatAI +{ + npc_leviathan_defense_turretAI(Creature* creature) : CombatAI(creature, DEFENSE_TURRET_ACTIONS_MAX) + { + SetCombatMovement(false); + AddCombatAction(DEFENSE_TURRET_RANGE_CHECK, 1s); + } + + void JustDied(Unit* killer) override + { + uint8 seatId = m_creature->GetTransSeat(); + TransportInfo* transportInfo = m_creature->GetTransportInfo(); + if (!transportInfo) + return; + Unit* leviSeat = static_cast(transportInfo->GetTransport()); + if (!leviSeat || !leviSeat->IsVehicle()) + return; + Unit* overloadDevice = leviSeat->GetVehicleInfo()->GetPassenger(seatId == 1 ? 2 : 1); + if (!overloadDevice) + return; + overloadDevice->CastSpell(nullptr, SPELL_OVERLOAD_CIRCUIT, TRIGGERED_OLD_TRIGGERED); + m_creature->ForcedDespawn(1000); + } + + void ExecuteAction(uint32 action) override + { + if (action == DEFENSE_TURRET_RANGE_CHECK) + { + float newHealthVal = m_creature->GetHealthPercent() + 1.f; + if (!m_creature->GetVictim()) + m_creature->SetHealthPercent(std::min(newHealthVal, 100.f)); + for (auto& attacker : m_creature->getAttackers()) + if (attacker->GetDistance(m_creature, true) >= (20.f * 20.f) || m_creature->IsFriend(attacker)) + m_creature->getThreatManager().modifyThreatPercent(attacker, -101); + ResetCombatAction(DEFENSE_TURRET_RANGE_CHECK, 1s); + } + } +}; + +bool NpcSpellClick_npc_salvaged_demolisher(Player* player, Creature* clickedCreature, uint32 spellId) +{ + if (!clickedCreature || clickedCreature->GetEntry() != NPC_SALVAGED_DEMOLISHER) + return false; + VehicleInfo* vehicleInfo = clickedCreature->GetVehicleInfo(); + if (!vehicleInfo) + return false; + if (vehicleInfo->CanBoard(player)) + { + player->CastSpell(clickedCreature, SPELL_RIDE_VEHICLE_SCALES_WITH_GEAR, TRIGGERED_IGNORE_CURRENT_CASTED_SPELL | TRIGGERED_IGNORE_GCD | TRIGGERED_HIDE_CAST_IN_COMBAT_LOG); + return true; + } + int32 newSeat = 0; + player->CastCustomSpell(clickedCreature, SPELL_RIDE_VEHICLE_SCALES_WITH_GEAR, &newSeat, nullptr, nullptr, TRIGGERED_IGNORE_CURRENT_CASTED_SPELL | TRIGGERED_IGNORE_GCD | TRIGGERED_HIDE_CAST_IN_COMBAT_LOG); + return true; } +// 62374 - Pursued +struct PursueLeviathan : public SpellScript +{ + bool OnCheckTarget(const Spell* /*spell*/, Unit* target, SpellEffectIndex /*eff*/) const override + { + if (!target) + return false; + if (!target->IsVehicle()) + return false; + if (VehicleInfo* vehicleInfo = target->GetVehicleInfo()) + if (vehicleInfo->GetPassenger(0)) + return true; + return false; + } + + void OnEffectExecute(Spell* spell, SpellEffectIndex effIdx) const override + { + if (effIdx != EFFECT_INDEX_0) + return; + Unit* caster = spell->GetCaster(); + if (!caster || !caster->AI() || caster->GetEntry() != NPC_LEVIATHAN) + return; + if (static_cast(caster->AI())->TimeSinceEncounterStart() < 10s) + return; + switch (urand(0, 2)) + { + case 0: DoBroadcastText(SAY_CHANGE_1, caster); break; + case 1: DoBroadcastText(SAY_CHANGE_2, caster); break; + case 2: DoBroadcastText(SAY_CHANGE_3, caster); break; + } + } + + void OnHit(Spell* spell, SpellMissInfo /*missInfo*/) const override + { + Unit* caster = spell->GetCaster(); + Unit* target = spell->GetUnitTarget(); + if (!caster || !target) + return; + if (!target->IsVehicle()) + return; + caster->FixateTarget(target); + if (Player* player = target->GetBeneficiaryPlayer()) + DoBroadcastText(EMOTE_PURSUE, caster, player); + } +}; + +// 62376 - Battering Ram +struct BatteringRamLeviathan : public SpellScript +{ + // TODO: Figure out Targeting issues +}; + +// 62297 Hodir's Fury +struct HodirsFuryLeviathan : public SpellScript +{ + bool OnCheckTarget(const Spell* spell, Unit* target, SpellEffectIndex eff) const override + { + if (!target) + return true; + Unit* caster = spell->GetCaster(); + if (!caster) + return false; + if (caster->IsFriend(target)) + return false; + if (!target->IsPlayer() && !target->IsControlledByPlayer()) + return false; + return true; + } +}; + +// 62912 Thorim's Hammer +struct ThorimsHammerLeviathan : public SpellScript +{ + bool OnCheckTarget(const Spell* spell, Unit* target, SpellEffectIndex eff) const override + { + if (!target) + return true; + Unit* caster = spell->GetCaster(); + if (!caster) + return false; + if (caster->IsFriend(target)) + return false; + if (!target->IsPlayer() && !target->IsControlledByPlayer()) + return false; + return true; + } +}; + +// 62910 Mimiron's Inferno +struct MimironsInfernoLeviathan : public SpellScript, public AuraScript +{ + bool OnAreaAuraCheckTarget(Aura const* aura, Unit* target) const override + { + if (!target) + return false; + Unit* caster = aura->GetCaster(); + if (!caster) + return false; + if (caster->IsFriend(target)) + { + return false; + } + if (!target->IsPlayer() && !target->IsControlledByPlayer()) + return false; + return true; + } +}; + +// 64414 - Load into Catapult +struct LoadIntoCatapultLeviathan : public AuraScript +{ + void OnApply(Aura* aura, bool apply) const override + { + Unit* target = aura->GetTarget(); + if (!target) + return; + if (apply) + { + target->CastSpell(nullptr, SPELL_PASSENGER_LOADED, TRIGGERED_OLD_TRIGGERED); + return; + } + target->RemoveAurasDueToSpell(SPELL_PASSENGER_LOADED); + aura->GetCaster()->RemoveAurasDueToSpell(SPELL_PASSENGER_LOADED); + } +}; + +// 62324 Throw Passenger. May also apply to 47792 +struct ThrowPassenger : public SpellScript +{ + void OnEffectExecute(Spell* spell, SpellEffectIndex /*effIdx*/) const override + { + Unit* caster = spell->GetCaster(); + if (!caster) + return; + if (caster->GetEntry() != NPC_SALVAGED_DEMOLISHER) + return; + auto& targetList = spell->GetTargetList(); + Unit* projectile = nullptr; + Unit* seat = nullptr; + + if (caster->GetVehicleInfo()) + if (caster->GetVehicleInfo()->GetPassenger(3)) + if ((seat = static_cast(caster->GetVehicleInfo()->GetPassenger(3)))) + if (seat->IsVehicle()) + projectile = seat->GetVehicleInfo()->GetPassenger(0); + if (!projectile) + return; + if (!seat) + return; + + std::unordered_set spellIds; + for (Aura* aura : caster->GetAurasByType(SPELL_AURA_CONTROL_VEHICLE)) + { + if (aura->GetCasterGuid() == projectile->GetObjectGuid()) + spellIds.emplace(aura->GetId()); + } + + for (uint32 spell : spellIds) + projectile->RemoveAurasByCasterSpell(spell, projectile->GetObjectGuid()); + spellIds.clear(); + + projectile->RemoveAurasDueToSpell(SPELL_LOAD_INTO_CATAPULT); + projectile->KnockBackWithAngle(projectile->GetAngle(spell->m_targets.m_destPos.x, spell->m_targets.m_destPos.y), spell->m_targets.getSpeed() * cos(spell->m_targets.getElevation()), spell->m_targets.getSpeed() * sin(spell->m_targets.getElevation())); + projectile->CastSpell(nullptr, SPELL_HOOKSHOT_AURA, TRIGGERED_IGNORE_CURRENT_CASTED_SPELL | TRIGGERED_IGNORE_GCD | TRIGGERED_HIDE_CAST_IN_COMBAT_LOG | TRIGGERED_IGNORE_CASTER_AURA_STATE); + } +}; + +// 62336 - Hookshot Aura +struct HookshotAura : public AuraScript +{ + void OnPeriodicDummy(Aura* aura) const override + { + if (aura->GetEffIndex() != EFFECT_INDEX_0) + return; + Unit* caster = aura->GetCaster(); + if (!caster) + return; + caster->CastSpell(nullptr, aura->GetBasePoints(), TRIGGERED_IGNORE_CURRENT_CASTED_SPELL | TRIGGERED_IGNORE_GCD | TRIGGERED_HIDE_CAST_IN_COMBAT_LOG | TRIGGERED_IGNORE_CASTER_AURA_STATE); + if (aura->GetAuraTicks() < 6) + return; + caster->RemoveAurasByCasterSpell(SPELL_HOOKSHOT_AURA, caster->GetObjectGuid()); + } +}; + +// 62323 - Hookshot +struct Hookshot : public SpellScript +{ + static constexpr float checkDist = 30.f * 30.f; + bool OnCheckTarget(const Spell* spell, Unit* target, SpellEffectIndex eff) const override + { + if (eff != EFFECT_INDEX_0) + return true; + Unit* caster = spell->GetCaster(); + if (!caster || !target) + return true; + if (caster->GetPosition().GetDistance(target->GetPosition()) > checkDist) + return false; + if (target->HasAura(SPELL_SYSTEMS_SHUTDOWN)) + return false; + caster->RemoveAurasByCasterSpell(SPELL_HOOKSHOT_AURA, caster->GetObjectGuid()); + return true; + } + + void OnEffectExecute(Spell* spell, SpellEffectIndex effIdx) const override + { + if (effIdx != EFFECT_INDEX_0) + return; + Unit* target = spell->GetUnitTarget(); + if (!target) + return; + + CreatureList turrets; + GetCreatureListWithEntryInGrid(turrets, target, NPC_DEFENSE_TURRET, 10.f); + for (auto& turret : turrets) + { + turret->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_UNINTERACTIBLE); + } + instance_ulduar* instance = dynamic_cast(target->GetInstanceData()); + if (!instance) + return; + Creature* levi = instance->GetSingleCreatureFromStorage(NPC_LEVIATHAN); + DoBroadcastText(SAY_PLAYER_RIDE, levi); + } +}; + +// 62399 - Overload Circuit +struct OverloadCircuit : public AuraScript +{ + void OnApply(Aura* aura, bool apply) const override + { + if (!apply) + return; + Unit* target = aura->GetTarget(); + if (!target) + return; + if (target->GetEntry() != NPC_LEVIATHAN) + return; + Unit* caster = aura->GetCaster(); + if (!caster) + return; + bool isRegularMode = target->GetMap()->IsRegularDifficulty(); + if (target->GetAuraCount(SPELL_OVERLOAD_CIRCUIT) >= 2 && isRegularMode) + { + target->CastSpell(nullptr, SPELL_SYSTEMS_SHUTDOWN, TRIGGERED_OLD_TRIGGERED); + } + else if (target->GetAuraCount(SPELL_OVERLOAD_CIRCUIT) >= 4) + { + target->CastSpell(nullptr, SPELL_SYSTEMS_SHUTDOWN, TRIGGERED_OLD_TRIGGERED); + } + } +}; + +// 62475 - Systems Shutdown +struct SystemsShutdown : public AuraScript +{ + void OnApply(Aura* aura, bool apply) const override + { + Unit* target = aura->GetTarget(); + if (!target) + return; + if (apply) + { + target->SetStunned(true); + if (target->AI()) + target->AI()->SetCombatScriptStatus(true); + if (target->GetEntry() == NPC_LEVIATHAN_SEAT) + { + Unit* passenger; + if (target && target->IsVehicle()) + passenger = target->GetVehicleInfo()->GetPassenger(0); + target->CastSpell(nullptr, SPELL_EJECT_PASSENGER_1, TRIGGERED_OLD_TRIGGERED); + if (passenger) + target->CastSpell(passenger, SPELL_SMOKE_TRAIL, TRIGGERED_IGNORE_CURRENT_CASTED_SPELL | TRIGGERED_IGNORE_GCD | TRIGGERED_HIDE_CAST_IN_COMBAT_LOG | TRIGGERED_IGNORE_CASTER_AURA_STATE); // This may actually be a separate cast, not sure. + } + } + else + { + target->SetStunned(false); + if (target->AI()) + target->AI()->SetCombatScriptStatus(false); + } + + if (target->GetEntry() != NPC_LEVIATHAN) + return; + if (apply) + { + CreatureList leviAdds; + for (const uint32& entry : addEntries) + { + GetCreatureListWithEntryInGrid(leviAdds, target, entry, 30.f); + for (auto add : leviAdds) + { + if (add) + { + add->CastSpell(nullptr, SPELL_SYSTEMS_SHUTDOWN, TRIGGERED_OLD_TRIGGERED); + add->SetTarget(nullptr); + } + } + } + target->RemoveAurasDueToSpell(SPELL_GATHERING_SPEED); + switch (urand(0,2)) + { + case 0: DoBroadcastText(SAY_OVERLOAD_1, target); break; + case 1: DoBroadcastText(SAY_OVERLOAD_2, target); break; + case 2: DoBroadcastText(SAY_OVERLOAD_3, target); break; + } + return; + } + CreatureList leviSeats; + GetCreatureListWithEntryInGrid(leviSeats, target, NPC_LEVIATHAN_SEAT, 50.f); + for (Creature* seat : leviSeats) + { + if (seat && seat->IsVehicle()) + { + seat->GetVehicleInfo()->RespawnAccessories(1); + } + } + } +}; + +// 60603 - Eject Passenger 1 +struct EjectPassenger1 : public SpellScript +{ + void OnEffectExecute(Spell* spell, SpellEffectIndex /*effIdx*/) const override + { + Unit* target = spell->GetUnitTarget(); + if (!target || !target->IsVehicle()) + return; + VehicleInfo* vInfo = target->GetVehicleInfo(); + if (!vInfo) + return; + Unit* passenger = vInfo->GetPassenger(spell->m_currentBasePoints[0]); + if (!passenger) + return; + + std::unordered_set spellIds; + for (Aura* aura : target->GetAurasByType(SPELL_AURA_CONTROL_VEHICLE)) + { + if (aura->GetCasterGuid() == passenger->GetObjectGuid()) + spellIds.emplace(aura->GetId()); + } + + for (uint32 spell : spellIds) + passenger->RemoveAurasByCasterSpell(spell, passenger->GetObjectGuid()); + spellIds.clear(); + } +}; + +// 63575 - Smoke Trail +struct SmokeTrailLeviathan : public SpellScript +{ + void OnEffectExecute(Spell* spell, SpellEffectIndex effIdx) const + { + if (effIdx != EFFECT_INDEX_0) + return; + Unit* target = spell->GetUnitTarget(); + if (!target || !target->IsPlayer()) + return; + Unit* caster = spell->GetCaster(); + if (!caster || !caster->IsVehicle()) + return; + target->KnockBackFrom(caster, 5.f, 25.f); + } +}; + +// 61242 - Parachute +struct ParachuteLeviathan : public AuraScript +{ + void OnPeriodicDummy(Aura* aura) const override + { + Unit* caster = aura->GetCaster(); + if (!caster) + return; + if (!caster->IsFalling()) + return; + caster->RemoveAurasDueToSpell(aura->GetId()); + caster->CastSpell(caster, aura->GetBasePoints(), TRIGGERED_IGNORE_CURRENT_CASTED_SPELL | TRIGGERED_IGNORE_GCD | TRIGGERED_HIDE_CAST_IN_COMBAT_LOG | TRIGGERED_IGNORE_CASTER_AURA_STATE); + } +}; + +// 67372 - Grab Pyrite +struct GrabPyrite : public SpellScript +{ + void OnEffectExecute(Spell* spell, SpellEffectIndex effIdx) const + { + if (effIdx != EFFECT_INDEX_0) + return; + Unit* caster = spell->GetCaster(); + Unit* target = spell->GetUnitTarget(); + if (!caster || !target) + return; + if (TransportInfo* transportInfo = caster->GetTransportInfo()) + if (Unit* vehicle = static_cast(transportInfo->GetTransport())) + { + uint32 val = spell->m_spellInfo->CalculateSimpleValue(EFFECT_INDEX_0); + target->CastSpell(vehicle, val, TRIGGERED_OLD_TRIGGERED); + } + } +}; + +// 63618 - Overload +struct OverloadLeviathan : public SpellScript +{ + bool OnCheckTarget(const Spell* spell, Unit* target, SpellEffectIndex /*eff*/) const override + { + Unit* caster = spell->GetAffectiveCaster(); + if (target && target->IsVehicle() && caster->IsEnemy(target)) + return true; + return false; + } +}; + +// 62907 - Freya's Ward +struct FreyasWard : public SpellScript +{ + void OnEffectExecute(Spell* spell, SpellEffectIndex effIdx) const override + { + Unit* caster = spell->GetAffectiveCaster(); + caster->CastSpell(caster, spell->m_currentBasePoints[1], TRIGGERED_OLD_TRIGGERED); + } +}; + +// 65045, 65044 - Flames +struct FlamesLeviathan : public SpellScript +{ + bool OnCheckTarget(const Spell* spell, Unit* target, SpellEffectIndex /*eff*/) const override + { + Unit* caster = spell->GetAffectiveCaster(); + if (!caster->IsEnemy(target)) + return false; + return true; + } +}; + +// 64998 - Say you're ready to fly! +struct ReadyToFly : public SpellScript +{ + const std::vector bcts = {34429, 34433}; + void OnEffectExecute(Spell* spell, SpellEffectIndex effIdx) const override + { + Unit* target = spell->GetUnitTarget(); + if (!target) + return; + if (effIdx == EFFECT_INDEX_0) + { + if (!target->IsBoarded()) + return; + Unit* vehicle = static_cast(target->GetTransportInfo()->GetTransport()); + if (!vehicle || !vehicle->IsVehicle()) + return; + Unit* driver = vehicle->GetVehicleInfo()->GetPassenger(0); + if (!driver) + return; + DoBroadcastText(spell->m_triggeredBySpellInfo->EffectBasePoints[2] + 1, spell->GetTrueCaster(), driver); + } + else if (effIdx == EFFECT_INDEX_1) + { + DoBroadcastText(bcts[urand(0,1)], target); + } + } +}; + +enum SafetyContainerID : uint32 +{ + NPC_PYRITE_SAFETY_CONTAINER = 33218, +}; +// 64979, 62363 - Anti-Air Rocket +struct AntiAirRocket : public SpellScript +{ + bool OnCheckTarget(const Spell* spell, Unit* target, SpellEffectIndex eff) const override + { + Unit* caster = spell->GetAffectiveCaster(); + if (!caster->IsEnemy(target)) + return false; + if (target->GetEntry() == NPC_PYRITE_SAFETY_CONTAINER) + return false; + return true; + } +}; + +// 62634, 62635 - Mortar +struct DemolisherMortar : public SpellScript +{ + bool OnCheckTarget(const Spell* spell, Unit* target, SpellEffectIndex eff) const override + { + Unit* caster = spell->GetAffectiveCaster(); + if (!caster->IsEnemy(target)) + return false; + return true; + } +}; + +// 63605 - Rope Beam +struct RopeBeam : public AuraScript +{ + void OnApply(Aura* aura, bool apply) const override + { + if (apply) + return; + Unit* caster = aura->GetCaster(); + if (!caster || caster->GetEntry() != NPC_PYRITE_SAFETY_CONTAINER) + return; + caster->CastSpell(nullptr, SPELL_COSMETIC_PARACHITE, TRIGGERED_OLD_TRIGGERED); + caster->GetMotionMaster()->MoveFall(); + } +}; + +// 65077 - Tower of Frost, 64482 - Tower of Life, 65076 - Tower of Storms, 65075 - Tower of Flames +struct FlameLeviathanBuff : public SpellScript +{ + bool OnCheckTarget(const Spell* /*spell*/, Unit* target, SpellEffectIndex /*eff*/) const + { + if (target && target->HasStringId(ULDUAR_FLAME_LEVIATHAN_PARTY)) + return true; + return false; + } +}; + void AddSC_boss_flame_leviathan() { Script* pNewScript = new Script; pNewScript->Name = "boss_flame_leviathan"; - pNewScript->GetAI = GetAI_boss_flame_leviathan; + pNewScript->GetAI = &GetNewAIInstance; pNewScript->RegisterSelf(); pNewScript = new Script; pNewScript->Name = "npc_hodir_fury_reticle"; - pNewScript->GetAI = GetAI_npc_hodir_fury_reticle; + pNewScript->GetAI = &GetNewAIInstance; pNewScript->RegisterSelf(); pNewScript = new Script; pNewScript->Name = "npc_hodir_fury"; - pNewScript->GetAI = GetAI_npc_hodir_fury; + pNewScript->GetAI = &GetNewAIInstance; pNewScript->RegisterSelf(); pNewScript = new Script; pNewScript->Name = "npc_freya_ward"; - pNewScript->GetAI = GetAI_npc_freya_ward; + pNewScript->GetAI = &GetNewAIInstance; pNewScript->RegisterSelf(); pNewScript = new Script; pNewScript->Name = "npc_mimiron_inferno"; - pNewScript->GetAI = GetAI_npc_mimiron_inferno; + pNewScript->GetAI = &GetNewAIInstance; + pNewScript->RegisterSelf(); + + pNewScript = new Script; + pNewScript->Name = "npc_salvaged_demolisher"; + pNewScript->GetAI = &GetNewAIInstance; + pNewScript->pNpcSpellClick = &NpcSpellClick_npc_salvaged_demolisher; pNewScript->RegisterSelf(); + + pNewScript = new Script; + pNewScript->Name = "npc_leviathan_defense_turret"; + pNewScript->GetAI = &GetNewAIInstance; + pNewScript->RegisterSelf(); + + pNewScript = new Script; + pNewScript->Name = "npc_liquid_pyrite"; + pNewScript->GetAI = &GetNewAIInstance; + pNewScript->RegisterSelf(); + + pNewScript = new Script; + pNewScript->Name = "npc_pyrite_safety_container"; + pNewScript->GetAI = &GetNewAIInstance; + pNewScript->RegisterSelf(); + + pNewScript = new Script; + pNewScript->Name = "npc_salvaged_chopper"; + pNewScript->GetAI = &GetNewAIInstance; + pNewScript->RegisterSelf(); + + RegisterSpellScript("spell_pursue_leviathan"); + RegisterSpellScript("spell_hodirs_fury_leviathan"); + RegisterSpellScript("spell_thorims_hammer_leviathan"); + RegisterSpellScript("spell_mimirons_inferno_leviathan"); + RegisterSpellScript("spell_load_into_catapult_leviathan"); + RegisterSpellScript("spell_throw_passenger"); + RegisterSpellScript("spell_hookshot_aura"); + RegisterSpellScript("spell_hookshot"); + RegisterSpellScript("spell_overload_circuit"); + RegisterSpellScript("spell_systems_shutdown"); + RegisterSpellScript("spell_eject_passenger_1"); + RegisterSpellScript("spell_smoke_trail_leviathan"); + RegisterSpellScript("spell_parachute_leviathan"); + RegisterSpellScript("spell_grab_crate_leviathan"); + RegisterSpellScript("spell_overload_leviathan"); + RegisterSpellScript("spell_flames_leviathan"); + RegisterSpellScript("spell_freyas_ward_leviathan"); + RegisterSpellScript("spell_ready_to_fly"); + RegisterSpellScript("spell_anti_air_rocket"); + RegisterSpellScript("spell_demolisher_mortar"); + RegisterSpellScript("spell_rope_beam"); + RegisterSpellScript("spell_flame_leviathan_buff"); } diff --git a/src/game/AI/ScriptDevAI/scripts/northrend/ulduar/ulduar/ulduar.cpp b/src/game/AI/ScriptDevAI/scripts/northrend/ulduar/ulduar/ulduar.cpp index 9d609047461..94291f6a33c 100644 --- a/src/game/AI/ScriptDevAI/scripts/northrend/ulduar/ulduar/ulduar.cpp +++ b/src/game/AI/ScriptDevAI/scripts/northrend/ulduar/ulduar/ulduar.cpp @@ -180,6 +180,8 @@ void instance_ulduar::OnCreatureCreate(Creature* pCreature) case NPC_LEVIATHAN: case NPC_EXPLORER_DELLORAH: case NPC_BRANN_BRONZEBEARD: + case NPC_PROJECTION_UNIT: + case NPC_LORE_KEEPER_NORGANNON: case NPC_ORBITAL_SUPPORT: case NPC_IGNIS: case NPC_RAZORSCALE: @@ -298,7 +300,6 @@ void instance_ulduar::OnCreatureCreate(Creature* pCreature) else m_vaporVezaxBunnyGuid = pCreature->GetObjectGuid(); return; - default: return; } @@ -319,6 +320,9 @@ void instance_ulduar::OnCreatureRespawn(Creature* creature) hodirHelper->CastSpell(hodirHelper, 64174, TRIGGERED_NONE); }); } + //Workaround because Vehicles aren't Creatures, so CreatureAddons aren't applied to them + if (creature->GetEntry() == 33059 || creature->GetEntry() == 33061 || creature->GetEntry() == 33063) + creature->CastSpell(nullptr, 29266, TRIGGERED_OLD_TRIGGERED); } void instance_ulduar::OnObjectCreate(GameObject* pGo) @@ -328,6 +332,7 @@ void instance_ulduar::OnObjectCreate(GameObject* pGo) // ----------------- Doors & Other ----------------- // The siege case GO_SHIELD_WALL: + case GO_PROTECTIVE_BUBBLE: break; case GO_LIGHTNING_DOOR: if (m_auiEncounter[TYPE_LEVIATHAN] == SPECIAL || m_auiEncounter[TYPE_LEVIATHAN] == FAIL) @@ -335,7 +340,7 @@ void instance_ulduar::OnObjectCreate(GameObject* pGo) break; case GO_LEVIATHAN_GATE: if (m_auiEncounter[TYPE_LEVIATHAN] != NOT_STARTED) - pGo->SetGoState(GO_STATE_ACTIVE); + pGo->SetGoState(GO_STATE_ACTIVE_ALTERNATIVE); break; case GO_XT002_GATE: pGo->SetGoState(GO_STATE_READY); @@ -512,26 +517,16 @@ void instance_ulduar::SetData(uint32 uiType, uint32 uiData) // Siege of Ulduar case TYPE_LEVIATHAN: m_auiEncounter[uiType] = uiData; - if (uiData != SPECIAL) - DoUseDoorOrButton(GO_SHIELD_WALL); if (uiData == IN_PROGRESS) { // make sure that the Lightning door is closed when engaged in combat - if (GameObject* pDoor = GetSingleGameObjectFromStorage(GO_LIGHTNING_DOOR)) - { - if (pDoor->GetGoState() != GO_STATE_READY) - DoUseDoorOrButton(GO_LIGHTNING_DOOR); - } - + DoUseOpenableObject(GO_LIGHTNING_DOOR, false); SetSpecialAchievementCriteria(TYPE_ACHIEV_SHUTOUT, true); } - else if (uiData == DONE) - { - DoUseDoorOrButton(GO_XT002_GATE); - DoUseDoorOrButton(GO_LIGHTNING_DOOR); - } else if (uiData == FAIL) + { DoCallLeviathanHelp(); + } break; case TYPE_IGNIS: m_auiEncounter[uiType] = uiData; @@ -1089,7 +1084,12 @@ bool instance_ulduar::CheckConditionCriteriaMeet(Player const* pPlayer, uint32 u break; // handle vehicle spell clicks - are available only after the gauntlet was started by gossip or when Leviathan is active - return GetData(TYPE_LEVIATHAN_GAUNTLET) == IN_PROGRESS || GetData(TYPE_LEVIATHAN) == SPECIAL || GetData(TYPE_LEVIATHAN) == FAIL; + Creature* keeper = GetSingleCreatureFromStorage(NPC_LORE_KEEPER_NORGANNON); + bool isDead = true; + if (keeper) + if (keeper->IsAlive()) + isDead = false; + return (isDead || GetData(TYPE_LEVIATHAN_GAUNTLET) == IN_PROGRESS || GetData(TYPE_LEVIATHAN) == SPECIAL || GetData(TYPE_LEVIATHAN) == FAIL || GetData(TYPE_LEVIATHAN) == IN_PROGRESS) && GetData(TYPE_LEVIATHAN) != DONE; } } @@ -1606,15 +1606,14 @@ void instance_ulduar::JustDidDialogueStep(int32 iEntry) float fSpeedRate = pLeviathan->GetSpeedRate(MOVE_RUN); pLeviathan->SetWalk(false); pLeviathan->SetSpeedRate(MOVE_RUN, 5); - pLeviathan->GetMotionMaster()->MovePoint(1, afLeviathanMovePos[0], afLeviathanMovePos[1], afLeviathanMovePos[2]); + pLeviathan->GetMotionMaster()->MoveCharge(afLeviathanMovePos[0], afLeviathanMovePos[1], afLeviathanMovePos[2], pLeviathan->GetSpeedRate(MOVE_RUN) * 10, EVENT_CHARGE); pLeviathan->SetSpeedRate(MOVE_RUN, fSpeedRate); // modify respawn / home position to the center of arena pLeviathan->SetRespawnCoord(afLeviathanMovePos[0], afLeviathanMovePos[1], afLeviathanMovePos[2], afLeviathanMovePos[3]); } - // Note: starting 4.x this gate is a GO 33 and it's destroyed at this point - DoUseDoorOrButton(GO_LEVIATHAN_GATE); + GetSingleGameObjectFromStorage(GO_LEVIATHAN_GATE)->SetGoState( GO_STATE_ACTIVE_ALTERNATIVE); break; } } @@ -1712,6 +1711,26 @@ void instance_ulduar::Update(uint32 uiDiff) } } +bool AreaTrigger_repair_station(Player* player, AreaTriggerEntry const* at) +{ + switch (at->id) + { + case AREATRIGGER_ID_REPAIR_1: + case AREATRIGGER_ID_REPAIR_2: + { + const Creature* vehicle = dynamic_cast(player->FindRootVehicle()); + Creature* vehiclePtr = const_cast(vehicle); + if (!vehiclePtr) + return false; + if (!vehiclePtr->HasAura(62705)) + player->CastSpell(vehiclePtr, 62705, TRIGGERED_NONE); + return false; + } + default: + return false; + } +} + InstanceData* GetInstanceData_instance_ulduar(Map* pMap) { return new instance_ulduar(pMap); @@ -1767,4 +1786,9 @@ void AddSC_instance_ulduar() pNewScript->Name = "event_ulduar"; pNewScript->pProcessEventId = &ProcessEventId_event_ulduar; pNewScript->RegisterSelf(); + + pNewScript = new Script; + pNewScript->Name = "at_ulduar"; + pNewScript->pAreaTrigger = &AreaTrigger_repair_station; + pNewScript->RegisterSelf(); } diff --git a/src/game/AI/ScriptDevAI/scripts/northrend/ulduar/ulduar/ulduar.h b/src/game/AI/ScriptDevAI/scripts/northrend/ulduar/ulduar/ulduar.h index 9f2245e8a0b..93ab7693bb1 100644 --- a/src/game/AI/ScriptDevAI/scripts/northrend/ulduar/ulduar/ulduar.h +++ b/src/game/AI/ScriptDevAI/scripts/northrend/ulduar/ulduar/ulduar.h @@ -72,21 +72,26 @@ enum NPC_XT_TOY_PILE = 33337, // robot spawner npc for XT002 // Leviathan other npcs + NPC_LORE_KEEPER_NORGANNON = 33686, NPC_ULDUAR_COLOSSUS = 33237, NPC_BRONZEBEARD_RADIO = 34054, NPC_EXPLORER_DELLORAH = 33701, NPC_BRANN_BRONZEBEARD = 33579, + NPC_PROJECTION_UNIT = 33721, NPC_ORBITAL_SUPPORT = 34286, // NPC_GENERATOR = 33571, // spawns iron dwarfs from Storm Beacons NPC_GENERATOR_SMALL = 34159, // spawns iron dwarfs from hard mode towers + NPC_LEVIATHAN_SEAT = 33114, // Leviathan reinforcements // NPC_HIRED_ENGINEER = 33626, // NPC_HIRED_DEMOLITIONIST = 33627, // NPC_BATTLE_MAGE = 33662, NPC_SALVAGED_SIEGE_ENGINE = 33060, + NPC_SALVAGED_SIEGE_TURRET = 33067, NPC_SALVAGED_CHOPPER = 33062, NPC_SALVAGED_DEMOLISHER = 33109, + NPC_SALVAGED_DEMOLISHER_SEAT= 33167, // NPC_LIQUID_PYRITE = 33189, // Ignis adds @@ -277,6 +282,7 @@ enum // Doors and other Objects // The siege + GO_PROTECTIVE_BUBBLE = 194484, GO_SHIELD_WALL = 194416, // Gate before Leviathan GO_LIGHTNING_DOOR = 194905, // Lightning gate after the Leviathan. It closes after the boss enters the arena GO_LEVIATHAN_GATE = 194630, // Gate after Leviathan -> this will be broken when the boss enters the arena diff --git a/src/game/AI/ScriptDevAI/scripts/northrend/ulduar/ulduar/ulduarScripts.cpp b/src/game/AI/ScriptDevAI/scripts/northrend/ulduar/ulduar/ulduarScripts.cpp index 4313b904ce7..efd8d157113 100644 --- a/src/game/AI/ScriptDevAI/scripts/northrend/ulduar/ulduar/ulduarScripts.cpp +++ b/src/game/AI/ScriptDevAI/scripts/northrend/ulduar/ulduar/ulduarScripts.cpp @@ -223,6 +223,11 @@ bool GossipSelect_npc_brann_ulduar(Player* pPlayer, Creature* pCreature, uint32 // set gauntlet in progress; rest of the event is done by DB scripts pInstance->SetData(TYPE_LEVIATHAN_GAUNTLET, IN_PROGRESS); pCreature->GetMotionMaster()->MoveWaypoint(); + + for (auto& player : pCreature->GetMap()->GetPlayers()) + { + player.getSource()->UpdateEverything(); + } } pPlayer->CLOSE_GOSSIP_MENU(); @@ -283,6 +288,13 @@ bool GossipSelect_npc_keeper_norgannon(Player* pPlayer, Creature* pCreature, uin pDellorah->GetMotionMaster()->MoveWaypoint(); if (Creature* pBrann = pInstance->GetSingleCreatureFromStorage(NPC_BRANN_BRONZEBEARD)) pBrann->GetMotionMaster()->MoveWaypoint(); + if (Creature* pProjector = pInstance->GetSingleCreatureFromStorage(NPC_PROJECTION_UNIT)) + pProjector->GetMotionMaster()->MovePath(1); + + for (auto& player : pCreature->GetMap()->GetPlayers()) + { + player.getSource()->UpdateEverything(); + } } pPlayer->SEND_GOSSIP_MENU(GOSSIP_TEXT_ID_ACTIVATED, pCreature->GetObjectGuid()); diff --git a/src/game/AI/ScriptDevAI/scripts/world/spell_scripts_wotlk.cpp b/src/game/AI/ScriptDevAI/scripts/world/spell_scripts_wotlk.cpp index 1c2c8161600..ae2a1e06b43 100644 --- a/src/game/AI/ScriptDevAI/scripts/world/spell_scripts_wotlk.cpp +++ b/src/game/AI/ScriptDevAI/scripts/world/spell_scripts_wotlk.cpp @@ -16,6 +16,7 @@ #include "AI/ScriptDevAI/include/sc_common.h" #include "Globals/ObjectMgr.h" +#include "Entities/Vehicle.h" struct Replenishment : public SpellScript { @@ -164,6 +165,38 @@ struct AutoBreakProc : public AuraScript } }; +// 67393 - Eject Passenger +struct EjectPassengerChopper : public SpellScript +{ + void OnEffectExecute(Spell* spell, SpellEffectIndex /*effIdx*/) const override + { + Unit* target = spell->GetUnitTarget(); + if (!target || !target->IsVehicle()) + return; + VehicleInfo* vInfo = target->GetVehicleInfo(); + if (!vInfo) + return; + int32 simpleVal = spell->m_spellInfo->CalculateSimpleValue(EFFECT_INDEX_0) - 1; + Unit* passenger = vInfo->GetPassenger(simpleVal); + if (!passenger) + return; + + std::unordered_set spellIds; + for (auto aura : target->GetAurasByType(SPELL_AURA_CONTROL_VEHICLE)) + { + if (aura->GetCasterGuid() == passenger->GetObjectGuid()) + spellIds.emplace(aura->GetId()); + } + + for (uint32 spell : spellIds) + passenger->RemoveAurasByCasterSpell(spell, passenger->GetObjectGuid()); + spellIds.clear(); + if (passenger = vInfo->GetPassenger(simpleVal)) + vInfo->UnBoard(passenger, false); + target->CastSpell(nullptr, 67395, TRIGGERED_OLD_TRIGGERED); + } +}; + void AddSC_spell_scripts_wotlk() { RegisterSpellScript("spell_replenishment"); @@ -172,4 +205,5 @@ void AddSC_spell_scripts_wotlk() RegisterSpellScript("spell_stoicism"); RegisterSpellScript("spell_blood_reserve_enchant"); RegisterSpellScript("spell_auto_break_proc"); + RegisterSpellScript("spell_eject_passenger_chopper"); } \ No newline at end of file diff --git a/src/game/Entities/GameObject.cpp b/src/game/Entities/GameObject.cpp index 32372ceece3..df8042ed1e7 100644 --- a/src/game/Entities/GameObject.cpp +++ b/src/game/Entities/GameObject.cpp @@ -303,6 +303,11 @@ bool GameObject::Create(uint32 dbGuid, uint32 guidlow, uint32 name_id, Map* map, if (GetGOInfo()->IsLargeGameObject() && GetVisibilityData().GetVisibilityDistance() < VISIBILITY_DISTANCE_LARGE) GetVisibilityData().SetVisibilityDistanceOverride(VisibilityDistanceType::Large); + if (GetGoType() == GAMEOBJECT_TYPE_DESTRUCTIBLE_BUILDING) + GetVisibilityData().SetVisibilityDistanceOverride(VisibilityDistanceType::Infinite); + if (GetGOInfo()->id == 194484) + GetVisibilityData().SetVisibilityDistanceOverride(VisibilityDistanceType::Gigantic); + return true; } diff --git a/src/game/Entities/TemporarySpawn.cpp b/src/game/Entities/TemporarySpawn.cpp index efe034bbf60..d14830b6656 100644 --- a/src/game/Entities/TemporarySpawn.cpp +++ b/src/game/Entities/TemporarySpawn.cpp @@ -96,7 +96,7 @@ void TemporarySpawn::Update(const uint32 diff) case TEMPSPAWN_DEAD_DESPAWN: { - if (IsDespawned()) + if (IsDead() || IsDespawned()) { UnSummon(); return; @@ -174,7 +174,7 @@ void TemporarySpawn::Update(const uint32 diff) } if (!GetCharmerGuid()) { - if (IsExpired()) + if (IsExpired() && !IsInCombat()) { UnSummon(); return; diff --git a/src/game/Entities/Vehicle.cpp b/src/game/Entities/Vehicle.cpp index 354424dd4e7..83b9dcee829 100644 --- a/src/game/Entities/Vehicle.cpp +++ b/src/game/Entities/Vehicle.cpp @@ -197,7 +197,7 @@ VehicleInfo::VehicleInfo(Unit* owner, VehicleEntry const* vehicleEntry, uint32 o VehicleInfo::~VehicleInfo() { - ((Unit*)m_owner)->RemoveSpellsCausingAura(SPELL_AURA_CONTROL_VEHICLE); + (static_cast(m_owner))->RemoveSpellsCausingAura(SPELL_AURA_CONTROL_VEHICLE); RemoveAccessoriesFromMap(); // Remove accessories (for example required with player vehicles) } @@ -221,28 +221,36 @@ void VehicleInfo::Initialize() // Initialize movement limitations uint32 vehicleFlags = GetVehicleEntry()->m_flags; - Unit* pVehicle = (Unit*)m_owner; + Unit* vehicle = static_cast(m_owner); if (vehicleFlags & VEHICLE_FLAG_NO_STRAFE) - pVehicle->m_movementInfo.AddMovementFlags2(MOVEFLAG2_NO_STRAFE); + vehicle->m_movementInfo.AddMovementFlags2(MOVEFLAG2_NO_STRAFE); if (vehicleFlags & VEHICLE_FLAG_NO_JUMPING) - pVehicle->m_movementInfo.AddMovementFlags2(MOVEFLAG2_NO_JUMPING); + vehicle->m_movementInfo.AddMovementFlags2(MOVEFLAG2_NO_JUMPING); if (vehicleFlags & VEHICLE_FLAG_FULLSPEEDTURNING) - pVehicle->m_movementInfo.AddMovementFlags2(MOVEFLAG2_FULLSPEEDTURNING); + vehicle->m_movementInfo.AddMovementFlags2(MOVEFLAG2_FULLSPEEDTURNING); if (vehicleFlags & VEHICLE_FLAG_ALLOW_PITCHING) - pVehicle->m_movementInfo.AddMovementFlags2(MOVEFLAG2_ALLOW_PITCHING); + vehicle->m_movementInfo.AddMovementFlags2(MOVEFLAG2_ALLOW_PITCHING); if (vehicleFlags & VEHICLE_FLAG_FULLSPEEDPITCHING) - pVehicle->m_movementInfo.AddMovementFlags2(MOVEFLAG2_FULLSPEEDPITCHING); + vehicle->m_movementInfo.AddMovementFlags2(MOVEFLAG2_FULLSPEEDPITCHING); // NOTE: this is the best possible combination to root a vehicle if ((vehicleFlags & VEHICLE_FLAG_FIXED_POSITION) || m_owner->GetEntry() == 30236 || m_owner->GetEntry() == 39759) - pVehicle->SetImmobilizedState(true); + vehicle->SetImmobilizedState(true); // Initialize power type based on DBC values (creatures only) - if (pVehicle->GetTypeId() == TYPEID_UNIT) + if (vehicle->GetTypeId() == TYPEID_UNIT) { if (PowerDisplayEntry const* powerEntry = sPowerDisplayStore.LookupEntry(GetVehicleEntry()->m_powerDisplayID)) - pVehicle->SetPowerType(Powers(powerEntry->power)); + vehicle->SetPowerType(Powers(powerEntry->power)); + } + + // Experimental + if (vehicleFlags & (VEHICLE_FLAG_UNK8 | VEHICLE_FLAG_UNK7)) + { + vehicle->SetCanEnterCombat(false); + if (vehicle->AI()) + vehicle->AI()->SetReactState(REACT_PASSIVE); } m_isInitialized = true; @@ -255,7 +263,7 @@ void VehicleInfo::SummonPassenger(uint32 entry, Position const& pos, uint8 seatI DEBUG_LOG("VehicleInfo(of %s)::Initialize: Load vehicle accessory %s onto seat %u", m_owner->GetGuidStr().c_str(), summoned->GetGuidStr().c_str(), seatId); m_accessoryGuids.insert(summoned->GetObjectGuid()); int32 basepoint0 = seatId + 1; - summoned->CastCustomSpell((Unit*)m_owner, SPELL_RIDE_VEHICLE_HARDCODED, &basepoint0, nullptr, nullptr, TRIGGERED_OLD_TRIGGERED); + summoned->CastCustomSpell(static_cast(m_owner), SPELL_RIDE_VEHICLE_HARDCODED, &basepoint0, nullptr, nullptr, TRIGGERED_OLD_TRIGGERED); } } @@ -279,7 +287,7 @@ void VehicleInfo::Board(Unit* passenger, uint8 seat) if (!IsSeatAvailableFor(passenger, seat)) if (!GetUsableSeatFor(passenger, seat, true, true)) return; - + VehicleSeatEntry const* seatEntry = GetSeatEntry(seat); MANGOS_ASSERT(seatEntry); @@ -301,23 +309,11 @@ void VehicleInfo::Board(Unit* passenger, uint8 seat) // Calculate passengers local position float lx = 0.f, ly = 0.f, lz = 0.f, lo = 0.f; - auto* creatureDisplayInfo = sCreatureDisplayInfoStore.LookupEntry(static_cast(m_owner)->GetNativeDisplayId()); - float scale = creatureDisplayInfo->scale; - scale *= sCreatureModelDataStore.LookupEntry(creatureDisplayInfo->ModelId)->Scale; - auto attachmentItr = sModelAttachmentStore.find(creatureDisplayInfo->ModelId); - if (attachmentItr != sModelAttachmentStore.end()) - for (auto& attachment : attachmentItr->second) - { - if (attachment.id == attachmentLookup(seatEntry->m_attachmentID)) - { - lx = (attachment.position.x + seatEntry->m_attachmentOffsetX) * scale; - ly = (attachment.position.y + seatEntry->m_attachmentOffsetY) * scale; - lz = (attachment.position.z + seatEntry->m_attachmentOffsetZ) * scale; - break; - } - } + GetSeatCoordinates(seatEntry, lx, ly, lz); + + if(!BoardPassenger(passenger, lx, ly, lz, lo, seat)) // Use TransportBase to store the passenger + return; - BoardPassenger(passenger, lx, ly, lz, lo, seat); // Use TransportBase to store the passenger if (auto* rootVehicle = static_cast(m_owner)->FindRootVehicle()) passenger->SetRootVehicle(rootVehicle->GetObjectGuid()); @@ -327,22 +323,20 @@ void VehicleInfo::Board(Unit* passenger, uint8 seat) if (passenger->GetTypeId() == TYPEID_PLAYER) { - Player* pPlayer = (Player*)passenger; - pPlayer->UnsummonPetTemporaryIfAny(); + Player* player = static_cast(passenger); + player->UnsummonPetTemporaryIfAny(); WorldPacket data(SMSG_ON_CANCEL_EXPECTED_RIDE_VEHICLE_AURA); - pPlayer->GetSession()->SendPacket(data); + player->GetSession()->SendPacket(data); data.Initialize(SMSG_BREAK_TARGET, m_owner->GetPackGUID().size()); data << m_owner->GetPackGUID(); - pPlayer->GetSession()->SendPacket(data); - - pPlayer->SetImmobilizedState(true); + player->GetSession()->SendPacket(data); } else if (passenger->GetTypeId() == TYPEID_UNIT) { if (!passenger->IsRooted()) - ((Creature*)passenger)->SetImmobilizedState(true); + (static_cast(passenger))->SetImmobilizedState(true); } Movement::MoveSplineInit init(*passenger); @@ -406,28 +400,17 @@ void VehicleInfo::SwitchSeat(Unit* passenger, uint8 seat) MANGOS_ASSERT(seatEntry); // Switching seats is only allowed if this flag is set - if (seatEntry->CanSwitchFromSeat()) + if (!seatEntry->CanSwitchFromSeat()) return; // Remove passenger modifications of the old seat RemoveSeatMods(passenger, seatEntry->m_flags); + // Get seatEntry of new seat + seatEntry = GetSeatEntry(seat); + float lx = 0.f, ly = 0.f, lz = 0.f, lo = 0.f; - auto* creatureDisplayInfo = sCreatureDisplayInfoStore.LookupEntry(static_cast(m_owner)->GetNativeDisplayId()); - float scale = creatureDisplayInfo->scale; - scale *= sCreatureModelDataStore.LookupEntry(creatureDisplayInfo->ModelId)->Scale; - auto attachmentItr = sModelAttachmentStore.find(creatureDisplayInfo->ModelId); - if (attachmentItr != sModelAttachmentStore.end()) - for (auto& attachment : attachmentItr->second) - { - if (attachment.id == attachmentLookup(seatEntry->m_attachmentID)) - { - lx = (attachment.position.x + seatEntry->m_attachmentOffsetX) * scale; - ly = (attachment.position.y + seatEntry->m_attachmentOffsetY) * scale; - lz = (attachment.position.z + seatEntry->m_attachmentOffsetZ) * scale; - break; - } - } + GetSeatCoordinates(seatEntry, lx, ly, lz); // Set to new seat itr->second->SetTransportSeat(seat); @@ -473,6 +456,13 @@ void VehicleInfo::UnBoard(Unit* passenger, bool changeVehicle) { MANGOS_ASSERT(passenger); + for (const auto& m_passenger : m_passengers) + { + if (static_cast(m_passenger.first)->IsVehicle()) + { + static_cast(m_passenger.first)->GetVehicleInfo()->UnBoard(passenger, changeVehicle); + } + } PassengerMap::const_iterator itr = m_passengers.find(passenger); if (itr == m_passengers.end()) return; @@ -503,11 +493,9 @@ void VehicleInfo::UnBoard(Unit* passenger, bool changeVehicle) if (passenger->IsPlayer()) { - Player* pPlayer = (Player*)passenger; - pPlayer->ResummonPetTemporaryUnSummonedIfAny(); - pPlayer->SetFallInformation(0, pPlayer->GetPositionZ()); - - // SMSG_PET_DISMISS_SOUND (?) + Player* player = static_cast(passenger); + player->ResummonPetTemporaryUnSummonedIfAny(); + player->SetFallInformation(0, player->GetPositionZ()); } if (passenger->hasUnitState(UNIT_STAT_ROOT) && !passenger->HasAuraType(SPELL_AURA_MOD_ROOT)) @@ -608,7 +596,7 @@ Unit* VehicleInfo::GetPassenger(uint8 seat) const { for (const auto& m_passenger : m_passengers) if (m_passenger.second->GetTransportSeat() == seat) - return (Unit*)m_passenger.first; + return static_cast(m_passenger.first); return nullptr; } @@ -622,6 +610,32 @@ void VehicleInfo::CalculateBoardingPositionOf(float gx, float gy, float gz, floa lo = MapManager::NormalizeOrientation(go - m_owner->GetOrientation()); } +void VehicleInfo::GetSeatCoordinates(const VehicleSeatEntry* seatEntry, float& lx, float& ly, float& lz) const +{ + uint32 displayId = 0; + if (m_owner->IsPlayer() && static_cast(m_owner)->IsMounted()) + displayId = static_cast(m_owner)->GetMountID(); + else + displayId = static_cast(m_owner)->GetNativeDisplayId(); + auto* creatureDisplayInfo = sCreatureDisplayInfoStore.LookupEntry(displayId); + float scale = creatureDisplayInfo->scale; + scale *= sCreatureModelDataStore.LookupEntry(creatureDisplayInfo->ModelId)->Scale; + auto attachmentItr = sModelAttachmentStore.find(creatureDisplayInfo->ModelId); + if (attachmentItr != sModelAttachmentStore.end()) + { + for (auto& attachment : attachmentItr->second) + { + if (attachment.id == attachmentLookup(seatEntry->m_attachmentID)) + { + lx = (attachment.position.x + seatEntry->m_attachmentOffsetX) * scale; + ly = (attachment.position.y + seatEntry->m_attachmentOffsetY) * scale; + lz = (attachment.position.z + seatEntry->m_attachmentOffsetZ) * scale; + break; + } + } + } +} + void VehicleInfo::RemoveAccessoriesFromMap() { // Remove all accessories @@ -637,7 +651,7 @@ void VehicleInfo::TeleportPassengers(uint32 mapId) { if (passenger.first->IsPlayer()) { - players.push_back((Player*)passenger.first); + players.push_back(static_cast(passenger.first)); } } GenericTransport* transport = GetOwner()->GetTransport(); @@ -664,6 +678,8 @@ void VehicleInfo::RespawnAccessories(int32 seatIndex) { if (seatIndex != -1 && seatIndex != itr->seatId) continue; + if (m_vehicleSeats.find(itr->seatId) == m_vehicleSeats.end()) + continue; Position pos = m_owner->GetPosition(); pos.o *= 2; SummonPassenger(itr->passengerEntry, pos, itr->seatId); @@ -779,11 +795,29 @@ uint8 VehicleInfo::GetTakenSeatsMask() const uint8 takenSeatsMask = 0; for (const auto& m_passenger : m_passengers) + { + if (m_passenger.first->IsUnit()) + if (static_cast(m_passenger.first)->IsVehicle() && static_cast(m_passenger.first)->GetVehicleInfo()->GetEmptySeats() > 0) + continue; takenSeatsMask |= 1 << m_passenger.second->GetTransportSeat(); + } return takenSeatsMask; } +uint8 VehicleInfo::GetEmptySeats() const +{ + int size = 0; + for (const auto& m_passenger : m_passengers) + { + if (m_passenger.first->IsUnit()) + if (static_cast(m_passenger.first)->IsVehicle() && static_cast(m_passenger.first)->GetVehicleInfo()->GetEmptySeats() > 0) + continue; + size++; + } + return m_vehicleSeats.size() - size; +} + bool VehicleInfo::IsUsableSeatForPlayer(uint32 seatFlags, uint32 seatFlagsB) const { return seatFlags & (SEAT_FLAG_HAS_ENTER_ANIM | SEAT_FLAG_HAS_RIDE_ANIM) || @@ -797,7 +831,10 @@ bool VehicleInfo::IsUsableSeatForPlayer(uint32 seatFlags, uint32 seatFlagsB) con /// Add control and such modifiers to a passenger if required void VehicleInfo::ApplySeatMods(Unit* passenger, uint32 seatFlags) { - Unit* pVehicle = (Unit*)m_owner; // Vehicles are alawys Unit + if (m_owner->IsPlayer()) + return; + + Unit* vehicle = static_cast(m_owner); // Vehicles are alawys Unit (except with multi-person mounts) if (seatFlags & SEAT_FLAG_NOT_SELECTABLE) passenger->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_UNINTERACTIBLE); @@ -806,82 +843,84 @@ void VehicleInfo::ApplySeatMods(Unit* passenger, uint32 seatFlags) if (passenger->GetTypeId() == TYPEID_PLAYER) { - Player* pPlayer = (Player*)passenger; + Player* player = static_cast(passenger); // group update - if (pPlayer->GetGroup()) - pPlayer->SetGroupUpdateFlag(GROUP_UPDATE_FLAG_VEHICLE_SEAT); + if (player->GetGroup()) + player->SetGroupUpdateFlag(GROUP_UPDATE_FLAG_VEHICLE_SEAT); if (seatFlags & SEAT_FLAG_CAN_CONTROL) { - pPlayer->GetCamera().SetView(pVehicle); + player->GetCamera().SetView(vehicle); - pPlayer->SetCharm(pVehicle); - pVehicle->SetCharmer(pPlayer); + player->SetCharm(vehicle); + vehicle->SetCharmer(player); - pVehicle->GetMotionMaster()->Clear(); - pVehicle->GetMotionMaster()->MoveIdle(); - pVehicle->StopMoving(true); + vehicle->SetCanEnterCombat(true); - pVehicle->addUnitState(UNIT_STAT_POSSESSED); - pVehicle->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_POSSESSED); + vehicle->GetMotionMaster()->Clear(); + vehicle->GetMotionMaster()->MoveIdle(); + vehicle->StopMoving(true); - pVehicle->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_PLAYER_CONTROLLED); + vehicle->addUnitState(UNIT_STAT_POSSESSED); + vehicle->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_POSSESSED); - if (pPlayer->IsPvP()) - pVehicle->SetPvP(true); + vehicle->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_PLAYER_CONTROLLED); - if (pPlayer->IsPvPFreeForAll()) - pVehicle->SetPvPFreeForAll(true); + if (player->IsPvP()) + vehicle->SetPvP(true); - pPlayer->UpdateClientControl(pVehicle, true); - pPlayer->SetMover(pVehicle); + if (player->IsPvPFreeForAll()) + vehicle->SetPvPFreeForAll(true); + + player->UpdateClientControl(vehicle, true); + player->SetMover(vehicle); // Unconfirmed - default speed handling - if (pVehicle->GetTypeId() == TYPEID_UNIT) + if (vehicle->GetTypeId() == TYPEID_UNIT) { - if (!pPlayer->IsWalking() && pVehicle->IsWalking()) + if (!player->IsWalking() && vehicle->IsWalking()) { - ((Creature*)pVehicle)->SetWalk(false, true); + (static_cast(vehicle))->SetWalk(false, true); } - else if (pPlayer->IsWalking() && !pVehicle->IsWalking()) + else if (player->IsWalking() && !vehicle->IsWalking()) { - ((Creature*)pVehicle)->SetWalk(true, true); + (static_cast(vehicle))->SetWalk(true, true); } // set vehicle faction as per the controller faction - m_originalFaction = pVehicle->GetFaction(); - ((Creature*)pVehicle)->SetFactionTemporary(pPlayer->GetFaction(), TEMPFACTION_NONE); + m_originalFaction = vehicle->GetFaction(); + (static_cast(vehicle))->SetFactionTemporary(player->GetFaction(), TEMPFACTION_NONE); // set vehicle react state to passive; player will control the vehicle - pVehicle->AI()->SetReactState(REACT_PASSIVE); + vehicle->AI()->SetReactState(REACT_PASSIVE); } } - pVehicle->SendForcedObjectUpdate(); // TODO: both of these should be one packet - pPlayer->SendForcedObjectUpdate(); + vehicle->SendForcedObjectUpdate(); // TODO: both of these should be one packet + player->SendForcedObjectUpdate(); if (seatFlags & SEAT_FLAG_CAN_CAST) { - CharmInfo* charmInfo = pVehicle->InitCharmInfo(pVehicle); + CharmInfo* charmInfo = vehicle->InitCharmInfo(vehicle); charmInfo->InitVehicleCreateSpells(); - pPlayer->VehicleSpellInitialize(); + player->VehicleSpellInitialize(); } } else if (passenger->GetTypeId() == TYPEID_UNIT) { if (seatFlags & SEAT_FLAG_CAN_CONTROL) { - passenger->SetCharm(pVehicle); - pVehicle->SetCharmer(passenger); + passenger->SetCharm(vehicle); + vehicle->SetCharmer(passenger); // Change vehicle react state; ToDo: also change the vehicle faction? - if (pVehicle->GetTypeId() == TYPEID_UNIT) - pVehicle->AI()->SetReactState(passenger->AI()->GetReactState()); + if (vehicle->GetTypeId() == TYPEID_UNIT) + vehicle->AI()->SetReactState(passenger->AI()->GetReactState()); } - ((Creature*)passenger)->AI()->SetCombatMovement(false); + (static_cast(passenger))->AI()->SetCombatMovement(false); // Not entirely sure how this must be handled in relation to CONTROL // But in any way this at least would require some changes in the movement system most likely passenger->GetMotionMaster()->Clear(false, true); @@ -892,7 +931,10 @@ void VehicleInfo::ApplySeatMods(Unit* passenger, uint32 seatFlags) /// Remove control and such modifiers to a passenger if they were added void VehicleInfo::RemoveSeatMods(Unit* passenger, uint32 seatFlags) { - Unit* pVehicle = (Unit*)m_owner; + if (m_owner->IsPlayer()) + return; + + Unit* vehicle = static_cast(m_owner); if (seatFlags & SEAT_FLAG_NOT_SELECTABLE) passenger->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_UNINTERACTIBLE); @@ -901,60 +943,63 @@ void VehicleInfo::RemoveSeatMods(Unit* passenger, uint32 seatFlags) if (passenger->GetTypeId() == TYPEID_PLAYER) { - Player* pPlayer = (Player*)passenger; + Player* player = static_cast(passenger); // group update - if (pPlayer->GetGroup()) - pPlayer->SetGroupUpdateFlag(GROUP_UPDATE_FLAG_VEHICLE_SEAT); + if (player->GetGroup()) + player->SetGroupUpdateFlag(GROUP_UPDATE_FLAG_VEHICLE_SEAT); if (seatFlags & SEAT_FLAG_CAN_CONTROL) { - pPlayer->SetCharm(nullptr); - pVehicle->SetCharmer(nullptr); - - pPlayer->UpdateClientControl(pVehicle, false); - pPlayer->SetMover(nullptr); + player->SetCharm(nullptr); + vehicle->SetCharmer(nullptr); - pVehicle->StopMoving(true); - pVehicle->GetMotionMaster()->Clear(); + player->UpdateClientControl(vehicle, false); + player->SetMover(nullptr); - pVehicle->clearUnitState(UNIT_STAT_POSSESSED); - pVehicle->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_POSSESSED); + vehicle->StopMoving(true); + vehicle->GetMotionMaster()->Clear(); - pVehicle->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_PLAYER_CONTROLLED); + vehicle->clearUnitState(UNIT_STAT_POSSESSED); + vehicle->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_POSSESSED); - if (pPlayer->IsPvP()) - pVehicle->SetPvP(false); + vehicle->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_PLAYER_CONTROLLED); - if (pPlayer->IsPvPFreeForAll()) - pVehicle->SetPvPFreeForAll(false); + if (player->IsPvP()) + vehicle->SetPvP(false); - // must be called after movement control unapplying - pPlayer->GetCamera().ResetView(); + if (player->IsPvPFreeForAll()) + vehicle->SetPvPFreeForAll(false); - if (pVehicle->GetTypeId() == TYPEID_UNIT) + if (vehicle->GetTypeId() == TYPEID_UNIT) { // reset vehicle faction - ((Creature*)pVehicle)->SetFactionTemporary(m_originalFaction, TEMPFACTION_NONE); + (static_cast(vehicle))->SetFactionTemporary(m_originalFaction, TEMPFACTION_NONE); - pVehicle->AI()->SetReactState(REACT_AGGRESSIVE); + vehicle->AI()->SetReactState(REACT_DEFENSIVE); + } + + vehicle->SetTarget(nullptr); } + // must be called after movement control unapplying + player->GetCamera().ResetView(); + if (seatFlags & SEAT_FLAG_CAN_CAST) - pPlayer->RemovePetActionBar(); + player->RemovePetActionBar(); } else if (passenger->GetTypeId() == TYPEID_UNIT) { if (seatFlags & SEAT_FLAG_CAN_CONTROL) { passenger->SetCharm(nullptr); - pVehicle->SetCharmer(nullptr); + vehicle->SetCharmer(nullptr); } // Reinitialize movement - if (((Creature*)passenger)->AI()) - ((Creature*)passenger)->AI()->SetCombatMovement(true, true); + if ((static_cast(passenger))->AI()) + (static_cast(passenger))->AI()->SetCombatMovement(true, true); if (!passenger->GetVictim()) passenger->GetMotionMaster()->Initialize(); } diff --git a/src/game/Entities/Vehicle.h b/src/game/Entities/Vehicle.h index 9d708bea1c1..7dd36832c1f 100644 --- a/src/game/Entities/Vehicle.h +++ b/src/game/Entities/Vehicle.h @@ -112,6 +112,8 @@ class VehicleInfo : public TransportBase private: // Internal use to calculate the boarding position void CalculateBoardingPositionOf(float gx, float gy, float gz, float go, float& lx, float& ly, float& lz, float& lo) const; + // Internal use to calculate the coordinates of the seat + void GetSeatCoordinates(const VehicleSeatEntry* seatEntry, float& lx, float& ly, float& lz) const; // Seat information bool GetUsableSeatFor(Unit* passenger, uint8& seat, bool reset, bool next) const; @@ -119,7 +121,8 @@ class VehicleInfo : public TransportBase uint8 GetTakenSeatsMask() const; uint8 GetEmptySeatsMask() const { return ~GetTakenSeatsMask(); } - uint8 GetEmptySeats() const { return m_vehicleSeats.size() - m_passengers.size(); } + //uint8 GetEmptySeats() const { return m_vehicleSeats.size() - m_passengers.size(); } + uint8 GetEmptySeats() const; bool IsUsableSeatForPlayer(uint32 seatFlags, uint32 seatFlagsB) const; bool IsUsableSeatForCreature(uint32 /*seatFlags*/) const { return true; } // special flag?, !IsUsableSeatForPlayer(seatFlags)? diff --git a/src/game/Entities/VehicleHandler.cpp b/src/game/Entities/VehicleHandler.cpp index a6bb4000986..32cf603b59c 100644 --- a/src/game/Entities/VehicleHandler.cpp +++ b/src/game/Entities/VehicleHandler.cpp @@ -42,12 +42,20 @@ void WorldSession::HandleDismissControlledVehicle(WorldPacket& recvPacket) Unit* vehicle = (Unit*)transportInfo->GetTransport(); + if (!vehicle) + return; // Something went wrong if (vehicleGuid != vehicle->GetObjectGuid()) return; + if (vehicle->IsBoarded()) + { + vehicle = static_cast(vehicle->GetTransportInfo()->GetTransport()); + } // Remove Vehicle Control Aura vehicle->RemoveSpellsCausingAura(SPELL_AURA_CONTROL_VEHICLE, _player->GetObjectGuid()); + + vehicle->GetVehicleInfo()->UnBoard(_player, false); } void WorldSession::HandleRequestVehicleExit(WorldPacket& recvPacket) @@ -61,10 +69,19 @@ void WorldSession::HandleRequestVehicleExit(WorldPacket& recvPacket) Unit* vehicle = (Unit*)transportInfo->GetTransport(); + if (!vehicle) + return; + if (vehicle->IsBoarded()) + { + vehicle = static_cast(vehicle->GetTransportInfo()->GetTransport()); + } // Check for exit flag if (VehicleSeatEntry const* seatEntry = vehicle->GetVehicleInfo()->GetSeatEntry(transportInfo->GetTransportSeat())) if (seatEntry->m_flags & SEAT_FLAG_CAN_EXIT) + { vehicle->RemoveSpellsCausingAura(SPELL_AURA_CONTROL_VEHICLE, _player->GetObjectGuid()); + vehicle->GetVehicleInfo()->UnBoard(_player, false); + } } void WorldSession::HandleRequestVehicleNextSeat(WorldPacket& recvPacket) @@ -109,7 +126,7 @@ void WorldSession::HandleRequestVehicleSwitchSeat(WorldPacket& recvPacket) if (!transportInfo || !transportInfo->IsOnVehicle()) return; - Unit* vehicle = (Unit*)transportInfo->GetTransport(); + Unit* vehicle = static_cast(transportInfo->GetTransport()); if (vehicleGuid != vehicle->GetObjectGuid()) { @@ -124,7 +141,7 @@ void WorldSession::HandleRequestVehicleSwitchSeat(WorldPacket& recvPacket) SpellClickInfoMapBounds clickPair = sObjectMgr.GetSpellClickInfoMapBounds(destVehicle->GetEntry()); for (SpellClickInfoMap::const_iterator itr = clickPair.first; itr != clickPair.second; ++itr) - if (itr->second.IsFitToRequirements(_player, destVehicle->GetTypeId() == TYPEID_UNIT ? (Creature*)destVehicle : nullptr)) + if (itr->second.IsFitToRequirements(_player, destVehicle->GetTypeId() == TYPEID_UNIT ? static_cast(destVehicle) : nullptr)) _player->CastSpell(destVehicle, itr->second.spellId, TRIGGERED_OLD_TRIGGERED); } else @@ -150,7 +167,7 @@ void WorldSession::HandleChangeSeatsOnControlledVehicle(WorldPacket& recvPacket) if (!transportInfo || !transportInfo->IsOnVehicle()) return; - Unit* srcVehicle = (Unit*)transportInfo->GetTransport(); + Unit* srcVehicle = static_cast(transportInfo->GetTransport()); // Something went wrong if (srcVehicleGuid != srcVehicle->GetObjectGuid()) @@ -184,7 +201,7 @@ void WorldSession::HandleRideVehicleInteract(WorldPacket& recvPacket) ObjectGuid playerGuid; recvPacket >> playerGuid; - Player* vehicle = _player->GetMap()->GetPlayer(playerGuid); + Unit* vehicle = _player->GetMap()->GetUnit(playerGuid); if (!vehicle || !vehicle->IsVehicle()) return; @@ -192,8 +209,16 @@ void WorldSession::HandleRideVehicleInteract(WorldPacket& recvPacket) // Only allowed if in same raid if (!vehicle->IsInGroup(_player)) return; - - _player->CastSpell(vehicle, SPELL_RIDE_VEHICLE_HARDCODED, TRIGGERED_OLD_TRIGGERED); + SpellClickInfoMapBounds clickPair = sObjectMgr.GetSpellClickInfoMapBounds(vehicle->GetEntry()); + bool spellFound = false; + for (SpellClickInfoMap::const_iterator itr = clickPair.first; itr != clickPair.second; ++itr) + if (itr->second.IsFitToRequirements(_player, vehicle->GetTypeId() == TYPEID_UNIT ? (Creature*)vehicle : nullptr)) + { + _player->CastSpell(vehicle, itr->second.spellId, TRIGGERED_OLD_TRIGGERED); + spellFound = true; + } + if (!spellFound) + _player->CastSpell(vehicle, SPELL_RIDE_VEHICLE_HARDCODED, TRIGGERED_OLD_TRIGGERED); } void WorldSession::HandleEjectPassenger(WorldPacket& recvPacket) @@ -209,11 +234,30 @@ void WorldSession::HandleEjectPassenger(WorldPacket& recvPacket) if (!passenger || !passenger->IsBoarded()) return; - // _player is not a vehicle - if (!_player->IsVehicle()) + // _player is not on a vehicle + if (!_player->IsBoarded() && !_player->IsVehicle()) + return; + + Unit* vehicle = static_cast(passenger->GetTransportInfo()->GetTransport()); + + if (!vehicle) return; - VehicleInfo* vehicleInfo = _player->GetVehicleInfo(); + VehicleInfo* vehicleInfo = vehicle->GetVehicleInfo(); + + for (int i = 0; i < MAX_VEHICLE_SEAT; i++) + { + if (Unit* psg = vehicleInfo->GetPassenger(i)) + if (psg->IsVehicle()) + { + if (VehicleInfo* vi = psg->GetVehicleInfo()) + if (vi->HasOnBoard(passenger)) + { + vehicleInfo = vi; + break; + } + } + } // _player must be transporting passenger if (!vehicleInfo->HasOnBoard(passenger)) @@ -222,5 +266,5 @@ void WorldSession::HandleEjectPassenger(WorldPacket& recvPacket) // Check for eject flag if (VehicleSeatEntry const* seatEntry = vehicleInfo->GetSeatEntry(passenger->GetTransportInfo()->GetTransportSeat())) if (seatEntry->m_flagsB & SEAT_FLAG_B_EJECTABLE) - _player->RemoveSpellsCausingAura(SPELL_AURA_CONTROL_VEHICLE, passengerGuid); + vehicle->RemoveSpellsCausingAura(SPELL_AURA_CONTROL_VEHICLE, passengerGuid); } diff --git a/src/game/Maps/TransportSystem.cpp b/src/game/Maps/TransportSystem.cpp index d0c7c5d95f5..15863195f3b 100644 --- a/src/game/Maps/TransportSystem.cpp +++ b/src/game/Maps/TransportSystem.cpp @@ -47,6 +47,7 @@ TransportBase::TransportBase(WorldObject* owner) : TransportBase::~TransportBase() { + m_passengers.clear(); MANGOS_ASSERT(m_passengers.empty()); } @@ -154,8 +155,23 @@ bool TransportBase::HasOnBoard(WorldObject const* passenger) const return false; } -void TransportBase::BoardPassenger(WorldObject* passenger, float lx, float ly, float lz, float lo, uint8 seat) +bool TransportBase::BoardPassenger(WorldObject* passenger, float lx, float ly, float lz, float lo, uint8 seat) { + for (const auto& m_passenger : m_passengers) + { + if (seat == m_passenger.second->GetTransportSeat()) + { + if (m_passenger.first->IsUnit()) + { + if (static_cast(m_passenger.first)->IsVehicle()) + { + static_cast(m_passenger.first)->GetVehicleInfo()->Board(static_cast(passenger), 0); + return false; + } + } + } + } + TransportInfo* transportInfo = new TransportInfo(passenger, this, lx, ly, lz, lo, seat); // Insert our new passenger @@ -163,12 +179,22 @@ void TransportBase::BoardPassenger(WorldObject* passenger, float lx, float ly, f // The passenger needs fast access to transportInfo passenger->SetTransportInfo(transportInfo); + return true; } void TransportBase::UnBoardPassenger(WorldObject* passenger) { PassengerMap::iterator itr = m_passengers.find(passenger); + for (const auto& m_passenger : m_passengers) + { + if (m_passenger.first->IsUnit()) + { + if (static_cast(m_passenger.first)->IsVehicle() && static_cast(m_passenger.first)->GetVehicleInfo()->HasOnBoard(passenger)) + static_cast(m_passenger.first)->GetVehicleInfo()->UnBoard(static_cast(passenger), false); + } + } + if (itr == m_passengers.end()) return; diff --git a/src/game/Maps/TransportSystem.h b/src/game/Maps/TransportSystem.h index c8b2434485d..311060ade38 100644 --- a/src/game/Maps/TransportSystem.h +++ b/src/game/Maps/TransportSystem.h @@ -75,7 +75,7 @@ class TransportBase protected: // Helper functions to add/ remove a passenger from the list - void BoardPassenger(WorldObject* passenger, float lx, float ly, float lz, float lo, uint8 seat); + bool BoardPassenger(WorldObject* passenger, float lx, float ly, float lz, float lo, uint8 seat); void UnBoardPassenger(WorldObject* passenger); WorldObject* m_owner; ///< The transporting unit diff --git a/src/game/MotionGenerators/MotionMaster.h b/src/game/MotionGenerators/MotionMaster.h index 98ed9af28f6..3f4ed5b562a 100644 --- a/src/game/MotionGenerators/MotionMaster.h +++ b/src/game/MotionGenerators/MotionMaster.h @@ -76,6 +76,9 @@ enum MovementGeneratorType EXTERNAL_WAYPOINT_FINISHED_LAST = 20, // Only used in UnitAI::MovementInform when the waittime of the last wp is finished The pathId >= 0 is added as additional value FORMATION_MOTION_TYPE = 21, // TargetedMovementGenerator.h + + BOARD_VEHICLE_MOTION_TYPE = 22, + UNBOARD_VEHICLE_MOTION_TYPE = 23, }; enum MMCleanFlag diff --git a/src/game/Movement/MoveSplineFlag.h b/src/game/Movement/MoveSplineFlag.h index 1c47f7c51e6..7acf7226774 100644 --- a/src/game/Movement/MoveSplineFlag.h +++ b/src/game/Movement/MoveSplineFlag.h @@ -100,12 +100,12 @@ namespace Movement void EnableAnimation(uint8 anim) { raw() = (raw() & ~(Mask_Animations | Falling | Parabolic)) | Animation | anim;} void EnableParabolic() { raw() = (raw() & ~(Mask_Animations | Falling | Animation)) | Parabolic;} void EnableFalling() { raw() = (raw() & ~(Mask_Animations | Parabolic | Animation)) | Falling;} - void EnableFlying() { raw() = (raw() & ~Catmullrom) | Flying; } + void EnableFlying() { raw() = (raw() & ~(Catmullrom | Falling)) | Flying; } void EnableCatmullRom() { raw() = (raw() & ~Flying) | Catmullrom; } void EnableFacingPoint() { raw() = (raw() & ~Mask_Final_Facing) | Final_Point;} void EnableFacingAngle() { raw() = (raw() & ~Mask_Final_Facing) | Final_Angle;} void EnableFacingTarget() { raw() = (raw() & ~Mask_Final_Facing) | Final_Target;} - void EnableBoardVehicle() { raw() = (raw() & ~(Catmullrom | ExitVehicle)) | BoardVehicle; } + void EnableBoardVehicle() { raw() = (raw() & ~ExitVehicle) | BoardVehicle; } void EnableExitVehicle() { raw() = (raw() & ~BoardVehicle) | ExitVehicle; } uint8 animId : 8; diff --git a/src/game/Movement/MoveSplineInit.cpp b/src/game/Movement/MoveSplineInit.cpp index cb027043122..559259b979a 100644 --- a/src/game/Movement/MoveSplineInit.cpp +++ b/src/game/Movement/MoveSplineInit.cpp @@ -197,6 +197,8 @@ namespace Movement data.SetOpcode(SMSG_MONSTER_MOVE_TRANSPORT); if (transportInfo) { + if (unit.AI()) + unit.AI()->MovementInform(BOARD_VEHICLE_MOTION_TYPE, transportInfo->GetTransportSeat()); data << transportInfo->GetTransportGuid().WriteAsPacked(); data << int8(transportInfo->GetTransportSeat()); } diff --git a/src/game/Spells/Spell.cpp b/src/game/Spells/Spell.cpp index 9720a612adc..5df00cd3a4c 100644 --- a/src/game/Spells/Spell.cpp +++ b/src/game/Spells/Spell.cpp @@ -4081,7 +4081,8 @@ void Spell::update(uint32 difftime) // check if the player or unit caster has moved before the spell finished (exclude casting on vehicles) if ((m_trueCaster->IsUnit() && m_timer != 0) && (m_castPositionX != m_trueCaster->GetPositionX() || m_castPositionY != m_trueCaster->GetPositionY() || m_castPositionZ != m_trueCaster->GetPositionZ()) && - (m_spellInfo->Effect[EFFECT_INDEX_0] != SPELL_EFFECT_STUCK || !m_trueCaster->m_movementInfo.HasMovementFlag(MOVEFLAG_FALLINGFAR))) + (m_spellInfo->Effect[EFFECT_INDEX_0] != SPELL_EFFECT_STUCK || !m_trueCaster->m_movementInfo.HasMovementFlag(MOVEFLAG_FALLINGFAR)) && + (!m_trueCaster->m_movementInfo.HasMovementFlag(MOVEFLAG_ONTRANSPORT))) { // always cancel for channeled spells if (m_spellState == SPELL_STATE_CHANNELING) @@ -5602,7 +5603,8 @@ SpellCastResult Spell::CheckCast(bool strict) // Caster aura req check if need if (m_spellInfo->casterAuraSpell && !m_caster->HasAura(m_spellInfo->casterAuraSpell)) - return SPELL_FAILED_CASTER_AURASTATE; + if (!m_triggeredBySpellInfo || m_triggeredBySpellInfo->Id != m_spellInfo->casterAuraSpell) + return SPELL_FAILED_CASTER_AURASTATE; if (m_spellInfo->excludeCasterAuraSpell) { // Special cases of non existing auras handling @@ -6991,19 +6993,6 @@ SpellCastResult Spell::CheckCast(bool strict) if (!expectedTarget->IsVehicle()) return SPELL_FAILED_BAD_TARGETS; - // It is possible to change between vehicles that are boarded on each other - if (m_caster->IsBoarded() && m_caster->GetTransportInfo()->IsOnVehicle()) - { - // Check if trying to board a vehicle that is boarded on current transport - bool boardedOnEachOther = m_caster->GetTransportInfo()->HasOnBoard(expectedTarget); - // Check if trying to board a vehicle that has the current transport on board - if (!boardedOnEachOther) - boardedOnEachOther = expectedTarget->GetVehicleInfo()->HasOnBoard(m_caster); - - if (!boardedOnEachOther) - return SPELL_FAILED_NOT_ON_TRANSPORT; - } - if (!expectedTarget->GetVehicleInfo()->CanBoard(m_caster)) return SPELL_FAILED_BAD_TARGETS; } diff --git a/src/game/Spells/SpellAuras.cpp b/src/game/Spells/SpellAuras.cpp index adf06238581..63c04ff82a1 100755 --- a/src/game/Spells/SpellAuras.cpp +++ b/src/game/Spells/SpellAuras.cpp @@ -6938,6 +6938,10 @@ void Aura::HandleAuraModIncreaseHealthPercent(bool apply, bool /*Real*/) case 60430: // Molten Fury case 64193: // Heartbreak case 65737: // Heartbreak + case 65077: // Tower of Frost + case 64482: // Tower of Life + case 65076: // Tower of Storms + case 65075: // Tower of Flames target->SetHealth(target->GetMaxHealth()); break; default: diff --git a/src/game/Spells/SpellMgr.h b/src/game/Spells/SpellMgr.h index ac82f335104..46b4795833d 100644 --- a/src/game/Spells/SpellMgr.h +++ b/src/game/Spells/SpellMgr.h @@ -1470,6 +1470,7 @@ inline bool IsPositiveEffect(const SpellEntry* spellproto, SpellEffectIndex effI case 37962: case 37968: case 35734: // Dropping Phase Disruptor + case 62910: return false; } diff --git a/src/game/meson.build b/src/game/meson.build new file mode 100644 index 00000000000..5a4ab8aacb4 --- /dev/null +++ b/src/game/meson.build @@ -0,0 +1,806 @@ +game_sources = [ + 'Weather/Weather.cpp', + 'OutdoorPvP/OutdoorPvPEP.cpp', + 'OutdoorPvP/OutdoorPvPTF.cpp', + 'OutdoorPvP/OutdoorPvPSI.cpp', + 'OutdoorPvP/OutdoorPvPHP.cpp', + 'OutdoorPvP/OutdoorPvPGH.cpp', + 'OutdoorPvP/OutdoorPvP.cpp', + 'OutdoorPvP/OutdoorPvPZM.cpp', + 'OutdoorPvP/OutdoorPvPNA.cpp', + 'OutdoorPvP/OutdoorPvPMgr.cpp', + 'GMTickets/GMTicketMgr.cpp', + 'GMTickets/GMTicketHandler.cpp', + 'World/WorldStateVariableManager.cpp', + 'World/World.cpp', + 'World/WorldStateExpression.cpp', + 'World/WorldState.cpp', + 'Trade/TradeHandler.cpp', + 'Anticheat/module/Antispam/antispam.cpp', + 'Anticheat/module/Antispam/antispammgr.cpp', + 'Anticheat/module/config.cpp', + 'Anticheat/module/Warden/wardenmodule.cpp', + 'Anticheat/module/Warden/wardenmac.cpp', + 'Anticheat/module/Warden/wardenmodulemgr.cpp', + 'Anticheat/module/Warden/wardenscan.cpp', + 'Anticheat/module/Warden/wardenwin.cpp', + 'Anticheat/module/Warden/warden.cpp', + 'Anticheat/module/Warden/wardenscanmgr.cpp', + 'Anticheat/module/AddonHandler.cpp', + 'Anticheat/module/libanticheat.cpp', + 'Anticheat/module/anticheatchatcommandsfunctions.cpp', + 'Anticheat/module/Movement/movement.cpp', + 'BattleGround/BattleGroundMgr.cpp', + 'BattleGround/BattleGroundHandler.cpp', + 'BattleGround/BattleGroundRL.cpp', + 'BattleGround/BattleGroundIC.cpp', + 'BattleGround/BattleGround.cpp', + 'BattleGround/BattleGroundAV.cpp', + 'BattleGround/BattleGroundWS.cpp', + 'BattleGround/BattleGroundSA.cpp', + 'BattleGround/BattleGroundEY.cpp', + 'BattleGround/BattleGroundAB.cpp', + 'BattleGround/BattleGroundDS.cpp', + 'BattleGround/BattleGroundRV.cpp', + 'BattleGround/BattleGroundNA.cpp', + 'BattleGround/BattleGroundBE.cpp', + 'Entities/SkillHandler.cpp', + 'Entities/MiscHandler.cpp', + 'Entities/QueryHandler.cpp', + 'Entities/Corpse.cpp', + 'Entities/ObjectGuid.cpp', + 'Entities/StatSystem.cpp', + 'Entities/Bag.cpp', + 'Entities/CharacterHandler.cpp', + 'Entities/Pet.cpp', + 'Entities/ItemHandler.cpp', + 'Entities/Relations.cpp', + 'Entities/NPCHandler.cpp', + 'Entities/RafHandler.cpp', + 'Entities/Vehicle.cpp', + 'Entities/CreatureLinkingMgr.cpp', + 'Entities/Taxi.cpp', + 'Entities/DynamicObject.cpp', + 'Entities/Totem.cpp', + 'Entities/PetHandler.cpp', + 'Entities/Object.cpp', + 'Entities/Transports.cpp', + 'Entities/GossipDef.cpp', + 'Entities/ItemEnchantmentMgr.cpp', + 'Entities/UpdateData.cpp', + 'Entities/EntitiesMgr.cpp', + 'Entities/GameObject.cpp', + 'Entities/Camera.cpp', + 'Entities/TemporarySpawn.cpp', + 'Entities/PetitionsHandler.cpp', + 'Entities/ItemPrototype.cpp', + 'Entities/Creature.cpp', + 'Entities/CreatureSettings.cpp', + 'Entities/VehicleHandler.cpp', + 'Entities/ObjectVisibility.cpp', + 'Entities/Item.cpp', + 'Entities/Unit.cpp', + 'Entities/Player.cpp', + 'Entities/UpdateFields.cpp', + 'GameEvents/GameEventMgr.cpp', + 'GameEvents/moon.cpp', + 'AI/ScriptDevAI/base/pet_ai.cpp', + 'AI/ScriptDevAI/base/guard_ai.cpp', + 'AI/ScriptDevAI/base/CombatAI.cpp', + 'AI/ScriptDevAI/base/BossAI.cpp', + 'AI/ScriptDevAI/base/follower_ai.cpp', + 'AI/ScriptDevAI/base/TimerAI.cpp', + 'AI/ScriptDevAI/base/escort_ai.cpp', + 'AI/ScriptDevAI/include/sc_grid_searchers.cpp', + 'AI/ScriptDevAI/include/sc_instance.cpp', + 'AI/ScriptDevAI/include/sc_creature.cpp', + 'AI/ScriptDevAI/system/ScriptLoader.cpp', + 'AI/ScriptDevAI/system/system.cpp', + 'AI/ScriptDevAI/ScriptDevAIMgr.cpp', + 'AI/BaseAI/GuardAI.cpp', + 'AI/BaseAI/CreatureAI.cpp', + 'AI/BaseAI/PetAI.cpp', + 'AI/BaseAI/GuardianAI.cpp', + 'AI/BaseAI/PossessedAI.cpp', + 'AI/BaseAI/TotemAI.cpp', + 'AI/BaseAI/UnitAI.cpp', + 'AI/BaseAI/GameObjectAI.cpp', + 'AI/BaseAI/NullCreatureAI.cpp', + 'AI/EventAI/CreatureEventAI.cpp', + 'AI/EventAI/CreatureEventAIMgr.cpp', + 'AI/CreatureAISelector.cpp', + 'AI/CreatureAIRegistry.cpp', + 'AI/PlayerAI/PlayerAI.cpp', + 'AI/PlayerAI/CharmAI.cpp', + 'Calendar/Calendar.cpp', + 'Calendar/CalendarHandler.cpp', + 'Models/M2Stores.cpp', + 'Cinematics/CinematicMgr.cpp', + 'Arena/ArenaTeam.cpp', + 'Arena/ArenaTeamHandler.cpp', + 'VoiceChat/VoiceChatHandler.cpp', + 'DBScripts/ScriptMgr.cpp', + 'Maps/SpawnGroup.cpp', + 'Maps/GridMap.cpp', + 'Maps/Map.cpp', + 'Maps/SpawnManager.cpp', + 'Maps/MapDataContainer.cpp', + 'Maps/TaxiHandler.cpp', + 'Maps/InstanceData.cpp', + 'Maps/TransportMgr.cpp', + 'Maps/ObjectPosSelector.cpp', + 'Maps/TransportSystem.cpp', + 'Maps/MapManager.cpp', + 'Maps/MapPersistentStateMgr.cpp', + 'Maps/MapUpdater.cpp', + 'Quests/QuestDef.cpp', + 'Quests/QuestHandler.cpp', + 'MotionGenerators/IdleMovementGenerator.cpp', + 'MotionGenerators/PathFinder.cpp', + 'MotionGenerators/TargetedMovementGenerator.cpp', + 'MotionGenerators/HomeMovementGenerator.cpp', + 'MotionGenerators/PointMovementGenerator.cpp', + 'MotionGenerators/MovementHandler.cpp', + 'MotionGenerators/WrapperMovementGenerator.cpp', + 'MotionGenerators/MotionMaster.cpp', + 'MotionGenerators/MoveMap.cpp', + 'MotionGenerators/WaypointManager.cpp', + 'MotionGenerators/FollowerReference.cpp', + 'MotionGenerators/WaypointMovementGenerator.cpp', + 'MotionGenerators/MoveMapSharedDefines.cpp', + 'MotionGenerators/MovementGenerator.cpp', + 'MotionGenerators/RandomMovementGenerator.cpp', + 'MotionGenerators/PathMovementGenerator.cpp', + 'Tools/CharacterDatabaseCleaner.cpp', + 'Tools/PlayerDump.cpp', + 'Pools/PoolManager.cpp', + 'Guilds/Guild.cpp', + 'Guilds/GuildMgr.cpp', + 'Guilds/GuildHandler.cpp', + 'Battlefield/Battlefield.cpp', + 'Battlefield/BattlefieldWG.cpp', + 'Battlefield/BattlefieldHandler.cpp', + 'Chat/Level2.cpp', + 'Chat/Level1.cpp', + 'Chat/ChannelMgr.cpp', + 'Chat/Level0.cpp', + 'Chat/debugcmds.cpp', + 'Chat/Channel.cpp', + 'Chat/ChatHandler.cpp', + 'Chat/Level3.cpp', + 'Chat/TicketCommands.cpp', + 'Chat/NpcCommands.cpp', + 'Chat/ChannelHandler.cpp', + 'Chat/Chat.cpp', + 'Globals/Locales.cpp', + 'Globals/CombatCondition.cpp', + 'Globals/Conditions.cpp', + 'Globals/GraveyardManager.cpp', + 'Globals/ObjectAccessor.cpp', + 'Globals/ObjectMgr.cpp', + 'Globals/UnitCondition.cpp', + 'AuctionHouse/AuctionHouseHandler.cpp', + 'AuctionHouse/AuctionHouseMgr.cpp', + 'AuctionHouseBot/AuctionHouseBot.cpp', + 'Combat/CombatHandler.cpp', + 'Combat/HostileRefManager.cpp', + 'Combat/DuelHandler.cpp', + 'Combat/CombatManager.cpp', + 'Combat/ThreatManager.cpp', + 'Loot/LootMgr.cpp', + 'Loot/LootHandler.cpp', + 'Spells/Scripts/SpellScript.cpp', + 'Spells/Scripts/Scripting/ClassScripts/Paladin.cpp', + 'Spells/Scripts/Scripting/ClassScripts/Priest.cpp', + 'Spells/Scripts/Scripting/ClassScripts/DeathKnight.cpp', + 'Spells/Scripts/Scripting/ClassScripts/Hunter.cpp', + 'Spells/Scripts/Scripting/ClassScripts/ScalingAuras.cpp', + 'Spells/Scripts/Scripting/ClassScripts/Druid.cpp', + 'Spells/Scripts/Scripting/ClassScripts/Rogue.cpp', + 'Spells/Scripts/Scripting/ClassScripts/Warrior.cpp', + 'Spells/Scripts/Scripting/ClassScripts/Warlock.cpp', + 'Spells/Scripts/Scripting/ClassScripts/Shaman.cpp', + 'Spells/Scripts/Scripting/ClassScripts/Mage.cpp', + 'Spells/SpellHandler.cpp', + 'Spells/Spell.cpp', + 'Spells/SpellAuras.cpp', + 'Spells/UnitAuraProcHandler.cpp', + 'Spells/SpellMgr.cpp', + 'Spells/SpellTargets.cpp', + 'Spells/SpellDefines.cpp', + 'Spells/SpellEffects.cpp', + 'Groups/GroupHandler.cpp', + 'Groups/GroupReference.cpp', + 'Groups/Group.cpp', + 'Social/SocialMgr.cpp', + 'Skills/SkillExtraItems.cpp', + 'Skills/SkillDiscovery.cpp', + 'Vmap/VMapManager2.cpp', + 'Vmap/VMapFactory.cpp', + 'Vmap/BIH.cpp', + 'Vmap/DynamicTree.cpp', + 'Vmap/ModelInstance.cpp', + 'Vmap/WorldModel.cpp', + 'Vmap/TileAssembler.cpp', + 'Vmap/GameObjectModelVmaps.cpp', + 'Vmap/GameObjectModel.cpp', + 'Vmap/MapTree.cpp', + 'Achievements/AchievementMgr.cpp', + 'LFG/LFGQueue.cpp', + 'LFG/LFG.cpp', + 'LFG/LFGMgr.cpp', + 'LFG/LFGHandler.cpp', + 'Server/SQLStorages.cpp', + 'Server/DBCStores.cpp', + 'Server/PacketLog.cpp', + 'Server/Opcodes.cpp', + 'Server/WorldSession.cpp', + 'Server/WorldSocket.cpp', + 'Server/AuthCrypt.cpp', + 'Grids/GridNotifiers.cpp', + 'Grids/ObjectGridLoader.cpp', + 'Grids/GridStates.cpp', + 'Movement/util.cpp', + 'Movement/packet_builder.cpp', + 'Movement/spline.cpp', + 'Movement/MoveSpline.cpp', + 'Movement/MoveSplineInit.cpp', + 'Accounts/AccountMgr.cpp', + 'Reputation/ReputationMgr.cpp', + 'Mails/MassMailMgr.cpp', + 'Mails/MailHandler.cpp', + 'Mails/Mail.cpp' +] + +scriptdev_sources = [ + 'AI/ScriptDevAI/scripts/battlegrounds/battlegrounds.cpp', + 'AI/ScriptDevAI/scripts/eastern_kingdoms/uldaman/instance_uldaman.cpp', + 'AI/ScriptDevAI/scripts/eastern_kingdoms/uldaman/uldaman.cpp', + 'AI/ScriptDevAI/scripts/eastern_kingdoms/uldaman/boss_archaedas.cpp', + 'AI/ScriptDevAI/scripts/eastern_kingdoms/stranglethorn_vale.cpp', + 'AI/ScriptDevAI/scripts/eastern_kingdoms/arathi_highlands.cpp', + 'AI/ScriptDevAI/scripts/eastern_kingdoms/westfall.cpp', + 'AI/ScriptDevAI/scripts/eastern_kingdoms/karazhan/boss_moroes.cpp', + 'AI/ScriptDevAI/scripts/eastern_kingdoms/karazhan/karazhanScripts.cpp', + 'AI/ScriptDevAI/scripts/eastern_kingdoms/karazhan/bosses_opera.cpp', + 'AI/ScriptDevAI/scripts/eastern_kingdoms/karazhan/boss_curator.cpp', + 'AI/ScriptDevAI/scripts/eastern_kingdoms/karazhan/boss_maiden_of_virtue.cpp', + 'AI/ScriptDevAI/scripts/eastern_kingdoms/karazhan/boss_midnight.cpp', + 'AI/ScriptDevAI/scripts/eastern_kingdoms/karazhan/boss_nightbane.cpp', + 'AI/ScriptDevAI/scripts/eastern_kingdoms/karazhan/boss_prince_malchezaar.cpp', + 'AI/ScriptDevAI/scripts/eastern_kingdoms/karazhan/chess_event.cpp', + 'AI/ScriptDevAI/scripts/eastern_kingdoms/karazhan/karazhan.cpp', + 'AI/ScriptDevAI/scripts/eastern_kingdoms/karazhan/boss_netherspite.cpp', + 'AI/ScriptDevAI/scripts/eastern_kingdoms/karazhan/boss_shade_of_aran.cpp', + 'AI/ScriptDevAI/scripts/eastern_kingdoms/karazhan/boss_terestian_illhoof.cpp', + 'AI/ScriptDevAI/scripts/eastern_kingdoms/loch_modan.cpp', + 'AI/ScriptDevAI/scripts/eastern_kingdoms/stratholme/boss_dathrohan_balnazzar.cpp', + 'AI/ScriptDevAI/scripts/eastern_kingdoms/stratholme/boss_baroness_anastari.cpp', + 'AI/ScriptDevAI/scripts/eastern_kingdoms/stratholme/boss_maleki_the_pallid.cpp', + 'AI/ScriptDevAI/scripts/eastern_kingdoms/stratholme/stratholmeScripts.cpp', + 'AI/ScriptDevAI/scripts/eastern_kingdoms/stratholme/boss_cannon_master_willey.cpp', + 'AI/ScriptDevAI/scripts/eastern_kingdoms/stratholme/stratholme.cpp', + 'AI/ScriptDevAI/scripts/eastern_kingdoms/stratholme/boss_order_of_silver_hand.cpp', + 'AI/ScriptDevAI/scripts/eastern_kingdoms/isle_of_queldanas.cpp', + 'AI/ScriptDevAI/scripts/eastern_kingdoms/undercity.cpp', + 'AI/ScriptDevAI/scripts/eastern_kingdoms/dun_morogh.cpp', + 'AI/ScriptDevAI/scripts/eastern_kingdoms/burning_steppes.cpp', + 'AI/ScriptDevAI/scripts/eastern_kingdoms/silverpine_forest.cpp', + 'AI/ScriptDevAI/scripts/eastern_kingdoms/eversong_woods.cpp', + 'AI/ScriptDevAI/scripts/eastern_kingdoms/scholomance/boss_jandice_barov.cpp', + 'AI/ScriptDevAI/scripts/eastern_kingdoms/scholomance/instance_scholomance.cpp', + 'AI/ScriptDevAI/scripts/eastern_kingdoms/scholomance/scholomance.cpp', + 'AI/ScriptDevAI/scripts/eastern_kingdoms/scholomance/boss_darkmaster_gandling.cpp', + 'AI/ScriptDevAI/scripts/eastern_kingdoms/silvermoon_city.cpp', + 'AI/ScriptDevAI/scripts/eastern_kingdoms/world_eastern_kingdoms.cpp', + 'AI/ScriptDevAI/scripts/eastern_kingdoms/hinterlands.cpp', + 'AI/ScriptDevAI/scripts/eastern_kingdoms/ironforge.cpp', + 'AI/ScriptDevAI/scripts/eastern_kingdoms/sunwell_plateau/boss_felmyst.cpp', + 'AI/ScriptDevAI/scripts/eastern_kingdoms/sunwell_plateau/sunwell_plateauScripts.cpp', + 'AI/ScriptDevAI/scripts/eastern_kingdoms/sunwell_plateau/boss_eredar_twins.cpp', + 'AI/ScriptDevAI/scripts/eastern_kingdoms/sunwell_plateau/boss_kiljaeden.cpp', + 'AI/ScriptDevAI/scripts/eastern_kingdoms/sunwell_plateau/boss_muru.cpp', + 'AI/ScriptDevAI/scripts/eastern_kingdoms/sunwell_plateau/boss_brutallus.cpp', + 'AI/ScriptDevAI/scripts/eastern_kingdoms/sunwell_plateau/boss_kalecgos.cpp', + 'AI/ScriptDevAI/scripts/eastern_kingdoms/sunwell_plateau/sunwell_plateau.cpp', + 'AI/ScriptDevAI/scripts/eastern_kingdoms/tirisfal_glades.cpp', + 'AI/ScriptDevAI/scripts/eastern_kingdoms/deadmines/boss_mr_smite.cpp', + 'AI/ScriptDevAI/scripts/eastern_kingdoms/deadmines/deadmines.cpp', + 'AI/ScriptDevAI/scripts/eastern_kingdoms/deadmines/instance_deadmines.cpp', + 'AI/ScriptDevAI/scripts/eastern_kingdoms/magisters_terrace/magisters_terraceScripts.cpp', + 'AI/ScriptDevAI/scripts/eastern_kingdoms/magisters_terrace/boss_selin_fireheart.cpp', + 'AI/ScriptDevAI/scripts/eastern_kingdoms/magisters_terrace/boss_vexallus.cpp', + 'AI/ScriptDevAI/scripts/eastern_kingdoms/magisters_terrace/boss_priestess_delrissa.cpp', + 'AI/ScriptDevAI/scripts/eastern_kingdoms/magisters_terrace/magisters_terrace.cpp', + 'AI/ScriptDevAI/scripts/eastern_kingdoms/magisters_terrace/boss_felblood_kaelthas.cpp', + 'AI/ScriptDevAI/scripts/eastern_kingdoms/swamp_of_sorrows.cpp', + 'AI/ScriptDevAI/scripts/eastern_kingdoms/blackrock_spire/boss_gyth.cpp', + 'AI/ScriptDevAI/scripts/eastern_kingdoms/blackrock_spire/instance_blackrock_spire.cpp', + 'AI/ScriptDevAI/scripts/eastern_kingdoms/blackrock_spire/boss_pyroguard_emberseer.cpp', + 'AI/ScriptDevAI/scripts/eastern_kingdoms/blackrock_spire/boss_overlord_wyrmthalak.cpp', + 'AI/ScriptDevAI/scripts/eastern_kingdoms/zulaman/boss_nalorakk.cpp', + 'AI/ScriptDevAI/scripts/eastern_kingdoms/zulaman/boss_akilzon.cpp', + 'AI/ScriptDevAI/scripts/eastern_kingdoms/zulaman/zulaman.cpp', + 'AI/ScriptDevAI/scripts/eastern_kingdoms/zulaman/boss_halazzi.cpp', + 'AI/ScriptDevAI/scripts/eastern_kingdoms/zulaman/zulamanScripts.cpp', + 'AI/ScriptDevAI/scripts/eastern_kingdoms/zulaman/boss_malacrass.cpp', + 'AI/ScriptDevAI/scripts/eastern_kingdoms/zulaman/boss_janalai.cpp', + 'AI/ScriptDevAI/scripts/eastern_kingdoms/zulaman/boss_zuljin.cpp', + 'AI/ScriptDevAI/scripts/eastern_kingdoms/sunken_temple/sunken_templeScripts.cpp', + 'AI/ScriptDevAI/scripts/eastern_kingdoms/sunken_temple/sunken_temple.cpp', + 'AI/ScriptDevAI/scripts/eastern_kingdoms/shadowfang_keep/shadowfang_keep.cpp', + 'AI/ScriptDevAI/scripts/eastern_kingdoms/shadowfang_keep/instance_shadowfang_keep.cpp', + 'AI/ScriptDevAI/scripts/eastern_kingdoms/shadowfang_keep/boss_hummel.cpp', + 'AI/ScriptDevAI/scripts/eastern_kingdoms/boss_kazzak.cpp', + 'AI/ScriptDevAI/scripts/eastern_kingdoms/searing_gorge.cpp', + 'AI/ScriptDevAI/scripts/eastern_kingdoms/blackwing_lair/boss_ebonroc.cpp', + 'AI/ScriptDevAI/scripts/eastern_kingdoms/blackwing_lair/boss_flamegor.cpp', + 'AI/ScriptDevAI/scripts/eastern_kingdoms/blackwing_lair/boss_nefarian.cpp', + 'AI/ScriptDevAI/scripts/eastern_kingdoms/blackwing_lair/boss_chromaggus.cpp', + 'AI/ScriptDevAI/scripts/eastern_kingdoms/blackwing_lair/boss_broodlord_lashlayer.cpp', + 'AI/ScriptDevAI/scripts/eastern_kingdoms/blackwing_lair/boss_victor_nefarius.cpp', + 'AI/ScriptDevAI/scripts/eastern_kingdoms/blackwing_lair/boss_razorgore.cpp', + 'AI/ScriptDevAI/scripts/eastern_kingdoms/blackwing_lair/boss_firemaw.cpp', + 'AI/ScriptDevAI/scripts/eastern_kingdoms/blackwing_lair/boss_vaelastrasz.cpp', + 'AI/ScriptDevAI/scripts/eastern_kingdoms/blackwing_lair/blackwing_lair.cpp', + 'AI/ScriptDevAI/scripts/eastern_kingdoms/scarlet_monastery/instance_scarlet_monastery.cpp', + 'AI/ScriptDevAI/scripts/eastern_kingdoms/scarlet_monastery/boss_arcanist_doan.cpp', + 'AI/ScriptDevAI/scripts/eastern_kingdoms/scarlet_monastery/boss_herod.cpp', + 'AI/ScriptDevAI/scripts/eastern_kingdoms/scarlet_monastery/boss_mograine_and_whitemane.cpp', + 'AI/ScriptDevAI/scripts/eastern_kingdoms/scarlet_monastery/boss_headless_horseman.cpp', + 'AI/ScriptDevAI/scripts/eastern_kingdoms/western_plaguelands.cpp', + 'AI/ScriptDevAI/scripts/eastern_kingdoms/alterac_mountains.cpp', + 'AI/ScriptDevAI/scripts/eastern_kingdoms/molten_core/boss_sulfuron_harbinger.cpp', + 'AI/ScriptDevAI/scripts/eastern_kingdoms/molten_core/boss_magmadar.cpp', + 'AI/ScriptDevAI/scripts/eastern_kingdoms/molten_core/boss_garr.cpp', + 'AI/ScriptDevAI/scripts/eastern_kingdoms/molten_core/molten_core.cpp', + 'AI/ScriptDevAI/scripts/eastern_kingdoms/molten_core/molten_coreScripts.cpp', + 'AI/ScriptDevAI/scripts/eastern_kingdoms/molten_core/boss_shazzrah.cpp', + 'AI/ScriptDevAI/scripts/eastern_kingdoms/molten_core/boss_gehennas.cpp', + 'AI/ScriptDevAI/scripts/eastern_kingdoms/molten_core/boss_lucifron.cpp', + 'AI/ScriptDevAI/scripts/eastern_kingdoms/molten_core/boss_majordomo_executus.cpp', + 'AI/ScriptDevAI/scripts/eastern_kingdoms/molten_core/boss_baron_geddon.cpp', + 'AI/ScriptDevAI/scripts/eastern_kingdoms/molten_core/boss_golemagg.cpp', + 'AI/ScriptDevAI/scripts/eastern_kingdoms/molten_core/boss_ragnaros.cpp', + 'AI/ScriptDevAI/scripts/eastern_kingdoms/scarlet_enclave/world_map_ebon_hold.cpp', + 'AI/ScriptDevAI/scripts/eastern_kingdoms/scarlet_enclave/ebon_hold.cpp', + 'AI/ScriptDevAI/scripts/eastern_kingdoms/blackrock_depths/boss_ambassador_flamelash.cpp', + 'AI/ScriptDevAI/scripts/eastern_kingdoms/blackrock_depths/boss_high_interrogator_gerstahn.cpp', + 'AI/ScriptDevAI/scripts/eastern_kingdoms/blackrock_depths/boss_coren_direbrew.cpp', + 'AI/ScriptDevAI/scripts/eastern_kingdoms/blackrock_depths/instance_blackrock_depths.cpp', + 'AI/ScriptDevAI/scripts/eastern_kingdoms/blackrock_depths/blackrock_depths.cpp', + 'AI/ScriptDevAI/scripts/eastern_kingdoms/blackrock_depths/boss_general_angerforge.cpp', + 'AI/ScriptDevAI/scripts/eastern_kingdoms/blackrock_depths/boss_emperor_dagran_thaurissan.cpp', + 'AI/ScriptDevAI/scripts/eastern_kingdoms/blasted_lands.cpp', + 'AI/ScriptDevAI/scripts/eastern_kingdoms/wetlands.cpp', + 'AI/ScriptDevAI/scripts/eastern_kingdoms/ghostlands.cpp', + 'AI/ScriptDevAI/scripts/eastern_kingdoms/zulgurub/zulgurubScripts.cpp', + 'AI/ScriptDevAI/scripts/eastern_kingdoms/zulgurub/boss_jeklik.cpp', + 'AI/ScriptDevAI/scripts/eastern_kingdoms/zulgurub/boss_thekal.cpp', + 'AI/ScriptDevAI/scripts/eastern_kingdoms/zulgurub/boss_marli.cpp', + 'AI/ScriptDevAI/scripts/eastern_kingdoms/zulgurub/boss_mandokir.cpp', + 'AI/ScriptDevAI/scripts/eastern_kingdoms/zulgurub/boss_renataki.cpp', + 'AI/ScriptDevAI/scripts/eastern_kingdoms/zulgurub/zulgurub.cpp', + 'AI/ScriptDevAI/scripts/eastern_kingdoms/zulgurub/boss_venoxis.cpp', + 'AI/ScriptDevAI/scripts/eastern_kingdoms/zulgurub/boss_hakkar.cpp', + 'AI/ScriptDevAI/scripts/eastern_kingdoms/zulgurub/boss_arlokk.cpp', + 'AI/ScriptDevAI/scripts/eastern_kingdoms/stormwind_city.cpp', + 'AI/ScriptDevAI/scripts/eastern_kingdoms/eastern_plaguelands.cpp', + 'AI/ScriptDevAI/scripts/eastern_kingdoms/redridge_mountains.cpp', + 'AI/ScriptDevAI/scripts/eastern_kingdoms/elwynn_forest.cpp', + 'AI/ScriptDevAI/scripts/eastern_kingdoms/gnomeregan/gnomeregan.cpp', + 'AI/ScriptDevAI/scripts/eastern_kingdoms/gnomeregan/boss_thermaplugg.cpp', + 'AI/ScriptDevAI/scripts/eastern_kingdoms/gnomeregan/instance_gnomeregan.cpp', + 'AI/ScriptDevAI/scripts/world/bosses_emerald_dragons.cpp', + 'AI/ScriptDevAI/scripts/world/guards.cpp', + 'AI/ScriptDevAI/scripts/world/spell_scripts_wotlk.cpp', + 'AI/ScriptDevAI/scripts/world/npc_professions.cpp', + 'AI/ScriptDevAI/scripts/world/areatrigger_scripts.cpp', + 'AI/ScriptDevAI/scripts/world/npcs_special.cpp', + 'AI/ScriptDevAI/scripts/world/lunar_festival.cpp', + 'AI/ScriptDevAI/scripts/world/hallows_end.cpp', + 'AI/ScriptDevAI/scripts/world/midsummer_festival.cpp', + 'AI/ScriptDevAI/scripts/world/brewfest.cpp', + 'AI/ScriptDevAI/scripts/world/shade_of_the_horseman.cpp', + 'AI/ScriptDevAI/scripts/world/scourge_invasion.cpp', + 'AI/ScriptDevAI/scripts/world/world_map_scripts.cpp', + 'AI/ScriptDevAI/scripts/world/suns_reach_reclamation.cpp', + 'AI/ScriptDevAI/scripts/world/mob_generic_creature.cpp', + 'AI/ScriptDevAI/scripts/world/item_scripts_wotlk.cpp', + 'AI/ScriptDevAI/scripts/world/item_scripts.cpp', + 'AI/ScriptDevAI/scripts/world/boss_highlord_kruul.cpp', + 'AI/ScriptDevAI/scripts/world/spell_scripts.cpp', + 'AI/ScriptDevAI/scripts/world/war_effort.cpp', + 'AI/ScriptDevAI/scripts/world/childrens_week_tbc.cpp', + 'AI/ScriptDevAI/scripts/world/quest_scripts.cpp', + 'AI/ScriptDevAI/scripts/world/go_scripts.cpp', + 'AI/ScriptDevAI/scripts/kalimdor/ashenvale.cpp', + 'AI/ScriptDevAI/scripts/kalimdor/world_kalimdor.cpp', + 'AI/ScriptDevAI/scripts/kalimdor/felwood.cpp', + 'AI/ScriptDevAI/scripts/kalimdor/maraudon/boss_noxxion.cpp', + 'AI/ScriptDevAI/scripts/kalimdor/maraudon/instance_maraudon.cpp', + 'AI/ScriptDevAI/scripts/kalimdor/azshara.cpp', + 'AI/ScriptDevAI/scripts/kalimdor/azuremyst_isle.cpp', + 'AI/ScriptDevAI/scripts/kalimdor/darkshore.cpp', + 'AI/ScriptDevAI/scripts/kalimdor/feralas.cpp', + 'AI/ScriptDevAI/scripts/kalimdor/stonetalon_mountains.cpp', + 'AI/ScriptDevAI/scripts/kalimdor/blackfathom_deeps/instance_blackfathom_deeps.cpp', + 'AI/ScriptDevAI/scripts/kalimdor/wailing_caverns/wailing_cavernsScripts.cpp', + 'AI/ScriptDevAI/scripts/kalimdor/wailing_caverns/wailing_caverns.cpp', + 'AI/ScriptDevAI/scripts/kalimdor/boss_azuregos.cpp', + 'AI/ScriptDevAI/scripts/kalimdor/silithus.cpp', + 'AI/ScriptDevAI/scripts/kalimdor/temple_of_ahnqiraj/boss_twinemperors.cpp', + 'AI/ScriptDevAI/scripts/kalimdor/temple_of_ahnqiraj/temple_of_ahnqiraj.cpp', + 'AI/ScriptDevAI/scripts/kalimdor/temple_of_ahnqiraj/boss_skeram.cpp', + 'AI/ScriptDevAI/scripts/kalimdor/temple_of_ahnqiraj/boss_cthun.cpp', + 'AI/ScriptDevAI/scripts/kalimdor/temple_of_ahnqiraj/boss_huhuran.cpp', + 'AI/ScriptDevAI/scripts/kalimdor/temple_of_ahnqiraj/boss_bug_trio.cpp', + 'AI/ScriptDevAI/scripts/kalimdor/temple_of_ahnqiraj/boss_fankriss.cpp', + 'AI/ScriptDevAI/scripts/kalimdor/temple_of_ahnqiraj/boss_ouro.cpp', + 'AI/ScriptDevAI/scripts/kalimdor/temple_of_ahnqiraj/boss_viscidus.cpp', + 'AI/ScriptDevAI/scripts/kalimdor/temple_of_ahnqiraj/boss_sartura.cpp', + 'AI/ScriptDevAI/scripts/kalimdor/temple_of_ahnqiraj/mob_anubisath_sentinel.cpp', + 'AI/ScriptDevAI/scripts/kalimdor/razorfen_kraul/instance_razorfen_kraul.cpp', + 'AI/ScriptDevAI/scripts/kalimdor/razorfen_kraul/razorfen_kraul.cpp', + 'AI/ScriptDevAI/scripts/kalimdor/tanaris.cpp', + 'AI/ScriptDevAI/scripts/kalimdor/caverns_of_time/culling_of_stratholme/instance_culling_of_stratholme.cpp', + 'AI/ScriptDevAI/scripts/kalimdor/caverns_of_time/culling_of_stratholme/culling_of_stratholme.cpp', + 'AI/ScriptDevAI/scripts/kalimdor/caverns_of_time/hyjal/boss_anetheron.cpp', + 'AI/ScriptDevAI/scripts/kalimdor/caverns_of_time/hyjal/hyjal.cpp', + 'AI/ScriptDevAI/scripts/kalimdor/caverns_of_time/hyjal/boss_kazrogal.cpp', + 'AI/ScriptDevAI/scripts/kalimdor/caverns_of_time/hyjal/boss_rage_winterchill.cpp', + 'AI/ScriptDevAI/scripts/kalimdor/caverns_of_time/hyjal/hyjalAI.cpp', + 'AI/ScriptDevAI/scripts/kalimdor/caverns_of_time/hyjal/hyjalScripts.cpp', + 'AI/ScriptDevAI/scripts/kalimdor/caverns_of_time/hyjal/boss_azgalor.cpp', + 'AI/ScriptDevAI/scripts/kalimdor/caverns_of_time/hyjal/boss_archimonde.cpp', + 'AI/ScriptDevAI/scripts/kalimdor/caverns_of_time/old_hillsbrad/old_hillsbrad.cpp', + 'AI/ScriptDevAI/scripts/kalimdor/caverns_of_time/old_hillsbrad/old_hillsbradScripts.cpp', + 'AI/ScriptDevAI/scripts/kalimdor/caverns_of_time/dark_portal/boss_aeonus.cpp', + 'AI/ScriptDevAI/scripts/kalimdor/caverns_of_time/dark_portal/boss_chrono_lord_deja.cpp', + 'AI/ScriptDevAI/scripts/kalimdor/caverns_of_time/dark_portal/dark_portalScripts.cpp', + 'AI/ScriptDevAI/scripts/kalimdor/caverns_of_time/dark_portal/dark_portal.cpp', + 'AI/ScriptDevAI/scripts/kalimdor/caverns_of_time/dark_portal/boss_temporus.cpp', + 'AI/ScriptDevAI/scripts/kalimdor/ruins_of_ahnqiraj/ruins_of_ahnqirajScripts.cpp', + 'AI/ScriptDevAI/scripts/kalimdor/ruins_of_ahnqiraj/boss_moam.cpp', + 'AI/ScriptDevAI/scripts/kalimdor/ruins_of_ahnqiraj/boss_ossirian.cpp', + 'AI/ScriptDevAI/scripts/kalimdor/ruins_of_ahnqiraj/boss_ayamiss.cpp', + 'AI/ScriptDevAI/scripts/kalimdor/ruins_of_ahnqiraj/boss_rajaxx.cpp', + 'AI/ScriptDevAI/scripts/kalimdor/ruins_of_ahnqiraj/ruins_of_ahnqiraj.cpp', + 'AI/ScriptDevAI/scripts/kalimdor/ruins_of_ahnqiraj/boss_kurinnaxx.cpp', + 'AI/ScriptDevAI/scripts/kalimdor/ruins_of_ahnqiraj/boss_buru.cpp', + 'AI/ScriptDevAI/scripts/kalimdor/dustwallow_marsh.cpp', + 'AI/ScriptDevAI/scripts/kalimdor/zulfarrak/instance_zulfarrak.cpp', + 'AI/ScriptDevAI/scripts/kalimdor/zulfarrak/zulfarrak.cpp', + 'AI/ScriptDevAI/scripts/kalimdor/zulfarrak/boss_zumrah.cpp', + 'AI/ScriptDevAI/scripts/kalimdor/teldrassil.cpp', + 'AI/ScriptDevAI/scripts/kalimdor/winterspring.cpp', + 'AI/ScriptDevAI/scripts/kalimdor/onyxias_lair/boss_onyxia.cpp', + 'AI/ScriptDevAI/scripts/kalimdor/onyxias_lair/instance_onyxias_lair.cpp', + 'AI/ScriptDevAI/scripts/kalimdor/orgrimmar.cpp', + 'AI/ScriptDevAI/scripts/kalimdor/durotar.cpp', + 'AI/ScriptDevAI/scripts/kalimdor/razorfen_downs/instance_razorfen_downs.cpp', + 'AI/ScriptDevAI/scripts/kalimdor/razorfen_downs/razorfen_downs.cpp', + 'AI/ScriptDevAI/scripts/kalimdor/desolace.cpp', + 'AI/ScriptDevAI/scripts/kalimdor/thousand_needles.cpp', + 'AI/ScriptDevAI/scripts/kalimdor/ungoro_crater.cpp', + 'AI/ScriptDevAI/scripts/kalimdor/mulgore.cpp', + 'AI/ScriptDevAI/scripts/kalimdor/the_barrens.cpp', + 'AI/ScriptDevAI/scripts/kalimdor/moonglade.cpp', + 'AI/ScriptDevAI/scripts/kalimdor/thunder_bluff.cpp', + 'AI/ScriptDevAI/scripts/kalimdor/bloodmyst_isle.cpp', + 'AI/ScriptDevAI/scripts/kalimdor/dire_maul/instance_dire_maul.cpp', + 'AI/ScriptDevAI/scripts/kalimdor/dire_maul/dire_maul.cpp', + 'AI/ScriptDevAI/scripts/outland/nagrand.cpp', + 'AI/ScriptDevAI/scripts/outland/hellfire_peninsula.cpp', + 'AI/ScriptDevAI/scripts/outland/tempest_keep/the_mechanar/boss_pathaleon_the_calculator.cpp', + 'AI/ScriptDevAI/scripts/outland/tempest_keep/the_mechanar/boss_nethermancer_sepethrea.cpp', + 'AI/ScriptDevAI/scripts/outland/tempest_keep/the_mechanar/boss_mechano_lord_capacitus.cpp', + 'AI/ScriptDevAI/scripts/outland/tempest_keep/the_mechanar/mechanar.cpp', + 'AI/ScriptDevAI/scripts/outland/tempest_keep/botanica/boss_laj.cpp', + 'AI/ScriptDevAI/scripts/outland/tempest_keep/botanica/boss_warp_splinter.cpp', + 'AI/ScriptDevAI/scripts/outland/tempest_keep/botanica/boss_high_botanist_freywinn.cpp', + 'AI/ScriptDevAI/scripts/outland/tempest_keep/botanica/boss_thorngrin_the_tender.cpp', + 'AI/ScriptDevAI/scripts/outland/tempest_keep/botanica/botanica.cpp', + 'AI/ScriptDevAI/scripts/outland/tempest_keep/arcatraz/boss_harbinger_skyriss.cpp', + 'AI/ScriptDevAI/scripts/outland/tempest_keep/arcatraz/arcatrazScripts.cpp', + 'AI/ScriptDevAI/scripts/outland/tempest_keep/arcatraz/boss_soccothrates.cpp', + 'AI/ScriptDevAI/scripts/outland/tempest_keep/arcatraz/arcatraz.cpp', + 'AI/ScriptDevAI/scripts/outland/tempest_keep/arcatraz/boss_dalliah.cpp', + 'AI/ScriptDevAI/scripts/outland/tempest_keep/the_eye/boss_void_reaver.cpp', + 'AI/ScriptDevAI/scripts/outland/tempest_keep/the_eye/boss_kaelthas.cpp', + 'AI/ScriptDevAI/scripts/outland/tempest_keep/the_eye/boss_alar.cpp', + 'AI/ScriptDevAI/scripts/outland/tempest_keep/the_eye/boss_astromancer.cpp', + 'AI/ScriptDevAI/scripts/outland/tempest_keep/the_eye/the_eye.cpp', + 'AI/ScriptDevAI/scripts/outland/hellfire_citadel/blood_furnace/blood_furnace.cpp', + 'AI/ScriptDevAI/scripts/outland/hellfire_citadel/blood_furnace/boss_kelidan_the_breaker.cpp', + 'AI/ScriptDevAI/scripts/outland/hellfire_citadel/blood_furnace/boss_broggok.cpp', + 'AI/ScriptDevAI/scripts/outland/hellfire_citadel/blood_furnace/boss_the_maker.cpp', + 'AI/ScriptDevAI/scripts/outland/hellfire_citadel/shattered_halls/boss_warchief_kargath_bladefist.cpp', + 'AI/ScriptDevAI/scripts/outland/hellfire_citadel/shattered_halls/shattered_halls.cpp', + 'AI/ScriptDevAI/scripts/outland/hellfire_citadel/shattered_halls/shattered_hallsScripts.cpp', + 'AI/ScriptDevAI/scripts/outland/hellfire_citadel/shattered_halls/boss_nethekurse.cpp', + 'AI/ScriptDevAI/scripts/outland/hellfire_citadel/shattered_halls/boss_warbringer_omrogg.cpp', + 'AI/ScriptDevAI/scripts/outland/hellfire_citadel/hellfire_ramparts/boss_watchkeeper_gargolmar.cpp', + 'AI/ScriptDevAI/scripts/outland/hellfire_citadel/hellfire_ramparts/boss_nazan_and_vazruden.cpp', + 'AI/ScriptDevAI/scripts/outland/hellfire_citadel/hellfire_ramparts/hellfire_ramparts.cpp', + 'AI/ScriptDevAI/scripts/outland/hellfire_citadel/hellfire_ramparts/boss_omor_the_unscarred.cpp', + 'AI/ScriptDevAI/scripts/outland/hellfire_citadel/magtheridons_lair/magtheridons_lair.cpp', + 'AI/ScriptDevAI/scripts/outland/hellfire_citadel/magtheridons_lair/boss_magtheridon.cpp', + 'AI/ScriptDevAI/scripts/outland/zangarmarsh.cpp', + 'AI/ScriptDevAI/scripts/outland/black_temple/boss_mother_shahraz.cpp', + 'AI/ScriptDevAI/scripts/outland/black_temple/illidari_council.cpp', + 'AI/ScriptDevAI/scripts/outland/black_temple/boss_illidan.cpp', + 'AI/ScriptDevAI/scripts/outland/black_temple/black_temple.cpp', + 'AI/ScriptDevAI/scripts/outland/black_temple/boss_supremus.cpp', + 'AI/ScriptDevAI/scripts/outland/black_temple/boss_shade_of_akama.cpp', + 'AI/ScriptDevAI/scripts/outland/black_temple/boss_reliquary_of_souls.cpp', + 'AI/ScriptDevAI/scripts/outland/black_temple/black_templeScripts.cpp', + 'AI/ScriptDevAI/scripts/outland/black_temple/boss_bloodboil.cpp', + 'AI/ScriptDevAI/scripts/outland/black_temple/boss_teron_gorefiend.cpp', + 'AI/ScriptDevAI/scripts/outland/black_temple/boss_warlord_najentus.cpp', + 'AI/ScriptDevAI/scripts/outland/auchindoun/auchenai_crypts/boss_exarch_maladaar.cpp', + 'AI/ScriptDevAI/scripts/outland/auchindoun/auchenai_crypts/boss_shirrak.cpp', + 'AI/ScriptDevAI/scripts/outland/auchindoun/shadow_labyrinth/boss_ambassador_hellmaw.cpp', + 'AI/ScriptDevAI/scripts/outland/auchindoun/shadow_labyrinth/boss_grandmaster_vorpil.cpp', + 'AI/ScriptDevAI/scripts/outland/auchindoun/shadow_labyrinth/boss_murmur.cpp', + 'AI/ScriptDevAI/scripts/outland/auchindoun/shadow_labyrinth/shadow_labyrinth.cpp', + 'AI/ScriptDevAI/scripts/outland/auchindoun/shadow_labyrinth/boss_blackheart_the_inciter.cpp', + 'AI/ScriptDevAI/scripts/outland/auchindoun/mana_tombs/boss_yor.cpp', + 'AI/ScriptDevAI/scripts/outland/auchindoun/mana_tombs/mana_tombsScripts.cpp', + 'AI/ScriptDevAI/scripts/outland/auchindoun/mana_tombs/boss_nexusprince_shaffar.cpp', + 'AI/ScriptDevAI/scripts/outland/auchindoun/mana_tombs/boss_pandemonius.cpp', + 'AI/ScriptDevAI/scripts/outland/auchindoun/sethekk_halls/boss_anzu.cpp', + 'AI/ScriptDevAI/scripts/outland/auchindoun/sethekk_halls/sethekk_halls.cpp', + 'AI/ScriptDevAI/scripts/outland/auchindoun/sethekk_halls/boss_darkweaver_syth.cpp', + 'AI/ScriptDevAI/scripts/outland/auchindoun/sethekk_halls/boss_talon_king_ikiss.cpp', + 'AI/ScriptDevAI/scripts/outland/blades_edge_mountains.cpp', + 'AI/ScriptDevAI/scripts/outland/boss_terokk.cpp', + 'AI/ScriptDevAI/scripts/outland/boss_doomlord_kazzak.cpp', + 'AI/ScriptDevAI/scripts/outland/netherstorm.cpp', + 'AI/ScriptDevAI/scripts/outland/shattrath_city.cpp', + 'AI/ScriptDevAI/scripts/outland/boss_doomwalker.cpp', + 'AI/ScriptDevAI/scripts/outland/world_outland.cpp', + 'AI/ScriptDevAI/scripts/outland/gruuls_lair/boss_high_king_maulgar.cpp', + 'AI/ScriptDevAI/scripts/outland/gruuls_lair/boss_gruul.cpp', + 'AI/ScriptDevAI/scripts/outland/gruuls_lair/gruuls_lair.cpp', + 'AI/ScriptDevAI/scripts/outland/coilfang_reservoir/slave_pens/boss_ahune.cpp', + 'AI/ScriptDevAI/scripts/outland/coilfang_reservoir/slave_pens/slave_pens.cpp', + 'AI/ScriptDevAI/scripts/outland/coilfang_reservoir/serpent_shrine/boss_hydross_the_unstable.cpp', + 'AI/ScriptDevAI/scripts/outland/coilfang_reservoir/serpent_shrine/boss_fathomlord_karathress.cpp', + 'AI/ScriptDevAI/scripts/outland/coilfang_reservoir/serpent_shrine/boss_leotheras_the_blind.cpp', + 'AI/ScriptDevAI/scripts/outland/coilfang_reservoir/serpent_shrine/boss_lady_vashj.cpp', + 'AI/ScriptDevAI/scripts/outland/coilfang_reservoir/serpent_shrine/serpent_shrine.cpp', + 'AI/ScriptDevAI/scripts/outland/coilfang_reservoir/serpent_shrine/boss_morogrim_tidewalker.cpp', + 'AI/ScriptDevAI/scripts/outland/coilfang_reservoir/serpent_shrine/boss_the_lurker_below.cpp', + 'AI/ScriptDevAI/scripts/outland/coilfang_reservoir/underbog/boss_swamplord_muselek.cpp', + 'AI/ScriptDevAI/scripts/outland/coilfang_reservoir/underbog/boss_black_stalker.cpp', + 'AI/ScriptDevAI/scripts/outland/coilfang_reservoir/underbog/underbog.cpp', + 'AI/ScriptDevAI/scripts/outland/coilfang_reservoir/underbog/boss_hungarfen.cpp', + 'AI/ScriptDevAI/scripts/outland/coilfang_reservoir/steam_vault/steam_vault.cpp', + 'AI/ScriptDevAI/scripts/outland/coilfang_reservoir/steam_vault/boss_warlord_kalithresh.cpp', + 'AI/ScriptDevAI/scripts/outland/coilfang_reservoir/steam_vault/boss_hydromancer_thespia.cpp', + 'AI/ScriptDevAI/scripts/outland/coilfang_reservoir/steam_vault/boss_mekgineer_steamrigger.cpp', + 'AI/ScriptDevAI/scripts/outland/shadowmoon_valley.cpp', + 'AI/ScriptDevAI/scripts/outland/bashir_landing.cpp', + 'AI/ScriptDevAI/scripts/outland/shartuul_transporter.cpp', + 'AI/ScriptDevAI/scripts/outland/terokkar_forest.cpp', + 'AI/ScriptDevAI/scripts/northrend/wintergrasp.cpp', + 'AI/ScriptDevAI/scripts/northrend/world_northrend.cpp', + 'AI/ScriptDevAI/scripts/northrend/grizzly_hills.cpp', + 'AI/ScriptDevAI/scripts/northrend/dalaran.cpp', + 'AI/ScriptDevAI/scripts/northrend/nexus/nexus/boss_telestra.cpp', + 'AI/ScriptDevAI/scripts/northrend/nexus/nexus/boss_anomalus.cpp', + 'AI/ScriptDevAI/scripts/northrend/nexus/nexus/nexus.cpp', + 'AI/ScriptDevAI/scripts/northrend/nexus/nexus/boss_keristrasza.cpp', + 'AI/ScriptDevAI/scripts/northrend/nexus/nexus/boss_ormorok.cpp', + 'AI/ScriptDevAI/scripts/northrend/nexus/oculus/oculus.cpp', + 'AI/ScriptDevAI/scripts/northrend/nexus/oculus/oculusScripts.cpp', + 'AI/ScriptDevAI/scripts/northrend/nexus/oculus/boss_varos.cpp', + 'AI/ScriptDevAI/scripts/northrend/nexus/oculus/boss_urom.cpp', + 'AI/ScriptDevAI/scripts/northrend/nexus/oculus/boss_eregos.cpp', + 'AI/ScriptDevAI/scripts/northrend/nexus/eye_of_eternity/boss_malygos.cpp', + 'AI/ScriptDevAI/scripts/northrend/nexus/eye_of_eternity/eye_of_eternity.cpp', + 'AI/ScriptDevAI/scripts/northrend/icecrown_citadel/frozen_halls/forge_of_souls/forge_of_souls.cpp', + 'AI/ScriptDevAI/scripts/northrend/icecrown_citadel/frozen_halls/forge_of_souls/boss_bronjahm.cpp', + 'AI/ScriptDevAI/scripts/northrend/icecrown_citadel/frozen_halls/forge_of_souls/boss_devourer_of_souls.cpp', + 'AI/ScriptDevAI/scripts/northrend/icecrown_citadel/frozen_halls/halls_of_reflection/boss_lich_king.cpp', + 'AI/ScriptDevAI/scripts/northrend/icecrown_citadel/frozen_halls/halls_of_reflection/halls_of_reflection.cpp', + 'AI/ScriptDevAI/scripts/northrend/icecrown_citadel/frozen_halls/halls_of_reflection/halls_of_reflectionScripts.cpp', + 'AI/ScriptDevAI/scripts/northrend/icecrown_citadel/frozen_halls/pit_of_saron/pit_of_saronScripts.cpp', + 'AI/ScriptDevAI/scripts/northrend/icecrown_citadel/frozen_halls/pit_of_saron/boss_scourgelord_tyrannus.cpp', + 'AI/ScriptDevAI/scripts/northrend/icecrown_citadel/frozen_halls/pit_of_saron/boss_krick_and_ick.cpp', + 'AI/ScriptDevAI/scripts/northrend/icecrown_citadel/frozen_halls/pit_of_saron/boss_forgemaster_garfrost.cpp', + 'AI/ScriptDevAI/scripts/northrend/icecrown_citadel/frozen_halls/pit_of_saron/pit_of_saron.cpp', + 'AI/ScriptDevAI/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_blood_queen_lanathel.cpp', + 'AI/ScriptDevAI/scripts/northrend/icecrown_citadel/icecrown_citadel/icecrown_citadel.cpp', + 'AI/ScriptDevAI/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_sindragosa.cpp', + 'AI/ScriptDevAI/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_festergut.cpp', + 'AI/ScriptDevAI/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_lady_deathwhisper.cpp', + 'AI/ScriptDevAI/scripts/northrend/icecrown_citadel/icecrown_citadel/gunship_battle.cpp', + 'AI/ScriptDevAI/scripts/northrend/icecrown_citadel/icecrown_citadel/icecrown_citadelScripts.cpp', + 'AI/ScriptDevAI/scripts/northrend/icecrown_citadel/icecrown_citadel/blood_prince_council.cpp', + 'AI/ScriptDevAI/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_deathbringer_saurfang.cpp', + 'AI/ScriptDevAI/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_lord_marrowgar.cpp', + 'AI/ScriptDevAI/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_valithria_dreamwalker.cpp', + 'AI/ScriptDevAI/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_the_lich_king.cpp', + 'AI/ScriptDevAI/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_professor_putricide.cpp', + 'AI/ScriptDevAI/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_rotface.cpp', + 'AI/ScriptDevAI/scripts/northrend/naxxramas/boss_patchwerk.cpp', + 'AI/ScriptDevAI/scripts/northrend/naxxramas/boss_heigan.cpp', + 'AI/ScriptDevAI/scripts/northrend/naxxramas/boss_anubrekhan.cpp', + 'AI/ScriptDevAI/scripts/northrend/naxxramas/boss_thaddius.cpp', + 'AI/ScriptDevAI/scripts/northrend/naxxramas/boss_noth.cpp', + 'AI/ScriptDevAI/scripts/northrend/naxxramas/naxxramas.cpp', + 'AI/ScriptDevAI/scripts/northrend/naxxramas/naxxramasScripts.cpp', + 'AI/ScriptDevAI/scripts/northrend/naxxramas/boss_four_horsemen.cpp', + 'AI/ScriptDevAI/scripts/northrend/naxxramas/boss_gothik.cpp', + 'AI/ScriptDevAI/scripts/northrend/naxxramas/boss_sapphiron.cpp', + 'AI/ScriptDevAI/scripts/northrend/naxxramas/boss_gluth.cpp', + 'AI/ScriptDevAI/scripts/northrend/naxxramas/boss_maexxna.cpp', + 'AI/ScriptDevAI/scripts/northrend/naxxramas/boss_kelthuzad.cpp', + 'AI/ScriptDevAI/scripts/northrend/naxxramas/boss_faerlina.cpp', + 'AI/ScriptDevAI/scripts/northrend/naxxramas/boss_razuvious.cpp', + 'AI/ScriptDevAI/scripts/northrend/naxxramas/boss_loatheb.cpp', + 'AI/ScriptDevAI/scripts/northrend/naxxramas/boss_grobbulus.cpp', + 'AI/ScriptDevAI/scripts/northrend/ulduar/halls_of_stone/halls_of_stoneScripts.cpp', + 'AI/ScriptDevAI/scripts/northrend/ulduar/halls_of_stone/halls_of_stone.cpp', + 'AI/ScriptDevAI/scripts/northrend/ulduar/halls_of_stone/boss_sjonnir.cpp', + 'AI/ScriptDevAI/scripts/northrend/ulduar/halls_of_lightning/instance_halls_of_lightning.cpp', + 'AI/ScriptDevAI/scripts/northrend/ulduar/halls_of_lightning/boss_loken.cpp', + 'AI/ScriptDevAI/scripts/northrend/ulduar/halls_of_lightning/boss_bjarngrim.cpp', + 'AI/ScriptDevAI/scripts/northrend/ulduar/halls_of_lightning/boss_ionar.cpp', + 'AI/ScriptDevAI/scripts/northrend/ulduar/halls_of_lightning/boss_volkhan.cpp', + 'AI/ScriptDevAI/scripts/northrend/ulduar/ulduar/boss_xt_002.cpp', + 'AI/ScriptDevAI/scripts/northrend/ulduar/ulduar/assembly_of_iron.cpp', + 'AI/ScriptDevAI/scripts/northrend/ulduar/ulduar/boss_algalon.cpp', + 'AI/ScriptDevAI/scripts/northrend/ulduar/ulduar/boss_freya.cpp', + 'AI/ScriptDevAI/scripts/northrend/ulduar/ulduar/boss_razorscale.cpp', + 'AI/ScriptDevAI/scripts/northrend/ulduar/ulduar/boss_mimiron.cpp', + 'AI/ScriptDevAI/scripts/northrend/ulduar/ulduar/boss_ignis.cpp', + 'AI/ScriptDevAI/scripts/northrend/ulduar/ulduar/boss_thorim.cpp', + 'AI/ScriptDevAI/scripts/northrend/ulduar/ulduar/boss_yogg_saron.cpp', + 'AI/ScriptDevAI/scripts/northrend/ulduar/ulduar/boss_auriaya.cpp', + 'AI/ScriptDevAI/scripts/northrend/ulduar/ulduar/ulduar.cpp', + 'AI/ScriptDevAI/scripts/northrend/ulduar/ulduar/boss_kologarn.cpp', + 'AI/ScriptDevAI/scripts/northrend/ulduar/ulduar/boss_flame_leviathan.cpp', + 'AI/ScriptDevAI/scripts/northrend/ulduar/ulduar/ulduarScripts.cpp', + 'AI/ScriptDevAI/scripts/northrend/ulduar/ulduar/boss_hodir.cpp', + 'AI/ScriptDevAI/scripts/northrend/ulduar/ulduar/boss_general_vezax.cpp', + 'AI/ScriptDevAI/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/trial_of_the_crusaderScripts.cpp', + 'AI/ScriptDevAI/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/trial_of_the_crusader.cpp', + 'AI/ScriptDevAI/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_twin_valkyr.cpp', + 'AI/ScriptDevAI/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_jaraxxus.cpp', + 'AI/ScriptDevAI/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_anubarak_trial.cpp', + 'AI/ScriptDevAI/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_faction_champions.cpp', + 'AI/ScriptDevAI/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_northrend_beasts.cpp', + 'AI/ScriptDevAI/scripts/northrend/crusaders_coliseum/trial_of_the_champion/boss_black_knight.cpp', + 'AI/ScriptDevAI/scripts/northrend/crusaders_coliseum/trial_of_the_champion/boss_grand_champions.cpp', + 'AI/ScriptDevAI/scripts/northrend/crusaders_coliseum/trial_of_the_champion/instance_trial_of_the_champion.cpp', + 'AI/ScriptDevAI/scripts/northrend/crusaders_coliseum/trial_of_the_champion/trial_of_the_champion.cpp', + 'AI/ScriptDevAI/scripts/northrend/crusaders_coliseum/trial_of_the_champion/boss_argent_challenge.cpp', + 'AI/ScriptDevAI/scripts/northrend/obsidian_sanctum/boss_sartharion.cpp', + 'AI/ScriptDevAI/scripts/northrend/obsidian_sanctum/obsidian_sanctum.cpp', + 'AI/ScriptDevAI/scripts/northrend/sholazar_basin.cpp', + 'AI/ScriptDevAI/scripts/northrend/dragonblight.cpp', + 'AI/ScriptDevAI/scripts/northrend/ruby_sanctum/boss_baltharus.cpp', + 'AI/ScriptDevAI/scripts/northrend/ruby_sanctum/boss_halion.cpp', + 'AI/ScriptDevAI/scripts/northrend/ruby_sanctum/boss_zarithrian.cpp', + 'AI/ScriptDevAI/scripts/northrend/ruby_sanctum/ruby_sanctumScripts.cpp', + 'AI/ScriptDevAI/scripts/northrend/ruby_sanctum/boss_saviana.cpp', + 'AI/ScriptDevAI/scripts/northrend/ruby_sanctum/ruby_sanctum.cpp', + 'AI/ScriptDevAI/scripts/northrend/howling_fjord.cpp', + 'AI/ScriptDevAI/scripts/northrend/utgarde_keep/utgarde_pinnacle/utgarde_pinnacle.cpp', + 'AI/ScriptDevAI/scripts/northrend/utgarde_keep/utgarde_pinnacle/boss_gortok.cpp', + 'AI/ScriptDevAI/scripts/northrend/utgarde_keep/utgarde_pinnacle/boss_ymiron.cpp', + 'AI/ScriptDevAI/scripts/northrend/utgarde_keep/utgarde_pinnacle/boss_svala.cpp', + 'AI/ScriptDevAI/scripts/northrend/utgarde_keep/utgarde_pinnacle/boss_skadi.cpp', + 'AI/ScriptDevAI/scripts/northrend/utgarde_keep/utgarde_keep/boss_keleseth.cpp', + 'AI/ScriptDevAI/scripts/northrend/utgarde_keep/utgarde_keep/utgarde_keep.cpp', + 'AI/ScriptDevAI/scripts/northrend/utgarde_keep/utgarde_keep/utgarde_keepScripts.cpp', + 'AI/ScriptDevAI/scripts/northrend/utgarde_keep/utgarde_keep/boss_ingvar.cpp', + 'AI/ScriptDevAI/scripts/northrend/storm_peaks.cpp', + 'AI/ScriptDevAI/scripts/northrend/gundrak/boss_eck.cpp', + 'AI/ScriptDevAI/scripts/northrend/gundrak/boss_galdarah.cpp', + 'AI/ScriptDevAI/scripts/northrend/gundrak/boss_colossus.cpp', + 'AI/ScriptDevAI/scripts/northrend/gundrak/boss_moorabi.cpp', + 'AI/ScriptDevAI/scripts/northrend/gundrak/gundrak.cpp', + 'AI/ScriptDevAI/scripts/northrend/gundrak/boss_sladran.cpp', + 'AI/ScriptDevAI/scripts/northrend/icecrown.cpp', + 'AI/ScriptDevAI/scripts/northrend/draktharon_keep/boss_trollgore.cpp', + 'AI/ScriptDevAI/scripts/northrend/draktharon_keep/boss_tharonja.cpp', + 'AI/ScriptDevAI/scripts/northrend/draktharon_keep/instance_draktharon_keep.cpp', + 'AI/ScriptDevAI/scripts/northrend/draktharon_keep/boss_novos.cpp', + 'AI/ScriptDevAI/scripts/northrend/vault_of_archavon/boss_archavon.cpp', + 'AI/ScriptDevAI/scripts/northrend/vault_of_archavon/boss_toravon.cpp', + 'AI/ScriptDevAI/scripts/northrend/vault_of_archavon/boss_koralon.cpp', + 'AI/ScriptDevAI/scripts/northrend/vault_of_archavon/boss_emalon.cpp', + 'AI/ScriptDevAI/scripts/northrend/vault_of_archavon/instance_vault_of_archavon.cpp', + 'AI/ScriptDevAI/scripts/northrend/azjol-nerub/azjol-nerub/boss_hadronox.cpp', + 'AI/ScriptDevAI/scripts/northrend/azjol-nerub/azjol-nerub/boss_krikthir.cpp', + 'AI/ScriptDevAI/scripts/northrend/azjol-nerub/azjol-nerub/azjol-nerub.cpp', + 'AI/ScriptDevAI/scripts/northrend/azjol-nerub/azjol-nerub/boss_anubarak.cpp', + 'AI/ScriptDevAI/scripts/northrend/azjol-nerub/ahnkahet/boss_nadox.cpp', + 'AI/ScriptDevAI/scripts/northrend/azjol-nerub/ahnkahet/boss_amanitar.cpp', + 'AI/ScriptDevAI/scripts/northrend/azjol-nerub/ahnkahet/ahnkahet.cpp', + 'AI/ScriptDevAI/scripts/northrend/azjol-nerub/ahnkahet/boss_volazj.cpp', + 'AI/ScriptDevAI/scripts/northrend/azjol-nerub/ahnkahet/boss_jedoga.cpp', + 'AI/ScriptDevAI/scripts/northrend/azjol-nerub/ahnkahet/boss_taldaram.cpp', + 'AI/ScriptDevAI/scripts/northrend/borean_tundra.cpp', + 'AI/ScriptDevAI/scripts/northrend/violet_hold/boss_ichoron.cpp', + 'AI/ScriptDevAI/scripts/northrend/violet_hold/violet_holdScripts.cpp', + 'AI/ScriptDevAI/scripts/northrend/violet_hold/boss_xevozz.cpp', + 'AI/ScriptDevAI/scripts/northrend/violet_hold/violet_hold.cpp', + 'AI/ScriptDevAI/scripts/northrend/zuldrak.cpp', + 'AI/ScriptDevAI/scripts/examples/example_escort.cpp', + 'AI/ScriptDevAI/scripts/examples/example_creature.cpp', + 'AI/ScriptDevAI/scripts/examples/example_misc.cpp', + 'AI/ScriptDevAI/scripts/examples/example_gossip_codebox.cpp', +] + +playerbot_sources = [ + 'PlayerBot/Base/PlayerbotClassAI.cpp', + 'PlayerBot/Base/PlayerbotMgr.cpp', + 'PlayerBot/Base/PlayerbotAI.cpp', + 'PlayerBot/AI/PlayerbotDruidAI.cpp', + 'PlayerBot/AI/PlayerbotWarlockAI.cpp', + 'PlayerBot/AI/PlayerbotDeathKnightAI.cpp', + 'PlayerBot/AI/PlayerbotMageAI.cpp', + 'PlayerBot/AI/PlayerbotPriestAI.cpp', + 'PlayerBot/AI/PlayerbotWarriorAI.cpp', + 'PlayerBot/AI/PlayerbotHunterAI.cpp', + 'PlayerBot/AI/PlayerbotRogueAI.cpp', + 'PlayerBot/AI/PlayerbotShamanAI.cpp', + 'PlayerBot/AI/PlayerbotPaladinAI.cpp', +] + +game_inc_dirs = ['.', 'Vmap', 'AuctionHouseBot', 'BattleGround', 'OutdoorPvP', 'PlayerBot'] + +if utfcpp_dep.found() == false + game_inc_dirs = [game_inc_dirs, '../../dep/include/utf8cpp'] +endif + +if build_machine.system() == 'windows' + game_inc_dirs = game_inc_dirs + ['../../dep/lib/include', '../../dep/lib/include/mysql'] +endif + +game_inc = include_directories(game_inc_dirs) + +if get_option('BUILD_SCRIPTDEV') + game_sources = [game_sources, scriptdev_sources] +endif + +if get_option('BUILD_PLAYERBOT') + game_sources = [game_sources, playerbot_sources] + install_data('PlayerBot/playerbot.conf.dist.in', rename: 'playerbot.conf.dist', install_dir: 'etc') +endif + +if not get_option('USE_ANTICHEAT') + game_sources = [game_sources, './Anticheat/Anticheat.cpp'] +else + install_data('Anticheat/module/anticheat.conf.dist.in', rename: 'anticheat.conf.dist', install_dir: 'etc') + install_subdir('Anticheat/module/warden_modules', install_dir : 'bin') # mydir subtree -> include/mydir +endif + +if get_option('BUILD_AHBOT') + install_data('AuctionHouseBot/ahbot.conf.dist.in', rename: 'ahbot.conf.dist', install_dir: 'etc') +endif + +if not get_option('PCH') + pch_files = [] +else + pch_files = ['../game/pchdef.h'] +endif + +game_args = ['-DDT_POLYREF64', '-D__ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES=0'] + +if get_option('BUILD_GAME_SERVER') +gamelib = static_library('game', + game_sources, + include_directories: [game_inc, global_includes], + dependencies: [zlib_dep, boost_dep, dblib_dep, utfcpp_dep], + link_with: [frameworklib, sharedlib, g3dlib, detourlib], + cpp_args: game_args, + cpp_pch: pch_files, + install : false +) +endif diff --git a/src/mangosd/meson.build b/src/mangosd/meson.build new file mode 100644 index 00000000000..a7011253338 --- /dev/null +++ b/src/mangosd/meson.build @@ -0,0 +1,34 @@ +mangosd_sources = [ + 'Master.cpp', + 'MaNGOSsoap.cpp', + 'soapC.cpp', + 'WorldRunnable.cpp', + 'Main.cpp', + 'CliRunnable.cpp', + 'RASocket.cpp', + 'soapServer.cpp' +] + +mangosd_inc_dirs = [] + +if utfcpp_dep.found() == false + mangosd_inc_dirs = [mangosd_inc_dirs, '../../dep/include/utf8cpp'] +endif + +if build_machine.system() == 'windows' + mangosd_inc_dirs = [mangosd_inc_dirs, '../../dep/lib/include', '../../dep/lib/include/mysql'] +endif + +mangosd_inc = include_directories(mangosd_inc_dirs) + +if get_option('BUILD_GAME_SERVER') + executable('mangosd', + mangosd_sources, + link_with: [sharedlib, gamelib, gsoaplib], + include_directories: [mangosd_inc, global_includes], + dependencies: [boost_dep, dblib_dep, zlib_dep, openssl_dep, utfcpp_dep], + link_args: _linker_args, + install: true + ) + install_data('mangosd.conf.dist.in', rename: 'mangosd.conf.dist', install_dir: 'etc') +endif \ No newline at end of file diff --git a/src/meson.build b/src/meson.build new file mode 100644 index 00000000000..1ca4f20955f --- /dev/null +++ b/src/meson.build @@ -0,0 +1,5 @@ +subdir('framework') +subdir('shared') +subdir('game') +subdir('mangosd') +subdir('realmd') \ No newline at end of file diff --git a/src/realmd/meson.build b/src/realmd/meson.build new file mode 100644 index 00000000000..6e776c30697 --- /dev/null +++ b/src/realmd/meson.build @@ -0,0 +1,29 @@ +realmd_sources = [ + 'AuthSocket.cpp', + 'Main.cpp', + 'RealmList.cpp' +] + +realmd_inc_dirs = [] + +if utfcpp_dep.found() == false + realmd_inc_dirs = [realmd_inc_dirs, '../../dep/include/utf8cpp'] +endif + +if build_machine.system() == 'windows' + realmd_inc_dirs = realmd_inc_dirs + ['../../dep/lib/include', '../../dep/lib/include/mysql'] +endif + +realmd_inc = include_directories(realmd_inc_dirs) + +if get_option('BUILD_LOGIN_SERVER') +executable('realmd', + realmd_sources, + link_with: [sharedlib], + include_directories: [realmd_inc, global_includes], + dependencies: [boost_dep, dblib_dep, zlib_dep, openssl_dep, utfcpp_dep], + link_args: _linker_args, + install: true +) +install_data('realmd.conf.dist.in', rename: 'realmd.conf.dist', install_dir: 'etc') +endif \ No newline at end of file diff --git a/src/shared/meson.build b/src/shared/meson.build new file mode 100644 index 00000000000..3d4b13f23ef --- /dev/null +++ b/src/shared/meson.build @@ -0,0 +1,88 @@ +shared_sources = [ + 'Metric/Measurement.cpp', + 'Metric/Metric.cpp', + 'Util/Util.cpp', + 'Multithreading/Messager.cpp', + 'Log/Log.cpp', + 'Util/ProgressBar.cpp', + 'Multithreading/Threading.cpp', + 'Util/ByteBuffer.cpp', + 'Database/SqlPreparedStatement.cpp', + 'Database/SqlDelayThread.cpp', + 'Database/Field.cpp', + 'Database/Database.cpp', + 'Database/SqlOperations.cpp', + 'Database/QueryResultPostgre.cpp', + 'Database/QueryResultSqlite.cpp', + 'Database/DBCFileLoader.cpp', + 'Database/DatabasePostgre.cpp', + 'Database/DatabaseSqlite.cpp', + 'Database/SQLStorage.cpp', + 'Database/QueryResultMysql.cpp', + 'Database/DatabaseMysql.cpp', + 'Auth/SRP6.cpp', + 'Auth/SARC4.cpp', + 'Auth/base32.cpp', + 'Auth/HMACSHA1.cpp', + 'Auth/BigNumber.cpp', + 'Common.cpp', + 'Config/Config.cpp' +] + +shared_linux = [ + 'Platform/PosixDaemon.cpp' +] + +shared_windows = [ + 'Platform/WheatyExceptionReport.cpp', + 'Platform/ServiceWin32.cpp' +] + +shared_inc_dirs = ['Database'] + +if utfcpp_dep.found() == false + shared_inc_dirs = [shared_inc_dirs, '../../dep/include/utf8cpp'] +endif + +if build_machine.system() == 'windows' + shared_sources = shared_sources + shared_windows + shared_inc_dirs = shared_inc_dirs + ['../../dep/lib/include', '../../dep/lib/include/mysql'] +else + shared_sources = shared_sources + shared_linux +endif + +shared_inc = include_directories(shared_inc_dirs) + +revision_target = vcs_tag( + command : ['git', 'rev-parse', 'HEAD'], + fallback : 'Devel', + input : 'meson_revision.h.in', + output : 'meson_revision.h.temp', + replace_string : '@REVISION_ID@' +) + +actual_rev = vcs_tag( + command: ['git', 'show', '--quiet', '--date=iso-strict', '--format="%ad"', 'HEAD'], + fallback: '"0000-00-00T00:00:00+00:00"', + input: revision_target, + output: 'revision.h', + replace_string: '@REVISION_DATE@' +) + +if not get_option('PCH') + pch_files = [] +else + pch_files = ['../shared/pchdef.h'] +endif + +if get_option('BUILD_GAME_SERVER') or get_option('BUILD_LOGIN_SERVER') or get_option('BUILD_EXTRACTORS') +sharedlib = static_library('shared', + [actual_rev, shared_sources], + include_directories: [global_includes, shared_inc], + implicit_include_directories: true, + dependencies: [zlib_dep, boost_dep, dblib_dep, openssl_dep, utfcpp_dep], + cpp_pch: pch_files, + link_with: [frameworklib], + install : false +) +endif diff --git a/src/shared/meson_revision.h.in b/src/shared/meson_revision.h.in new file mode 100644 index 00000000000..3ed189ee9d3 --- /dev/null +++ b/src/shared/meson_revision.h.in @@ -0,0 +1,6 @@ +#ifndef __REVISION_H__ +#define __REVISION_H__ + #define REVISION_ID "@REVISION_ID@" + #define REVISION_DATE @REVISION_DATE@ + #define VERSION "0.18" +#endif // __REVISION_H__ diff --git a/subprojects/openssl.wrap b/subprojects/openssl.wrap new file mode 100644 index 00000000000..873d55106e9 --- /dev/null +++ b/subprojects/openssl.wrap @@ -0,0 +1,15 @@ +[wrap-file] +directory = openssl-3.0.8 +source_url = https://www.openssl.org/source/openssl-3.0.8.tar.gz +source_filename = openssl-3.0.8.tar.gz +source_hash = 6c13d2bf38fdf31eac3ce2a347073673f5d63263398f1f69d0df4a41253e4b3e +patch_filename = openssl_3.0.8-3_patch.zip +patch_url = https://wrapdb.mesonbuild.com/v2/openssl_3.0.8-3/get_patch +patch_hash = 300da189e106942347d61a4a4295aa2edbcf06184f8d13b4cee0bed9fb936963 +source_fallback_url = https://github.com/mesonbuild/wrapdb/releases/download/openssl_3.0.8-3/openssl-3.0.8.tar.gz +wrapdb_version = 3.0.8-3 + +[provide] +libcrypto = libcrypto_dep +libssl = libssl_dep +openssl = openssl_dep diff --git a/subprojects/sqlite3.wrap b/subprojects/sqlite3.wrap new file mode 100644 index 00000000000..bacc6f5a552 --- /dev/null +++ b/subprojects/sqlite3.wrap @@ -0,0 +1,13 @@ +[wrap-file] +directory = sqlite-amalgamation-3450100 +source_url = https://www.sqlite.org/2024/sqlite-amalgamation-3450100.zip +source_filename = sqlite-amalgamation-3450100.zip +source_hash = 5592243caf28b2cdef41e6ab58d25d653dfc53deded8450eb66072c929f030c4 +patch_filename = sqlite3_3.45.1-1_patch.zip +patch_url = https://wrapdb.mesonbuild.com/v2/sqlite3_3.45.1-1/get_patch +patch_hash = fc2d083fed0de64991c9754a25c7532ef1fd581f7751778b5484f099bec5d6dd +source_fallback_url = https://github.com/mesonbuild/wrapdb/releases/download/sqlite3_3.45.1-1/sqlite-amalgamation-3450100.zip +wrapdb_version = 3.45.1-1 + +[provide] +sqlite3 = sqlite3_dep diff --git a/subprojects/utfcpp.wrap b/subprojects/utfcpp.wrap new file mode 100644 index 00000000000..3512216208d --- /dev/null +++ b/subprojects/utfcpp.wrap @@ -0,0 +1,13 @@ +[wrap-file] +directory = utfcpp-3.2.4 +source_url = https://github.com/nemtrif/utfcpp/archive/v3.2.4.tar.gz +source_filename = utfcpp-3.2.4.tar.gz +source_hash = fde21a4c519eed25f095a1cd8490167409cc70d7b5e9c38756142e588ccb7c7e +patch_filename = utfcpp_3.2.4-1_patch.zip +patch_url = https://wrapdb.mesonbuild.com/v2/utfcpp_3.2.4-1/get_patch +patch_hash = 8e233b728579a5e14784e6886767b8e467862fe80baa19e4bea1e3e7c4cf12ae +source_fallback_url = https://github.com/mesonbuild/wrapdb/releases/download/utfcpp_3.2.4-1/utfcpp-3.2.4.tar.gz +wrapdb_version = 3.2.4-1 + +[provide] +utf8cpp = utfcpp_dep diff --git a/subprojects/zlib.wrap b/subprojects/zlib.wrap new file mode 100644 index 00000000000..aa14de17740 --- /dev/null +++ b/subprojects/zlib.wrap @@ -0,0 +1,13 @@ +[wrap-file] +directory = zlib-1.3.1 +source_url = http://zlib.net/fossils/zlib-1.3.1.tar.gz +source_fallback_url = https://github.com/mesonbuild/wrapdb/releases/download/zlib_1.3.1-1/zlib-1.3.1.tar.gz +source_filename = zlib-1.3.1.tar.gz +source_hash = 9a93b2b7dfdac77ceba5a558a580e74667dd6fede4585b91eefb60f03b72df23 +patch_filename = zlib_1.3.1-1_patch.zip +patch_url = https://wrapdb.mesonbuild.com/v2/zlib_1.3.1-1/get_patch +patch_hash = e79b98eb24a75392009cec6f99ca5cdca9881ff20bfa174e8b8926d5c7a47095 +wrapdb_version = 1.3.1-1 + +[provide] +zlib = zlib_dep